Windows Security Event IDs for Detection

A detection is only as good as the events under it. This is the reference I use alongside my privilege escalation and Splunk detection work: the event IDs worth watching, grouped by what they reveal. Security-log IDs are four digits; Sysmon IDs are low numbers from its own Operational log.

Turn the Logging On First

Most of these are not logged by default. Enable them before expecting the events to appear, ideally through Group Policy across the fleet.

Command-line process auditing: turns on 4688 with the process command line, the single most useful setting.

Sysmon: install with a sound configuration for process, network, file, and pipe telemetry.

PowerShell logging: script-block and module logging for 4104 / 4103.

Forward to a SIEM: an event logged only on the host is gone when the host is wiped.

Authentication and Privilege

EventMeaningWhy it matters
4624Successful logonLogon type shows how (2 interactive, 3 network, 10 RDP); odd types or hours stand out
4625Failed logonBursts indicate password spraying or brute force
4672Special privileges at logonAdmin-equivalent logon; to an unexpected account it is a strong signal
4648Logon with explicit credentialsrunas and lateral movement with alternate creds
4740Account locked outRepeated lockouts can mean brute force or a bad service password

Account and Group Changes

EventMeaningWhy it matters
4720User account createdA new account, especially off-hours, can be attacker persistence
4728 / 4732 / 4756Member added to a privileged groupAddition to Domain Admins or local Administrators is high priority
4722 / 4725Account enabled / disabledRe-enabling a dormant account is a common foothold
4738User account changedPassword or attribute changes on sensitive accounts

Execution, Services, and Persistence

EventMeaningWhy it matters
4688Process created (with command line)The backbone of execution detection; reveals what ran and how
Sysmon 1Process createRicher than 4688: hashes, parent process, signing
7045New service installedServices run as SYSTEM; a rogue one is escalation or persistence
4697Service installed (Security log)Same event audited through the Security channel
4698 / 4702Scheduled task created / updatedCommon persistence and privilege-abuse technique

Credential Access and Network

EventMeaningWhy it matters
4663Object access attemptOn SAM/SYSTEM or credential files, flags hive theft and secret reads
Sysmon 10Process accessAccess to lsass.exe is a strong credential-dumping signal
Sysmon 3Network connectionOutbound from a process that has no business making network calls
5156 / 5157Filtering Platform allowed / blockedA burst across many ports from one source is a port scan
Sysmon 17 / 18Named pipe created / connectedPotato-style token impersonation under a service account

PowerShell and Log Tampering

EventMeaningWhy it matters
4104PowerShell script block loggingCaptures the actual script, including obfuscated and in-memory code
4103PowerShell module/pipeline loggingCommands and parameters executed in the pipeline
1102Security audit log clearedClearing the log is almost always an attacker covering tracks; alert hard

Using the Reference

Collecting events is not detecting; the value is in which ones you alert on. The highest-fidelity are the rare, high-impact ones: 1102 (log cleared), 7045 (new service), 4720 and privileged group additions, 4672 to an unusual account, and Sysmon 10 against lsass. Baseline the noisy ones first, then alert on deviation. This maps directly to the SC-200 and CySA+ detection work and feeds the Splunk rules in my detection lab.