Stop Wrestling with ELK! Chainsaw Hunts Windows Threats in Seconds
Stop Wrestling with ELK! Chainsaw Hunts Windows Threats in Seconds
Your SIEM is down. The clock is ticking. And somewhere in 40GB of Windows Event Logs, the attacker left fingerprints.
What do you do? Spin up a Splunk instance? Pray your ELK stack doesn't choke? Here's the brutal truth most incident responders won't admit: traditional log analysis infrastructure is a liability when seconds matter. The overhead of indexing, parsing, and querying through centralized platforms turns rapid triage into a crawl. Blue teams hemorrhage precious investigation time waiting for dashboards to load while adversaries deepen their foothold.
But what if you could bypass the infrastructure entirely? What if a single binary, smaller than most PowerPoint files, could rip through hundreds of EVTX files and apply thousands of Sigma detection rules in under a minute?
Enter Chainsaw — the open-source forensic engine that threat hunters at WithSecure Countercept built for themselves, then unleashed on the world. No databases. No indexing. No bloat. Just insane speed and military-grade detection logic wrapped in Rust-powered efficiency. Whether you're responding to a breach at 3 AM or proactively hunting for advanced persistent threats, Chainsaw transforms Windows forensic artefacts from an overwhelming data swamp into actionable intelligence.
Ready to see why elite incident response teams are quietly abandoning their bloated log platforms? Let's cut to the chase.
What is Chainsaw?
Chainsaw is a blazing-fast, standalone forensic analysis tool developed by WithSecure Labs (formerly F-Secure Countercept) — the same elite threat hunting team that defends enterprise environments against nation-state adversaries. Born from real-world incident response desperation, Chainsaw was engineered to solve a specific, painful problem: rapidly triaging Windows forensic artefacts when EDR telemetry is unavailable or incomplete.
The tool's name isn't accidental. Like its namesake, it cuts through noise with brutal efficiency — specifically Windows Event Logs, MFT (Master File Table) records, registry hives, SRUM databases, and ESE databases. What makes Chainsaw genuinely revolutionary is its native Sigma rule support — the industry-standard detection format that most open-source tools struggle to implement efficiently.
Here's why Chainsaw is trending hard in DFIR (Digital Forensics and Incident Response) circles right now:
- Zero infrastructure dependency — single binary, no Java heap tuning, no Elasticsearch cluster management
- Rust-powered performance — leverages the battle-tested EVTX parser by @OBenamram for memory-safe, lightning-fast log parsing
- Cross-platform flexibility — runs natively on macOS, Linux, and Windows (crucial for diverse IR toolkits)
- Production-hardened — actively used by WithSecure's managed detection and response consultants in live breach investigations
The project's credibility skyrocketed with Chainsaw v2 (July 2022), a ground-up rewrite by @AlexKornitzer that transformed a "Christmas project" codebase into a polished, enterprise-grade platform. Version 2 dramatically expanded Sigma rule compatibility, added JSON/XML event log parsing, and introduced cleaner CLI ergonomics that make complex hunts feel effortless.
In an ecosystem saturated with half-maintained Python↗ Bright Coding Blog scripts and resource-hungry platforms, Chainsaw represents something rare: a tool built by practitioners, for practitioners, that actually scales under pressure.
Key Features That Separate Chainsaw from the Pack
Chainsaw isn't just another log parser. Its feature architecture reveals deep understanding of forensic workflows that most tools ignore:
🎯 Native Sigma & Custom Rule Engine
The crown jewel. Chainsaw doesn't merely "support" Sigma rules — it automatically loads, converts, and executes them against EVTX files with intelligent field mapping. The built-in mappings/sigma-event-logs-all.yml handles Sysmon (Event IDs 1, 3, 7, 11, 13), PowerShell Script Blocks (4104), Process Creation (4688), Scheduled Tasks (4698), Service Installation (7045), and beyond. Plus, Chainsaw's custom rule format extracts AV alerts from Windows Defender, F-Secure, Sophos, and Kaspersky — detecting log tampering, privilege escalation, lateral movement, and brute-force attacks.
🔍 Multi-Modal Search Architecture
Three distinct search paradigms cover every investigative scenario:
- String matching with case-insensitive options (
-i) - Regex pattern extraction (
-e) for complex indicators - Tau expressions (
-t) for structured field queries likeEvent.System.EventID: =4104
📅 Shimcache Timeline Reconstruction
Chainsaw reconstructs execution timelines from AppCompatCache (Shimcache) artefacts, with optional Amcache enrichment and timestamp pair detection (--tspair). This reveals program execution even when logs were cleared — a critical capability against anti-forensic adversaries.
💡 SRUM Database Intelligence
Unlike parsers relying on hardcoded table schemas, Chainsaw dynamically extracts SRUM structure from the SOFTWARE hive. Parse application resource usage, network data consumption, and energy estimation without schema version headaches.
⚡ Raw Artefact Dumping
Need to extract MFT records, registry hives, or ESE databases for deeper analysis? Chainsaw's dump command exports clean JSON/JSONL for downstream processing in your preferred tools.
🪶 Output Flexibility
ASCII tables for quick terminal review. CSV for spreadsheet analysis. JSON for SIEM ingestion. The --full flag reveals complete event data without truncation — essential when hunting obfuscated payloads.
🔥 TAU Engine Integration
Document tagging via the TAU Engine library enables sophisticated detection logic matching that goes beyond simple string comparisons.
Use Cases: Where Chainsaw Absolutely Dominates
1. Ransomware Incident Response (The 3 AM Scenario)
Your EDR missed the initial access. Now encryption is spreading. You pull disk images and face hundreds of EVTX files across domain controllers, member servers, and workstations. Chainsaw hunts for Sigma rules detecting PsExec usage, WMI event subscriptions, shadow copy deletion, and suspicious service installations — without waiting for log ingestion. The --from and --to timestamp filters isolate the attack window precisely.
2. Insider Threat Investigations
When privileged users go rogue, they often clear event logs (Event ID 1102) or stop the logging service. Chainsaw's built-in rules detect log tampering indicators alongside user creation events and sensitive group additions. Cross-reference with SRUM analysis to prove application execution during alleged "unattended" periods.
3. Lateral Movement Detection
Attackers rarely stop at one system. Chainsaw's remote login detection rules (Service, RDP, Network logon types) map lateral movement paths across your estate. Combine with Sysmon Event ID 3 (network connections) to identify C2 beaconing and data staging.
4. Anti-Forensic Technique Discovery
Sophisticated adversaries use tools like Eventlogedit to surgically remove individual records without triggering the noisy 1102 "log cleared" event. Chainsaw's analyse gaps command detects RecordID gaps and time gaps — the fingerprints of selective record deletion that most analysts miss entirely.
5. Proactive Threat Hunting
Even without active incidents, Chainsaw enables systematic hypothesis-driven hunting. Apply the complete Sigma ruleset against historical EVTX archives. Hunt for Cobalt Strike named pipes, Meterpreter service installations, and PowerShell obfuscation patterns that your SIEM rules never caught.
Step-by-Step Installation & Setup Guide
Method 1: Pre-Compiled Binaries (Fastest)
Grab the latest release from the GitHub releases page:
# Download for your platform (Linux x86_64 example)
wget https://github.com/WithSecureLabs/chainsaw/releases/download/v2.10.1/chainsaw_x86_64-unknown-linux-gnu.tar.gz
tar -xzf chainsaw_x86_64-unknown-linux-gnu.tar.gz
chmod +x chainsaw
# Verify it works
./chainsaw --version
Pro tip: Download the all-in-one package if you want bundled Sigma rules and EVTX-Attack-Samples for immediate testing.
Method 2: Build from Source (Rust Required)
# Clone the repository
git clone https://github.com/WithSecureLabs/chainsaw.git
cd chainsaw
# Build optimized release binary — CRITICAL for performance
cargo build --release
# Binary appears in target/release/chainsaw
ls -la target/release/chainsaw
⚠️ WARNING: Always use --release flag. Debug builds are 10-50x slower — unacceptable for large-scale hunts.
Method 3: Nix Installation (Reproducible Environments)
# Temporary shell with chainsaw available
nix-shell -p chainsaw
# Or install permanently via flakes
nix profile install github:WithSecureLabs/chainsaw
# Build from flake (if you cloned the repo)
nix build .#
# Binary: ./result/bin/chainsaw
Essential Dependencies for Full Hunting
# Clone Sigma rules (detection logic)
git clone https://github.com/SigmaHQ/sigma
# Clone attack sample event logs (testing/learning)
git clone https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES.git
Environment Setup Best Practices
- Create a dedicated analysis directory with subdirectories for rules, logs, and output
- Set executable permissions on the binary:
chmod +x chainsaw - Test with attack samples first — never learn on production evidence
- Configure your terminal for wide output:
export COLUMNS=200prevents table truncation
REAL Code Examples from the Repository
Example 1: Basic Sigma-Powered Threat Hunt
This is the foundational command that demonstrates Chainsaw's core value proposition — applying Sigma detection rules to EVTX files with zero configuration overhead:
./chainsaw hunt EVTX-ATTACK-SAMPLES/ \
-s sigma/ \
--mapping mappings/sigma-event-logs-all.yml
What's happening here:
hunt— activates detection logic mode (vs.searchoranalyse)EVTX-ATTACK-SAMPLES/— directory containing Windows Event Log files-s sigma/— path to Sigma rules directory (can be the entire Sigma git repo)--mapping mappings/sigma-event-logs-all.yml— critical file that maps Sigma field names to EVTX structure; tells Chainsaw thatImageLoadedin a Sigma rule equalsEvent.EventData.ImageLoadedin the log
The output instantly categorizes detections by threat groups: Antivirus alerts, Log Tampering, Sigma-detected techniques. Each hit shows timestamp, Event ID, affected computer, and extracted event data.
Example 2: Precision Hunting with Time Boundaries and CSV Export
Real investigations require temporal scoping and machine-readable output for evidence preservation:
./chainsaw hunt evtx_attack_samples/ \
-s sigma/ \
--mapping mappings/sigma-event-logs-all.yml \
--from "2019-03-17T19:09:39" \
--to "2019-03-17T19:09:50" \
--json
Advanced capabilities demonstrated:
--from/--to— ISO 8601 timestamp filtering; drops everything outside the attack window--json— structured output for SIEM ingestion, automated alerting, or chain-of-custody documentation- The 11-second window shown here represents surgical precision — imagine filtering a 24-hour incident to the exact lateral movement event
For spreadsheet-friendly analysis, swap --json for --csv --output results/:
./chainsaw hunt evtx_attack_samples/ \
-s sigma/ \
--mapping mappings/sigma-event-logs-all.yml \
-r rules/ \
--csv \
--output results
Here -r rules/ adds Chainsaw's custom rules alongside Sigma — capturing AV alerts and Windows-specific behaviours that Sigma doesn't cover.
Example 3: Detecting Anti-Forensic Log Tampering
This is where Chainsaw exposes techniques that most tools completely miss:
# Scan for BOTH RecordID gaps AND time gaps (default 30-minute threshold)
./chainsaw analyse gaps ./Logs/
# Focus ONLY on surgical record deletion (no time gap analysis)
./chainsaw analyse gaps ./Logs/ \
--no-time-gaps \
--json \
-o ./gaps.json
The forensic significance:
- RecordID gaps — Windows Event Logs use monotonically increasing RecordIDs per channel. A gap (not at rotation boundary) indicates selective record deletion via tools like
Eventlogedit - Time gaps — unexpectedly quiet periods on normally chatty channels suggest bulk record removal
--min-time-gap-minutes— customizable threshold; adjust based on your baseline
This capability alone justifies adding Chainsaw to your toolkit. Attackers know you'll check for Event ID 1102 (log cleared). They don't expect you to detect their surgical precision.
Example 4: Structured Search with Tau Expressions
When you need field-specific queries without writing full Sigma rules:
# Hunt for PowerShell script block logging (Event ID 4104)
./chainsaw search -t 'Event.System.EventID: =4104' evtx_attack_samples/
# Case-insensitive string search for known malicious tool
./chainsaw search mimikatz -i evtx_attack_samples/
# Regex search for domain controller references, JSON output
./chainsaw search -e "DC[0-9].insecurebank.local" evtx_attack_samples/ --json
Tau expression syntax explained:
Event.System.EventID: =4104— field pathEvent.System.EventID, operator=(exact match), value4104- More powerful than grep because it understands EVTX structure, not just raw text
- Combine with
--from/--tofor temporal filtering,--outputfor file export
Example 5: SRUM Analysis for Application Execution Evidence
SRUM (System Resource Usage Monitor) tracks application execution even when logs are cleared:
./chainsaw analyse srum \
--software ./SOFTWARE \
./SRUDB.dat \
--output ./output.json
Critical requirements:
--software ./SOFTWARE— mandatory path to SOFTWARE registry hive; Chainsaw dynamically extracts SRUM schema instead of hardcoding table structures./SRUDB.dat— the SRUM database itself (located atC:\Windows\System32\sru\SRUDB.daton live systems)- Output reveals application timelines, network usage, energy consumption — behavioural evidence that persists for 30-60 days
The --stats-only flag provides quick database overview without full parsing:
./chainsaw analyse srum --software ./SOFTWARE ./SRUDB.dat --stats-only
Advanced Usage & Best Practices
Performance Optimization
- Always use
--releasebuilds — the speed difference is staggering on large datasets - Filter by time first — apply
--from/--tobefore loading rules when possible - Use
--skip-errorsfor corrupted EVTX files — don't let one bad log stop your hunt - Limit rule scope with
--level criticalor--kindfilters for initial triage
Rule Management Strategy
- Maintain separate rule directories by threat type (ransomware, APT, insider threat)
- Version-control your mappings — custom field mappings for non-standard log sources
- Update Sigma rules weekly —
git pullin your sigma directory keeps detection current
Operational Security
- Expect AV/EDR false positives — Chainsaw's binary and bundled rules trigger heuristic detection (see Issue #12). Whitelist in your analysis environment.
- Run from read-only media when analyzing live evidence — preserve chain of custody
- Document your commands — use
-ooutput files with timestamps for reproducible analysis
Integration Patterns
- Pipe JSON output to
jqfor custom filtering:./chainsaw hunt ... --json | jq '.[] | select(.level=="critical")' - Import CSV into Timeline Explorer or Timesketch for visualization
- Automate with wrapper scripts for standardized IR playbooks
Comparison with Alternatives
| Capability | Chainsaw | ELK Stack | Splunk | DeepBlueCLI | EVTXCmd |
|---|---|---|---|---|---|
| Setup Time | Seconds | Hours-Days | Hours-Days | Minutes | Minutes |
| Infrastructure Required | None | Elasticsearch cluster | Indexers + Search Heads | PowerShell | None |
| Sigma Rule Support | ✅ Native | ⚠️ Via converters | ⚠️ Via addons | ❌ No | ❌ No |
| Speed (10GB EVTX) | ⚡ Minutes | Slow (indexing) | Moderate | Slow (PowerShell) | Moderate |
| Cross-Platform | ✅ Linux/Mac/Win | ❌ Linux primarily | ❌ Limited | ❌ Windows only | ✅ Yes |
| Standalone Binary | ✅ Single file | ❌ Multiple services | ❌ Multiple services | ❌ Requires PowerShell | ✅ Single file |
| Custom Detection Rules | ✅ Chainsaw + Sigma | ⚠️ Complex | ⚠️ SPL learning curve | ⚠️ Limited | ❌ No |
| SRUM Analysis | ✅ Built-in | ❌ Add-on required | ❌ Add-on required | ❌ No | ❌ No |
| Shimcache Timelines | ✅ Built-in | ❌ Manual | ❌ Manual | ❌ No | ❌ No |
| Log Tampering Detection | ✅ Gaps analysis | ❌ Manual queries | ❌ Manual queries | ❌ No | ❌ No |
| Cost | 🆓 Free | 💰 High (hardware + ops) | 💰💰💰 Very High | 🆓 Free | 🆓 Free |
The verdict: ELK and Splunk excel at continuous monitoring but fail at rapid tactical response. DeepBlueCLI and EVTXCmd lack Sigma ecosystem integration. Chainsaw occupies the critical gap — instant deployment, professional-grade detection, zero overhead.
FAQ: What Developers and Analysts Ask Most
Q1: Is Chainsaw a replacement for my SIEM?
A: No — it's a tactical complement. Use your SIEM for continuous monitoring and alerting. Deploy Chainsaw when you need immediate answers without infrastructure dependency — incident response, air-gapped environments, or historical archive analysis.
Q2: Why does my antivirus flag Chainsaw as malicious?
A: False positive due to bundled Sigma rules containing attack signatures (e.g., "mimikatz") and heuristic detection of the binary. See the official guidance. Whitelist in your analysis environment — never modify the tool to evade detection.
Q3: Can I use Chainsaw on live systems, or only forensic images?
A: Both. On live Windows systems, extract EVTX files from C:\Windows\System32\winevt\Logs\ and SRUM from C:\Windows\System32\sru\SRUDB.dat. For forensic images, mount the volume and point Chainsaw at the extracted artefacts.
Q4: How do I write custom Chainsaw rules?
A: Chainsaw rules use YAML format documented in the repository's rules/ directory. Start by modifying existing rules for AV alerts or log tampering. The project wiki provides detailed syntax guidance.
Q5: What's the maximum EVTX volume Chainsaw can handle?
A: Tested successfully on hundreds of EVTX files totaling multiple gigabytes. Rust's memory safety and the optimized EVTX parser provide exceptional scalability. For massive datasets, use --skip-errors and consider parallel execution across file batches.
Q6: Does Chainsaw support real-time log streaming?
A: No — Chainsaw is designed for batch forensic analysis of static artefacts, not real-time ingestion. For streaming, maintain your existing SIEM infrastructure.
Q7: How frequently is Chainsaw updated?
A: Active development with regular releases. Version 2.x represents a stable, maintained platform. Follow @FranticTyping and @AlexKornitzer for updates.
Conclusion: The Tool That Changes Everything
Chainsaw isn't just faster — it's fundamentally different.
Where other tools demand infrastructure, Chainsaw demands nothing. Where others require configuration, Chainsaw requires only a binary and a question. Where others drown you in data, Chainsaw surfaces precisely the threats that matter — categorized, timestamped, and actionable.
For incident responders, this means measured-in-minutes triage instead of measured-in-hours log ingestion. For threat hunters, this means hypothesis validation without procurement cycles. For security architects, this means a reliable fallback when primary systems fail.
The Rust-powered performance, native Sigma integration, and comprehensive artefact support make Chainsaw the most capable standalone Windows forensic tool available today. The anti-forensic gap detection alone justifies its place in every blue team's arsenal.
Don't wait for your next breach to discover you need this. Download Chainsaw now, test it against the EVTX-Attack-Samples, and integrate it into your incident response playbooks before the next 3 AM emergency.
👉 Get Chainsaw today: https://github.com/WithSecureLabs/chainsaw
Your future self — bleary-eyed at 3:17 AM, facing down an active intrusion — will thank you.
Explore on the BrightCoding network
Hand-picked resources from our other sites.
PWF: The Essential Windows Forensics Training Toolkit
Master Windows digital forensics with PWF, the free training toolkit from Blue Cape Security. Learn to build labs, simulate attacks using Atomic Red Team, acqui...
ForensicsTools: Your Complete Digital Investigation Arsenal
ForensicsTools by mesquidar is a curated arsenal of 100+ free digital forensics tools. This comprehensive guide covers installation, real-world use cases, and h...
Stop Wasting Hours on Manual Threat Intel: Use Malwoverview Instead
Malwoverview is an open-source threat hunting tool aggregating 17+ intelligence sources including VirusTotal, Shodan, and AbuseIPDB. Features LLM-powered AI enr...
Continuez votre lecture
Username Reconnaissance: The Ultimate 2025 Guide to Scanning Social & Developer Platforms Like a Pro
Build a Secure SSH Workspace with SFTP & Terminals
403-Bypass-lab: The Essential Web Security Training Ground
Stop Coding Alone: OPC-Skills Gives Your AI Agent Superpowers
Commentaires 0
Aucun commentaire pour l'instant. Soyez le premier à réagir !