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

Blogger

Platform: Proving Grounds Level: Easy

Reconnaissance

I used RustScan to identify open ports.

Rustscan result

The scan found ports 22 and 80 open. I used service detection to verify the services rather than relying on their conventional port assignments.

Service enumeration

I scanned the open ports with Nmap to identify the services and versions.

Nmap result

The results identified SSH and HTTP. The service information suggested a Linux host.

Web enumeration

I checked the HTTP response with curl and opened the site in a browser. The landing page displayed a portfolio:

Portfolio webpage

Directory discovery found /assets, /images, /css, and /js. Following the directory structure to /fonts/blog produced a redirect with a different hostname:

Hostname change

The redirected site appeared to use WordPress. I added the hostname to the local hosts file to resolve it to the target:

Hosts file change

Wappalyzer identified an older WordPress version:

Wappalyzer result

WordPress enumeration

I used WPScan with aggressive plugin detection to identify installed components.

The results flagged a plugin with a reported vulnerability:

WPScan plugin detection

Initial access

Research indicated that the plugin permitted arbitrary file upload and that a public Metasploit module existed. The module did not work in this attempt:

Metasploit failure

I tested the upload path manually.

The blog comment form included an image upload field:

Comment with image upload

The application rejected a direct upload of a non-image file:

File upload error

Prepending a GIF signature to a PentestMonkey reverse-shell script allowed the payload to pass the observed upload check. The exact server-side validation mechanism was not established:

Reverse shell uploaded

I submitted the completed comment form:

Form submission

With a Netcat listener running, submitting the comment produced a reverse-shell connection:

Reverse shell received

The session ran as www-data. I located the first flag in james’s directory:

First flag found

Privilege escalation

Access to other user directories was restricted, so I enumerated local privilege boundaries.

The account list included vagrant.

Vagrant user found

Further enumeration showed a route to the vagrant account, which had passwordless sudo access to all commands:

Privilege escalation to vagrant

Using that access, I obtained a root shell and retrieved the final flag.

Outcome

The documented chain was WordPress plugin upload bypass, a www-data shell, and privilege escalation through the vagrant account.