Go to file
Hannah Ward 783a1e9936
fix: Variable name was wrong
fixes #6
2017-05-22 16:45:06 +01:00
OpenTAXII@461543d4d8 fix: Point submodule to own fork 2017-05-10 15:37:39 +01:00
config fix: Update opentaxii version 2017-03-29 11:57:49 +01:00
misp_taxii_hooks fix: Variable name was wrong 2017-05-22 16:45:06 +01:00
scripts new: Allow cert-based auth 2017-04-07 10:22:05 +01:00
tests Squashed commit of the following: 2016-11-19 15:42:54 +00:00
.gitignore 2 way comms achieved! 2016-12-28 10:51:43 +00:00
.gitmodules fix: Point submodule to own fork 2017-05-10 15:37:39 +01:00
.travis.yml fix: This time misp won't kill itself for low memory ;) 2017-01-13 14:08:41 +00:00
LICENSE Added readme 2016-11-18 11:57:01 +00:00
README.md fix: typo in readme 2017-03-31 12:45:56 +01:00
setup.py new: Add taxii poll to scripts 2017-03-31 10:41:14 +01:00

README.md

MISP Taxii Server

Build Status

A set of configuration files to use with EclecticIQ's OpenTAXII implementation, along with a callback for when data is sent to the TAXII Server's inbox.

Installation

Download the repository with

git clone --recursive https://github.com/MISP/MISP-Taxii-Server

This will also download the OpenTAXII Server, which you should install with

cd OpenTAXII
sudo python3 setup.py install

You'll then need to set up your TAXII database. As you're using MISP, you'll likely already have a MySQL environment running.

Run the following commands to create your databases

mysql -u [database user] -p
# Enter Database password

mysql> create database taxiiauth;

mysql> create database taxiipersist;

mysql> grant all on taxiiauth.* to 'taxii'@'%' identified by 'some_password';

mysql> grant all on taxiipersist.* to 'taxii'@'%' identified by 'some_password';

mysql> exit;

Now, with that data edit config.yaml, and edit the db_connection parameters to match your environment. Change auth_api -> parameters -> secret whilst you're here as well.

If you wish, you can edit the taxii service definitions in services.yaml, or the collections to be created in collections.yaml; full documentation on how this is set up is available at OpenTaxii's docs.

Now it's time to create all your SQL tables. Luckily OpenTaxii comes with commands for this.

You're going to want to export your configuration file to a variable as well.

# An example of this config is in the config directory
export OPENTAXII_CONFIG=/path/to/config.yaml

opentaxii-create-services -c config/services.yaml
opentaxii-create-collections -c config/collections.yaml

# Create a user account
# Set the username and password to whatever you want
opentaxii-create-account -u root -p root

OpenTaxii is now ready to roll, we've just gotta do one or two more things.

Edit misp_taxii_hooks/hooks.py and add your MISP server's URL and API key.

Then, in the repository root directory, run

sudo python3 setup.py install

This will install the TAXII hooks to run when we have new data.

Now we should be ready to go!

opentaxii-run-dev

This should tell you that there is now a server running on localhost:9000 (maybe a different port if you changed it). If there are no errors, you're good!

If you want to test everything is working, run

taxii-push --path http://localhost:9000/services/inbox -f stix_sample.xml \
           --dest collection --username root --password root

Obviously replace anything that differs in your system.

The client should say "Content Block Pushed Successfully" if all went well.

Now you have a TAXII server hooked up to MISP, you're able to send STIX files to the inbox and have them uploaded directly to MISP. So that's nice <3

There is also an experimental feature to push MISP events to the TAXII server when they're published - that's in scripts/push_published_to_taxii.py. It seems to work, but may occasionally re-upload duplicate events to MISP.

Automated TAXII -> MISP Sync

If you want, there is the ability to synchronise between a remote TAXII server and the local MISP server.

$ install-remote-server.sh

[MISP-TAXII-SERVER]
POLLING SERVER INSTALLATION
FRIENDLY SERVER NAME:
< Add a unique server name here, can be anything >

This will then install 2 files to ~/.misptaxii, one for a local server and one for the remote servers. Edit these files as needed. Run install-remote-server.sh once for each remote server you want to add.

You'll probably want to put the sync script on a crontab,

First, run

echo `which python3` `which run-taxii-poll.py`

to get the path of your script, copy it. Then

crontab -e

This will open your crontab. Paste in

* */6 * * * <the output of that echo command you just ran>

This will run the polling script every 6 hours to keep things all synced up.

Planned features

  • Duplicate Detection