dMSA - Windows Server 2025

Managed Service Accounts (dMSAs) - BadSuccessor and Golden dMSA Exploits

ko-fiarrow-up-right

Delegated Managed Service Accounts (dMSAs) is a new feature introduced in Windows Server 2025.

dMSAs are designed to streamline the management of service accounts by allowing a new dMSA to inherit permissions from an older account it replaces

BadSuccessor

circle-info

Target domain must have at least one Windows Server 2025 Domain Controller

Attackers can simulate this migration by simply modifying two attributes on a dMSA object: msDS-ManagedAccountPrecededByLink and msDS-DelegatedMSAState. By setting the first attribute to reference a target user and the second to “2” (indicating migration completion), an attacker can trick the system into believing a legitimate migration occurred.

Automatically gain all the permissions of the targeted user, including highly privileged accounts like Domain Admins. Crucially, this attack doesn’t require any direct permissions on the targeted user’s account itself, only the ability to create or control a dMSA.

Detection

Requirements: Windows Server 2025 DC + CreateChild on any OU

Windows Server 2025

Verify whether the DC is Windows Server 2025

LDAPSearch

BloodHound Cypher Query

https://x.com/badsectorlabs/status/1925229491607023702arrow-up-right

CreateChild permission on any OU

BloodHound

PowerView

BadSuccessor.ps1

BadSuccessor

Identify which identities have permissions to create dMSAs in the domain, and which OUs are affected - highlighting where the BadSuccessor attack could be executed

Proof of Concept (Poc)

NetExec

https://x.com/mpgn_x64/status/1925935365744951350arrow-up-right

Rubeus

SharpSuccessor - .NET

BadSuccessor - Powershell

PowerView.py dev branch - Python

BadSuccessor - Python

BloodyAD - Python

Mitigation

  • Set 3 deny ACEs on OUs to prevent DMSA abuse.

  • Disable Implicit Owner Rights

  • Don’t have a KDS Root Key - Check for KDS

Golden dMSA

The Golden dMSA attack enables attackers to bypass authentication and generate passwords for all dMSAs and gMSAs and their associated service accounts.

Obtain dMSAs from root.test.\gmsa.exe

Create a wordlist that will be used for the managedPasswordIss bruteforce attack

Bruteforce

Interesting Book

Interesting Bookschevron-right
circle-info

Disclaimer: As an Amazon Associate, I earn from qualifying purchases. This helps support this GitBook project at no extra cost to you.

Support this Gitbook

I hope it helps you as much as it has helped me. If you can support me in any way, I would deeply appreciate it.

ko-fiarrow-up-right

buymeacoffeearrow-up-right

Last updated