Event ID 4689 — A process has exited.
Description
A process has exited.
Message #
Fields #
| Name | Description |
|---|---|
SubjectUserSid SID | [Subject] Security ID. |
SubjectUserName UnicodeString | [Subject] Account Name. |
SubjectDomainName UnicodeString | [Subject] Account Domain. |
SubjectLogonId HexInt64 | [Subject] Logon ID. |
Status HexInt32 | [Process Information] Exit Status. NTSTATUS reference |
ProcessId Pointer | [Process Information] Process ID. |
ProcessName UnicodeString | [Process Information] Process Name. |
Example Event #
{
"system": {
"provider": "Microsoft-Windows-Security-Auditing",
"guid": "54849625-5478-4994-A5BA-3E3B0328C30D",
"event_source_name": "",
"event_id": 4689,
"version": 0,
"level": 0,
"task": 13313,
"opcode": 0,
"keywords": 9232379236109516800,
"time_created": "2023-11-06T02:04:26.563982+00:00",
"event_record_id": 315178,
"correlation": {},
"execution": {
"process_id": 4,
"thread_id": 20768
},
"channel": "Security",
"computer": "WinDev2310Eval",
"security": {
"user_id": ""
}
},
"event_data": {
"SubjectUserSid": "S-1-5-18",
"SubjectUserName": "WINDEV2310EVAL$",
"SubjectDomainName": "WORKGROUP",
"SubjectLogonId": "0x3e7",
"Status": "0x0",
"ProcessId": "0x3f24",
"ProcessName": "C:\\Windows\\System32\\svchost.exe"
},
"message": ""
}
Detection Patterns #
Normalized Process Events
Security-Auditing Event ID 4688: A new process has been created.OREvent ID 4689: A process has exited.ORSysmon Event ID 1: Process creationOREvent ID 5: Process terminated
7 rules
Kusto Query Language
Normalized Process Events
References #
- Microsoft Learn https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4689
- Microsoft Learn Audit Policy https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-process-termination
- Ultimate Windows Security https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4689
- Example event sourced from https://github.com/NextronSystems/evtx-baseline