From nmap, there are several services opened.

Local Picture

This is the web page.

Local Picture

There is nothing in the smb server.

Local Picture

From gobuster, I found a directory backup containing credentials.

Local Picture

Local Picture

And there is a admin page.

Local Picture

It includes login.js, and it contains another credential.

Local Picture

Local Picture

After we login, there is something called Ook! language. I use the online decoder to decode it and get a directory name.

Local Picture

Local Picture

In this directory, there is a base64 string. I decode it and get a zip file.

Local Picture

Local Picture

There is a passphrase for this zip file. I use john to crack it, and get the password password.

Local Picture

There is a index.php, I convert it from hexdump into binary, base64 decode, and brainfuck interpret, get a string at the end.

Local Picture

Local Picture

There is another directory dev, and it indicates /playsms.

Local Picture

There is a login page. I login with admin and what I got from brainfuck.

Local Picture

Local Picture

There is a vulnerability for playsms. Use one of the module in msf, we can get a shell as www-data.

Local Picture

There is a strange binary rop with SUID bit.

Local Picture

I use ghidra to decompile it, and there is a buffer overflow vulnerability.

Local Picture

Local Picture

Determine how many bytes we need to trigger the vulnerability.

Local Picture

Local Picture

Doing checksec.

Local Picture

Try to find some useful gadgets in its libc.

Local Picture

I create a python script to make the payload, and pass it as the parameter to rop. Now, I am root.

Local Picture

Local Picture