Writeup by wook413

Enumeration

Nmap

Following my standard Nmap methodology, I conducted three distinct Nmap scans. First, I performed a full comprehensive TCP port scan to identify all active services. This was followed by a targeted service and script scan on the discovered ports to gather more details. Finally, I ran a UDP scan to ensure no common UDP-based services were overlooked.

Initial Access

SMB 139 445

Whenever SMB services are identified as open, I like to run smb-enum-shares , smb-enum-users and vuln Nmap scripts before I start any manual enumeration. I didn’t find anything useful this time.

SMB appears to block Null Authentication.

HTTP 3128

Nmap identified an interesting service on port 3128 as Squid http proxy 4.14 . Upon researching Squid on HackTricks, I found that it could be used as a proxy pivot point to enumerate internal services that are not directly accessible from the outside.

image-20260129194353668

I added the target’s proxy service http 192.168.108.189 3128 to my /etc/proxychains4.conf file.

image-20260129194359200

Using proxychains nmap , I performed a scan on localhost from the perspective of the target machine. This scan discovered additional internal ports, specifically port 8080.

To confirm these findings, I used spose scanner. This tool verified that ports 3306 and 8080 were indeed open and accessible via the proxy.

To interact with the web service on port 8080, I configured FoxyProxy in my browser to use the Squid proxy as a pivot.

image-20260129194409482

Navigating to http://192.168.108.189:8080 revealed a Wampserver default page.

image-20260129194414693

I accessed the PhpMyAdmin login page and successfully logged in using the default credentials: username:root with no password.

image-20260129194420921

image-20260129194431730

Within the phpMyAdmin SQL tab, I executed the following query to create a PHP file uploader named uploader.php in the web root directory (C:/wamp/www/ ).

image-20260129194438484

Using the newly created uploader, I uploaded a malicious PHP payload (Ivan-Sincek.php ) configured to connect back to my Kali machine.

image-20260129194443953

image-20260129194448881

Shell as local service

I successfully established a reverse shell as the nt authority\\local service user.

I can’t access Administrator directory as local service user.

Privilege Escalation

I checked the current user’s privileges using whoami /priv . The output showed that SeImpersonatePrivilege was enabled. This privilege is a known vector for elevation to SYSTEM using “Potato” exploits.

I used certutil.exe binary to transfer nc.exe and gp.exe to the target’s C:\\Users\\Public directory.

I ran GodPotato to execute a reverse shell command with elevated privileges.

Shell as system

The exploit successfully triggered, granting me a shell as SYSTEM . I was then able to navigate to the Administrator’s desktop and retrieve the proof.txt flag.

Found proof.txt