Enhanced Windows Event Log Investigation Guide
Comprehensive DFIR SOC Analyst Playbook
๐ Table of Contents
๐ฏ Investigation Framework
Critical Event ID Quick Reference
Authentication
4624, 4625, 4634, 4647
๐ด Critical
Security.evtx
Admin Activity
4672, 4648, 4720
๐ด Critical
Security.evtx
RDP Sessions
4778, 4779
๐ High
Security.evtx
Account Logon
4776, 4768, 4769, 4771
๐ High
Security.evtx (DC)
Services
7034, 7035, 7036, 7040, 7045
๐ High
System.evtx
Services (Security)
4697
๐ด Critical
Security.evtx
Scheduled Tasks
106, 140, 141, 200, 201
๐ High
TaskScheduler/Operational
Scheduled Tasks (Sec)
4698, 4699, 4700, 4701, 4702
๐ด Critical
Security.evtx
Network Shares
5140, 5145
๐ก Medium
Security.evtx
Process Tracking
4688, 4689
๐ High
Security.evtx
PowerShell
4103, 4104, 4105, 4106
๐ด Critical
PowerShell/Operational
WMI Activity
5857, 5858, 5859, 5860, 5861
๐ด Critical
WMI-Activity/Operational
WinRM/PS Remoting
6, 91, 168
๐ High
WinRM/Operational
Log Clearing
1102, 104
๐ด Critical
Security.evtx, System.evtx
Registry Changes
4656, 4657, 4658, 4660, 4663
๐ก Medium
Security.evtx
Account Enumeration
4798, 4799
๐ก Medium
Security.evtx
Malware/Crashes
1000, 1001, 1002
๐ก Medium
Application.evtx
Log Locations Quick Reference
๐ Account Usage Investigation
Phase 1: Initial Account Assessment
1.1 Determine Account Type and Status
Check Local Account:
Check Domain Account:
Built-in Accounts to Recognise:
SYSTEM: Most powerful local account
LOCAL SERVICE: Limited privileges, null session network access
NETWORK SERVICE: Network resource access as authenticated user
<Hostname>$: Domain-joined computer account
DWM-#: Desktop Window Manager
UMFD-#: Font Driver Host
ANONYMOUS LOGON: Null session authentication
Phase 2: Authentication Event Analysis
2.1 Successful Logon Analysis (Event ID 4624)
Query Successful Logons:
Using EvtxECmd:
Using DeepBlueCLI:
2.2 Logon Type Analysis
Critical Logon Types:
2
Interactive
Console/Keyboard logon
Physical or KVM access
3
Network
SMB, some RDP
File shares, lateral movement
4
Batch
Scheduled Tasks
Non-interactive automation
5
Service
Windows Services
Service account activity
7
Unlock/Reconnect
Screen unlock, RDP reconnect
Can indicate RDP session continuation
8
NetworkCleartext
Credentials in cleartext
โ ๏ธ SECURITY RISK - Possible downgrade attack
9
NewCredentials
RunAs/netonly
Credential switching, lateral movement
10
RemoteInteractive
RDP
Remote desktop sessions
11
CachedInteractive
Cached credentials
Offline domain authentication
12
CachedRemote
Cached RDP
Microsoft account authentication
13
CachedUnlock
Cached unlock
Similar to Type 7
Detection Query - Unusual Logon Types:
2.3 Failed Logon Analysis (Event ID 4625)
Extract Failed Logons:
Common Error Codes:
0xC0000064
User does not exist
Username enumeration
0xC000006A
Correct username, wrong password
Password guessing/brute force
0xC000006D
Bad username or password
Generic failure
0xC000006E
Account restriction
Policy violation
0xC000006F
Time restriction
Outside allowed hours
0xC0000070
Workstation restriction
Unauthorized system access
0xC0000071
Password expired
Account maintenance needed
0xC0000072
Account disabled
Accessing disabled account
0xC0000193
Account expired
Expired account access attempt
0xC0000234
Account locked
Multiple failed attempts
Brute Force Detection:
Password Spray Detection:
2.4 Session Tracking (Logon ID Correlation)
Track Complete User Session:
Calculate Session Duration:
Phase 3: Administrator Account Activity
3.1 Admin Logon Detection (Event ID 4672)
Query Admin Logons:
Correlate with Successful Logon:
After-Hours Admin Activity:
3.2 Explicit Credentials / RunAs (Event ID 4648)
Detect RunAs Activity:
Investigate Lateral Movement via RunAs:
3.3 Account Creation/Modification
Account Creation (Event ID 4720):
Track Complete Account Lifecycle:
Phase 4: RDP Investigation
4.1 RDP Session Analysis (Multiple Event Sources)
Event ID 4624 Type 10 (Standard RDP):
Event ID 4778/4779 (Session Reconnect/Disconnect):
TerminalServices-LocalSessionManager:
RDP Client Activity (Source System):
Check Registry for RDP History:
4.2 RDP Bitmap Cache Analysis
Extract Bitmap Cache Files:
Process with bmc-tools:
Phase 5: Account Logon Events (Domain Controller)
5.1 NTLM Authentication (Event ID 4776)
Query NTLM Authentication on DC:
5.2 Kerberos Authentication
TGT Requests (Event ID 4768):
Service Ticket Requests (Event ID 4769):
Failed Kerberos Pre-Auth (Event ID 4771):
๐ Lateral Movement Detection
Phase 1: Network Share Access
1.1 Share Access Detection (Event ID 5140)
Query Share Access:
Detect Admin Share Access:
Detailed File Access (Event ID 5145):
Phase 2: Service-Based Lateral Movement
2.1 Remote Service Creation
Detect New Services (Event ID 7045 - System Log):
Detect New Services (Event ID 4697 - Security Log):
Detect Suspicious Service Patterns:
Correlate with Network Logon:
Phase 3: Scheduled Task Lateral Movement
3.1 Scheduled Task Analysis
Task Scheduler Log (Event IDs 106, 140, 141, 200, 201):
Security Log Task Events (Event IDs 4698, 4699, 4700, 4701, 4702):
Detect Deleted Tasks (Common Attacker Cleanup):
Analyze .job Files:
Phase 4: PsExec Detection
4.1 Source System Artifacts
Check for PsExec Execution:
Process Execution Artifacts:
4.2 Destination System Artifacts
PSEXESVC.EXE Detection:
Service Registry Key:
Event Log Correlation:
Phase 5: WMI Lateral Movement
5.1 WMI Activity Log Analysis
Query WMI Events:
Detect Remote WMI (Event ID 5858):
Process Execution Artifacts:
Phase 6: PowerShell Remoting
6.1 Source System Analysis
PowerShell/Operational Log:
WinRM/Operational Log:
PowerShell Console History:
6.2 Destination System Analysis
Detect wsmprovhost.exe:
PowerShell Script Block Logging:
WinRM Event Log:
๐ Persistence Mechanisms
Phase 1: Registry Run Keys
1.1 Monitor Registry Modifications (Event IDs 4656, 4657, 4658, 4660, 4663)
Query Registry Modifications:
Check Run Keys Manually:
Phase 2: Scheduled Tasks
See Phase 3 of Lateral Movement section for comprehensive Scheduled Task analysis
Phase 3: Windows Services
See Phase 2 of Lateral Movement section for comprehensive Service analysis
Phase 4: WMI Event Subscription
4.1 Detect WMI Persistence (Event ID 5861)
Query Permanent Event Consumers:
Enumerate WMI Event Subscriptions:
Hunt for Malicious Patterns:
โฌ๏ธ Privilege Escalation
Tracking Privilege Changes
Group Membership Changes:
Monitor Sensitive Groups:
๐ป PowerShell & WMI Analysis
Phase 1: PowerShell Logging
1.1 Script Block Logging (Event ID 4104)
Extract All Script Blocks:
Filter Suspicious Scripts:
Detect Download Cradles:
Detect Obfuscation:
1.2 Module Logging (Event ID 4103)
Extract Pipeline Output:
Phase 2: WMI Analysis
See Lateral Movement WMI section and Persistence WMI section above
๐ฆ Malware Execution Evidence
Phase 1: Application and System Crashes
Windows Error Reporting (Event IDs 1000-1002):
System Critical Errors:
Analyze Windows Error Reports:
Phase 2: Process Tracking
Process Creation (Event ID 4688):
Detect Suspicious Process Patterns:
๐ฆ Event Log Collection
Live System Collection
Method 1: Event Viewer Export
Method 2: wevtutil (Built-in)
Method 3: PowerShell Get-WinEvent
Method 4: PsLogList (Sysinternals)
Method 5: KAPE
Method 6: Velociraptor
Remote Collection at Scale
Windows Event Forwarding (WEF)
Configure Collector:
Example Subscription XML:
PowerShell Remoting (at Scale)
๐ ๏ธ Tool Reference
EvtxECmd
Installation:
Usage:
DeepBlueCLI
Installation:
Usage:
Chainsaw
Installation:
Usage:
Hayabusa
Installation:
Usage:
๐ Investigation Playbooks
Playbook 1: Suspected Compromised Account
Playbook 2: Lateral Movement Investigation
Playbook 3: PowerShell Attack Investigation
๐ Quick Reference: Time-Saving Queries
Top 10 Failed Logon Sources
All Admin Activity Last 24 Hours
New Services Last 7 Days
Suspicious PowerShell This Week
All RDP Sessions Today
This guide consolidates event log analysis, tool usage, and investigation workflows into a single reference. Bookmark for quick access during incidents.
Last updated