Writeup by wook413

Enumeration

Nmap

Initial TCP scan result

Second TCP scan result

UDP scan result

Initial Access

HTTP 80

Wordpress CMS is being used on port 80

image-20260128094837172

wpscan returned some hits on vulnerable plugins/themes.

I looked up every plugin and theme but couldn’t find any known vulnerabilities associated with those. So I ran a gobuster scan and found /filemanager

I was able to login with the default credentials admin:admin .

image-20260128094856955

image-20260128094904196

Inside /filemanager/config/.htusers.php , I found credentials for two accounts: admin and dora . The passwords for these users appear to be hashed using different algorithms. I am almost certain the admin hash is MD5. Also its password should be admin because I’m currently logged in as admin haha.

image-20260128094914350

Crackstation confirmed.

image-20260128094921963

hashcat is telling me Dora’s hash algorithm is bcrypt . Let’s crack it.

Hashcat successfully cracked the hash

I thought I would be able to login to SSH using dora’s credentials but it returned Permission denied

Alternatively, I simply uploaded php-reverse-shell.php file inside /filemanager/config . Then I navigated to the path on the browser.

image-20260128094937025

The payload was triggered and it connected to my nc listener. I got the shell as www-data

I stopped the listener and reconnected using penelope . Penelope is probably my favorite program right now. It automatically stabilizes and upgrades your TTY so you don’t have to go through all of the commands trying to stabilize your shell only to have it drop after a stupid typo. You can press Ctrl + C anytime and it still won’t kill your session.

Shell as dora

/etc/passwd shows the user does exist.

Since I already had dora's password, I tried switching to that user and successfully logged in.

Found local.txt

Privilege Escalation

Dora is a member of disk group.

df -h to check disk space summary.

We can examine and modify the disk using the debugfs utility in Linux.

Got access to the contents of /etc/shadow

I found proof.txt

Even though I found both local.txt and proof.txt. I like to challenge myself further and obtain the root shell.

I downloaded both /etc/shadow and /etc/passwd to combine them first with unshadow and finally crack the hash with john but failed.

Then I simply saved the hash separately into a file roothash.txt and john cracked the hash.

Got the shell as root !