- runs on the host with the mqtt container
- starts sysdig and sends the recordings to the ids
- a python script with the actual ids algorithm
- gets scap files via rest
- does detection
- sends results to an other endpoint in json format, example: {'generation': 'G1', 'testcases': [{'testcase': 'T001', 'anomaly-score-max': 0}]}
- a small python helper script to test the ids endpoints: start/stop generation/testcase
- a docker container
- only used to test this locally -> this replaces the mqtt container
- install sysdig into the host, see: https://github.com/draios/sysdig/wiki/How-to-Install-Sysdig-for-Linux
- for testing
- build the test container
- start the test container
- Agent
- move to agent directory
- install python dependencies:
sudo pip install -r requirements.txt
- start the agent script
sudo python3 agent.py target_container_name endpoint
- example:
sudo python3 agent.py flamboyant_leavitt http://127.0.0.1:80/ids/upload_scap
- example:
- install sysdig into the ids machine, see: https://github.com/draios/sysdig/wiki/How-to-Install-Sysdig-for-Linux
- move to ids directory
- install python dependencies:
sudo pip install -r requirements.txt
- run the ids script:
sudo python3 ids.py [training|detection] path_to_model algorithm features hostname port fuzzino_endpoint
- hostname and port to listen on for incoming scap file of the agent
- example:
sudo python3 ids.py detection ./models/mosquitto_default.json astide name 127.0.0.1 80 http://127.0.0.1:8081/fz/scores
sudo python3 ids.py detection ./models/mosquitto_freq_stide_n9_w500.json fstide name 127.0.0.1 80 http://127.0.0.1:8081/fz/scores
sudo python3 ids.py detection ./models/mosquitto_freq_stide_r_n9_w500.json fstide name_result 127.0.0.1 80 http://127.0.0.1:8081/fz/scores
- run the ids script:
- sends scap files via HTTP POST to the ids
- recieves scap files over HTTP POST (/ids/upload_scap)
- recieves generation start events over HTTP POST (/ids/start_generation)
- format json, example:
{"generation_name": "g-001"}
- format json, example:
- recieves generation stop events over HTTP POST (/ids/stop_generation)
- format json, example:
{"generation_name": "g-001"}
- format json, example:
- recieves test case start events over HTTP POST (/ids/start_testcase)
- format json, example:
{"testcase_name": "t-1"}
- format json, example:
- recieves test case stop events over HTTP POST (/ids/stop_testcase)
- format json, example:
{"testcase_name": "t-1"}
- format json, example:
- sends generation and testcase results via HTTP POST
- format: json, example:
{'generation': 'G1', 'testcases': [{'testcase': 'T001', 'anomaly-score-max': 0}]}
- format: json, example: