Skip to main content

A lightweight Python module to interact with the Mitre Att&ck Enterprise framework.

Project description

Downloads PyPI version License: MIT image

enterpriseattack - MITRE's Enterprise Att&ck

A lightweight Python module to interact with the MITRE ATT&CK Enterprise dataset. Built to be used in production applications due to it's speed and minimal depedancies. Read the docs for more info.

MITRE Att&ck

MITRE ATT&CK® is a globally-accessible knowledge base of adversary tactics and techniques based on real-world observations. The ATT&CK knowledge base is used as a foundation for the development of specific threat models and methodologies in the private sector, in government, and in the cybersecurity product and service community.

Dependancies

  • Python 3.x
  • ujson >= 3.0.0
  • requests >= 2.9.2

Installation

Install via Pip:

pip install enterpriseattack

Alternatively clone the repository:

git clone https://github.com/xakepnz/enterpriseattack.git
cd enterpriseattack
python3 setup.py install

(back to top)

Usage

Initialise an Attack object:

import enterpriseattack

attack = enterpriseattack.Attack()

Example: Passing custom args:

In this example, you can choose where to download the official Mitre Att&ck json from, including proxies to pass through. Alternatively, if you want to save the json file in a separate location, you can alter the enterprise_json arg. By default this is saved within your default site-packages location.

  • update - boolean forces a refresh download (each time this is called), overwriting the previous file.
  • include_deprecated - boolean to include Mitre Att&ck deprecated objects (from previous Att&ck versions).
attack = enterpriseattack.Attack(
   enterprise_json=None,
   url='https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json',
   include_deprecated=False,
   update=False,
   proxies={'http':'http://127.0.0.1:1337'}
)

Example: Iterate over tactics/techniques/sub_techniques:

for tactic in attack.tactics:
   print(tactic.name)
   for technique in tactic.techniques:
      print(technique.name)
      print(technique.detection)

for software in attack.software:
    for technique in software.techniques:
        for sub_technique in technique.sub_techniques:
            print(software.name, technique.name, sub_technique.name)

Example: Create a json object of any tactic/technique/sub_technique/group/software/datasource:

for tactic in attack.tactics:
   print(tactic.to_json())

for group in attack.groups:
   print(group.to_json())

...

For more examples, please refer to the Documentation

(back to top)

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

enterpriseattack-0.1.4.tar.gz (9.6 kB view details)

Uploaded Source

Built Distributions

enterpriseattack-0.1.4-py3.9.egg (35.3 kB view details)

Uploaded Source

enterpriseattack-0.1.4-py2-none-any.whl (17.4 kB view details)

Uploaded Python 2

File details

Details for the file enterpriseattack-0.1.4.tar.gz.

File metadata

  • Download URL: enterpriseattack-0.1.4.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for enterpriseattack-0.1.4.tar.gz
Algorithm Hash digest
SHA256 35359d27bc253b57ef007bc72cf48e0225a25b32d8a06753e1f7a5877800a38b
MD5 b3fec064fb742542ff3a4dae38209bfd
BLAKE2b-256 e7a3385dbcfe2ae68d90778c59e3cef29cab67e38405aa966c4b3c1e0a267b99

See more details on using hashes here.

File details

Details for the file enterpriseattack-0.1.4-py3.9.egg.

File metadata

  • Download URL: enterpriseattack-0.1.4-py3.9.egg
  • Upload date:
  • Size: 35.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for enterpriseattack-0.1.4-py3.9.egg
Algorithm Hash digest
SHA256 617943b52f35d80de7b7a78f107bb6f4fe390bd2f18f11888f631702ea521828
MD5 afe486911abb0b8c38cad71823643e33
BLAKE2b-256 789a279f2fcea25510d55ec37dbbfd26106379a249ff8ca073fd49b9a8a72451

See more details on using hashes here.

File details

Details for the file enterpriseattack-0.1.4-py2-none-any.whl.

File metadata

  • Download URL: enterpriseattack-0.1.4-py2-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for enterpriseattack-0.1.4-py2-none-any.whl
Algorithm Hash digest
SHA256 e8bcd64f7522e79e10a10dc844c3220c615ec05a7d726c0314c17ff3c8574bd7
MD5 d5960477ed9b2107165509fdabbfd331
BLAKE2b-256 8beecd84815bcb1a1a98e0d428a2439e6ab6ab51385af250c03061f3c1c9f048

See more details on using hashes here.

Supported by

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