Toppo - VulnHub CTF Challenge Walkthrough

twr(57)
Published in
#ctflhn
Words
227
Reading
2 min
Listen
Play
8y


Toppo is beginner level CTF and is available at VulnHub. Getting the first shell and then root, both are very easy.

Throughout the walkthrough, I'll be using Parrot Security OS.

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

sudo netdiscover -r 192.168.8.1/24
alt
 

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

sudo nano /etc/hosts
alt

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

alt

A web server is running on port 80.

alt

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

dirb http://toppo.local
alt

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

alt

We've found some credentials. Now, try to SSH with username "ted" and password "12345ted123".

alt

We've got our lower shell, we have to strive more for ROOT. I've got something there https://chryzsh.gitbooks.io/pentestbook/privilege_escalation_-_linux.html, 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
alt

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")}'
alt
And finally, the ROOT flag. Now, try abusing Python to get root by yourself. Happy ROOTING :)


Posted from my blog with SteemPress : https://latesthackingnews.com/2018/08/24/toppo-vulnhub-ctf-challenge-walkthrough/
Toppo - VulnHub CTF Challenge Walkthrough | Ecency