Skip to content
AO.GitHub
← All write-ups
FIELD NOTES / PORTFOLIO

Shakabrah

Platform: Proving Grounds · Difficulty: Easy

Reconnaissance

RustScan identified the target’s open ports.2023-10-22_08-43.png

Service identification

I used Nmap to identify the services and versions. 2023-10-22_08-44.png

Web enumeration

The web application offered a form that ran a ping against a supplied IP address. 2023-10-22_08-44_1.png

Submitting 127.0.0.1 returned four ping responses.2023-10-22_08-44_2.png

Command injection and initial access

Because the input appeared to be passed to a system command, I tested for command injection.

I appended whoami to the IP address with a shell separator. 2023-10-22_08-45.png

Test input: 127.0.0.1;whoami

2023-10-22_08-46.png

The response included whoami output as well as ping output, confirming command execution.

I prepared a callback payload and listener. 2023-10-22_08-47.png

Other callback ports did not work in my tests; port 80 did. This observation alone does not establish the target’s full firewall policy. I started a Netcat listener on port 80 and submitted the payload. 2023-10-22_08-47_1.png

The callback provided a shell. I found the user flag in dylan’s home directory.

2023-10-22_08-50.png

I then investigated local privilege escalation.

Privilege escalation

A search for root-owned SUID binaries highlighted vim.basic. 2023-10-22_10-23.png

I consulted GTFOBins for a SUID vim.basic technique. 2023-10-22_10-48.png

I launched /usr/bin/vim.basic and used its Python command interface as shown in the screenshot. The original note does not transcribe the full payload, so the screenshot is the source for that step.

2023-10-22_10-48_1.png

The resulting process had root privileges, and I retrieved the final flag.

Outcome

The ping form allowed shell command injection. A SUID-enabled vim.basic binary supplied the local escalation path.