Skip to main content

MITRE ATT&CK python library

Project description

mitreattack-python

This repository contains a library of Python tools and utilities for working with ATT&CK data. For more information, see the full documentation on ReadTheDocs.

Install

To use this package, install the mitreattack-python library with pip:

pip install mitreattack-python

Note: the library requires python3.

MitreAttackData Library

The MitreAttackData library is used to read in and work with MITRE ATT&CK STIX 2.0 content. This library provides the ability to query the dataset for objects and their related objects. This is the main content of mitreattack-python; you can read more about other modules in this library under "Additional Modules".

Additional Modules

More detailed information and examples about the specific usage of the additional modules in this package can be found in the individual README files for each module linked below.

module description documentation
navlayers A collection of utilities for working with ATT&CK Navigator layers. Provides the ability to import, export, and manipulate layers. Layers can be read in from the filesystem or python dictionaries, combined and edited, and then exported to excel or SVG images. Further documentation can be found here.
attackToExcel A collection of utilities for converting ATT&CK STIX data to Excel spreadsheets. It also provides access to Pandas DataFrames representing the dataset for use in data analysis. Further documentation can be found here.
collections A set of utilities for working with ATT&CK Collections and Collection Indexes. Provides functionalities for converting and summarizing data in collections and collection indexes, as well as generating a collection from a raw stix bundle input. Further documentation can be found here.
diffStix Create markdown, HTML, JSON and/or ATT&CK Navigator layers reporting on the changes between two versions of the STIX2 bundles representing the ATT&CK content. Run diff_stix -h for full usage instructions. Further documentation can be found here.

Related MITRE Work

CTI

Cyber Threat Intelligence repository of the ATT&CK catalog expressed in STIX 2.0 JSON. This repository also contains our USAGE document which includes additional examples of accessing and parsing our dataset in Python.

ATT&CK

ATT&CK® is a curated knowledge base and model for cyber adversary behavior, reflecting the various phases of an adversary’s lifecycle, and the platforms they are known to target. ATT&CK is useful for understanding security risk against known adversary behavior, for planning security improvements, and verifying defenses work as expected.

https://attack.mitre.org

STIX

Structured Threat Information Expression (STIX) is a language and serialization format used to exchange cyber threat intelligence (CTI).

STIX enables organizations to share CTI with one another in a consistent and machine-readable manner, allowing security communities to better understand what computer-based attacks they are most likely to see and to anticipate and/or respond to those attacks faster and more effectively.

STIX is designed to improve many capabilities, such as collaborative threat analysis, automated threat exchange, automated detection and response, and more.

https://oasis-open.github.io/cti-documentation/

ATT&CK scripts

One-off scripts and code examples you can use as inspiration for how to work with ATT&CK programmatically. Many of the functionalities found in the mitreattack-python package were originally posted on attack-scripts.

https://github.com/mitre-attack/attack-scripts

Contributing

To contribute to this project, either through a bug report, feature request, or merge request, please see the Contributors Guide.

Notice

Copyright 2025 The MITRE Corporation

Approved for Public Release; Distribution Unlimited. Case Number 19-0486.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This project makes use of ATT&CK®

ATT&CK Terms of Use

Project details


Download files

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

Source Distribution

mitreattack-python-4.0.2.tar.gz (528.8 kB view details)

Uploaded Source

Built Distribution

mitreattack_python-4.0.2-py3-none-any.whl (544.1 kB view details)

Uploaded Python 3

File details

Details for the file mitreattack-python-4.0.2.tar.gz.

File metadata

  • Download URL: mitreattack-python-4.0.2.tar.gz
  • Upload date:
  • Size: 528.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mitreattack-python-4.0.2.tar.gz
Algorithm Hash digest
SHA256 d3b980cc7f1d8fccda25b0a92d001f6c7f825c0f708eaf8f75d086530a920c7e
MD5 1f674745206707e4b7831015ab07c392
BLAKE2b-256 2e9d08a3f1c6c4cb566edc7bc486dd2595bc3de43fd7c3199599912a4ba0f847

See more details on using hashes here.

Provenance

The following attestation bundles were made for mitreattack-python-4.0.2.tar.gz:

Publisher: lint-publish.yml on mitre-attack/mitreattack-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mitreattack_python-4.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mitreattack_python-4.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2fb71f35cc6512b8614b8d8dd65ed7928a33759f8e4ac2e1861726505f8e65c5
MD5 7f4aa930ba3418f2bee1a5b9ff125176
BLAKE2b-256 e7df16340dd2437ca387e32f8fd7e597bf11c195da32f0622bc0d150ee7826ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for mitreattack_python-4.0.2-py3-none-any.whl:

Publisher: lint-publish.yml on mitre-attack/mitreattack-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page