BadSuccessor: Active Directory dMSA Privilege Escalation
Overview
The BadSuccessor vulnerability affects Windows Server 2025's Delegated Managed Service Accounts (dMSAs). By manipulating the msDS-ManagedAccountPrecededByLink attribute and msDS-DelegatedMSAState, attackers can:
- Privilege Escalation: Force the KDC to issue TGTs with victim SIDs (including Domain Admins)
- Credential Extraction: Extract RC4-HMAC keys (NT hashes) from the KERB-DMSA-KEY-PACKAGE
Requirements
Before attempting this attack, verify:
- Windows Server 2025 domain controller is present
- You have object creation or attribute write rights on at least one OU
- You can execute PowerShell or Rubeus from a domain-joined host
- You have explicit authorization to test this environment
Methodology
Phase 1: Reconnaissance
Check for dMSA support
- Verify Windows Server 2025 DC exists
- Look for existing dMSA objects in AD
Identify writable OUs
- Find OUs where you can create objects
- Check for "Create All Child Objects" permissions
Locate target accounts
- Identify high-value users (Domain Admins, Enterprise Admins)
- Note their DNs for the attack
Phase 2: Attack Execution
Create attacker-controlled dMSA
- Use
New-ADServiceAccountin a writable OU - This gives you full attribute control
- Use
Configure the "fake migration"
- Set
msDS-ManagedAccountPrecededByLinkto victim DN - Set
msDS-DelegatedMSAStateto 2 (completed)
- Set
Request TGT with dMSA flag
- Use Rubeus with
/dmsaflag - The PAC will include victim SIDs
- Use Rubeus with
Phase 3: Credential Extraction
Extract RC4-HMAC keys
- Parse KERB-DMSA-KEY-PACKAGE from TGT
- These are unsalted NT hashes
Mass enumeration
- Link multiple victims to scale credential theft
- Extract hashes for offline cracking
Tools
- BadSuccessor (Akamai): https://github.com/akamai/BadSuccessor
- SharpSuccessor: https://github.com/logangoins/SharpSuccessor
- Pentest-Tools-Collection: https://github.com/LuemmelSec/Pentest-Tools-Collection
Safety & Ethics
⚠️ CRITICAL: This skill is for authorized security testing only.
- Obtain written authorization before testing
- Document all findings for remediation
- Never use against systems you don't own or have permission to test
- Report findings to appropriate security teams
References
- Akamai Security Research: https://www.akamai.com/blog/security-research/abusing-dmsa-for-privilege-escalation-in-active-directory