Skip to main content

attackmap

A lightweight Python tool that converts MITRE ATT&CK Navigator layers into publication-ready heatmaps.

Technique names and tactic assignments are resolved dynamically from the official MITRE ATT&CK Enterprise STIX bundle.

Supported output formats:

  • PNG
  • SVG
  • PDF
  • HTML

Features

  • Parses MITRE ATT&CK Navigator layer (Enterprise, v4.5+)
  • Resolves technique metadata dynamically from official MITRE ATT&CK STIX bundle (tested with ATT&CK v19)
  • Automatically balances dense tactic columns into adaptive sub-columns while preserving ATT&CK tactic grouping
  • Techniques mapped to multiple tactics are automatically rendered in every applicable tactic
  • Analyst-defined score visualization (integer 0–100)
  • Multi-format export: PNG, SVG, PDF, HTML

Installation

1. Install AttackMap

git clone https://github.com/HalfTimeOfLife/attackmap.git
cd attackmap
pip install .

3. Download MITRE ATT&CK STIX bundle

curl -L -o enterprise-attack.json \
  https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json

Technique names and tactic assignments are resolved dynamically from the official STIX bundle.


Usage

attackmap \
  --layer  <layer.json> \
  --stix   <enterprise-attack.json> \
  --output <output/heatmap> \
  --title  "<Heatmap title>" \
  --format <png|svg|pdf|html|all> \
  --min-score <0-100>
Argument Required Default Description
--layer yes ATT&CK Navigator JSON layer
--stix yes MITRE ATT&CK STIX bundle
--output yes Output path (extension overridden by format)
--title no Layer name Heatmap title
--format no png Output format: png, svg, pdf, html, all
--min-score no 0 Minimum score threshold (0–100)
--version no Display program version and exit

Filtering by score

You can filter techniques using any analyst-defined score.

attackmap \
  --layer example-layer.json \
  --stix enterprise-attack.json \
  --output heatmap \
  --min-score 80

Only techniques whose score is greater than or equal to 80 will be rendered.


Layer format

Each technique requires:

  • techniqueID
  • score (integer between 0 and 100)

Supported optional fields:

  • enabled
  • comment (displayed in HTML output)
{
  "name": "Example layer",
  "versions": {
    "attack": "19",
    "navigator": "5.1.0",
    "layer": "4.5"
  },
  "domain": "enterprise-attack",
  "techniques": [
    { "techniqueID": "T1566.001", "score": 100 },
    { "techniqueID": "T1055.003", "score": 90 }
  ]
}

Output formats

PNG / SVG / PDF

Static heatmap rendering suitable for reports and offline analysis.

example_heatmap

HTML

Interactive heatmap with:

  • clickable techniques
  • detail sidebar
    • technique ID
    • score
    • analyst comments
    • direct links to MITRE ATT&CK
  • fully offline single-file output

Project structure

attackmap/
├── attackmap
│   ├── attack
│      ├── __init__.py
│      ├── enrich.py
│      └── parser.py
│   ├── layout
│      ├── __init__.py
│      └── columns.py
│   ├── render
│      ├── __init__.py
│      ├── common.py
│      ├── render_html.py
│      └── render_image.py
│   ├── __init__.py
│   ├── __main__.py
│   ├── cli.py
│   └── constants.py
├── docs
│   ├── example_heatmap.html
│   ├── example_heatmap.pdf
│   ├── example_heatmap.png
│   └── example_heatmap.svg
├── examples
│   └── example-layer.json
├── .gitignore
├── LICENSE
├── README.md
├── ROADMAP.md
└── pyproject.toml

License

MIT License — see LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

attackmap_navigator-1.2.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

attackmap_navigator-1.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file attackmap_navigator-1.2.tar.gz.

File metadata

  • Download URL: attackmap_navigator-1.2.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for attackmap_navigator-1.2.tar.gz
Algorithm Hash digest
SHA256 fd0650f874bca9b03754f9443d532fce35743ea46f2e5b4110373d7619a423f8
MD5 72cb3ef13ec4cdaff01eeece16cbd19c
BLAKE2b-256 0a19f40e0382b11d22da507fe0324c8898021f48fb5ce5b498393109b3fa7451

See more details on using hashes here.

File details

Details for the file attackmap_navigator-1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for attackmap_navigator-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 17ac94f2b083accbb84ecc31db5e83fbd1f14b7c60e2c7da13e891fa0bc871e6
MD5 dde334e49e269f0810bc92406d839c15
BLAKE2b-256 05969a2f2f4b03a168152e7f276dc3a8501aaf88b296dfa919de14055b6b2511

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.1

2 files

This release

1.2 This release

2 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