Skip to content

ExelR8ight/ATT-CK-Detection-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ATT&CK Detection Library Banner

πŸ›‘οΈ ATT&CK-Mapped Detection Library

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.

Rules Techniques Tactics Validated License


πŸ“‹ Overview

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.


πŸ—ΊοΈ Coverage Matrix

# 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 βœ…

πŸ“ Repository Structure

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

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/ExelR8ight/ATT-CK-Detection-Library.git
cd ATT-CK-Detection-Library

2. Deploy a Rule to Splunk

# 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

3. Validate with Atomic Red Team

# 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

πŸ”§ How Rules Are Built

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  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:

  1. Identify the ATT&CK technique to detect
  2. Author the Sigma YAML rule with clear detection logic
  3. Translate to Splunk SPL and Elastic Query DSL
  4. Validate by executing the Atomic Red Team test in a lab
  5. Document results in the coverage matrix

πŸ“„ Sigma Rule Format

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.

πŸ”§ False-Positive Tuning

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.


πŸ—ΊοΈ ATT&CK Navigator Coverage

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:

  1. Open the ATT&CK Navigator
  2. Click Open Existing Layer β†’ Upload from local
  3. Select coverage-matrix/coverage.json
  4. Green cells = validated detections exist

The coverage spans 6 tactics: Execution, Credential Access, Defense Evasion, Discovery, Exfiltration, and Lateral Movement.


🀝 Contributing

Contributions are welcome! To add a new detection:

  1. Fork the repository
  2. Create a Sigma YAML rule in the appropriate tactic directory
  3. Translate to Splunk SPL and Elastic DSL
  4. Validate with Atomic Red Team
  5. Update the coverage matrix
  6. Submit a pull request

πŸ“œ License

This project is licensed under the MIT License β€” see LICENSE for details.


πŸ‘€ Author

Ankit Singh
πŸ“§ ankisinsen152@gmail.com
πŸ”— LinkedIn Β· GitHub

About

Detection-as-Code repository containing highly tuned Sigma rules translated to Splunk SPL and Elastic DSL, validated via Atomic Red Team.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages