Blurry

Enumeration
nmap -v -A -O -p- -Pn blurry.htb -oN nmapPort 80
There is a redirect to app.blurry.htb when we hit the port 80, so add the subdomain to /ect/hosts and start the enumeration:

Insert any username and login.
Previously we have seen a redirect to app.blurry.htb so we can try to enumerate different subdomains using gobuster:

There are so many functionalities, so starts viewing which projects are already created:

This project highlighted with red is composed by different automated task that runs occasionally:

From here we can extract useful information about the box and a possible user of the machine -> jippity.
Exploitation (user)
Searching online for some ClearML vulns, we will find it:
We just need to setup the python venv and install dependencies:
and then we can run the exploit:

We need to set up the ClearML client by copy&paste the API configuration from Settings of our account:



Then run the exploit and obtain the reverse shell as jippity user and the user flag:

Obtain a second cleaner reverse shell using pwncat-cs. This is necessary due to log output inside the first reverse shell:


To mantain an access and avoid to exploit the ClearML every time we can dump SSH key of jippity:


Privilege escalation (root)
There isn't any other interesting users to exploit so go further with root:

The more simple command sudo -l from SSH session or the LinPeas script are our friends:

We can run as root the bash script evaluate_model by passing as a parameter any .pth (PyTorch trained model) file present inside the /models folder.
We have write permission inside the /models directory so:

We need to install torch because it will allow us to create a model containing bash spawning process. This script defines a PyTorch model with malicious intent by overriding the __reduce__ method to execute a shell command when the model is deserialized. The __reduce__ method is a special method used by Python's pickle module to define how an object is reduced to a serialized form. By overriding this method, the script executes a malicious command during deserialization.
Run the script and upload the evil.pth to victim machine under /models.


Now run the sudo command and enjoy the root shell 🎉:

Last updated