Skip to main content

Suricata Threat Bus App

Threat Bus is a publish-subscribe broker for threat intelligence. It is expected that applications register themselves at the bus. Since Suricata can't do that on it's own (yet) this app works as a bridge application in the meantime.

It receives indicators from Threat Bus and picks up all those where the STIX-2 pattern_type equals "suricata". The suricata rules from those IoCs are then forwarded to Suricata using a pre-configured rules file and then reloaded via suricatasc.

Make sure to run this app on the same host as your Suricata installation. Make also sure that this app (e.g., user running this app) has the correct permissions to use the suricatasc command line utility and can read/write the rules file.

Received rule updates are not applied instantaneously to minimize load on Suricata. Instead, users must configure the reload_interval (seconds) in the config file to enable periodic reloads for Suricata to pick up rule changes.

Quick Start

You can configure the app via a YAML configuration file. 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 suricata-threatbus in a virtualenv and start:

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

You first need to configure the rules_file option in the config file. See also below for configuring your local Suricata installation to work with this app.

Suricata Preparation

This app maintains a file with Suricata rules. The app writes to it and Suricata reads from it. You need to make this file known to your Suricata installation by adding it to the rules configuration section in the suricata.yaml config file. Suricata won't pick up rule changes if you skip this step.

Here is an example snippet to add to your Suricata config file:

/etc/suricata/suricata.yaml
--------------------------------------------------------------------------------

....

default-rule-path: /var/lib/suricata/rules

rule-files:
  - suricata.rules
  - threatbus.rules         # !! managed by suricata-threatbus

....

In this example, we configure Suricata to read additional rules from a file called threatbus.rules, located in the default rule path /var/lib/suricata/rules.

You need to provide the path of your custom rule file to this app, so it can modify the file contents when new indicators arrive. See also the rules_file config option in the config.yaml.example file.

Metadata

Release files for suricata-threatbus 2022.5.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suricata-threatbus 2022.5.16
File Size Uploaded
suricata-threatbus-2022.5.16.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for suricata-threatbus 2022.5.16
File Interpreter ABI Platform
suricata_threatbus-2022.5.16-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / suricata-threatbus-2022.5.16.tar.gz

Download URL suricata-threatbus-2022.5.16.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fb483cea594a2ca74d1498d4aab52b4ce2ed1aeb48dd7cfb98bc65bf322a665d
BLAKE2b-256 checksum
How to use checksums
aee9757e617457f3df29f5820c0d207ffeedcb48352cbfe8ea7edf54297ac62b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

Release files / suricata_threatbus-2022.5.16-py3-none-any.whl

Download URL suricata_threatbus-2022.5.16-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d7e3d137732219cde6bff5bd0822fc7f7af37b319bc5fb5b68856a71f55d1a1
BLAKE2b-256 checksum
How to use checksums
093a8416fd3042078cb7dd12d4304eaede07df35d09aac6c1ea22b7e92635f0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

Release history Release notifications | RSS feed

This release

2022.5.16 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page