Welcome to another Hack the Box exercise. In this walkthrough, I showed how I pwned the Blurry machine on Hack the Box. Hack The Box is a cybersecurity platform that helps you bridge knowledge gaps and prepares you for cyber security jobs. You can also test and grow your penetration testing skills, from gathering information to reporting. If you are new to this blog, please do not forget to like, comment and subscribe to my YouTube channel (https://www.youtube.com/@BoltechTechnologies1) and follow me on LinkedIn (https://www.linkedin.com/in/isiaq-ibrahim-468588156/) for more updates.
About the Machine
Blurry is a medium-difficulty Linux machine that features DevOps-related vectors surrounding machine learning. The foothold is comprised of a series of CVEs recently disclosed about the ClearML suite. The service provides a web platform, a fileserver, and an API; all of which contain vulnerabilities (`[CVE-2024-24590](https://nvd.nist.gov/vuln/detail/CVE-2024-24590)` - `[CVE-2024-24595](https://nvd.nist.gov/vuln/detail/CVE-2024-24595)`) that can be chained together for remote code execution. Once a shell on the target is obtained, a program that can be run with `sudo` is discovered. The program loads arbitrary `PyTorch` models to evaluate them against a protected dataset. While it is known that such models are susceptible to insecure deserialisation, `fickling` is used to scan the dataset for insecure `pickle` files , prior to loading the model. Malicious code can be injected into a model, using `runpy` to bypass the `fickling` checks.
The first step in solving this machine like I have always done in my previous writeup is to sign in into my Hack the Box account. I logged into my Hack the Box account inside the Firefox browser on my Kali Linux, then I downloaded the .ovpn file and renamed it to blurry.ovpn. Then I created a directory on my desktop called BlurryHTB and moved the blurry.ovpn file into it.
Next, I opened the terminal in the folder and ran the following command to establish a connection between my Linux terminal and Hack the Box server. Once the connection was successful, I opened my Kali Linux terminal and ran the following commands to connect my terminal with Hack the Box:
After successfully connecting my Kali Linux machine to HTB server, I navigated to the “Machine” tab and clicked on Blurry. My target machine was assigned an IP address of 10.10.11.19. The next step was performing enumeration using nmap to find all open ports on the target machine, therefore I used the following command to scan for open ports:
I found port 22/tcp with ssh service running at the port and port 80/tcp with http running at the port. This clearly shows we need a reverse shell to get hold of the machine and that the machine is a web application running on port 80.
I began reconnaissance using whatweb to identify technologies running on the target:
The whatweb tool is used in penetration testing to identify technologies used by websites — including web servers, CMS, frameworks, programming languages, and more. It's often one of the first recon tools used in CTFs to fingerprint web applications.
The response revealed an Nginx server redirecting traffic to a virtual host
app.blurry.htb
, which served a web application titled ClearML. I added the host to my /etc/hosts
file and accessed it in my browser for further analysis.
Social Plugin