Skip to content
SOC Analyst Role
  • Loading index…

↑↓ navigate · ↵ open · Esc close

en

Security · Process

4689 · A process has exited

Event 4689 is logged when a process exits, recording its path, PID and exit status. On its own it is low value, but paired with 4688 it gives the lifetime of a process, which helps spot short-lived attacker commands and confirm that a malicious process is no longer running. It is often disabled because of volume.

low prioritySecurity logProcess

Where it is logged

Security log on the host where the process ran. Requires Audit Process Termination (Detailed Tracking) for Success, which is not enabled by default.

Key fields to read

FieldWhat it tells you
ProcessNameFull path of the process that exited.
ProcessIdHex PID, matching NewProcessId in the originating 4688.
StatusExit code, e.g. 0x0 for success; non-zero codes can indicate crashes or errors.
SubjectUserNameAccount the process ran as (with SubjectLogonId).

Sample event

4689 — synthetic example
EventID: 4689
TimeCreated: 2026-03-14T09:41:09.102Z
Computer: NW-FIN-WS07.northwind.local
SubjectUserName: m.okafor
SubjectDomainName: NORTHWIND
SubjectLogonId: 0x2A41C7
Status: 0x0
ProcessId: 0x1f3c
ProcessName: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

How to triage it

  1. 1Find the matching 4688 on the same host with NewProcessId equal to this ProcessId and a creation time just before the exit.
  2. 2Calculate the lifetime: a two-second hidden PowerShell launched by Excel is a scripted stager, not a user typing.
  3. 3Check what the process spawned or connected to during its lifetime (child 4688s, Sysmon 3, DNS).
  4. 4Use the exit to confirm containment: if a malicious process has exited, look for persistence (4698, 7045, Sysmon 13) that will start it again.

Benign vs suspicious

Usually benign

  • Every normal application and service exit; volume is extremely high.
  • Short-lived helper processes from installers, updaters and management agents.

Red flags

  • Very short-lived cmd.exe, powershell.exe or rundll32.exe processes spawned by Office, browsers or services.
  • Security tools (EDR agents, MsMpEng.exe) exiting unexpectedly, which may indicate tampering.
  • Repeated launch-and-exit cycles of the same unusual binary, consistent with a beacon or scheduled payload.

Hunt for it: Splunk & KQL

Splunk SPL
index=wineventlog (EventCode=4688 OR EventCode=4689) host=NW-FIN-WS07
| eval pid=if(EventCode=4688, New_Process_ID, Process_ID)
| eval image=coalesce(New_Process_Name, Process_Name)
| stats min(_time) AS start max(_time) AS end BY host, pid, image
| eval lifetime_s=end-start
| where lifetime_s < 5 AND match(image, "(?i)(powershell|cmd|rundll32|mshta)\.exe$")
Sentinel KQL
let starts = SecurityEvent
| where EventID == 4688
| project StartTime = TimeGenerated, Computer, Pid = NewProcessId, Image = NewProcessName, ParentProcessName, CommandLine;
let stops = SecurityEvent
| where EventID == 4689
| extend Pid = ProcessId
| project StopTime = TimeGenerated, Computer, Pid;
starts
| join kind=inner stops on Computer, Pid
| where StopTime >= StartTime
| extend LifetimeSec = datetime_diff("second", StopTime, StartTime)
| where LifetimeSec < 5 and Image has_any ("powershell.exe", "cmd.exe", "mshta.exe")

Field names depend on your add-on and table. More translations in the Splunk vs KQL cheat sheet.

Interview question

“How can 4689 help in an investigation if it is mostly noise?”

✓ Strong answer sketch

On its own it is noise, but joined to 4688 by host and process ID it gives me each process's lifetime. Attacker commands run by scripts or C2 frameworks tend to be very short-lived cmd or PowerShell instances, so lifetime is a useful extra signal. It also helps me confirm whether a malicious process is still running or has exited. Because PIDs get reused, I always match on host and a tight time window, not PID alone.

More SOC interview questions

Frequently asked questions

What does Event ID 4689 mean?

Event ID 4689 means a process has exited. It records the process name, its PID and the exit status, and is enabled by Audit Process Termination.

How do I match 4689 to 4688?

Match ProcessId in 4689 to NewProcessId in 4688 on the same computer, choosing the most recent 4688 before the exit, because Windows reuses process IDs.