A version-controlled library of Sigma detection rules mapped to MITRE ATT&CK, validated with Atomic Red Team, and translated to Splunk SPL & Elastic Query DSL.
This repository contains a curated, version-controlled library of Sigma detection rules mapped to the MITRE ATT&CK framework. Each rule:
- π― Maps to a specific ATT&CK Technique and Tactic
- β Has been validated by executing the corresponding Atomic Red Team test
- π Is translated into production-ready Splunk SPL and Elastic Query DSL formats
- π Includes a coverage matrix for reproducibility
Why Detection-as-Code? Traditional SIEM rules live inside vendor UIs, are hard to version, and nearly impossible to peer-review. By treating detections as code, we bring software engineering rigor β version control, testing, CI/CD β to the detection engineering lifecycle.
| # | Sigma Rule | ATT&CK Technique | Tactic | Severity | Validated |
|---|---|---|---|---|---|
| 1 | reconnaissance_port_scan.yml |
T1046 β Network Service Scanning | Discovery | π΄ High | β |
| 2 | suspicious_powershell.yml |
T1059.001 β PowerShell | Execution | π΄ High | β |
| 3 | encoded_powershell.yml |
T1059.001 β Encoded Command | Execution | π΄ High | β |
| 4 | brute_force.yml |
T1110.001 β Password Guessing | Credential Access | π΄ High | β |
| 5 | credential_dumping.yml |
T1003 β OS Credential Dumping | Credential Access | π Critical | β |
| 6 | data_exfiltration.yml |
T1048 β Exfiltration Over Alt. Protocol | Exfiltration | π Critical | β |
| 7 | defense_evasion.yml |
T1055 β Process Injection | Defense Evasion | π Critical | β |
| 8 | lolbin_execution.yml |
T1218 β System Binary Proxy Execution | Defense Evasion | π΄ High | β |
| 9 | malware_execution.yml |
T1059 β Command & Scripting Interpreter | Execution | π Critical | β |
| 10 | lateral_movement.yml |
T1021 β Remote Services | Lateral Movement | π΄ High | β |
| 11 | insider_threat.yml |
T1078 β Valid Accounts | Persistence | π΄ High | β |
| 12 | phishing_document.yml |
T1566.001 β Spearphishing Attachment | Initial Access | π Critical | β |
| 13 | ddos_network_flood.yml |
T1498 β Network Denial of Service | Impact | π΄ High | β |
ATT-CK-Detection-Library/
βββ README.md
βββ LICENSE
βββ sigma-rules/ # π Original Sigma YAML rules
β βββ execution/
β β βββ suspicious_powershell.yml
β β βββ encoded_powershell.yml
β β βββ malware_execution.yml
β βββ credential-access/
β β βββ brute_force.yml
β β βββ credential_dumping.yml
β βββ defense-evasion/
β β βββ defense_evasion.yml
β β βββ lolbin_execution.yml
β βββ discovery/
β β βββ reconnaissance_port_scan.yml
β βββ exfiltration/
β β βββ data_exfiltration.yml
β βββ lateral-movement/
β β βββ lateral_movement.yml
β βββ persistence/
β β βββ insider_threat.yml
β βββ initial-access/
β β βββ phishing_document.yml
β βββ impact/
β βββ ddos_network_flood.yml
βββ splunk-spl/ # π Translated Splunk SPL queries
β βββ *.spl
βββ elastic-queries/ # π Translated Elastic Query DSL
β βββ *.json
βββ validation/ # β
Atomic Red Team test results
β βββ test-results/
β βββ run_validations.ps1
βββ coverage-matrix/ # π ATT&CK Navigator layer
β βββ coverage.json
βββ assets/ # π¨ Images and diagrams
βββ banner.png
git clone https://github.com/ExelR8ight/ATT-CK-Detection-Library.git
cd ATT-CK-Detection-Library# Copy the SPL query from splunk-spl/ and create a Saved Search
# Example: Detect encoded PowerShell execution
index=main sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
| where like(CommandLine, "%-encodedCommand%") OR like(CommandLine, "%-enc %")
| stats count by host, Image, CommandLine, _time
| where count > 3
# Install Atomic Red Team
IEX (IWR 'https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/install-atomicredteam.ps1' -UseBasicParsing)
# Execute a test (e.g., T1059.001 - PowerShell)
Invoke-AtomicTest T1059.001ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
β MITRE ATT&CK βββββΆβ Sigma YAML Rule βββββΆβ Atomic Red Team β
β Technique ID β β (Detection β β Validation β
β + Tactic β β Logic) β β (Fire & Confirm)β
ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
β
βββββββββββββΌββββββββββββ
βΌ βΌ
ββββββββββββββββ ββββββββββββββββ
β Splunk SPL β β Elastic DSL β
β Translation β β Translation β
ββββββββββββββββ ββββββββββββββββ
Each detection follows this lifecycle:
- Identify the ATT&CK technique to detect
- Author the Sigma YAML rule with clear detection logic
- Translate to Splunk SPL and Elastic Query DSL
- Validate by executing the Atomic Red Team test in a lab
- Document results in the coverage matrix
Each rule follows a consistent YAML schema:
title: Encoded PowerShell Execution
id: sigma-exec-002
status: active
description: >
Detects Base64-encoded PowerShell commands commonly used
for defense evasion and payload delivery.
severity: high
confidence: high
mitre_attack:
- technique: T1059.001
tactic: Execution
name: "Command and Scripting Interpreter: PowerShell"
detection:
condition: any
features:
encoded_command_count:
gte: 1
powershell_count:
gte: 5
incident_type: Suspicious PowerShell Activity
reason_template: >
Encoded PowerShell execution detected:
{encoded_command_count} encoded commands,
{powershell_count} total PowerShell executions.Real detection engineering isn't just writing rules β it's tuning them to reduce noise. Here are some examples of false-positive tuning applied in this library:
| Rule | False Positive Scenario | Tuning Applied |
|---|---|---|
suspicious_powershell.yml |
Legitimate admin scripts (SCCM, GPO) fire the rule | Added exclusion for ParentImage matching svchost.exe and gpscript.exe |
reconnaissance_port_scan.yml |
Vulnerability scanners (Nessus, Qualys) trigger the rule | Added src_ip whitelist for authorized scanner IPs |
credential_dumping.yml |
Windows Defender (MsMpEng.exe) legitimately accesses LSASS |
Added SourceImage exclusion for known AV processes |
lolbin_execution.yml |
System admins use certutil to install certificates |
Added condition requiring network activity (-urlcache flag) |
Takeaway: Every rule in this library has been through at least one round of false-positive analysis. The goal is actionable alerts, not a flood of noise.
The coverage-matrix/coverage.json file can be imported directly into the MITRE ATT&CK Navigator to visualize which techniques are covered by this detection library.
To view the heatmap:
- Open the ATT&CK Navigator
- Click Open Existing Layer β Upload from local
- Select
coverage-matrix/coverage.json - Green cells = validated detections exist
The coverage spans 6 tactics: Execution, Credential Access, Defense Evasion, Discovery, Exfiltration, and Lateral Movement.
Contributions are welcome! To add a new detection:
- Fork the repository
- Create a Sigma YAML rule in the appropriate tactic directory
- Translate to Splunk SPL and Elastic DSL
- Validate with Atomic Red Team
- Update the coverage matrix
- Submit a pull request
This project is licensed under the MIT License β see LICENSE for details.
Ankit Singh
π§ ankisinsen152@gmail.com
π LinkedIn Β· GitHub
