Windows Event Logging Explained — A SOC Analyst's Guide to Log Analysis
Why Windows Event Logs Matter
Windows Event Logs are the closest thing to a universal audit trail on Windows systems. Every authentication, process creation, service start, privilege escalation, and file access can leave a record. The problem is not lack of data — it is finding the signal in an overwhelming volume of noise.
This guide is what I wish I had when I started reading Windows logs. It covers the event IDs that actually matter for security monitoring, what each one means, and how to interpret the fields that come with it.
The Logs You Actually Need
Windows generates events across multiple channels. For SOC work, these three matter most:
Security Log (Event ID 4624, 4625, 4648, 4672)
Event ID 4624 — An account was successfully logged on. This is your bread-and-butter authentication event. The LogonType field tells you what kind of session was created: type 2 is interactive (someone at the keyboard), type 3 is network (file share, remote desktop), type 10 is Remote Interactive (RDP specifically). A spike in type 3 logons from a single source can indicate lateral movement.
Event ID 4625 — An account failed to log on. The SubStatus field is critical here. 0xC0000064 means the username does not exist. 0xC000006A means the username exists but the password was wrong. 0xC0000234 means the account is locked out. Repeated 4625 events with 0xC000006A from the same source IP pattern are brute force indicators.
Event ID 4648 — A logon was attempted using explicit credentials. This appears when a user or process provides different credentials than the ones currently in use — for example, running a command as a different user. It is common in legitimate administration but also appears in pass-the-hash attacks.
Event ID 4672 — Special privileges assigned to new logon. This fires when an account with administrative rights logs on. If you see this for an account that should not have admin rights, investigate immediately.
System Log (Event ID 7045, 7036, 7040)
Event ID 7045 — A service was installed in the system. Malware frequently installs itself as a service for persistence. The ServiceName and ImagePath fields show you what was installed and where. Any service with a random-looking name or an ImagePath pointing to a temporary directory is suspicious.
Event ID 7036 — The service entered the running/stopped state. Repeated start-stop cycles of the same service can indicate instability or malicious activity.
PowerShell Operational Log (Event ID 4103, 4104)
Event ID 4104 — Script block logging. When enabled, this records the actual PowerShell commands executed, including obfuscated scripts. This is one of the most valuable Windows events for detecting fileless malware and living-off-the-land techniques. The ScriptBlockText field contains the raw command.
Reading the Fields
Windows events contain many fields, but these five tell you the most:
- SubjectUserName / TargetUserName — Who performed the action and who the action targeted.
- IpAddress / IpPort — Network context.
::1means localhost. An external IP here is worth investigating. - ProcessName — The executable responsible. Watch for unusual paths (
Temp,AppData, downloaded files). - ObjectName / ObjectType — What file, registry key, or other resource was accessed.
- Status / SubStatus — Success/failure codes. Non-zero values usually mean failure.
What I Got Wrong at First
My first mistake was treating every event as equally important. I set up alerts on single failed logons and generated so much noise that real issues were buried. The fix was baselining — learning what normal looks like for each system and only alerting on deviations.
My second mistake was ignoring the SubStatus field on 4625 events. A failed logon is not just "failed" — the reason it failed tells you what kind of attack you might be seeing.
My third mistake was not enabling PowerShell script block logging from the start. Without it, PowerShell-based attacks are essentially invisible in the logs. If you are doing any Windows security monitoring, enable this first.
Practical Tips
Enable the logs before you need them. Some channels are disabled by default. Enable PowerShell logging, process creation auditing, and command line auditing on all endpoints.
Baselining beats alerting. Know what normal authentication patterns look like for each user and system before you set alert thresholds.
Correlate across logs. A single 4625 event is noise. Twenty 4625 events followed by a 4624 and then a 4672 is an incident.
Test your detection. Use legitimate tools to generate the events you want to detect, then verify your rules actually fire. Theory and practice diverge more often than you expect.