
Semperis, a leader in AI-powered identity security, has recently unveiled a critical vulnerability in Windows Server 2025's delegated Managed Service Accounts (dMSAs). Dubbed the "Golden dMSA" attack, this flaw allows attackers to generate passwords for all managed service accounts, facilitating cross-domain lateral movement and persistent access within Active Directory environments.
Understanding Delegated Managed Service Accounts (dMSAs)
Introduced in Windows Server 2025, dMSAs are designed to enhance service account security by automating password management and binding authentication to explicitly authorized machines in Active Directory. This approach aims to mitigate credential theft by tying authentication to device identity rather than user-managed passwords.
The Golden dMSA Attack: Exploiting a Design Flaw
The Golden dMSA attack exploits a critical design flaw in the ManagedPasswordId structure used for password generation. This structure contains predictable time-based components with only 1,024 possible combinations, making brute-force password generation computationally trivial. By obtaining the Key Distribution Service (KDS) root key, attackers can derive the current password for any dMSA or group Managed Service Account (gMSA) without connecting to the domain controller.
Attack Methodology
The attack unfolds in four key phases:
- Extraction of KDS Root Key Material: Attackers elevate to SYSTEM privileges on a domain controller to extract the KDS root key, which serves as the master key for all managed service account passwords.
- Enumeration of dMSA Accounts: Using APIs like LsaOpenPolicy and LsaLookupSids or LDAP queries, attackers enumerate dMSA accounts across the Active Directory forest.
- Identification of ManagedPasswordId Attributes: Through targeted guessing, attackers identify the ManagedPasswordId attributes and corresponding password hashes.
- Password Generation and Authentication: With the extracted information, attackers generate valid passwords for any gMSA or dMSA associated with the compromised key, enabling authentication via Pass-the-Hash or Overpass-the-Hash techniques.
Implications and Risks
The Golden dMSA attack poses significant risks:
- Cross-Domain Compromise: A single KDS root key extraction can lead to the compromise of every dMSA account across all domains within a forest, enabling extensive lateral movement.
- Persistent Access: Since KDS root keys have no expiration date, attackers can maintain persistent access indefinitely, creating a backdoor that survives typical security rotations and updates.
- Bypassing Security Measures: The attack circumvents modern protections like Credential Guard, which are designed to secure NTLM password hashes and Kerberos tickets.
Detection and Mitigation Strategies
Detecting Golden dMSA activity is challenging due to the lack of default security event logs for KDS root key access. Organizations are advised to:
- Audit KDS Root Key Access: Configure System Access Control Lists (SACLs) on KDS root key objects to audit read access.
- Monitor Authentication Requests: Keep an eye on abnormal volumes of authentication requests targeting service accounts and unusual Ticket-Granting Ticket requests for dMSA accounts.
- Restrict Privileged Access: Limit access to KDS root keys to only the most privileged accounts and regularly review permissions.
Semperis' Contribution
To aid in understanding and mitigating this threat, Semperis researcher Adi Malyanker developed a tool called GoldenDMSA. This tool incorporates the attack's logic, allowing users to efficiently explore, evaluate, and simulate how the technique may be exploited in real-world environments.
Conclusion
The discovery of the Golden dMSA attack underscores the importance of continuous vigilance and proactive security measures in managing service accounts. Organizations must assess their systems, implement robust monitoring, and restrict access to critical cryptographic materials to mitigate the risks associated with this vulnerability.
Source: WV News
Semperis Research Uncovers Critical Flaw in Windows Server 2025 Exposing Managed Service Accounts to Golden dMSA Attack