Skip to content
WETNav
SecurityObject Access

Event ID 4658: The handle to an object was closed

The handle to an object was closed.

Channel
Security
Logged by default
No
Written on
Any host
Volume
Moderate
Audit subcategory
File System
Needs a SACL
Yes

To have this event

  • Enable File System: auditpol /set /subcategory:"File System" /success:enable /failure:enable

Key fields

Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.

SubjectUserNameAccount that closed the handle
SubjectDomainNameDomain of the account
SubjectLogonIdLogon ID for correlation
ObjectNameName or path of the object
HandleIdHandle ID that was closed (correlates with 4656)
ProcessNameProcess that closed the handle
ProcessIdProcess ID
Have one of these events? Paste it into the decoder

Pull this event

Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.

Get-WinEvent -LogName 'Security' -FilterXPath "*[System[(EventID=4658)]]" -MaxEvents 50 |
  Select-Object TimeCreated, Id, MachineName, Message

-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.

Where it shows up

Investigations, attack signals and lateral movement techniques that rely on this event.

Common questions

What does Windows event ID 4658 mean?
The handle to an object was closed. It is written to the Windows Security log (Security).
Is event 4658 logged by default?
No. It must be enabled before it is recorded. It is controlled by the "File System" Advanced Audit Policy subcategory (Object Access). It also requires a SACL on the audited object.

The handle to an object was closed. Needs the "File System" audit subcategory. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.