Writeup by wook413

Recon

Nmap

I began with a comprehensive TCP scan of all 65,535 ports. The results indicated that only port 80 is open.

As a follow up, I performed a targeted service scan and a UDP scan of the top 10 ports to ensure no overlooked services were running.

Initial Access

HTTP 80

Whenever I encounter an HTTP service, I run the http-enum Nmap script as part of my standard enumeration process. The script identified several interesting directories including /uploads

Upon browsing the website on port 80, I discovered a file upload functionality. In CTF scenarios, these are often vulnerable.

image-20260129105427656

image-20260129105435408

After testing with a random image, I found that the server only accepts .odt (OpenDocument Text) files.

image-20260129105441998

I opened LibreOffice and created a macro containing a reverse shell payload. The macro was designed to trigger as soon as the file is opened by the server.

image-20260129105455297

I uploaded the .odt file and this time it was accepted by the server.

image-20260129105504677

After uploading wook_payload.odt , I navigated to the /uploads/ directory and confirmed the file was present.

image-20260129105510851

Shell as thecybergeek

Shortly after, the macro was triggered. The server retrieved the binary and I successfully obtained a reverse shell as the user thecybergeek .

image-20260129105518733

I was logged in as thecybergeek user.

Found local.txt

Privilege Escalation

To enumerate potential privilege escalation vectors, I ran Invoke-PrivescCheck .

The report indicated that the current user has write permissions in the C:\\xampp\\apache\\bin directory.

image-20260129105529281

I further confirmed that I had write access to the webroot directory, C:\\xampp\\htdocs . This meant I could host a malicious PHP payload locally and trigger it externally.

I transferred Ivan-Sincek.php to the webroot directory.

image-20260129105539218

After triggering the script via the browser, I gained a new shell, this time as the apache user.

image-20260129105545271

Checking the privileges of the apache user revealed that SeImpersonatePrivilege was enabled. This is a well-known vector for privilege escalation on Windows.

I transferred gp.exe to the target machine.

I executed a command through gp.exe to trigger another reverse shell using nc.exe with System privileges.

Shell as system

The exploit was successful, granting me a shell as NT AUTHORITY\\SYSTEM .

Found proof.txt