mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #12544 from Security-Onion-Solutions/jertel/status
pcap improvements
This commit is contained in:
@@ -72,13 +72,6 @@ stenoca:
|
|||||||
- user: 941
|
- user: 941
|
||||||
- group: 939
|
- group: 939
|
||||||
|
|
||||||
pcapdir:
|
|
||||||
file.directory:
|
|
||||||
- name: /nsm/pcap
|
|
||||||
- user: 941
|
|
||||||
- group: 941
|
|
||||||
- makedirs: True
|
|
||||||
|
|
||||||
pcaptmpdir:
|
pcaptmpdir:
|
||||||
file.directory:
|
file.directory:
|
||||||
- name: /nsm/pcaptmp
|
- name: /nsm/pcaptmp
|
||||||
|
|||||||
@@ -15,3 +15,12 @@ include:
|
|||||||
{% else %}
|
{% else %}
|
||||||
- pcap.disabled
|
- pcap.disabled
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
# This directory needs to exist regardless of whether STENO is enabled or not, in order for
|
||||||
|
# Sensoroni to be able to look at old steno PCAP data
|
||||||
|
pcapdir:
|
||||||
|
file.directory:
|
||||||
|
- name: /nsm/pcap
|
||||||
|
- user: 941
|
||||||
|
- group: 941
|
||||||
|
- makedirs: True
|
||||||
@@ -23,10 +23,7 @@ so-sensoroni:
|
|||||||
- /opt/so/conf/sensoroni/sensoroni.json:/opt/sensoroni/sensoroni.json:ro
|
- /opt/so/conf/sensoroni/sensoroni.json:/opt/sensoroni/sensoroni.json:ro
|
||||||
- /opt/so/conf/sensoroni/analyzers:/opt/sensoroni/analyzers:rw
|
- /opt/so/conf/sensoroni/analyzers:/opt/sensoroni/analyzers:rw
|
||||||
- /opt/so/log/sensoroni:/opt/sensoroni/logs:rw
|
- /opt/so/log/sensoroni:/opt/sensoroni/logs:rw
|
||||||
{% if GLOBALS.pcap_engine == "SURICATA" %}
|
|
||||||
- /nsm/suripcap/:/nsm/suripcap:rw
|
- /nsm/suripcap/:/nsm/suripcap:rw
|
||||||
- /nsm/suripcaptmp:/nsm/suripcaptmp:rw
|
|
||||||
{% endif %}
|
|
||||||
{% if DOCKER.containers['so-sensoroni'].custom_bind_mounts %}
|
{% if DOCKER.containers['so-sensoroni'].custom_bind_mounts %}
|
||||||
{% for BIND in DOCKER.containers['so-sensoroni'].custom_bind_mounts %}
|
{% for BIND in DOCKER.containers['so-sensoroni'].custom_bind_mounts %}
|
||||||
- {{ BIND }}
|
- {{ BIND }}
|
||||||
|
|||||||
@@ -23,29 +23,19 @@
|
|||||||
"statickeyauth": {
|
"statickeyauth": {
|
||||||
"apiKey": "{{ GLOBALS.sensoroni_key }}"
|
"apiKey": "{{ GLOBALS.sensoroni_key }}"
|
||||||
{% if GLOBALS.is_sensor %}
|
{% if GLOBALS.is_sensor %}
|
||||||
{% from 'pcap/config.map.jinja' import PCAPMERGED %}
|
|
||||||
{% from 'suricata/map.jinja' import SURICATAMERGED %}
|
|
||||||
{# if PCAPMERGED.enabled is true then we know that steno is the pcap engine #}
|
|
||||||
{# if it is false, then user has steno disabled in ui or has selected suricata for pcap engine #}
|
|
||||||
{%- if PCAPMERGED.enabled %}
|
|
||||||
},
|
},
|
||||||
"stenoquery": {
|
"stenoquery": {
|
||||||
"executablePath": "/opt/sensoroni/scripts/stenoquery.sh",
|
"executablePath": "/opt/sensoroni/scripts/stenoquery.sh",
|
||||||
"pcapInputPath": "/nsm/pcap",
|
"pcapInputPath": "/nsm/pcap",
|
||||||
"pcapOutputPath": "/nsm/pcapout"
|
"pcapOutputPath": "/nsm/pcapout"
|
||||||
}
|
|
||||||
{%- elif GLOBALS.pcap_engine == "SURICATA" and SURICATAMERGED.enabled %}
|
|
||||||
},
|
},
|
||||||
"suriquery": {
|
"suriquery": {
|
||||||
"executablePath": "/opt/sensoroni/scripts/suriquery.sh",
|
"executablePath": "/opt/sensoroni/scripts/suriquery.sh",
|
||||||
"pcapInputPath": "/nsm/suripcap",
|
"pcapInputPath": "/nsm/suripcap",
|
||||||
"pcapOutputPath": "/nsm/pcapout",
|
"pcapOutputPath": "/nsm/pcapout",
|
||||||
"pcapMaxCount": {{ SENSORONIMERGED.config.suripcap.pcapMaxCount }}
|
"pcapMaxCount": {{ SENSORONIMERGED.config.suripcap.pcapMaxCount }}
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
{%- else %}
|
|
||||||
}
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,9 +12,6 @@
|
|||||||
include:
|
include:
|
||||||
- suricata.config
|
- suricata.config
|
||||||
- suricata.sostatus
|
- suricata.sostatus
|
||||||
{% if GLOBALS.pcap_engine == "SURICATA" %}
|
|
||||||
- suricata.pcap
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
so-suricata:
|
so-suricata:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
@@ -36,9 +33,7 @@ so-suricata:
|
|||||||
- /nsm/suricata/:/nsm/:rw
|
- /nsm/suricata/:/nsm/:rw
|
||||||
- /nsm/suricata/extracted:/var/log/suricata//filestore:rw
|
- /nsm/suricata/extracted:/var/log/suricata//filestore:rw
|
||||||
- /opt/so/conf/suricata/bpf:/etc/suricata/bpf:ro
|
- /opt/so/conf/suricata/bpf:/etc/suricata/bpf:ro
|
||||||
{% if GLOBALS.pcap_engine == "SURICATA" %}
|
|
||||||
- /nsm/suripcap/:/nsm/suripcap:rw
|
- /nsm/suripcap/:/nsm/suripcap:rw
|
||||||
{% endif %}
|
|
||||||
{% if DOCKER.containers['so-suricata'].custom_bind_mounts %}
|
{% if DOCKER.containers['so-suricata'].custom_bind_mounts %}
|
||||||
{% for BIND in DOCKER.containers['so-suricata'].custom_bind_mounts %}
|
{% for BIND in DOCKER.containers['so-suricata'].custom_bind_mounts %}
|
||||||
- {{ BIND }}
|
- {{ BIND }}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
{% from 'suricata/map.jinja' import SURICATAMERGED %}
|
{% from 'suricata/map.jinja' import SURICATAMERGED %}
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
- suricata.pcap
|
||||||
{% if SURICATAMERGED.enabled and GLOBALS.role != 'so-import' %}
|
{% if SURICATAMERGED.enabled and GLOBALS.role != 'so-import' %}
|
||||||
- suricata.enabled
|
- suricata.enabled
|
||||||
{% elif GLOBALS.role == 'so-import' %}
|
{% elif GLOBALS.role == 'so-import' %}
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
{% from 'suricata/map.jinja' import SURICATAMERGED %}
|
{% from 'suricata/map.jinja' import SURICATAMERGED %}
|
||||||
|
|
||||||
|
# This directory needs to exist regardless of whether SURIPCAP is enabled or not, in order for
|
||||||
|
# Sensoroni to be able to look at old Suricata PCAP data
|
||||||
suripcapdir:
|
suripcapdir:
|
||||||
file.directory:
|
file.directory:
|
||||||
- name: /nsm/suripcap
|
- name: /nsm/suripcap
|
||||||
- user: 940
|
- user: 940
|
||||||
- group: 939
|
- group: 939
|
||||||
- mode: 755
|
- mode: 775
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
|
||||||
|
{% if GLOBALS.pcap_engine == "SURICATA" %}
|
||||||
|
|
||||||
{# there should only be 1 interface in af-packet so we can just reference the first list item #}
|
{# there should only be 1 interface in af-packet so we can just reference the first list item #}
|
||||||
{% for i in range(1, SURICATAMERGED.config['af-packet'][0].threads + 1) %}
|
{% for i in range(1, SURICATAMERGED.config['af-packet'][0].threads + 1) %}
|
||||||
|
|
||||||
@@ -17,6 +21,8 @@ suripcapthread{{i}}dir:
|
|||||||
- name: /nsm/suripcap/{{i}}
|
- name: /nsm/suripcap/{{i}}
|
||||||
- user: 940
|
- user: 940
|
||||||
- group: 939
|
- group: 939
|
||||||
- mode: 755
|
- mode: 775
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user