copy Copy chevron-down
Boxes: Very Easy Vaccine Personal Rating: Very Easy
After a first nmap scan, those ports seem open:
sudo nmap -sV <IP>
Copy 22(ssh, OpenSSH 8.0p1 Ubuntu 6build1)
21(ftp, vsftpd 3.0.3)
80(http, pache httpd 2.4.41) With anonymous ftp login I could obtain the file backup.zip. It was encrypted and I bruteforced the password using john:
Copy unzip -l
index.php style.css
zip2john backup.zip > backup.zip.john
john --wordlist:/home/parrot/Documents/Pentesting/rockyou.txt backup.zip.hash
john --show backup.zip.hash
backup.zip:741852963::backup.zip Checking the files inside, the PHP file contained the following:
Copy admin
md5($_POST['password']) === "2cb<SNIP>bd3" I cracked the hash, it resulted to qwerty789
I logged in with those credentials at the webpage.
On the page there was a search field. I tried several injection types, but my tests didn't yield results. But an sqlmap scan did:
With sqlmap I could directly get an os shell.
Searching for GTFObins yielded a quick result:
I executed the command with sudo to open the file with vi as root. vi can execute commands when opened, so I did just that:
With that a root shell was started.