Hack the Box (HTB) machines walkthrough series — Remote
Today, we will be continuing with our exploration of Hack the Box (HTB) machines, as seen in previous articles. This walkthrough is of an HTB machine named Remote.
HTB is an excellent platform that hosts machines belonging to multiple OSes. It also has some other challenges as well. Individuals have to solve the puzzle (simple enumeration plus pentest) in order to log into the platform and download the VPN pack to connect to the machines hosted on the HTB platform.
Note: Only write-ups of retired HTB machines are allowed. The machine in this article, named Remote, is retired.
Let’s start with this machine.
- Download the VPN pack for the individual user and use the guidelines to log into the HTB VPN.
- The “Remote” machine IP is 10.10.10.180.
- We will adopt our usual methodology of performing penetration testing. Let’s start with enumeration in order to gain as much information about the machine as possible.
- As usual, let’s start with the Nmap scan to learn more about the services running on this machine. [CLICK IMAGES TO ENLARGE]
<<nmap -sC -sV -oA Remote 10.10.10.180>>
- As we have multiple ports opened, let’s start enumeration with port 80. Below, we can see the home page.
- Enumerating more: under the Contact Us page, there is a further link to a login page.
- Looking into the login page, we can see that it is using “embraco” as a portal engine.
- Looking into exploits, we have some hits, but all of them require auth exploits.
- Let’s park the enumeration for now and move to the next set of ports.
- We can show that mount is available, so using showmount, we can see that a path is available.
- Mount it to the attacking box as shown below and then enumerate the folder.
- Under App_Data, we have embraco.sdf. Running strings on it for strings such as “admin” reveals a hash.
- We can break the hash via online cracking tools and reveal that the hashed phrase is “baeconandcheese”.
- So now that we have the username and password, we can hook the creds in the exploit.
- Running the exploit as shown below with the required parameters
- And we got the shell back. We now enumerate to grab the user.txt file.
- For further escalation, let’s upload PowerUp to the box and run Invoke-AllChecks:
- Running the checks, we can see that we can exploit the service UsoSvc, as it has weak permissions.
- Uploading nc64.exe to the box, as shown below
- Using the PowerUp Invoke-ServiceAbuse function, we can abuse the service to span a shell as soon as it is restarted. As shown below, the service is abused and the reverse shell with system privileges is gained.
And we’re done! This was a very straightforward box, with initial enumeration depending on information gathered from multiple ports. Escalation is straightforward.
We will continue this series with more examples of interesting HTB machines.