windows::event-log

dfir evtx chainsaw · hayabusa
EVTX triage Key IDs Chainsaw / Hayabusa PowerShell / tasks Tools Pitfalls
01EVTX Triage Flow
Where to start
# common locations
C:\Windows\System32\winevt\Logs\Security.evtx
C:\Windows\System32\winevt\Logs\System.evtx
C:\Windows\System32\winevt\Logs\Application.evtx
C:\Windows\System32\winevt\Logs\Microsoft-Windows-Sysmon%4Operational.evtx
C:\Windows\System32\winevt\Logs\Windows PowerShell.evtx
C:\Windows\System32\winevt\Logs\Microsoft-Windows-PowerShell%4Operational.evtx
C:\Windows\System32\winevt\Logs\Microsoft-Windows-TaskScheduler%4Operational.evtx

# first questions
- do I have Security + Sysmon + PowerShell logs?
- are they native, exported, or carved?
- do timestamps look local or UTC-shifted?
- do I want quick grep, CSV timeline, Sigma hunt, or XML parsing?
Minimal workflow
strings Security.evtx | grep -E "4624|4625|4688|4698|7045|1102"
EvtxECmd.exe -f Security.evtx --csv out
chainsaw search --input Logs/ --event-id 4624,4625,4688,4698,7045
python3 -m Evtx.Views Security.evtx --include-xml > security.xml

# pivot order
4624/4625 → 4648 → 4672 → 4688 → 4698/7045 → PowerShell/Sysmon
# build one timeline, not isolated screenshots
02High-Value Event IDs
Security / System / Sysmon quick map
Event IDLogMeaningUseful fields / notes
1102SecurityAudit log clearedBig tampering clue; find SubjectUserSid / SubjectUserName
4624SecuritySuccessful logonLogonType, TargetUserName, IpAddress, WorkstationName, LogonId
4625SecurityFailed logonStatus/SubStatus, username spray, source IP
4634SecurityLogoffPair with 4624 via LogonId
4648SecurityExplicit credentials usedrunas / alternate creds / lateral movement clue
4672SecuritySpecial privileges assignedAdmin / SYSTEM style logons
4688SecurityProcess creationNewProcessName, CommandLine, ParentProcessName
4697SecurityService installedSometimes absent; compare with 7045
4698SecurityScheduled task createdTask name, action, author
4702SecurityScheduled task updatedTask persistence changes
4719SecurityAudit policy changedCoverage reduction / tampering
4720SecurityUser account createdNew account creation
4728/4732SecurityUser added to privileged groupGroup membership abuse
4738SecurityUser account changedPassword / flags / metadata
4768SecurityKerberos TGT requestedAD environments only
4769SecurityKerberos service ticket requestedKerberoasting clues
4771SecurityKerberos pre-auth failedBad password, spray, clock issues
4776SecurityNTLM authenticationCredential validation
5140SecurityNetwork share accessedShareName, SubjectUserName
5145SecurityDetailed file share accessRelativeTargetName, AccessMask
5156SecurityWFP allowed connectionNetwork connection telemetry if enabled
7045SystemService installedServiceName, ImagePath, start type
6005SystemEvent log service startedSystem startup marker
6006SystemEvent log service stoppedShutdown marker
1SysmonProcess createdParent image, hashes, command line, GUIDs
3SysmonNetwork connectionSrc/Dst IP + port, process image
7SysmonImage loadedDLL hijack / injection clues
8SysmonCreateRemoteThreadInjection clue
10SysmonProcess accessLSASS access / dump attempts
11SysmonFile createdDropped payloads
12/13/14SysmonRegistry eventsPersistence, tampering
22SysmonDNS queryBeaconing / staging domains
03Chainsaw & Hayabusa
Chainsaw: fast hunts
# list interesting event ids quickly
chainsaw search --input Logs/ --event-id 4624,4625,4688,4698,7045

# free text search in evtx/json
chainsaw search --input Logs/ -q "powershell"
chainsaw search --input Logs/ -q "EncodedCommand"

# sigma hunt with mappings
chainsaw hunt Logs/ --rules sigma/rules/ --mapping sigma-event-logs-all.yml --csv out/

# target one log file
chainsaw hunt Security.evtx --rules sigma/rules/ --json out/

# same idea but only show matches on screen
chainsaw hunt Logs/ --rules sigma/rules/ --mapping sigma-event-logs-all.yml --level medium
Hayabusa: deeper summaries / timelines
# timeline csv from directory
hayabusa csv-timeline -d Logs -o timeline.csv

# hunt mode using built-in rules
hayabusa hunt -d Logs -o hayabusa.csv

# html report if available in your build
hayabusa html-report -d Logs -o report.html

# focused summaries
hayabusa logon-summary -d Logs
hayabusa eid-metrics -d Logs

# noisy CTF sets: timeline first, then grep suspicious process names
grep -Ei "powershell|cmd.exe|mshta|rundll32|regsvr32|certutil|bitsadmin" timeline.csv
04PowerShell, Tasks, Services
PowerShell-focused IDs
Event IDLogUse
400Windows PowerShellEngine start
403Windows PowerShellEngine stop
4103PowerShell OperationalModule logging
4104PowerShell OperationalScript block logging (high value)
4105/4106PowerShell OperationalPipeline execution details
106TaskScheduler OperationalTask registered
140TaskScheduler OperationalTask updated
200/201TaskScheduler OperationalAction started / completed
Suspicious strings to grep
grep -Ei "powershell|pwsh|encodedcommand|frombase64string|iex|downloadstring|rundll32|regsvr32|mshta|schtasks|sc.exe|cmd.exe /c" *.xml timeline.csv

# base64 PowerShell? decode UTF-16LE
python3 - <<'PY'
import base64
s = "BASE64_HERE"
print(base64.b64decode(s).decode("utf-16le","ignore"))
PY
05Tools & Workflow
Specific tools
zimmermann
EvtxECmd.exe -d Logs --csv evtx_csv
TimelineExplorer.exe evtx_csv\*.csv

python-evtx
python3 -m evtx.dump Security.evtx > security.xml
python3 -m Evtx.Views Security.evtx --include-xml > security_view.xml

jq/csvkit
csvcut -c EventId,Provider,TimeCreated,System.Computer timeline.csv
jq '.Event.System.EventID' suspicious.json
Practical triage checklist
1. export EVTX to CSV/XML
2. determine timezone / host / log coverage
3. mark startup / shutdown boundaries
4. list 4624/4625 pairs and remote logons
5. extract 4688 or Sysmon 1 command lines
6. check tasks / services / PowerShell / cleared logs
7. run Sigma hunt with Chainsaw or Hayabusa
8. correlate with Prefetch, Amcache, LNK, MFT, PCAP
9. note blind spots before concluding
06Pitfalls
4624 alone is not enough
Use LogonType, source IP, and LogonId. Network logons can be noisy.
4688 may be incomplete
CommandLine needs proper audit policy. Sysmon may be richer.
No log ≠ no activity
Retention, audit policy, and clearing can hide behavior.