githubEdit

BadSuccessor dMSA

Bad Successor dMSA

Tools:

https://github.com/LuemmelSec/Pentest-Tools-Collection/blob/112efc20807e14e3c05c2307e3e6816dc4f2b5ef/tools/ActiveDirectory/BadSuccessor.ps1

https://github.com/akamai/BadSuccessor

https://github.com/logangoins/SharpSuccessor

Prerequisites:

• Windows Server 2019 as Active Directory that supports PKINIT • Domain must have Ac􀆟ve Directory Certificate Services and Certificate Authority configured. • Kali Linux packed with tools • Tools: Rubeus, sharpsuccessor, badsuccessor module

Explanation

BadSuccessor is a post-compromise privilege escalation technique that targets a new feature in Windows Server 2025: Delegated Managed Service Accounts (dMSAs). This technique takes advantage of vulnerabilities in the dMSA configuration, allowing attackers to escalate their privileges within Active Directory environments after an initial compromise, potentially gran􀆟ng them higher-level access or control over critical systems.

In essence, it exploits:

• Weak ACLs on Organizational Units (OUs): Attackers with low privileges but write rights on an OU can create or modify dMSAs.

• msDS-DelegatedMSAState and msDS-ManagedAccountPrecededByLink: Attributes that allow linking dMSAs to privileged accounts.

• Kerberos quirks: Rogue dMSAs inherit the security context of the linked privileged account, allowing attackers to obtain TGTs and TGSs as Domain Admins.

This attack is particularly dangerous because it allows an attacker with minimal delegated permissions (like write rights on an Organizational Unit (OU)) to:

• Create a rogue dMSA

• Link it to a privileged account (e.g., Domain Admin)

• Obtain Kerberos 􀆟tickets that inherit the target’s security context

• Pivot to full domain control

Unlike attacks that require password cracking or golden ticket creation, BadSuccessor is stealthy, lives entirely within AD’s supported features, and can often bypass detection systems.

Enumeration and Exploitation

Windows

1) Load BadSuccessor and Check for Vulnerabilities

2) Audit OU Permissions

3) Create Rogue dMSA and link it to Administrator

4) Test access to sensitive resources

5) Finalize dMSA Link with SharpSuccessor

6) Request delegation TGT with Rubeus

7) Request TGT as BAD_DMSA

8) Request Service Ticket for File Server

9) Confirm Domain Admin access

Linux

1) Install tools

Then,

2) Check for any writeable attributes for our user

Desired results:

dSA: CREATE_CHILD on our target OU

3) Do the badSuccessor attack

4) Save the ccache file generated to the KRB5CCNAME environmental variable

5) Request a new service ticket

6) Save the newly created ccache file

7) Do DCSync

8) Log in as domain admin

Last updated