Nmap Scan
Press enter or click to view image in full size

port 22 shh
port 80 http
port 111 rpcbind
Press enter or click to view image in full size

Press enter or click to view image in full size

Nikto scan result.
Press enter or click to view image in full size

Running gobuster gives /wordpress hidden directory.
Press enter or click to view image in full size

Since we have wordpress running , lets use wpscan
Press enter or click to view image in full size

didn’t gave much info.
Press enter or click to view image in full size

Then I tried enumerating the users by adding — enumerate u option
Press enter or click to view image in full size

Which reveals two users michael and steven

Then I saved this usernames into username.txt
Press enter or click to view image in full size

After running hydra to bruteforce , password is revealed.
Press enter or click to view image in full size

and we have shell as user michael
Press enter or click to view image in full size


while digging around , i came across flag 2.
Press enter or click to view image in full size

visiting /var/www/html/wordpress we can see wp-config which can have juice info.
Press enter or click to view image in full size

And jackpot, we have mysql database credentials
Press enter or click to view image in full size

Press enter or click to view image in full size

and we have username and hashed password.

Then I used hash-identifier to identify hash type.
Press enter or click to view image in full size

Running john gives us the password pink84

switch user to steven
Privilege Escalation
Press enter or click to view image in full size

running sudo -l shows that user steven can run /usr/bin/python as raven
Press enter or click to view image in full size

Looking at https://gtfobins.github.io/.
we can run command sudo python -c 'import os; os.system("/bin/sh")' to get root access.
Press enter or click to view image in full size

and we got the root access.
For any correction / query /suggestion contact on
Instagram dollarboysushil
Twitter (X) dollarboysushil
Youtube dollarboysushil