Skip to main content

A small script that creates relationships between common CTI knowledge-bases in STIX 2.1 format.

Project description

Arango CTI Processor

codecov

A small script that creates relationships between common CTI knowledge-bases in STIX 2.1 format.

Before you get started

Arango CTI Processor is built into CTI Butler which also handles the download of knowledgebase objects (what you need for ACTIP to work). As such, CTI Butler is probably better suited to what you're looking for.

Overview

Here at dogesec we have many repositories that generate STIX objects for different knowledge-bases. Many of these knowledgebases often have some link to another.

For example, MITRE ATT&CK objects have references to MITRE CAPEC objects.

Arango CTI Processor is a script that;

  1. reads the ingested CTI from the supported sources in ArangoDB
  2. creates STIX Relationships and Grouping objects to represent the relationships between them

Arango CTI Processor is designed to work with the following data sources:

  • MITRE ATT&CK
    • Enterprise
    • ICS
    • Mobile
  • MITRE CWE
  • MITRE CAPEC
  • MITRE D3FEND

Source

Usage

Install the script

# clone the latest code
git clone https://github.com/muchdogesec/arango_cti_processor
# create a venv
cd arango_cti_processor
python3 -m venv arango_cti_processor-venv
source arango_cti_processor-venv/bin/activate
# install requirements
pip3 install -r requirements.txt

Configuration options

Arango CTI Processor has various settings that are defined in an .env file.

To create a template for the file:

cp .env.example .env

To see more information about how to set the variables, and what they do, read the .env.markdown file.

Run

python3 arango_cti_processor.py \
    --database DATABASE \
    --relationship RELATIONSHIP \
    --ignore_embedded_relationships BOOLEAN \
    --stix2arango_note STRING \
    --modified_min DATETIME \
    --version STRING

Where;

  • --database (required): the arangoDB database name where the objects you want to link are found. It must contain the collections required for the --relationship option(s) selected (see .env.markdown for more)
  • --relationship (optional, dictionary): you can apply updates to certain relationships at run time. Default is all. Note, you should ensure your database contains all the required seeded data. User can select from;
    • capec-attack
    • cwe-capec
    • d3fend-knowledgebases
  • --ignore_embedded_relationships (optional, boolean). Default is false. if true passed, this will stop any embedded relationships from being generated. This is a stix2arango feature where STIX SROs will also be created for _ref and _refs properties inside each object (e.g. if _ref property = identity--1234 and SRO between the object with the _ref property and identity--1234 will be created). See stix2arango docs for more detail if required, essentially this a wrapper for the same --ignore_embedded_relationships setting implemented by stix2arango
  • --modified_min (optional, date). By default arango_cti_processor will consider all objects in the database specified with the property _is_latest==true (that is; the latest version of the object). Using this flag with a modified time value will further filter the results processed by arango_cti_processor to STIX objects with a modified time >= to the value specified.
  • --created_min (optional, date). Same as modified_min but considers created date.
  • version (optional): controls the source version of objects used. This only really applies for d3fend-attack mode (although can be used with all modes) b/c the way relationship generation happens internally (that is all data is already held in the knowledgebase). So if you are using D3FEND 1.3.0 you should pass that here, to ensure relationships to other versions are not created. This will not affect the _is_latest behaviour, b/c this always considers the highest modified time, regardless of version passed.

On each run, only the _is_latest==true version of objects will be considered by the script.

Examples

python3 arango_cti_processor.py \
  --database arango_cti_processor_standard_tests_database \
  --relationship capec-attack \
  --ignore_embedded_relationships false 

How it works

If you would like to know how the logic of this script works in detail, please consult the /docs directory.

Useful supporting tools

Support

Minimal support provided via the dogesec community.

License

Apache 2.0.

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

arango_cti_processor-1.1.3.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

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

arango_cti_processor-1.1.3-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file arango_cti_processor-1.1.3.tar.gz.

File metadata

  • Download URL: arango_cti_processor-1.1.3.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arango_cti_processor-1.1.3.tar.gz
Algorithm Hash digest
SHA256 90795992c1555401edd65839c3fe00c5e42c6ccea7a155cfbc4f4ad92e044085
MD5 ebf45340df487ba6cc22d7eb4a5bf66a
BLAKE2b-256 65b43e9d178bd91efb7983acd42624271636aa7d81047cb9a7b90e41f2be5199

See more details on using hashes here.

Provenance

The following attestation bundles were made for arango_cti_processor-1.1.3.tar.gz:

Publisher: create-release.yml on muchdogesec/arango_cti_processor

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

File details

Details for the file arango_cti_processor-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for arango_cti_processor-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8c19c2c2bee95b04fdd85164e9a741c7d7cf4de9931885f79f0f628d7d9ab659
MD5 853aa5b279a2487c282d339e7df3a884
BLAKE2b-256 8d66c5d2e020b3e63f078defac0d4d589efd08d54c15293fbd33c9e875a4b508

See more details on using hashes here.

Provenance

The following attestation bundles were made for arango_cti_processor-1.1.3-py3-none-any.whl:

Publisher: create-release.yml on muchdogesec/arango_cti_processor

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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page