HTB: Sauna
| ターゲット // Sauna | |
|---|---|
| Platform | HTB |
| OS | Windows |
| Difficulty | Easy |
| IP | 10.129.93.188 |
Enumeration#
Nmap#
▶ Nmap output
PORT STATE SERVICE
53/tcp open domain
80/tcp open http
88/tcp open kerberos-sec
135/tcp open msrpc
139/tcp open netbios-ssn
389/tcp open ldap
445/tcp open microsoft-ds
464/tcp open kpasswd5
593/tcp open http-rpc-epmap
636/tcp open ldapssl
3268/tcp open globalcatLDAP
3269/tcp open globalcatLDAPssl
5985/tcp open wsman
9389/tcp open adws
Classic AD box – Kerberos, LDAP, SMB, WinRM all present. Domain: EGOTISTICAL-BANK.LOCAL.
LDAP Enumeration#
Anonymous bind is allowed, which leaks directory objects:
| |
This reveals a user Hugo Smith, hinting at naming conventions like hsmith.
Kerbrute - User Enumeration#
| |
Foothold#
AS-REP Roasting#
With valid usernames, attempt AS-REP roasting – fsmith doesn’t require pre-authentication:
| |
Crack it:
| |
Credentials: fsmith:Thestrokes23 – WinRM access confirmed.
Lateral Movement#
AutoLogon Credentials → svc_loanmgr#
WinPEAS finds AutoLogon credentials stored in the registry:
DefaultDomainName : EGOTISTICALBANK
DefaultUserName : EGOTISTICALBANK\svc_loanmanager
DefaultPassword : Moneymakestheworldgoround!
Gotcha here: the account name in the registry is svc_loanmanager, but the actual SAM account name is svc_loanmgr. Trying the full name fails – you need to check the C:\Users directory to spot the real name.
Privilege Escalation#
DCSync#
Running BloodHound/SharpHound reveals that svc_loanmgr has both DS-Replication-Get-Changes and DS-Replication-Get-Changes-All on the domain – DCSync capable.
| |
Pass-the-hash to SYSTEM:
| |
Proof#
C:\Users> whoami
nt authority\system
Key Takeaways#
- LDAP anonymous bind can leak enough info to enumerate valid usernames for Kerberos attacks
- Always try AS-REP roasting when you have valid usernames – it only takes one account without pre-auth
- AutoLogon credentials in the registry are a common lateral movement vector – but verify the actual account name vs what’s stored
- DCSync rights on a service account is game over for the domain – always check replication privileges in BloodHound