Credential accessCritical
DCSync
Also known as Directory replication abuse, DRSUAPI GetNCChanges
How DCSync shows up on a domain controller: 4662 replication reads (AccessMask 0x100) with the Get-Changes rights GUIDs from a non-DC account.
Signals in the logs
A replication-rights read on the domain naming context performed by a user or non-DC account.
- AccessMask
- 0x100 (Control Access)
- Properties
- contains 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 (DS-Replication-Get-Changes), 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 (DS-Replication-Get-Changes-All), or 89e95b76-444d-4c62-991a-0facbeda640c (Get-Changes-In-Filtered-Set)
- SubjectUserName
- an account name that does not end with $ (not a computer/DC account)
A DACL change that grants the replication rights to a normal account, which is how DCSync is pre-staged as a backdoor.
- AttributeLDAPDisplayName
- ntSecurityDescriptor
- AttributeValue
- contains 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2, 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 or 89e95b76-444d-4c62-991a-0facbeda640c granted to a non-DC trustee
What happens
DCSync abuses the directory replication protocol. An account that holds the replication extended rights can ask a domain controller to send the password data of any principal, exactly as a replica domain controller would during normal synchronization. Because the request reaches the domain controller as a legitimate replication operation, it is recorded as directory object access rather than as a logon or a memory dump. The telling trace is a replication read performed by an account that is not itself a domain controller, which should never originate replication under normal operation.
Logging you need
- Audit subcategory DS Access > Directory Service Access = Success on domain controllers (for 4662).
- A SACL on the domain naming context root (DC=domain,DC=com) auditing the DS-Replication-Get-Changes rights for Everyone, Success. Without the SACL no 4662 is produced; this is off by default.
- Audit subcategory DS Access > Directory Service Changes = Success (for 5136 DACL backdooring); object SACLs are required here too.
Hunt queries
Starting points. Tune thresholds and exclusions to your environment before alerting on them.
$guids = '1131f6aa-9c07-11d1-f79f-00c04fc2dcd2','1131f6ad-9c07-11d1-f79f-00c04fc2dcd2','89e95b76-444d-4c62-991a-0facbeda640c'
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4662} | ForEach-Object {
$x = [xml]$_.ToXml()
$d = @{}; $x.Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
[pscustomobject]@{ Time=$_.TimeCreated; Subject=$d['SubjectUserName']; Access=$d['AccessMask']; Props=$d['Properties'] }
} | Where-Object {
$_.Access -eq '0x100' -and
($guids | Where-Object { $_ }) -and
($_.Props -match '1131f6aa-9c07-11d1-f79f-00c04fc2dcd2|1131f6ad-9c07-11d1-f79f-00c04fc2dcd2|89e95b76-444d-4c62-991a-0facbeda640c') -and
$_.Subject -notlike '*$'
}Benign look-alikes
- Real domain controllers replicate constantly; their 4662 reads carry a SubjectUserName ending in $ and are the expected baseline.
- Entra Connect / Azure AD Connect sync accounts (often named MSOL_ or AAD_) are granted the replication rights legitimately and will read continuously.
- Third-party directory backup, migration and password-audit tools that use replication APIs under a service account.
Notes
- 4662 does not record a source IP. Pivot on SubjectLogonId to the 4624 that opened the session to find where the request came from.
- An account that does not hold the rights still generates a 4662, but with a failed access; focus on successful control-access reads.