muchdogesec / arango_cti_processor

A small script that creates relationships between common CTI knowledge-bases in STIX 2.1 format.
https://www.dogesec.com/
Apache License 2.0
3 stars 0 forks source link
capec cpe cve cwe mitre-attack nvd sigma-rules stix2

Arango CTI Processor

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

tl;dr

arango_cti_processor

Watch the demo.

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.

ArangoDB 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

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

Prerequisites

Assumes the database entered at the command line has the following collection names;

These utilities in stix2arango will do this automatically for you.

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

Note, the installation assumes ArangoDB is already installed locally.

You can install ArangoDB here. arango_cti_processor is compatible with both the Enterprise and Community versions.

Setup configoration options

You will need to create an .env file as follows;

cp .env.example .env

You will then need to specify details of your ArangoDB install (host, user, and password). It is important the user chosen has the ability to write/update new databases, collections and records.

Run

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

Where;

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 \
  --stix2arango_note test01 \
  --ignore_embedded_relationships false 

Backfilling data

stix2arango contains a set of utility scripts that can be used to backfill all the datasources required for this test.

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.