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

pip install attackmap-navigator

2. 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.

Install from source (for development)

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

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.

Metadata

Release files for attackmap-navigator 1.2.1

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

Source distribution (sdist)

Source distribution for attackmap-navigator 1.2.1
File Size Uploaded Provenance
attackmap_navigator-1.2.1.tar.gz 13.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for attackmap-navigator 1.2.1
File Interpreter ABI Platform
attackmap_navigator-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.2 kB

Release files / attackmap_navigator-1.2.1.tar.gz

Download URL attackmap_navigator-1.2.1.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
90ff93370d75f385e3a2b491167b4c34a43c82201b497f34702d1dfe8959df1c
BLAKE2b-256 checksum
How to use checksums
9561bf615ba3aa2472962dc702895a4a84149f03f0d9915d8fce9f0700725f04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / attackmap_navigator-1.2.1-py3-none-any.whl

Download URL attackmap_navigator-1.2.1-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fb1ab8c81abc58fdb80906468d850943cf0e3605c483cfbd7a4f264ad20c7db
BLAKE2b-256 checksum
How to use checksums
5d078a838106eb8eb03e81af0ce8e9133de8218e5a20885dce99bd00ccae8fd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for attackmap-navigator 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files No provenance

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