Potential Active Directory Replication Account Backdoor
Attackers can modify Active Directory object security descriptors to grant DCSync rights to unauthorized accounts, creating a backdoor to extract credential data.
This detection rule identifies modifications to the nTSecurityDescriptor attribute within Active Directory (AD) objects that grant DCSync-related permissions to a user or computer account. This technique allows attackers to create a persistent backdoor, enabling them to re-obtain access to user and computer account hashes. The modification involves assigning specific GUIDs that represent replication rights (1131f6ad-9c07-11d1-f79f-00c04fc2dcd2, 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2, 89e95b76-444d-4c62-991a-0facbeda640c) to an account’s security descriptor. This allows the attacker to then use DCSync to retrieve credentials from the domain, effectively bypassing normal authentication mechanisms.
Attack Chain
- The attacker gains initial access to an account with sufficient privileges to modify Active Directory objects (e.g., Domain Admin).
- The attacker uses AD management tools (PowerShell, ADSI Edit, etc.) to target a specific user or computer account.
- The attacker modifies the
nTSecurityDescriptorattribute of the targeted account. - The attacker grants replication rights to the targeted account by adding specific Access Control Entries (ACEs) containing the GUIDs
1131f6ad-9c07-11d1-f79f-00c04fc2dcd2,1131f6aa-9c07-11d1-f79f-00c04fc2dcd2, and89e95b76-444d-4c62-991a-0facbeda640c. - The attacker uses the DCSync technique, impersonating a domain controller, to request password hashes.
- The Active Directory server, believing the request is legitimate due to the granted replication rights, provides the attacker with the requested credential information.
- The attacker obtains password hashes for domain users and computers.
- The attacker uses the obtained credentials for lateral movement, privilege escalation, or data exfiltration.
Impact
Successful exploitation allows attackers to compromise the entire Active Directory domain by gaining access to sensitive credential data. This could lead to complete control over the network, including access to critical systems, sensitive data, and the ability to disrupt business operations. The modification of security descriptors creates a persistent backdoor that can be used repeatedly to harvest credentials.
Recommendation
- Enable Audit Directory Service Changes to generate the necessary event logs for detection (https://ela.st/audit-directory-service-changes).
- Deploy the Sigma rule provided below to detect unauthorized modifications to the
nTSecurityDescriptorattribute. Tune the rule to exclude legitimate administrative accounts or scripts that may perform authorized modifications. - Monitor Windows Security Event Logs (event code 5136) for changes to the
nTSecurityDescriptorattribute and investigate any unexpected modifications, focusing on the presence of DCSync-related GUIDs. - Regularly review and audit Active Directory permissions, focusing on accounts with replication rights, to ensure they are legitimate and necessary.
Detection coverage 2
Detect DCSync Rights Modification via nTSecurityDescriptor
mediumDetects modifications to nTSecurityDescriptor attribute granting DCSync rights to a user/computer account.
Detect Windows Event ID 5136 with DCSync Rights Modification
mediumDetects Windows Event ID 5136 for modification of nTSecurityDescriptor attribute granting DCSync rights.
Detection queries are kept inside the platform. Get full rules →