Hack the Box (HTB) machines walkthrough series — Bastion

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 Bastion.

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 Bastion, is retired.

The walkthrough

Let’s start with this machine.

1. Download the VPN pack for the individual user and use the guidelines to log into the HTB VPN.

2. The Bastion machine IP is 10.10.10.134.

3. We will adopt the same methodology of performing penetration testing as we’ve used previously. Let’s start with enumeration in order to learn as much information about the machine as possible.

4. As usual, let’s start with the nmap scan to gather more information about the services running on this machine. [CLICK IMAGES TO ENLARGE]
<<nmap -sC -sV -oA Bastion 10.10.10.134>>

5. As we can see, ports 22, 135, 139 and 445 are opened. Let’s start the enumeration with smb.
<<smbclient -I 10.10.10.134 -L Bastion>>

6. We can see that the shares are listed. Upon their individual enumeration, we can see that we have WindowsImageBackup.
<<smbclient //10.10.10.134/Backups>>

7. Under WindowsImageBackup, some VHD files were recovered.

8. We have two options: either to download the VHD files (which is never a good idea!) or to remotely mount them in read-only mode, like below:
<<mount -t cifs //10.10.10.134/Backups/ /opt/HTB/bastion/vhd -o ro>>

9. Below we can (Read more...)

*** This is a Security Bloggers Network syndicated blog from Infosec Resources authored by Security Ninja. Read the original post at: http://feedproxy.google.com/~r/infosecResources/~3/AiaF6t8X8vE/