Badsuccessor Exploiting Delegated Managed Service Accounts In Windows Server 2025
A flaw in Windows Server 2025 allows a low-privileged user with rights to create a delegated Managed Service Account (dMSA) to link it to a privileged account and set the migration state to completed, causing the domain controller to issue a Kerberos ticket containing the privileged account's SIDs. An attacker could then impersonate a domain administrator and gain full control of the domain.
Published on infosecwriteups.com
In doing a recent HackTheBox room, I came across this relatively new vulnerability of delegated Managed Service Accounts, and wanted to find out more about the BadSuccessor exploit. This TryHackMe room was particularly helpful.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the domain controller fails to verify that the creator of a dMSA has permissions over the account specified in the msDS-ManagedAccountPrecededByLink attribute before issuing a Kerberos ticket with the linked account's SIDs.
Impact
An attacker with low-level permissions could escalate to domain administrator, gaining full control over the Active Directory domain.
What the attacker needed
Windows Server 2025 domain controller; low-privileged user with CreateChild on an OU; ability to create a dMSA
The fix
Microsoft should enforce permission checks so that only users with rights over the target account can set it as a predecessor in a dMSA.
How it was found
- Check that the domain controller runs Windows Server 2025 and that your user has CreateChild or similar rights on an organizational unit.
- Create a dMSA account and set its predecessor link to a privileged account such as Administrator, with the migration state set to completed.
- Obtain a Kerberos ticket-granting ticket (TGT) for your low-privileged user.
- Request a service ticket for the dMSA account, which the domain controller issues with the privileged account's SIDs.
- Use the ticket to perform a DCSync and retrieve the administrator hash, then pass the hash to get a shell as Administrator.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
In Windows networks, a domain controller hands out special tickets that prove who you are and what you can access. A new feature in Windows Server 2025 lets you create a service account and say it replaces an old one. The bug is that the system does not check if you are allowed to replace that old account, so you can claim to replace the domain administrator and get a ticket with their powers.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.