Skip to main content

Bridges the gap between Threat Bus and STIX-Shifter

Project description

STIX-Shifter Threat Bus

This app bridges the gap between Threat Bus and various security tools by leveraging STIX-Shifter.

STIX-Shifter is a tool and library to transform STIX patterns into native queries for a variety of (mostly commercial) security tools, like IBM QRadar or Splunk. This app connects STIX-Shifter with Threat Bus and provides a simple way to communicate with the commercial tools of your choice via Threat Bus.

How It Works

The stix-shifter-threatbus app uses ZeroMQ to connect with Threat Bus. To connect via ZeroMQ, users must first install and configure the threatbus-zmq plugin on their Threat Bus host.

This app functions as middleman between Threat Bus and security tools supported by STIX-Shifter. It subscribes to indicator updates from the bus and uses STIX-Shifter to actively translate STIX-2 intelligence to native queries. The app then executes these queries via STIX-Shifter. [Result processing is yet to be implemented.]

Quick Start

You can configure the app via a YAML configuration file or via env vars. See config.yaml.example for an example config file. Rename the example to config.yaml before starting.

Alternatively, configure the app via environment variables, similarly to Threat Bus, or pass a path to configuration file via -c /path/to/config.yaml.

Install stix-shifter-threatbus in a virtualenv and start it:

python -m venv venv
source venv/bin/activate
make dev-mode
stix-shifter-threatbus

Docker

You can also run this app via Docker.

  • Build it:
    docker build . -t tenzir/stix-shifter-threatbus:latest
    
  • Run it to print the helptext.
    docker run tenzir/stix-shifter-threatbus:latest
    
  • Run and mount a custom config file into the container:
    docker run --net=host -v /path/to/your/conf.yaml:/opt/tenzir/threatbus/stix-shifter-threatbus/config.yaml tenzir/stix-shifter-threatbus:latest -c config.yaml
    

Configuration

Apart from the logging section, which is self-explanatory, users need to configure the threatbus endpoint of the ZerMQ-App plugin and an optional snapshot of historic threat intel data they want to fetch.

Additionally, users must configure each STIX-Shifter module individually to use it with this app. You also must install the corresponding modules according to your configuration. For example, if you configure a key splunk in the modules section, you must install the stix-shifter-modules-splunk. Otherwise the app will throw an error. See below for an example:

threatbus: localhost:13370 # connect with Threat Bus via this endpoint
snapshot: 300 # request 300 days of historic indicators
modules:
  # for details on a module's options, please see https://github.com/opencybersecurityalliance/stix-shifter/blob/master/OVERVIEW.md#how-to-use
  # to use the key `splunk` you must install `stix-shifter-modules-splunk`
  # same goes for any other key, e.g., `elastic`, `qradar`, etc...
  splunk:
    max_results: 100 # limit the number of events queried by STIX-Shifter
    # https://github.com/opencybersecurityalliance/stix-shifter/blob/master/OVERVIEW.md#connection
    connection:
      host: localhost
      port: 8089 # Management port
      selfSignedCert: false
    # https://github.com/opencybersecurityalliance/stix-shifter/blob/master/OVERVIEW.md#configuration
    transmission:
      auth:
        username: admin
        password: admin123
    # https://github.com/opencybersecurityalliance/stix-shifter/blob/master/OVERVIEW.md#translate
    translation: # {<Any required options specific to the particular data source>}
    # The data_source is a STIX-2 DataSource (e.g., an `identity`) and is used
    # to create a STIX bundle with the queried results. You configure it here
    # and only once for this module.
    data_source:
      type: identity
      identity_class: events
      name: Splunk
      id: identity--629a6400-8817-4bcb-aee7-8c74fc57482c

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

stix-shifter-threatbus-2022.5.16.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

stix_shifter_threatbus-2022.5.16-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file stix-shifter-threatbus-2022.5.16.tar.gz.

File metadata

File hashes

Hashes for stix-shifter-threatbus-2022.5.16.tar.gz
Algorithm Hash digest
SHA256 4999fb52c3af52ce223092f92af9d58f9becc7168c0621b9ae3a8d175fae7b9d
MD5 7ebaf5cc5f27a40b170e0f0f6889b877
BLAKE2b-256 c2b2ed097b2d85f0dfff8b02f3f5805c14bfeca4bb40ef4c201d970ed69943f4

See more details on using hashes here.

File details

Details for the file stix_shifter_threatbus-2022.5.16-py3-none-any.whl.

File metadata

File hashes

Hashes for stix_shifter_threatbus-2022.5.16-py3-none-any.whl
Algorithm Hash digest
SHA256 92bee61a0c4347306870af0784e834afda573804a1b969ba5d29cd69d15744da
MD5 0affbd1ae637842c5d9cb02deb863e2c
BLAKE2b-256 7c9343857bd0e9a6819dd3ee9f587dd8f45afe4ea4f9e91f77808923e1c8c8f8

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