From raw EVTX to host intrusion timelines.
Offline endpoint forensics CLI that parses Sysmon, Windows Defender, PowerShell, and Security EVTX files into process trees, investigation timelines, IOCs, and evidence-backed findings.
- Features
- Quick Start
- CLI Reference
- Example Terminal Output
- Interactive HTML Dashboard
- Project Structure
- Methodology
- Configuration
- Contributing
- Author
- License
| Feature | Description |
|---|---|
| Universal EVTX Parser | Dynamic extraction engine that handles any Event ID and provider without hardcoded schemas. |
| Process Tree Reconstruction | Correlates Sysmon EID 1 / Security EID 4688 into a full parent β child process forest. |
| Network & DNS Correlation | Maps Sysmon EID 3 (Network) and EID 22 (DNS) events to the exact process that initiated them. |
| Windows Defender Integration | Extracts EID 1116/1117/5001 alerts and links them to the responsible process. |
| PowerShell Deep Analysis | Parses EID 4104 ScriptBlock logs and auto-decodes Base64 payloads (UTF-16LE / UTF-8). |
| Sigma Rule Engine | Lightweight offline Sigma YAML evaluator with wildcard matching and MITRE ATT&CK tagging. |
| Local IOC Matching | O(1) lookups against flat files (bad-ips.txt, bad-hashes.txt). |
| VirusTotal Enrichment | Optional --vt-api-key flag for online hash/IP/domain reputation checks with local caching and rate limiting. |
| LOLBin Detection | Flags suspicious certutil, powershell -enc, and other living-off-the-land techniques. |
| Whitelist Noise Reduction | Regex-based whitelist prunes known-good branches only if they have no suspicious children or network activity. |
| Interactive HTML Dashboard | Standalone report with Chart.js doughnut/bar charts, vis-network process tree and network graph, findings table, and IOC copy-to-clipboard. |
| Multi-Format Export | --format html,json,csv,markdown β generate any combination in a single run. |
| PDF Export | One-click browser export via html2pdf.js with print-optimised CSS. |
- Python 3.10+
- Exported
.evtxfiles from a Windows endpoint
git clone https://github.com/1tsprune/EVTXCase.git
cd EVTXCase
python -m venv .venv
source .venv/bin/activate # Linux / macOS
# .venv\Scripts\activate # Windows
pip install -e .# Analyse a directory of EVTX files
evtxcase analyze logs/ --output cases/incident-001 --format html,json,csv,markdownevtxcase analyze logs/ \
--output cases/incident-001 \
--format html,markdown,json,csv \
--sigma rules/sigma/ \
--ioc-file config/ \
--whitelist config/whitelist.yaml \
--vt-api-key YOUR_API_KEYUsage: evtxcase analyze [OPTIONS] LOGS_DIR
Arguments:
LOGS_DIR Directory containing .evtx log files. [required]
Options:
-o, --output Output directory for reports. [default: output]
-f, --format Comma-separated formats. [default: html]
--sigma Path to Sigma rules directory.
--ioc-file Path to IOC config directory.
--whitelist, -w Path to whitelist YAML. [default: config/whitelist.yaml]
--vt-api-key VirusTotal API key for enrichment.
--version, -V Show version and exit.
EvtxCase 1.0.0 π
[+] Input Directory: logs/
[+] Loading Configurations:
- Whitelist: 10 rules loaded
- Sigma Rules: 1 rules loaded
- Local Threat Intel: 4 IOCs loaded
[+] Parsed Microsoft-Windows-Sysmon%4Operational.evtx (14,532 events)
[+] Parsed Microsoft-Windows-Windows Defender%4Operational.evtx (12 events)
[+] Engine:
- Events Filtered (Noise Reduction): 6,211 events ignored
- Process Nodes Reconstructed: 834
- Timeline events correlated: 14,544
- Base64 Payloads Decoded: 3
- IOCs Extracted: 45
[+] Findings (Categorized):
[Execution] HIGH Sigma Hit: Certutil Download (RecordID=1102)
[Execution] HIGH Base64 PowerShell Payload Decoded (RecordID=840)
[Defense Evasion] HIGH Windows Defender detected malware (RecordID=445)
[Command & Control] CRIT Matched IOC: Known C2 IP (185.x.x.x) (RecordID=1190)
[+] Rendering HTML Dashboard... Done! π
Output written to: cases/incident-001
-> cases/incident-001/report.html (Interactive Dashboard)
The standalone HTML report opens in any browser with no server required. It includes:
- Executive Summary β Metric cards, severity doughnut chart, MITRE ATT&CK tactics chart
- Activity Timeline β Bar chart of event volume over time
- Process Tree β Textual + interactive vis-network graph (red nodes = suspicious)
- Network Graph β Force-directed process β IP/domain correlation map
- Findings Table β Sortable by severity, click to expand evidence
- IOCs β Deduplicated IPs, domains, hashes, file paths with copy-to-clipboard
EVTXCase/
βββ pyproject.toml
βββ README.md
βββ LICENSE
βββ .gitignore
βββ config/
β βββ whitelist.yaml # Noise reduction rules
β βββ bad-ips.txt # Local threat intel (IPs)
β βββ bad-hashes.txt # Local threat intel (hashes)
β βββ sigma/ # Sigma detection rules
β βββ example_lolbin.yml
βββ templates/
β βββ report.html # Jinja2 HTML dashboard template
βββ src/evtxcase/
βββ __init__.py # Version
βββ cli.py # Typer CLI entrypoint
βββ config.py # Whitelist YAML loader
βββ models.py # Pydantic data models
βββ process_tree.py # 3-pass correlation engine
βββ parsers/
β βββ universal.py # Dynamic EVTX parser
β βββ sysmon.py # Sysmon-specific extensions
β βββ defender.py # Defender-specific extensions
β βββ powershell.py # Base64 decode for EID 4104
βββ detectors/
β βββ engine.py # Detection orchestrator
β βββ iocs.py # Local + VT IOC matcher
β βββ sigma_wrapper.py # Lightweight Sigma evaluator
β βββ cmd_detector.py # LOLBin / Base64 detector
β βββ vt_client.py # VirusTotal v3 client
βββ output/
βββ html.py # Jinja2 report generator
EvtxCase follows a six-phase workflow:
- Ingest β Discover and open
.evtxfiles - Parse β Dynamically extract System metadata and flatten EventData
- Correlate β Build process trees, attach network/file/DNS/alert events
- Extract & Match β Run Sigma rules, IOC matching, LOLBin detection, VT enrichment
- Validate β Whitelist noise reduction, finding deduplication
- Report β Generate HTML dashboard, Markdown, JSON, and CSV outputs
whitelist:
- image: "C:\\\\Windows\\\\System32\\\\svchost\\.exe"
- image: "C:\\\\Windows\\\\System32\\\\lsass\\.exe"
- image: "C:\\\\Windows\\\\System32\\\\services\\.exe"Rules support regex patterns (case-insensitive). A whitelisted process is pruned only if it has no suspicious children, network connections, or Defender alerts.
Place one indicator per line in config/bad-ips.txt and config/bad-hashes.txt. Lines starting with # are ignored.
Drop standard Sigma YAML files into config/sigma/. The engine supports selection blocks with exact match and * wildcard patterns.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes
- Push to the branch and open a Pull Request
Eky Januarta 1tsprune.com | GitHub: @1tsprune
This project is licensed under the MIT License. See the LICENSE file for details.
