Event 4662: An operation was performed on a directory object
Something acted on an Active Directory object. It is enormously noisy and mostly useless — except for one narrow case, where it is the only practical way to catch an attacker replicating every password hash in your domain.
Also written as Event ID 4662DCSync detection4662 replication get changes
How oftenFires constantly
Vendor calls itAudit Success
LogSecurity
SourceMicrosoft-Windows-Security-Auditing
What it means for you
On a personal computer
This only appears on Windows Server domain controllers in a business network.
For an analyst
The one reason to collect this is DCSync. An attacker with the replication permissions can ask a domain controller to hand over password hashes for any account — including krbtgt — using the same protocol a real domain controller uses. Nothing is installed, no code runs on the DC, and no other event records it. The GUIDs in the Properties field are the detection, and your only baseline exclusions should be your actual domain controllers and any directory synchronisation service account.
What it looks like
Sanitised. Addresses come from the RFC 5737 documentation ranges.
Sample
An operation was performed on an object.
Subject:
Security ID: CORP\jbrooks
Account Name: jbrooks
Account Domain: CORP
Logon ID: 0x3E9A11
Object:
Object Server: DS
Object Type: %%7000
Object Name: DC=corp,DC=example
Handle ID: 0x0
Operation:
Operation Type: Object Access
Accesses: Control Access
Access Mask: 0x100
Properties: Control Access
{1131f6ad-9c07-11d1-f79f-00c04fc2dcd2}
{1131f6aa-9c07-11d1-f79f-00c04fc2dcd2}
DC=corp,DC=example
The fields that decide it
Everything else in the log line is context.
Properties
The permission GUIDs the operation used. Three of them are what matter.
1131f6aa-9c07-11d1-f79f-00c04fc2dcd2DS-Replication-Get-Changes. One half of what DCSync requires.
1131f6ad-9c07-11d1-f79f-00c04fc2dcd2DS-Replication-Get-Changes-All. This is the one that returns password hashes. Seeing it from anything other than a domain controller is a serious finding.
89e95b76-444d-4c62-991a-0facbeda640cDS-Replication-Get-Changes-In-Filtered-Set. Used in some DCSync variants.
SubjectUserName
The account that performed the operation. Legitimately this should only ever be a domain controller computer account or a directory sync service account.
ObjectType
The class of object. The domain root object (%%7000) is what DCSync targets.
ObjectName
The distinguished name of the object acted on.
AccessMask
The access requested. 0x100 is Control Access, which is what a replication request uses.
SubjectLogonId
The session that performed it. Join to the 4624 for the source address — that is how you find the machine.
Ordinary reasons this happens
Most of the time it is one of these.
Domain controllers replicating with each other, which is constant and expected.
Directory synchronisation services such as Entra Connect, which legitimately hold replication rights.
Some backup products that replicate directory data.
Ordinary directory reads and writes, which account for almost all of the raw volume and never involve the replication GUIDs.
Administrative tooling querying the directory.
When it is not ordinary
DCSync — replicating password hashes out of the domain.
What gives it awayThe replication GUIDs used by an account that is not a domain controller and not your sync service. This yields hashes for any account, including krbtgt, and it is the standard route to a golden ticket.
What gives it awayA DCSync targeting the krbtgt account specifically. Whoever has that hash can forge tickets for any identity in the domain until krbtgt is reset twice.
Filter to the three replication GUIDs. Everything else in this event is noise.
Check whether SubjectUserName is a domain controller computer account. If it is not, treat it as an incident.
Exclude your directory synchronisation service account explicitly by name, and nothing else.
Take the Logon ID and find the matching 4624 to identify the source machine.
If DCSync is confirmed, assume every credential in the domain is compromised — including krbtgt.
Resetting krbtgt requires two resets separated by at least one replication cycle. One reset is not enough and this catches people out.
Audit who holds replication rights on the domain object and remove anything that cannot be justified.
Queries to run
kqlThe DCSync detection. Excluding computer accounts removes legitimate domain controller replication; add your sync service account by name and the rest should be empty.
SecurityEvent | where EventID == 4662 | where Properties has_any ('1131f6aa-9c07-11d1-f79f-00c04fc2dcd2','1131f6ad-9c07-11d1-f79f-00c04fc2dcd2','89e95b76-444d-4c62-991a-0facbeda640c') | where SubjectUserName !endswith '$' | project TimeGenerated, Computer, SubjectUserName, SubjectLogonId, ObjectName
kqlAdds the source address, which is what tells you which machine to isolate.
SecurityEvent | where EventID == 4662 and Properties contains '1131f6ad-9c07-11d1-f79f-00c04fc2dcd2' | join kind=leftouter (SecurityEvent | where EventID == 4624 | project SubjectLogonId = TargetLogonId, IpAddress) on SubjectLogonId | project TimeGenerated, Computer, SubjectUserName, IpAddress
powershellWho currently holds replication rights. Run this now — the list is usually longer than people expect.
sigmaPortable form. Tune only by adding your named sync account — not by broadening the filter.
detection:
selection:
EventID: 4662
Properties|contains:
- '1131f6aa-9c07-11d1-f79f-00c04fc2dcd2'
- '1131f6ad-9c07-11d1-f79f-00c04fc2dcd2'
filter:
SubjectUserName|endswith: '$'
condition: selection and not filter
Common questions
What is DCSync?
An attacker with replication permissions asks a domain controller to send password data using the same protocol domain controllers use with each other. Because it is a legitimate protocol operation, nothing is installed on the domain controller and no code runs there. It returns hashes for any account you name, including krbtgt, which is why it is a standard step towards total domain compromise.
How do I detect DCSync?
Event 4662 filtered to the replication permission GUIDs, particularly 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2, where the requesting account is not a domain controller computer account. Exclude your directory synchronisation service account by name. Anything else that appears is a serious finding — there is almost no other way to see this happen.
Why is Event 4662 so noisy?
Because it fires for object access across the whole directory, and normal operation touches directory objects constantly. Collecting it unfiltered is impractical on a busy domain controller. Filter to the replication GUIDs at collection — that reduces the volume by orders of magnitude and keeps the only part that matters.
What do I do if I find a real DCSync?
Assume every credential in the domain is compromised, including krbtgt. Identify the source machine from the Logon ID and the matching 4624, and isolate it. Then reset krbtgt twice, with at least one full replication cycle between the resets — a single reset leaves forged tickets valid, and that mistake is common enough to be worth stating plainly.
Which accounts should legitimately have replication rights?
Domain controller computer accounts, and any directory synchronisation service such as Entra Connect. That is normally the entire list. Audit the domain object's permissions directly — in most environments the actual list is longer than anyone expects, and every extra entry is a path to this attack.