root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat pirate.md
// writeups

Pirate

28 Feb 2026 · 9 min read · root access
Pirate — Hack The Box machine

Executive summary — An Active Directory DC (Windows Server 2019), assumed breach with the pentest account. An 8-phase, fully modern AD chain: Pre2k accounts (MS01$/EXCH01$ with a default password) → reading a gMSA → PtH to DC01 (no admin yet) → L3 pivot with Ligolo to the internal 192.168.100.0/24 network → the direct NTLM relay to DC01 fails (the DC enforces outbound SMB signing; ADCS hardened) → we coerce WEB01 (a member, not a DC) and the relay to LDAP does work → RBCD over WEB01 → S4U → Administrator on WEB01 (user.txt) → a.white's password sits in the LSA DefaultPassword secret (autologon) → a.white force-changes a.white_adm's password (IT tiering) → a.white_adm has WriteSPN over DC01 → SPN jacking + constrained delegation + --altservice → a valid Administrator ticket on DC01 → DCSync → root.txt.

PlatformHack The Box
Operating systemWindows Server 2019 (build 17763) — Domain Controller
DifficultyHard
StatusRetired
ScenarioAssumed breach (starting pentest account)
tun0 (attacker)<ATTACKER_IP>
Target IP<TARGET_IP> (DC01.pirate.htb)

Attack map

[1] Recon -- nmap + corregir clock skew (+7h18m rompe Kerberos)
        |
[2] Enum AD (pentest) -- Pre2k: MS01$/ms01, EXCH01$/exch01 -> gMSADumper -> NT de 2 gMSA
        |
[3] PtH -- evil-winrm gMSA_ADFS_prod$ (DC01, sin admin) -> Ligolo L3 -> 192.168.100.0/24 -> WEB01
        |
[4] Dead-end -- relay NTLM DC01$ -> LDAP DC01 FALLA (signing saliente + parche CVE-2019-1040)
      ADCS descartado (Web Enrollment off, SAN off)
        |
[5] Giro -- coaccionar WEB01 (miembro, sin signing forzado) -> relay LDAP OK ->
      --delegate-access crea TJOWNYDF$ + RBCD sobre WEB01$
        |
[6] S4U -- getST TJOWNYDF$ -impersonate Administrator (CIFS/WEB01) -> admin WEB01 -> user.txt
      secretsdump -> LSA DefaultPassword -> a.white:E2nvAOKSz5Xz2MJu
        |
[7] Tiering -- a.white --ForceChangePassword-> a.white_adm (P0wnedADM2026!)
      a.white_adm (grupo IT) tiene WRITE_PROP sobre servicePrincipalName de DC01 (WriteSPN)
        |
[8] SPN jacking -- mover HTTP/WEB01.pirate.htb a DC01 + S4U2Proxy --altservice ldap/DC01
      -> ticket Administrator valido en DC01 -> DCSync -> root.txt

Starting credentials: pentest / p3nt3st2025!&.
Artefacts obtained along the way: MS01$/ms01, EXCH01$/exch01 (Pre-Windows 2000 machine accounts with default passwords); NTLM hashes of gMSA_ADCS_prod$ and gMSA_ADFS_prod$; TJOWNYDF$ (created by ntlmrelayx --delegate-access for RBCD over WEB01$); a.white / E2nvAOKSz5Xz2MJu (WEB01's LSA DefaultPassword secret); a.white_adm (password we reset ourselves); Administrator's NTLM: 598295e78bd72d66f837997baf715171 plus the full NTDS via DCSync.

1. Recon and fixing Kerberos

nmap -sC -sV -T4 --privileged <TARGET_IP>
53,80,88,135,139,389,445,464,593,636,2179,3268,3269,5985  (pirate.htb DC)
| clock-skew: mean: 7h18m36s
echo "<TARGET_IP> pirate.htb dc01.pirate.htb DC01.pirate.htb" | sudo tee -a /etc/hosts

The +7h18m skew breaks Kerberos (KRB_AP_ERR_SKEW). We fix it — worth noting it kept reverting because virtualbox-guest-utils was re-syncing against the host clock:

sudo systemctl disable --now virtualbox-guest-utils.service
sudo ntpdate -u <TARGET_IP>
sudo hwclock --systohc
sudo timedatectl set-timezone UTC
🔒 Clearance required

Root Access unlocks the content you can't see — everything else on the site is already open.

See Root Access plans

No account? Create one free then upgrade from your console.