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

DarkZero

4 Oct 2025 · 14 min read · root access
DarkZero - maquina de Hack The Box

Executive summary — DarkZero is a Hard Active Directory box with two domains connected by a trust relationship, in a multihomed, split-horizon-DNS setup. In assume-breach mode (john.w) we attack MSSQL on DC01: although john.w has no privileges for xp_cmdshell there, a misconfigured linked server runs our queries on DC02 (external domain darkzero.ext) as the more privileged dc01_sql_svc account. With RCE on DC02 we pivot with Ligolo-ng into the internal network, set up a stable Meterpreter shell, escalate to SYSTEM via CVE-2024-30088, and — as SYSTEM — capture DC01's machine-account TGT mid-flight by coercing its authentication against DC02 (Rubeus + xp_dirtree). That ticket enables a DCSync against the real domain and Pass-the-Hash as Administrator.

PlatformHack The Box
Operating systemWindows
DifficultyHard
StatusRetired
Target IP10.129.16.247
VectorMSSQL linked server → internal pivot → Kerberos ticket theft

Attack map

[1] Recon -- 1433 MSSQL + DC ports; DNS reveals an internal interface 172.16.20.1 (multihomed)
        |
[2] MSSQL (john.w) on DC01 -- enum_links -> DC02.darkzero.ext (linked server)
      xp_cmdshell denied on DC01, but use_link DC02 + enable_xp_cmdshell DOES work
      (the linked server uses dc01_sql_svc, more privileged)
        |
[3] Ligolo-ng -- agent uploaded via xp_cmdshell/certutil -> tunnel into 172.16.20.0/24
        |
[4] Stable Meterpreter (xp_cmdshell + certutil + msfvenom) -> darkzero-ext\svc_sql
        |
[5] CVE-2024-30088 (authz TOCTOU) -> NT AUTHORITY\SYSTEM on DC02  ->  user.txt
        |
[6] Rubeus monitor (as SYSTEM) + xp_dirtree \\DC02.darkzero.ext\test from DC01 ->
      captures DC01$'s (machine account) TGT mid-flight
        |
[7] ticketConverter -> KRB5CCNAME -> secretsdump -k -just-dc -> darkzero.htb NTDS
      +-> Pass-the-Hash as Administrator  ->  root.txt

1. Reconnaissance — the hidden network

nmap -p 1-65535 -T4 -A -v 10.129.16.247

Relevant ports: 1433 (MS-SQL), 88 (Kerberos), 389/636 (LDAP/LDAPS), 5985 (WinRM), 445 (SMB). Port 1433 stands out: SQL servers often carry elevated privileges and interesting configurations like linked servers.

dig @10.129.16.247 ANY darkzero.htb

The DNS answer reveals two interfaces: 10.129.16.247 (external, the one we can reach) and 172.16.20.1 (internal, hidden). This is a multihomed host: one network card per segment. We're in the front room, but there's another one behind it.

echo "10.129.16.247 DC01.darkzero.htb darkzero.htb" | sudo tee -a /etc/hosts
crackmapexec smb 10.129.16.247 -u 'john.w' -p 'RFulUtONCOL!' -d darkzero.htb

Authentication succeeds, but only default shares are visible — need to dig deeper.

🔒 Clearance required

This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.

See Root Access plans

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