Reconnaissance
First, I added the new host to my known ones:
Then I performed an Nmap scan:
As seen, a redirect is done to app.blurry.htb
, so I added to the hosts file. Afterwards I decided to take a look at the webpage:
Weaponization
I decided to search for โClearML cveโ on the Internet and found the following RCE: CVE-2024-24590
Exploitation
First, I logged in as gitblanc, and look up for projects. I noticed a project called Black Swan:
- I installed ClearML on terminal with:
sudo pip install clearml
- Then I ran the ClearML setup script:
clearml-init
- I generated new credentials for configuration:
- I got some errors related to subdomain
api.blurry.htb
andfiles.blurry.htb
, so I added the new domains.
Weโve got a reverse shell :D
Stabilize it with:
Weโve got user flag :D
Privilege Escalation
Iโll upload linpeas and run it:
If we run sudo -l
:
So I investigated a bit and found this script to gain root privileges by generating a malicious model pytorch-script
- I had to install torch:
sudo pip3 install torch
I executed the previous script on my machine, and uploaded โevil.pthโ to the victim machine. Then I moved it to /modules
and executed:
We are root now and got root flag!
Machine pwned