Capture the flag (CTF)

Hack the Box (HTB) machines walkthrough series — Chatterbox

March 19, 2020 by Security Ninja

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

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 Chatterbox, 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 Chatterbox machine IP is
  3. We will adopt the usual methodology of performing penetration testing to begin. 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.
    <<nmap -sC -sV -oA Chatterbox>>

  5. Oh, wow, all standard nmap ports are filtered! Let’s widen the search a bit more.
    <<nmap -sT -p- -min-rate 4000 –max-retries 1>>

  6. Above, we can see that some ports are reflected now. Let’s dig in to see more about that service. It turns out that this an AChat service.
    <<nmap -sV -sC -p 9255>>

  7. Turns out we’ve got an exploit for the same in ExploitDB. We will use
  8. Looking into the code for the exploit, we have altered the payload a bit. Rather than spinning up calc.exe, we are going to spawn a reverse shell, as shown below.
  9. Inserting the above shellcode into exploit and changing the IP address to that of the target machine.
  10. Running the exploit, we got a reverse shell. We traverse the file system to get user.txt.
  11. Looking into root.txt, it is strange that we have access to the Admin directory but are not able to read/edit the root.txt file.
    <<icacls root.txt>>

  12. Looking into directory permissions for the same, we got something very interesting. So it seems that our current user owns the file.
    <<dir /q /a:>>

  13. With icacls, we grant FULL permissions to our current user on root.txt, since we own the file. And we can then read the root flag.
    <<icacls root.txt /grant Alfred:(F)>>

This was one of the most straightforward boxes on HTB. The interesting thing to know here is all about how Windows permissions work.

We will continue this series with more in the way of interesting HTB machines.

Posted: March 19, 2020
Security Ninja
View Profile