Skip to main content

mitre-attackctl

A fast, batteries-included CLI companion for MITRE ATT&CK® TTPs.

✨ Features

  • 🔍 Instant, offline TTP lookup - Search techniques using fuzzy matching
  • 📋 Rich technique details - View comprehensive information in YAML, JSON, or Markdown
  • 🔗 Clickable links - Technique IDs link directly to MITRE ATT&CK website
  • 🔄 Stay current - Easy updates to latest ATT&CK framework data
  • 💾 Smart caching - Local storage for offline access and performance
  • 🎨 Beautiful output - Rich terminal UI with tables, colors, and formatting

🚀 Quick Start

Installation

# Install from PyPI (recommended)
pip install mitre-attackctl

# Or install with pipx for isolated installation
pipx install mitre-attackctl

# Or install from source
git clone https://github.com/haasonsaas/mitre-attackctl
cd mitre-attackctl
pip install -e .

Basic Usage

# Search for techniques
attackctl search "gcp persistence"
attackctl search "powershell"
attackctl search "T1059"

# Show technique details
attackctl show T1098.004
attackctl show T1059.003 --format markdown

# Update local data cache
attackctl update

# Get help
attackctl --help
attackctl search --help

💡 Tip: Technique IDs in all output formats are clickable links that open the corresponding MITRE ATT&CK page in your browser (requires a terminal that supports clickable links).

📖 Commands

search - Find techniques

Search for ATT&CK techniques using fuzzy string matching:

# Basic search
attackctl search "credential access"

# Limit results
attackctl search "persistence" --limit 5

# JSON output
attackctl search "powershell" --format json

# Update cache before searching
attackctl search "docker" --update

show - Technique details

Display comprehensive information about a specific technique:

# Default YAML format
attackctl show T1098.004

# Markdown format
attackctl show T1059.003 --format markdown

# JSON format  
attackctl show T1055 --format json

update - Refresh data

Update the local ATT&CK framework data cache:

# Update if cache is stale
attackctl update

# Force update regardless of cache age
attackctl update --force

🏗️ Architecture

Tech Stack

  • Language: Python 3.12+ with Typer for CLI
  • Search: RapidFuzz for fuzzy string matching
  • Data: MITRE ATT&CK STIX bundles via JSON API
  • Output: Rich for beautiful terminal formatting
  • Caching: Local JSON cache in ~/.attackctl/cache/

Data Sources

  • MITRE ATT&CK Enterprise Matrix
  • Cached locally for offline access
  • Auto-updates with version tracking

🛣️ Roadmap

Planned Features

  • 🗺️ Detection mapping - Map techniques to Sigma, Splunk, Sentinel rules
  • 📊 Coverage analysis - Gap analysis for detection rules
  • 🧪 Test data generation - Synthetic logs for rule validation
  • 📤 Report export - Generate reports in multiple formats
  • 🔀 Version comparison - Diff between ATT&CK versions
  • 🔍 Semantic search - AI-powered technique discovery

Coming Soon

  • Sub-technique filtering
  • Tactic and platform filtering
  • Custom rule mappings
  • Integration with detection platforms

🤝 Contributing

Contributions welcome! This project aims to solve real pain points in threat hunting and detection engineering.

Development Setup

git clone https://github.com/haasonsaas/mitre-attackctl
cd mitre-attackctl
pip install -e ".[dev]"
pytest

Project Structure

mitre-attackctl/
├── src/attackctl/
│   ├── cli.py          # Main CLI interface
│   ├── data.py         # ATT&CK data fetching/caching  
│   ├── models.py       # Pydantic data models
│   ├── search.py       # Fuzzy search implementation
│   └── display.py      # Output formatting
├── tests/              # Test suite
└── docs/               # Documentation

📄 License

MIT License - see LICENSE for details.

🙏 Acknowledgments


MITRE ATT&CK® is a registered trademark of The MITRE Corporation.

Metadata

Release files for mitre-attackctl 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mitre-attackctl 1.1.0
File Size Uploaded
mitre_attackctl-1.1.0.tar.gz 26.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mitre-attackctl 1.1.0
File Interpreter ABI Platform
mitre_attackctl-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.8 kB

Release files / mitre_attackctl-1.1.0.tar.gz

Download URL mitre_attackctl-1.1.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a05f51d97d9c837cc30fc25aa0b45dc24d21be26674da99d429a822486d66536
BLAKE2b-256 checksum
How to use checksums
d8d0a1b51a6b067081848cf174ff9991d1d121790533ad43b67b4a35c1061c84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / mitre_attackctl-1.1.0-py3-none-any.whl

Download URL mitre_attackctl-1.1.0-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
262d26b0c4c944d76fc3136f4a500c9d00ec790fca82c9a3cc54c9bcec83bd0b
BLAKE2b-256 checksum
How to use checksums
964b216caa3282921c977e5b0d7e21230988cdb2f548ca2804c913059452d526
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page