Leveraging dMSA for Advanced Active Directory Persistence

Leveraging dMSA for Advanced Active Directory Persistence

Rethinking Service Account Security with dMSA in Windows Server 2025

With Windows Server 2025, Microsoft has introduced Delegated Managed Service Accounts (dMSAs)—a strategic evolution in how enterprise service identities are secured and maintained. This modern approach shifts the paradigm away from static credentials and toward dynamic, machine-bound authentication.

At its core, dMSA is engineered to eliminate the traditional pitfalls of service account management. Legacy service accounts, often plagued by manual password rotation and poor credential hygiene, are replaced with an automated and tamper-resistant model. Rather than relying on user-managed secrets, dMSA ties authentication directly to a host’s identity and routes all credential validation through the Local Security Authority (LSA)—cutting off opportunities for attacks like Kerberoasting before they begin.

As outlined in Microsoft’s own guidance, this model provides a “more secure and manageable approach” compared to its predecessors. When properly implemented, it disables password-based access for legacy accounts and reroutes all service-related authentication to the new dMSA structure.

Persistence Risks: Security Tradeoffs Under the Surface

Despite its improved security posture, researchers have uncovered critical avenues for abuse within dMSA’s implementation—particularly when attackers gain short-term administrative rights.

Security researcher Matan Bahar has demonstrated that attackers can exploit Access Control Lists (ACLs) tied to dMSA objects. Specifically, the issue lies in the permission structure of the Managed Service Accounts container. If an attacker obtains domain-level privileges—even briefly—they can implant custom ACLs that outlive their elevated session, preserving access to key dMSAs.

This tactic revolves around assigning “GenericAll” permissions to the container or individual dMSA accounts. Once in place, these modified permissions act as a backdoor, allowing the attacker to manipulate or impersonate dMSAs long after their original access has been revoked.

Final Thoughts

While dMSA presents a leap forward in secure service account management, it also highlights a familiar truth in cybersecurity: no system is immune to misuse. For defenders, the challenge is clear—strong identity systems require equally strong oversight. Vigilant auditing of ACLs, tiered administrative models, and regular review of service account permissions are essential to keeping this innovation from becoming an attacker’s foothold.

Although holding “GenericAll” rights on the container doesn’t inherently expose the dMSA objects within, a determined attacker can deliberately push permission inheritance, effectively cascading full control down to every linked dMSA account.

By executing these commands, an attacker cements long-term influence over both current and yet-to-be-created dMSA accounts. With this foothold, they gain the ability to:

  • Reassign ownership of targeted dMSA objects, effectively taking full administrative control.
  • Spin up rogue dMSA identities, seamlessly integrated but under the attacker’s influence.
  • Tamper with the PrincipalsAllowedToRetrieveManagedPassword attribute, inserting compromised identities to silently retrieve future credentials.

This level of control transforms dMSA from a defensive mechanism into a durable persistence layer—hidden in plain sight.

Defensive Measures

As organizations adopt Windows Server 2025, proactive security controls are essential to prevent misuse of dMSAs. Recommended actions include:

  • Continuously audit changes to Access Control Lists (ACLs) on the Managed Service Accounts container. Unexpected edits may signal privilege abuse or lateral movement.
  • Limit dMSA logon permissions by configuring the Group Policy setting:
    Computer Configuration → Administrative Templates → System → Kerberos → Enable Delegated Managed Service Account logons
    Only enable this on systems explicitly approved to use dMSAs, reducing the attack surface dramatically.

Monitoring & Hardening Strategies

To defend against misuse of Delegated Managed Service Accounts (dMSAs), organizations should adopt a layered security approach:

  • Track Event ID 4662 to flag when “Write” permissions are applied to dMSA objects—an early indicator of potential tampering.
  • Enforce strict privilege boundaries for Active Directory admin groups. Avoid broad access and apply role-based controls where possible.
  • Continuously review ACL changes on high-value containers using reconnaissance tools such as PingCastle or BloodHound to surface hidden risk.

A Balanced Perspective on dMSA Security

Despite the newly exposed persistence pathways, dMSAs still represent a major advancement in service account protection. When backed by intelligent monitoring and access governance, the security benefits far surpass the legacy risks associated with traditional service accounts.

The landscape will likely evolve. As Windows Server 2025 matures, Microsoft is expected to release additional controls to close off the avenues researchers have now illuminated. Until then, vigilance, visibility, and disciplined privilege management remain your best defense.

More Articles & Posts