A handle to an object was duplicated. SourceHandleId, TargetHandleId are key.
Handle duplication is used for process injection and privilege escalation — duplicating a SYSTEM handle to gain elevated access. Also used in certain credential dumping techniques.
Alert: handle duplication involving LSASS or other sensitive processes from unexpected sources.
SubjectUserNameTargetUserNameLogonTypeIpAddressWorkstationName | Tactic | Technique |
|---|---|
| Privilege Escalation | Access Token Manipulation: Create Process with Token (T1134.002) |
Starting points — adapt the log source, projected fields and thresholds for your environment.
SecurityEvent
| where EventID == 4690 // An attempt was made to duplicate a handle to an object
| project TimeGenerated, Computer, SubjectUserName, TargetUserName, LogonType, IpAddress, WorkstationName
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:Security" EventCode=4690
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# An attempt was made to duplicate a handle to an object — add EventData fields: SubjectUserName, TargetUserName, LogonType, IpAddress`
An attempt was made to duplicate a handle to an object. A handle to an object was duplicated. SourceHandleId, TargetHandleId are key.
Event 4690 is written to the Security channel by Microsoft-Windows-Security-Auditing. Advanced Audit Policy — enable the 'Object Access' subcategory (Success and/or Failure).
Event 4690 is associated with: Access Token Manipulation: Create Process with Token (T1134.002).
Alert: handle duplication involving LSASS or other sensitive processes from unexpected sources.