Reconnaissance
First, I added the new host to my known ones:
Then, I performed a Nmap scan:
So I inspected the website:
After inspecting the source code, I decided to enumerate with Ffuf ๐ณ:
We can now use cURL โ๏ธ to find out which php version is being used:
Weaponization
So now we can search for โPHP 8.1.0-dev exploitsโ. I found the following Exploit in Github:
Exploitation
If we execute the script, weโll get a reverse shell :D
So now we can read user flag:
Privilege escalation
If we run:
So we can execute that binary with sudo permissions. I found this sudo vulnerability in GTFOBins:
We can now read root flag :D
Machine pwned!