From nmap, there are ssh and http opened.

Local Picture

I further scan all ports, and get port 1337 opened.

Local Picture

This is the web page.

Local Picture

In the source code, there is a comment associated with port 1337.

Local Picture

This is the 1337 port.

Local Picture

I downloaded myapp, and it seems like port 1337 will echo back what we gave.

Local Picture

I use ghidra to decompile it. There is a buffer overflow.

Local Picture

And there is a function test.

Local Picture

I create a python script to get the shell with ROP chain.

Local Picture

Local Picture

Execute it, and I get the shell as user. There is a .kdbx file and 6 images. They may be the keyfile of the KeePass file.

Local Picture

I create all the potential hashes.

Local Picture

One of them is cracked by hashcat.

Local Picture

Open the KeePass database, I get the root password.

Local Picture

I get permission denied to ssh as root. It may be the restriction from sshd_config. So I ssh as user, and switch to root successfully.

Local Picture