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

Intelligence

3 Jul 2021 · 13 min read · root access
Intelligence - maquina de Hack The Box

Executive summary — Intelligence is a Medium Active Directory box where the initial vector lives in public PDF metadata: the Creator field of dozens of predictably-named documents reveals the domain's username format, and one of them documents a default password. With password spraying we get the first account (user flag). A share leaks a script that HTTP-queries web* DNS records every 5 minutes: creating a malicious one and capturing with Responder yields a second user's NTLMv2 hash. That account can read a gMSA's password with constrained delegation, which we use to forge an S4U2Self/S4U2Proxy ticket impersonating Administrator.

PlatformHack The Box
Operating systemWindows — Domain Controller
Domainintelligence.htb
DifficultyMedium
StatusRetired
Target IP10.129.95.154
tun0 (attacker)<ATTACKER_IP>

Attack map

[1] Recon -- full Windows DC (53,80,88,135,139,389,445,464,593,636,5985,9389)
        |
[2] Web: /documents/ -- 403 (no listing) but PDFs with a date pattern YYYY-MM-DD-upload.pdf
      brute forcing 2020 dates -> dozens of PDFs downloaded
        |
[3] exiftool (Creator field) -- reveals domain users (FirstName.LastName)
      pdftotext + grep -- "New Account Guide" document with a default password
        |
[4] Password spraying (netexec) -- Tiffany.Molina:NewIntelligenceCorpUser9876
      +-> Users share accessible  ->  user.txt
        |
[5] IT share -- downdetector.ps1: queries web* DNS records every 5min and HTTP GETs them
      (notifies Ted.Graves@intelligence.htb)
        |
[6] dnstool.py (krbrelayx) -- create a webYuba record -> attacker IP ->
      Responder captures Ted.Graves' NTLMv2 -> cracked with John -> Mr.Teddy
        |
[7] As Ted.Graves: no useful WinRM access, but he can read a gMSA's password
        |
[8] gMSADumper -- NTLM hash (and AES keys) of the gMSA svc_int$
      svc_int$ has constrained delegation over WWW/dc.intelligence.htb
        |
[9] impacket-getST -- S4U2Self+S4U2Proxy impersonating Administrator ->
      impacket-psexec (Kerberos)  ->  root.txt

1. Initial reconnaissance

nmap -sCV -Pn 10.129.95.154
53/tcp    DNS       80/tcp    HTTP      88/tcp   Kerberos   135/tcp  RPC
139/tcp   NetBIOS   389/tcp   LDAP      445/tcp  SMB        464/tcp  Kerberos pwd change
593/tcp   RPC over HTTP   636/tcp LDAPS   5985/tcp WinRM   9389/tcp AD Web Services

Typical Windows Domain Controller services (Kerberos, LDAP/LDAPS, SMB, WinRM, AD Web Services), plus an 80/tcp that tells us a web app is running on the DC itself.

netexec smb 10.129.95.154 -u guest -p ''
smbclient -L //10.129.95.154 -N

No useful guest access — on to the web.

🔒 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.