Platform: Proving Grounds · Difficulty: Easy
Reconnaissance
RustScan identified ports 22 and 80 as open.

Service enumeration
I ran an Nmap scan with aggressive detection to identify services, versions, and operating system indicators.

The scan identified Apache on port 80 and SSH on port 22.
The web server displayed the default Apache page.

Directory discovery identified a /secret path containing evil.php.

The page did not show useful content, so I used Burp Suite Intruder to test parameter names and values with a cluster-bomb configuration.

A response-length difference identified a candidate parameter. Reading a local file through it confirmed local file inclusion (LFI).

The parameter returned the contents of /etc/passwd.

Initial access
SSH log poisoning and password guessing did not produce access. The LFI path did allow me to retrieve mowree’s private SSH key.

The key was passphrase protected. I converted it to John the Ripper’s format with ssh2john.

John the Ripper recovered the key passphrase.

I authenticated to SSH as mowree with the recovered key and passphrase.

Once inside, I found the first flag in the user’s directory.
Privilege escalation
LinPEAS highlighted that /etc/passwd was writable by the current user, a configuration that permitted alteration of local account records.
I generated a password hash with openssl and added an account entry with UID 0 to /etc/passwd.

Switching to the new UID 0 account succeeded, allowing retrieval of the root flag.
Outcome
LFI exposed an SSH private key; a writable /etc/passwd file provided the route from user access to root.