Skip to content

Commit abc8ee4

Browse files
authored
Merge pull request #1716 from stratosphereips/sebas-alert-local-visualizer
Add a TAXII web interface for visualising Slips alerts
2 parents b8f148f + 2e179b5 commit abc8ee4

File tree

17 files changed

+428
-205
lines changed

17 files changed

+428
-205
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
path = feel_project
1515
url = https://github.com/stratosphereips/feel_project
1616
branch = main
17+
18+
[submodule "SlipsWeb"]
19+
path = SlipsWeb
20+
url = https://github.com/stratosphereips/SlipsWeb.git

SlipsWeb

Submodule SlipsWeb added at 131238c

config/slips.yaml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ exporting_alerts:
347347

348348
# Configuer all the methods Slips will export data with
349349
# Available options are slack or stix
350-
# export_to : [stix]
350+
# export_to : [stix] (And a TAXII server)
351351
# export_to : [slack]
352352
export_to: []
353353

@@ -373,12 +373,11 @@ exporting_alerts:
373373
# For Stix, if Slips should use TLS
374374
use_https: false
375375

376-
# TAXII
377-
discovery_path: /services/discovery-a
378-
inbox_path: /services/inbox-a
376+
# TAXII 2 discovery endpoint (relative path or full URL)
377+
discovery_path: /taxii2/
379378

380-
# Collection on the server you want to push stix data to
381-
collection_name: collection-a
379+
# Collection (ID or title) on the server you want to push STIX data to
380+
collection_name: Alerts
382381

383382
# This value is only used when Slips is running non-stop (e.g with -i )
384383
# push_delay is the time to wait before pushing STIX data to server
@@ -390,13 +389,7 @@ exporting_alerts:
390389

391390
# TAXII server credentials
392391
taxii_username: admin
393-
taxii_password: admin
394-
395-
# URL used to obtain JWT token. set this to '' if you don't want to use it
396-
# is required for JWT based authentication.
397-
# (JWT based authentication is Optional)
398-
# It's usually /management/auth
399-
jwt_auth_path: /management/auth
392+
taxii_password: changeme_before_installing_a_medallion_server
400393

401394
#############################
402395
CESNET:

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ RUN apt update && apt install -y --no-install-recommends \
6464
&& curl -fsSL https://download.opensuse.org/repositories/security:zeek/xUbuntu_22.04/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/security_zeek.gpg > /dev/null \
6565
&& apt update \
6666
&& apt install -y --no-install-recommends --fix-missing \
67-
zeek \
67+
zeek-8.0 \
6868
npm \
6969
&& ln -s /opt/zeek/bin/zeek /usr/local/bin/bro \
7070
&& apt clean \

docker/light/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN set -eux; \
2727
| tee /etc/apt/sources.list.d/security:zeek.list \
2828
&& curl -fsSL https://download.opensuse.org/repositories/security:zeek/xUbuntu_22.04/Release.key \
2929
| gpg --dearmor | tee /etc/apt/trusted.gpg.d/security_zeek.gpg > /dev/null \
30-
&& apt-get update && apt-get install -y --no-install-recommends --fix-missing zeek \
30+
&& apt-get update && apt-get install -y --no-install-recommends --fix-missing zeek-8.0 \
3131
&& ln -s /opt/zeek/bin/zeek /usr/local/bin/bro \
3232
&& apt-get clean \
3333
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

docker/light/excluded_libs.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ scikit_learn
1616
slackclient
1717
matplotlib
1818
stix2
19-
cabby
2019
pandas
2120
setuptools
2221
numpy

docs/exporting.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,46 +40,44 @@ You can do this by going to the channel, then clicking on the channel's name. Th
4040

4141
## STIX
4242

43-
If you want to export alerts to your TAXII server using STIX format, change ```export_to``` variable to export to STIX, and Slips will automatically generate a
44-
```STIX_data.json``` containing all alerts it detects.
43+
If you want to export alerts to your TAXII 2 server using STIX 2.1 format,
44+
set ```export_to``` to ```stix``` and Slips will automatically generate a
45+
```STIX_data.json``` bundle containing the indicators it detects and push it to
46+
your collection.
4547

4648

4749
[ExportingAlerts]
4850
export_to = [stix]
4951

5052

51-
You can add your TAXII server details in the following variables:
53+
Configure the TAXII client by editing the following variables:
5254

53-
```TAXII_server```: link to your TAXII server
55+
```TAXII_server```: host name or IP address of the TAXII server.
5456

55-
```port```: port to be used
57+
```port```: TCP port (optional, defaults to 80/443).
5658

57-
```use_https```: use https or not.
59+
```use_https```: set to true to connect over HTTPS (be careful that the default TAXII server in SlipsWeb, Medallion, do not support HTTPS yet)
5860

59-
```discovery_path``` and ```inbox_path``` should contain URIs not full urls. For example:
61+
```discovery_path```: TAXII discovery endpoint path or full URL
62+
(for example ```/taxii2/```).
6063

61-
```python
62-
discovery_path = /services/discovery-a
63-
inbox_path = /services/inbox-a
64-
```
65-
66-
```collection_name```: the collection on the server you want to push your STIX data to.
67-
68-
```push_delay```: the time to wait before pushing STIX data to server (in seconds).
69-
It is used when slips is running non-stop (e.g with -i )
64+
```collection_name```: ID or title of the TAXII collection that should receive your indicators. Be default `Alerts`.
7065

71-
```taxii_username```: TAXII server user credentials
66+
```push_delay```: time between automatic pushes (in seconds) when Slips is
67+
running continuously.
7268

73-
```taxii_password```: TAXII server user password
69+
```taxii_username``` / ```taxii_password```: credentials used for HTTP Basic authentication.
7470

75-
```jwt_auth_path```: auth path if JWT based authentication is used. It's usually /management/auth. this is what we
76-
use to get a token.
71+
**Change the default config password of the TAXII servers you are going to export to in ```config/medallion_config.yaml```**
7772

7873

79-
if your TAXII server is a remote server, you can set the ```port``` to 443 or 80.
74+
Slips stores the generated bundle for each run in the output directory of that
75+
execution (for example `output/<run_id>/STIX_data.json`), so you can inspect the
76+
exact STIX objects that were pushed.
8077

81-
If running on a file, Slips will export to server after analysis is done.
82-
If running on an interface, Slips will export to server every push_delay seconds. by default it's 1h.
78+
If running on a file, Slips will export once before shutdown.
79+
If running on an interface, Slips will export to the server every
80+
```push_delay``` seconds (default 1 hour).
8381

8482
## JSON format
8583

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ This documentation gives an overview how Slips works, how to use it and how to h
6363
contributing
6464
code_documentation
6565
related_repos
66+
visualisation

docs/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,26 +203,25 @@ You can read more about it [here](https://stratospherelinuxips.readthedocs.io/en
203203

204204
## Installing Slips natively
205205

206-
Slips is dependent on three major elements:
206+
Slips depends on three major elements:
207207

208208
- Python 3.10.12
209209
- Zeek 8.0.0
210210
- Redis database 7.0.4
211211

212-
To install these elements we will use APT package manager. After that, we will install python packages required for Slips to run and its modules to work. Also, Slips' interface Kalipso depend on Node.JS and several npm packages.
213212

213+
To install these elements, the script will use the APT package manager. After that, it will install python packages required for Slips to run and its modules to work. Also, Slips' interface Kalipso depend on Node JS and several npm packages.
214214

215215

216216
**Instructions to download everything for Slips are below.**
217217
<br>
218218

219219
### Install Slips using shell script
220-
You can install it using install.sh
220+
You can install it using [install.sh](https://github.com/stratosphereips/StratosphereLinuxIPS/blob/master/install/install.sh)
221221

222222
sudo chmod +x install.sh
223223
sudo ./install.sh
224224

225-
226225
### Installing Slips manually
227226
#### Installing Python, Redis, NodeJs, and required python and npm libraries.
228227

@@ -314,6 +313,7 @@ You can kill this redis database by running:
314313
```
315314
then choosing 1.
316315

316+
After these steps, if you need the submodules, you will need to clone them as done in the `install.sh` script.
317317

318318

319319
## Installing Slips on a Raspberry PI

docs/web_visualization.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Slips Web Visualization
2+
3+
To see the alerts of Slips in a visual way, the methodology is the following
4+
5+
1. Slips must be configured to export the alerts in STIX format to a TAXII server, as explained in [exporting](https://stratospherelinuxips.readthedocs.io/en/develop/exporting.html).
6+
2. You need to install a TAXII server (available in the SlipsWeb submodule folder). See its README.md
7+
3. Use the program `SlipsWeb` that is availbale in the StratosphereWeb submodule that reads from the TAXII server.
8+
9+
All the setup does not consume many resources, so you can run this visualization even in small servers like a Raspberry Pi. However, by having many Slips exporting to the same server you can centralize the visualization of many sensors in a unique location, probably with more hardware if needed.

0 commit comments

Comments
 (0)