Writeup by wook413

Enumeration

Nmap

I began the machine with scanning all 65,535 ports.

Discovered 7 open ports.

Also scanned for open UDP ports

Initial Access

Telnet 23

I tried to connect to target’s port 23 using telnet for banner grabbing.

I looked for known vulnerabilities and there was one and I first thought it was a match but it didn’t get me anywhere. I kept looking for leads.

HTTP 8091

The web service on port 8091 is asking for credentials.

image-20260128123329240

Looking back at the Nmap result, I thought RaspAP has to be the name for the service being hosted on the port.

I found the default credentials of the service.

image-20260128123337470

Apparently the service was still using the default credentials.

image-20260128123345912

I found a known vulnerability related to RaspAP but unfortunately it didn’t get me a shell.

Exploring the website, I found the built-in console under the System tab.

image-20260128123400057

I tried to connect the console to my reverse shell listener.

image-20260128123407778

I was able to get the reverse shell using penelope .

image-20260128123413662

Privilege Escalation

Under /home/walter , I found local.txt and wifi_reset.py

found local.txt

Interestingly, www-data can run a few commands with sudo privileges starting with the file I just found.

Reviewing the wifi_reset.py source code, I noticed it imports a module named wificontroller . Since this module isn’t present in the current directory, I can perform a hijacking attack by creating a malicious wificontroller.py file to gain elevated privileges.

The payload can be as simple as this:

Obtained the root shell.

Found proof.txt