π»RootMe
A ctf for beginners, can you root me?

1. Reconnaissance
1.1 Nmap
Using nmap to scan for open ports and services
we find 2 open ports,
22and80running ssh and web server respectively
2. Scanning
2.1 Gobuster
Using gobuster to brute-force directories in the web server.
We find two interesting directories
/paneland/uploads
/panel

We find a page to upload files
/uploads

We can see and access the uploaded files here
3. Gaining Access
3.1 Reverse shell
Using the php reverse shell from pentest monkey (https://raw.githubusercontent.com/pentestmonkey/php-reverse-shell/master/php-reverse-shell.php)
We find that uploading any
.phpfiles gives us an error

Changing the extension of the script from
.phpto.php5to bypass

Starting an
nclistener on our attacking machine and executing the reverse shell by going to/uploadsselecting our uploaded.php5file
Stabilizing the shell and reading
user.txtfile
4. Privilege Escalation
4.1 SUID
Searching for exploitable processes with set SUID
We find that
/usr/bin/pythonhas SUID bit set.Using the one liner from
GTFOBins, we get root
Reading
root.txt
Last updated