Writeup by wook413

Recon

Nmap

As per my standard methodology, I initiated the assessment with three Nmap scans: a comprehensive scan of all 65,535 TCP ports, a targeted service/version scan on identified open ports, and a fast scan of the top 10 UDP ports.

Initial Access

FTP 21

I confirmed that FTP on port 21 does not permit anonymous login.

SMB 139 445

While the Nmap’s SMB scripts yielded no useful results, I discovered that the SMB server allowed Null Authentication .

This let me identify the IPC$ and shenzi shares, the latter being a non-default share containing several files.

To streamline the inspection process, I mounted the entire shenzi share locally rather than downloading files individually.

Within the share, I found a passwords.txt file containing credentials for Wordpress CMS — a critical finding for the next stage of the attack.

HTTP 80

Although HTTP was active on port 80, the http-enum script failed to find any interesting directories.

The landing page was a standard default page that only provided access to phpinfo().

image-20260212215609138

image-20260212215615332

Initial directory brute-forcing with gobuster returned several results, but none provided a clear path forward.

Following a sudden hunch, I tried appending /shenzi, the name of the SMB share, to the target IP address. This successfully revealed a hidden WordPress installation.

image-20260212215624516

I ran a subsequent gobuster scan against the /shenzi directory and located the /admin path, which redirected to wp-login.php

Using the credentials found earlier in passwords.txt , I successfully authenticated to the WordPress dashboard.

image-20260212215631378

image-20260212215635430

Leveraging the Theme Editor in the WordPress admin panel, I found I could overwrite existing files. I replaced the content of 404.php with an Ivan-Sincek.php reverse shell payload.

image-20260212215640772

By navigating to the modified /404.php page, I triggered the payload and established a reverse shell as the user shenzi

image-20260212215647384

Shell as shenzi

When visited again /shenzi/404.php after updating the file.

Found local.txt

Privilege Escalation

To identify potential escalation vectors, I transferred PrivescCheck.ps1 to the target host and executed it.

The script flagged the AlwaysInstallElevated policy as being enabled, which allows Windows Installer (MSI) packages to run with elevated privileges.

AlwaysInstallElevated

I generated a malicious .msi reverse shell payload using msfvenom .

After transferring and executing the payload on the target, I successfully obtained a shell with SYSTEM privileges.

Shell as SYSTEM

found proof.txt