Windows Event Logs are the digital diary of everything that happens on a Windows system. Every login, every process, every error - it's all recorded. For defenders, these logs are gold. Attackers leave traces, and those traces are in the event logs.
Think of Windows Event Logs like security camera footage for your computer. When something bad happens (or is about to), reviewing the footage shows you exactly what occurred. The challenge? There's LOTS of footage, and you need to know what to look for.
Log Retention
By default, Windows keeps limited log history. For security, increase log size limits and consider forwarding logs to a SIEM for long-term storage. You can't investigate what you didn't save!
Event Log Locations
Critical Event IDs
Enable Command Line Logging
By default, Event ID 4688 doesn't log the full command line! You must enable it via Group Policy or registry. Without command lines, you're only seeing process names - not enough for investigation.
Understanding Logon Types
Detecting Attack Patterns
PowerShell Logging
Script Block Logging Magic
Even if attackers use -EncodedCommand or heavy obfuscation, Script Block Logging (4104) captures the DECODED version when PowerShell actually executes it. This is incredibly powerful for analysis!
Sysmon - Enhanced Logging
Log Analysis Tools
Investigation Workflow
Log Analysis Methodology
Windows Event Log Investigation
1
Define ScopeWhat system, what timeframe, what behavior?
2
Check Authentication4624/4625/4672 - Who logged in?
3
Check Execution4688/Sysmon 1 - What ran?
4
Check PowerShell4104 - What scripts executed?
5
Check Persistence7045/4698/Sysmon 12-14 - What stayed?
6
Check NetworkSysmon 3/Firewall - Where connected?
7
Build TimelineCorrelate events chronologically
Knowledge Check
Challenges
Key Takeaways
- Security log is most important: 4624 (success), 4625 (fail), 4688 (process)
- Logon Type 3 (network) + admin account = potential lateral movement
- Enable PowerShell Script Block Logging (4104) - catches decoded commands
- Install Sysmon for enhanced process, network, and registry logging
- Tools like Chainsaw and Hayabusa apply Sigma rules to EVTX files
- Always build a timeline when investigating incidents