Handle to an audited object was closed. Complements 4656.
Used with 4656 to determine access duration.
No standalone alerting. Use with 4656 pairs.
SubjectUserNameTargetUserNameLogonTypeIpAddressWorkstationName Starting points — adapt the log source, projected fields and thresholds for your environment.
SecurityEvent
| where EventID == 4658 // The handle to an object was closed
| project TimeGenerated, Computer, SubjectUserName, TargetUserName, LogonType, IpAddress, WorkstationName
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:Security" EventCode=4658
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# The handle to an object was closed — add EventData fields: SubjectUserName, TargetUserName, LogonType, IpAddress`
The handle to an object was closed. Handle to an audited object was closed. Complements 4656.
Event 4658 is written to the Security channel by Microsoft-Windows-Security-Auditing. Advanced Audit Policy — enable the 'Object Access' subcategory (Success and/or Failure).
No standalone alerting. Use with 4656 pairs.