Event ID 4656 — A handle to an object was requested.
Description
A handle to an object was requested.
Message #
Fields #
| Name | Description |
|---|---|
Security_ID | [Subject] Security ID. |
Account_Name | [Subject] Account Name. |
Account_Domain | [Subject] Account Domain. |
Logon_ID | [Subject] Logon ID. |
Object_Server | [Object] Object Server. |
Object_Type | [Object] Object Type. |
Object_Name | [Object] Object Name. |
Handle_ID | [Object] Handle ID. |
Transaction_ID | [Access Request Information] Transaction ID. |
Accesses | [Access Request Information] Accesses. |
Access_Mask | [Access Request Information] Access Reasons. Access mask reference |
PrivilegesUsedForAccessCheck | — Privilege constants reference |
Restricted_SID_Count | [Access Request Information] Privileges Used for Access Check. |
Process_ID | [Access Request Information] Restricted SID Count. |
Process_Name | [Process Information] Process ID. |
Example Event #
{
"system": {
"provider": "Microsoft-Windows-Security-Auditing",
"guid": "54849625-5478-4994-A5BA-3E3B0328C30D",
"event_source_name": "",
"event_id": 4656,
"version": 1,
"level": 0,
"task": 12802,
"opcode": 0,
"keywords": 9232379236109516800,
"time_created": "2020-03-08T22:11:34.340479Z",
"event_record_id": 314461,
"correlation": {},
"execution": {
"process_id": 4,
"thread_id": 160
},
"channel": "Security",
"computer": "MSEDGEWIN10",
"security": {
"user_id": ""
}
},
"event_data": {
"SubjectUserSid": "S-1-5-21-3461203602-4096304019-2269080069-1000",
"SubjectUserName": "IEUser",
"SubjectDomainName": "MSEDGEWIN10",
"SubjectLogonId": "0x33392",
"ObjectServer": "Security",
"ObjectType": "Process",
"ObjectName": "\\Device\\HarddiskVolume1\\Windows\\System32\\lsass.exe",
"HandleId": "0x558",
"TransactionId": "00000000-0000-0000-0000-000000000000",
"AccessList": "%%1537\r\n\t\t\t\t%%1538\r\n\t\t\t\t%%1539\r\n\t\t\t\t%%1540\r\n\t\t\t\t%%1541\r\n\t\t\t\t%%4480\r\n\t\t\t\t%%4481\r\n\t\t\t\t%%4482\r\n\t\t\t\t%%4483\r\n\t\t\t\t%%4484\r\n\t\t\t\t%%4485\r\n\t\t\t\t%%4486\r\n\t\t\t\t%%4487\r\n\t\t\t\t%%4488\r\n\t\t\t\t%%4489\r\n\t\t\t\t%%4490\r\n\t\t\t\t%%4491\r\n\t\t\t\t%%4492\r\n\t\t\t\t%%4493\r\n\t\t\t\t",
"AccessReason": "-",
"AccessMask": "0x1f3fff",
"PrivilegeList": "-",
"RestrictedSidCount": 0,
"ProcessId": "0x1688",
"ProcessName": "C:\\Windows\\System32\\cscript.exe",
"ResourceAttributes": "-"
}
}
Detection Patterns #
Registry Keys Access
Security-Auditing Event ID 4656: A handle to an object was requested.OREvent ID 4663: An attempt was made to access an object.
10 rules
Sigma
Security-Auditing Event ID 4656: A handle to an object was requested.OREvent ID 4658: The handle to an object was closed.OREvent ID 4663: An attempt was made to access an object.
1 rule
Defense Evasion: Disable or Modify Tools
Security-Auditing Event ID 4624: An account was successfully logged on.→Event ID 4656: A handle to an object was requested.
1 rule
Kusto Query Language
Community Notes #
Combined with 4663, may reveal bulk reads of sensitive shares before data exfil.
The AccessMask shown assumes File access rights (the most common context). The actual meaning of bits 0x01–0x80 depends on the ObjectType GUID at runtime. Common alternatives:
| Bit | File | Registry | Process | Service |
|---|---|---|---|---|
| 0x01 | ReadData / ListDirectory | KEY_QUERY_VALUE | PROCESS_TERMINATE | SERVICE_QUERY_CONFIG |
| 0x02 | WriteData / AddFile | KEY_SET_VALUE | PROCESS_CREATE_THREAD | SERVICE_CHANGE_CONFIG |
| 0x04 | AppendData / AddSubDir | KEY_CREATE_SUB_KEY | PROCESS_SET_SESSIONID | SERVICE_QUERY_STATUS |
| 0x08 | ReadEA | KEY_ENUMERATE_SUB_KEYS | PROCESS_VM_OPERATION | SERVICE_ENUMERATE_DEPENDENTS |
| 0x10 | WriteEA | KEY_NOTIFY | PROCESS_VM_READ | SERVICE_START |
| 0x20 | Execute / Traverse | KEY_CREATE_LINK | PROCESS_VM_WRITE | SERVICE_STOP |
Standard rights are shared across all types: DELETE (0x10000), READ_CONTROL (0x20000), WRITE_DAC (0x40000), WRITE_OWNER (0x80000).
Detection Rules #
View all rules referencing this event →
Sigma # view in reference
- SAM Registry Hive Handle Request source high: Detects handles requested to SAM registry hive
- SCM Database Handle Failure source medium: Detects non-system users failing to get a handle of the SCM database.
- Password Dumper Activity on LSASS source high: Detects process handle on LSASS process with certain access mask and object type SAM_DOMAIN
Elastic # view in reference
- LSASS Memory Dump Handle Access source medium: Identifies handle requests for the Local Security Authority Subsystem Service (LSASS) object access with specific access masks that many tools with a capability to dump memory to disk use (0x1fffff, 0x1010, 0x120089). This rule is tool agnostic as it has been validated against a host of various LSASS dump tools such as SharpDump, Procdump, Mimikatz, Comsvcs etc. It detects this behavior at a low level and does not depend on a specific tool or dump file name.
References #
- Microsoft Learn https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4656
- Microsoft Learn Audit Policy https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-file-system
- Ultimate Windows Security https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4656
- Example event sourced from https://github.com/NextronSystems/evtx-baseline