Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ build:
- pip install uv
- uv sync --extra docs
build:
- uv run sphinx-build -b html docs $READTHEDOCS_OUTPUT/html
html:
- uv run sphinx-build -b html docs $READTHEDOCS_OUTPUT/html

sphinx:
configuration: docs/conf.py
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# mitreattack-python

[![PyPI version](https://img.shields.io/pypi/v/mitreattack-python.svg)](https://pypi.org/project/mitreattack-python/) [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/) [![License](https://img.shields.io/pypi/l/mitreattack-python.svg)](https://github.com/mitre-attack/mitreattack-python/blob/main/LICENSE) [![Docs](https://img.shields.io/readthedocs/mitreattack-python.svg)](https://mitreattack-python.readthedocs.io/) [![Lint and Test](https://img.shields.io/github/actions/workflow/status/mitre-attack/mitreattack-python/lint-and-test.yml?label=lint%20%26%20test)](https://github.com/mitre-attack/mitreattack-python/actions/workflows/lint-and-test.yml) [![Release and Publish](https://img.shields.io/github/actions/workflow/status/mitre-attack/mitreattack-python/release-and-publish.yml?branch=main&label=release)](https://github.com/mitre-attack/mitreattack-python/actions/workflows/release-and-publish.yml)

This repository contains a library of Python tools and utilities for working with ATT&CK data.
For more information, see the [full documentation](https://mitreattack-python.readthedocs.io/) on ReadTheDocs.

Expand Down
11 changes: 8 additions & 3 deletions mitreattack/attackToExcel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ Build Excel files for selected ATT&CK domains from a release:
attack-to-excel from-release --version v19.0 --domains mobile-attack --domains ics-attack
```

`attack-to-excel` refuses to run when generated output directories already
contain Excel files. Pass `--overwrite` to `from-stix` or `from-release` to
replace existing Excel files. Pass `-v` or `--verbose` to show debug logs,
including sheet-level write messages.

### Module

Example execution targeting a specific domain and version:
Expand Down Expand Up @@ -75,9 +80,9 @@ overview of the available methods follows.
|:------------|:----------|:------|
|get_stix_data|`domain`: the domain of ATT&CK to fetch data from <br> `version`: optional parameter indicating which version to fetch data from (such as "v8.1"). If omitted retrieves the most recent version of ATT&CK. <br>`remote`: optional parameter that provides a URL of a remote ATT&CK Workbench instance to grab data from.| Retrieves the ATT&CK STIX data for the specified version and returns it as a MemoryStore object|
|build_dataframes| `src`: MemoryStore or other stix2 DataSource object holding domain data<br> `domain`: domain of ATT&CK that `src` corresponds to| Builds a Pandas DataFrame collection as a dictionary, with keys for each type, based on the ATT&CK data provided|
|write_excel| `dataframes`: pandas DataFrame dictionary (generated by build_dataframes) <br> `domain`: domain of ATT&CK that `dataframes` corresponds to <br> `version`: optional parameter indicating which version of ATT&CK is in use <br> `output_dir`: optional parameter specifying output directory| Writes out DataFrame based ATT&CK data to excel files|
|export| `domain`: the domain of ATT&CK to download <br> `version`: optional parameter specifying which version of ATT&CK to download <br> `output_dir`: optional parameter specifying output directory| Downloads ATT&CK data from MITRE/CTI and exports it to Excel spreadsheets |
|export_release| `version`: optional ATT&CK release version <br> `stix_version`: STIX release tree, such as "2.0" or "2.1" <br> `output_dir`: parent output directory <br> `stix_base_dir`: optional directory containing release STIX files <br> `domains`: optional list of domains <br> `versioned_output_dir`: preserve domain-version output folders| Exports a full ATT&CK release to Excel spreadsheets, downloading missing STIX files temporarily when needed |
|write_excel| `dataframes`: pandas DataFrame dictionary (generated by build_dataframes) <br> `domain`: domain of ATT&CK that `dataframes` corresponds to <br> `version`: optional parameter indicating which version of ATT&CK is in use <br> `output_dir`: optional parameter specifying output directory <br> `overwrite`: optional parameter allowing existing Excel files to be replaced| Writes out DataFrame based ATT&CK data to excel files|
|export| `domain`: the domain of ATT&CK to download <br> `version`: optional parameter specifying which version of ATT&CK to download <br> `output_dir`: optional parameter specifying output directory <br> `overwrite`: optional parameter allowing existing Excel files to be replaced| Downloads ATT&CK data from MITRE/CTI and exports it to Excel spreadsheets |
|export_release| `version`: optional ATT&CK release version <br> `stix_version`: STIX release tree, such as "2.0" or "2.1" <br> `output_dir`: parent output directory <br> `stix_base_dir`: optional directory containing release STIX files <br> `domains`: optional list of domains <br> `versioned_output_dir`: preserve domain-version output folders <br> `overwrite`: optional parameter allowing existing Excel files to be replaced| Exports a full ATT&CK release to Excel spreadsheets, downloading missing STIX files temporarily when needed |

### stixToDf

Expand Down
Loading