Guide
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.
Prerequisite
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.
Reference
Authentication and Privilege
| Event | Meaning | Why it matters |
|---|---|---|
| 4624 | Successful logon | Logon type shows how (2 interactive, 3 network, 10 RDP); odd types or hours stand out |
| 4625 | Failed logon | Bursts indicate password spraying or brute force |
| 4672 | Special privileges at logon | Admin-equivalent logon; to an unexpected account it is a strong signal |
| 4648 | Logon with explicit credentials | runas and lateral movement with alternate creds |
| 4740 | Account locked out | Repeated lockouts can mean brute force or a bad service password |
Reference
Account and Group Changes
| Event | Meaning | Why it matters |
|---|---|---|
| 4720 | User account created | A new account, especially off-hours, can be attacker persistence |
| 4728 / 4732 / 4756 | Member added to a privileged group | Addition to Domain Admins or local Administrators is high priority |
| 4722 / 4725 | Account enabled / disabled | Re-enabling a dormant account is a common foothold |
| 4738 | User account changed | Password or attribute changes on sensitive accounts |
Reference
Execution, Services, and Persistence
| Event | Meaning | Why it matters |
|---|---|---|
| 4688 | Process created (with command line) | The backbone of execution detection; reveals what ran and how |
| Sysmon 1 | Process create | Richer than 4688: hashes, parent process, signing |
| 7045 | New service installed | Services run as SYSTEM; a rogue one is escalation or persistence |
| 4697 | Service installed (Security log) | Same event audited through the Security channel |
| 4698 / 4702 | Scheduled task created / updated | Common persistence and privilege-abuse technique |
Reference
Credential Access and Network
| Event | Meaning | Why it matters |
|---|---|---|
| 4663 | Object access attempt | On SAM/SYSTEM or credential files, flags hive theft and secret reads |
| Sysmon 10 | Process access | Access to lsass.exe is a strong credential-dumping signal |
| Sysmon 3 | Network connection | Outbound from a process that has no business making network calls |
| 5156 / 5157 | Filtering Platform allowed / blocked | A burst across many ports from one source is a port scan |
| Sysmon 17 / 18 | Named pipe created / connected | Potato-style token impersonation under a service account |
Reference
PowerShell and Log Tampering
| Event | Meaning | Why it matters |
|---|---|---|
| 4104 | PowerShell script block logging | Captures the actual script, including obfuscated and in-memory code |
| 4103 | PowerShell module/pipeline logging | Commands and parameters executed in the pipeline |
| 1102 | Security audit log cleared | Clearing the log is almost always an attacker covering tracks; alert hard |
Why It Matters
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.