Hack the Box (HTB) machines walkthrough series — Shocker

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

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 Shocker, 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 Shocker machine IP is

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

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

5. We got two ports, 80 and 2222, where 2222 was for SSH.

6. We enumerate port 80 and find just this picture. Since we’re completely stuck, let’s enumerate the directories.

7. The initial few dictionaries result in only index.html, which was bit surprising. While using dirb, we got a hit on cgi-bin as well, which was restricted. OK, this is encouraging.

8. Let’s use this again with gobuster with the possible extensions .php, .sh and .html.
<<gobuster -u -w /usr/share/wordlists/dirb/common.txt -t 30 -x .php,.sh,.html>>

9. (Read more...)

*** This is a Security Bloggers Network syndicated blog from Infosec Resources authored by Security Ninja. Read the original post at: