Toppo 1.0 CTF Walkthrough

Toppo is a beginner level CTF and getting the first shell and then root, are only needed to succeed.

Turn on the machine and use netdiscover to determine the IP of the machine.

sudo netdiscover -r


Then register this IP into your local DNS file “/etc/hosts”.

sudo nano /etc/hosts


Now run a full port Nmap scan to find open ports.


A web server is running on port 80.


There’s is nothing in the source code. Running a dirb scan may help

dirb http://toppo.local


Dirb has found a directory “/admin/” which contains “notes.txt”.


We’ve found some credentials. Now, try to SSH with username “ted” and password “12345ted123”.


We’ve got our lower shell, we have to strive more for ROOT. I’ve got something there, this link contains a lot of Linux Privilege Escalation Vectors that you can use for post-exploitation. Now run

find / -perm -u=s -type f 2>/dev/null


Above is the list of installed programs that are owned by root but can be executed by other users. We can exploit “Python” and “mawk” to escalate our privileges to ROOT. To abuse “mawk”, type

mawk 'BEGIN {system("/bin/sh")}'
And finally, the ROOT flag. Now, try abusing Python to get root by yourself.  Happy ROOTING 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *