Windows Event Log Forensics - SOC Analyst Cheatsheet
Practical Guide for Event Log Analysis & Threat Hunting
Quick Reference: Critical Event IDs by Investigation Type
Account Compromise
4624, 4625, 4648, 4672
Security
Logon success/fail, privilege escalation
Lateral Movement
4624 (Type 3), 4648, 5140, 7045
Security, System
Remote logons, service creation
RDP Activity
4624 (Type 10), 1149, 21/24/25
Security, RDP logs
Remote desktop sessions
Persistence
7045, 4697, 4698, 106/140/200
System, Security, Task Scheduler
Service/task creation
Privilege Escalation
4672, 4728, 4732, 4756
Security
Admin rights, group changes
Credential Dumping
4688, 4656, 5140
Security
Process creation, object access
PowerShell Abuse
4104, 4103, 400/403
PowerShell logs
Script execution
Evidence Destruction
1102, 104
Security, System
Log clearing
Investigation Priority Matrix
CRITICAL
4624
Security
Successful logon
Account compromise, lateral movement
CRITICAL
4625
Security
Failed logon
Brute force, reconnaissance
CRITICAL
4672
Security
Admin privileges assigned
Privilege escalation
CRITICAL
7045
System
Service installed
Persistence mechanism
CRITICAL
4688
Security
Process creation
Execution timeline
HIGH
4648
Security
Explicit credentials
Pass-the-hash, runas
HIGH
4697
Security
Service installed (Security log)
Persistence validation
HIGH
4698
Security
Scheduled task created
Persistence mechanism
HIGH
1102
Security
Event log cleared
Anti-forensics
Core Investigation Questions
Primary Questions:
Who logged in? (4624 - Account identification)
From where? (Logon Type + Source IP)
What did they do? (4688 - Process execution)
How did they move laterally? (4624 Type 3, 7045, 5140)
What persistence was created? (7045, 4697, 4698)
SOC Investigation Workflows
Workflow 1: Account Compromise Investigation (CRITICAL)
Scenario: Suspected compromised user account
Investigation Priority Order:
Step 1: Identify Successful Logons (4624)
Event ID 4624 - Successful Logon
Critical Fields:
SubjectUserName- Who initiated the logonTargetUserName- Account that logged inLogonType- How they logged inIpAddress/WorkstationName- Source locationLogonProcessName- Process used for logonTimeCreated- When
Logon Types (MEMORIZE):
PowerShell - Find Logons:
Red Flags in 4624:
✗ Type 10 (RDP) from unusual IP addresses
✗ Type 3 (Network) indicating lateral movement
✗ Type 8 (NetworkCleartext) - plaintext password logon
✗ Logons outside business hours
✗ Logons from unusual workstations
✗ Service accounts with Type 10 (RDP)
Step 2: Check for Failed Logon Attempts (4625)
Event ID 4625 - Failed Logon
Critical Fields:
TargetUserName- Account targetedFailureReason- Why it failedIpAddress/WorkstationName- Attack sourceLogonType- Attack method
Common Failure Reasons:
PowerShell - Detect Brute Force:
Red Flags in 4625:
✗ Multiple failures followed by success (brute force)
✗ High volume from single IP (>10 failures)
✗ Failed admin accounts (Administrator, admin, etc.)
✗ 0xC000006D repeated (password guessing)
✗ Multiple usernames from same IP (spray attack)
Step 3: Check for Privilege Escalation (4672)
Event ID 4672 - Special Privileges Assigned
Indicates: Account logged on with administrator-level privileges
Critical Fields:
SubjectUserName- Account that gained privilegesPrivilegeList- Specific privileges granted
Important Privileges:
PowerShell - Find Privilege Escalation:
Red Flags in 4672:
✗ Non-admin users with 4672 events
✗ SeDebugPrivilege (credential dumping indicator)
✗ Service accounts with admin privileges
✗ Shortly after 4624 (privilege escalation after logon)
Step 4: Identify Explicit Credentials (4648)
Event ID 4648 - Logon with Explicit Credentials
Indicates:
runascommand usedPass-the-hash attack
Credential theft/reuse
Critical Fields:
SubjectUserName- Who initiated the actionTargetUserName- Credentials usedTargetServerName- Target systemProcessName- Process used (often runas.exe)
Red Flags in 4648:
✗ Different user credentials than current session
✗ Admin credentials used by standard user
✗ Multiple 4648 events in short time (credential testing)
✗ Non-runas.exe process (potentially malicious)
EvtxECmd Usage (Zimmerman Tool) - CRITICAL
Location:
Collection:
Parsing with EvtxECmd:
Basic Directory Parse:
Filter Specific Event IDs (RECOMMENDED):
Exclude Noisy Events:
Parse with Maps (Normalised Output):
Key EvtxECmd Output Columns:
TimeCreated- Event timestampComputer- System nameEventId- Event IDLevel- SeverityProvider- Log sourceChannel- Log fileUserId- User SIDMapDescription- Readable event descriptionPayloadData1-6- Event-specific data
Workflow 2: Lateral Movement Detection (HIGH PRIORITY)
Scenario: Detect attacker moving between systems
Key Event Correlation:
Lateral Movement Pattern:
PsExec Lateral Movement:
Source System Indicators:
Destination System Indicators:
PowerShell - Detect PsExec:
WMI Lateral Movement:
Source System Indicators:
Destination System Indicators:
RDP Lateral Movement:
Source System Indicators:
Destination System Indicators:
Workflow 3: Persistence Detection
Scenario: Identify persistence mechanisms
Key Events:
Service Creation:
Event 7045 - Service Installed (System Log)
Critical Fields:
ServiceName- Name of serviceImagePath- Executable pathServiceType- Service typeStartType- Auto-start configurationAccountName- Service account
Event 4697 - Service Installed (Security Log)
Same as 7045 but in Security log (requires auditing enabled)
PowerShell - Find Suspicious Services:
Red Flags in 7045/4697:
✗ Image path in temp directories
✗ PowerShell/cmd.exe as service
✗ Random service names
✗ PSEXESVC (PsExec)
✗ Auto-start configuration
Scheduled Task Creation:
Event 4698 - Scheduled Task Created (Security) Event 106 - Scheduled Task Created (Task Scheduler/Operational) Event 140 - Scheduled Task Updated (Task Scheduler/Operational) Event 200 - Scheduled Task Executed (Task Scheduler/Operational)
PowerShell - Find Scheduled Tasks:
Red Flags in 4698/106:
✗ Executables from temp/appdata
✗ PowerShell with encoded commands
✗ Hidden tasks (names with spaces/special chars)
✗ High-frequency execution (every minute)
✗ Tasks running as SYSTEM
Workflow 4: PowerShell Activity Investigation
Scenario: Detect malicious PowerShell usage
Key Events:
Event 4104 - Script Block Logging (MOST IMPORTANT)
Shows: Actual PowerShell commands executed
PowerShell - Analyse Script Blocks:
Event 4103 - Module Logging
Logs PowerShell module loading and pipeline execution
Event 400 - PowerShell Engine Start
PowerShell session started
Event 403 - PowerShell Engine End
PowerShell session ended
Event 800 - Pipeline Execution
Command pipeline details
Red Flags in PowerShell Events:
✗ Invoke-Expression (IEX)
✗ DownloadString (download and execute)
✗ -EncodedCommand (obfuscation)
✗ Bypass ExecutionPolicy
✗ Hidden window (-WindowStyle Hidden)
✗ Known attack tools (Mimikatz, Empire, Covenant)
✗ Base64 encoded commands
Workflow 5: Credential Dumping Detection
Scenario: Detect credential theft attempts
Key Indicators:
LSASS Access:
Event 4656 - Handle to Object Requested
Process requesting access to lsass.exe
ObjectName: \Device\HarddiskVolume*\Windows\System32\lsass.exe
Event 4688 - Process Creation
Look for:
procdump.exe
mimikatz.exe
dumpert.exe
comsvcs.dll (MiniDump)
PowerShell - Detect LSASS Access:
SAM/NTDS.dit Access:
Event 4663 - Attempt to Access Object
Access to SAM/SECURITY/SYSTEM registry hives
Access to NTDS.dit (Active Directory database)
Workflow 6: Evidence Destruction Detection
Scenario: Detect log clearing and anti-forensics
Critical Events:
Event 1102 - Security Log Cleared Event 104 - System Log Cleared
PowerShell - Detect Log Clearing:
Red Flags:
✗ Event 1102 or 104 at all (major indicator)
✗ Shortly after suspicious activity
✗ Cleared by non-admin account
✗ Multiple logs cleared
Complete Investigation Script
Quick Triage Commands
Live System Quick Checks
Event Log Collection Commands
Investigation Checklists
Account Compromise Investigation
[ ] Check 4624 for successful logons (unusual times/IPs)
[ ] Check 4625 for brute force attempts (>5 failures)
[ ] Correlate failures with successes (same user/IP)
[ ] Check 4672 for privilege escalation
[ ] Check 4648 for explicit credential usage
[ ] Review logon types (Type 10 RDP, Type 3 network)
[ ] Identify source IPs and workstations
[ ] Build user activity timeline
[ ] Cross-reference with file access artifacts
Lateral Movement Investigation
[ ] Check 4624 Type 3 (network logons)
[ ] Check 7045 for PSEXESVC service
[ ] Check 4648 for explicit credentials
[ ] Check 5140 for share access (ADMIN$, C$)
[ ] Check 4688 for remote execution tools
[ ] Review WMI activity logs (5857, 5860, 5861)
[ ] Check PowerShell remote execution
[ ] Correlate source and destination events
[ ] Map lateral movement paths
Persistence Investigation
[ ] Check 7045 for service creation
[ ] Review service image paths (temp/appdata)
[ ] Check 4697 (Security log service install)
[ ] Check 4698 for scheduled tasks
[ ] Review Task Scheduler operational log (106, 140, 200)
[ ] Check registry Run keys (correlate with registry artifacts)
[ ] Review WMI event subscriptions
[ ] Validate autostart locations
Summary: Critical Event IDs (Memorise)
Top 10 Most Important
4624
Security
Successful logon
CRITICAL
4625
Security
Failed logon
CRITICAL
4672
Security
Admin privileges
CRITICAL
4688
Security
Process creation
CRITICAL
7045
System
Service installed
CRITICAL
1102
Security
Log cleared
CRITICAL
4648
Security
Explicit credentials
HIGH
4697
Security
Service installed
HIGH
4698
Security
Task created
HIGH
4104
PowerShell
Script block
HIGH
Key Principle
Event logs document what happened on a Windows system. Focus on logon events (4624/4625), privilege escalation (4672), persistence (7045/4698), and evidence destruction (1102). Always correlate multiple events to build the complete attack timeline.
Remember: Event logs survive many anti-forensics techniques. Even if malware is deleted, event logs show it executed. Always check for log clearing (1102/104) as first indicator of attacker awareness!
Last updated