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

Monteverde

11 Jan 2020 · 17 min read · root access
Monteverde - maquina de Hack The Box

Executive summary — Monteverde is a short chain that's very representative of a poorly secured hybrid Azure/AD environment. An anonymous LDAP bind hands over the full list of domain users; a username=password spray over that list lands SABatchJobs:SABatchJobs, an account that opens a non-standard SMB share where mhope left their password in plaintext inside an azure.xml. mhope gives WinRM access and user.txt, and their membership in the Azure Admins group points straight at the real vector: the DC has Azure AD Connect installed, whose synchronization service stores its credentials reversibly encrypted in a local SQL database. Decrypting them reveals that the sync account is, directly, the domain's Administrator.

PlatformHack The Box
Operating systemWindows Server 2019 Build 17763
DifficultyMedium
StatusRetired
Target IP10.129.48.171

Attack map

[LDAP/389] anonymous bind -> full list of domain users
   |  username=password spray over that list
   v
[SMB] SABatchJobs:SABatchJobs -- non-standard "users$" share
   |  users$\mhope\azure.xml -- plaintext password (PSADPasswordCredential)
   v
[WinRM] mhope : 4n0therD4y@n0th3r$ -> user.txt
   |  mhope in "Azure Admins" + Azure AD Connect installed on the DC
   v
[ADSync DB] local decryption with mcrypt.dll -> administrator:d0m@in4dminyeah!
   |
   v
[ROOT] WinRM as administrator -> root.txt (DCSync confirms the NT hash)

1. Reconnaissance

sudo nmap -p- --min-rate 3000 -T4 -Pn -oN nmap-allports.txt 10.129.48.171
sudo nmap -p53,88,135,139,389,445,464,593,636,3268,5985,9389 -sCV -Pn -oN nmap-services.txt 10.129.48.171

A response ttl=127 already gives away a Windows stack before reading a single service. The open port set (53, 88, 389, 445, 464, 636, 3268, 9389) is the textbook fingerprint of a Domain Controller: DNS, Kerberos, LDAP/LDAPS/GC and the AD web services endpoint. There's no web port at all — the entire attack surface runs over directory protocols. The detail worth keeping is 5985/WinRM being open: once a valid credential shows up, a shell is guaranteed without needing any extra exploit.

echo "10.129.48.171 megabank.local MEGABANK.LOCAL monteverde.megabank.local MONTEVERDE" | sudo tee -a /etc/hosts

Methodology note: it's worth checking clock skew against the DC first — here it's about 7 seconds, well inside Kerberos' default 5-minute tolerance, so there's no need to sync the clock for netexec/Kerberos to work later on.

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