mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #1031 from Security-Onion-Solutions/quickfix/bro2zeeklogs
change reference from bro to zeek
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
{% set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') %}
|
{% set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') %}
|
||||||
{% set FREQSERVER = salt['pillar.get']('manager:freq', '0') %}
|
{% set FREQSERVER = salt['pillar.get']('manager:freq', '0') %}
|
||||||
{% set DOMAINSTATS = salt['pillar.get']('manager:domainstats', '0') %}
|
{% set DOMAINSTATS = salt['pillar.get']('manager:domainstats', '0') %}
|
||||||
{% set BROVER = salt['pillar.get']('static:broversion', 'COMMUNITY') %}
|
{% set ZEEKVER = salt['pillar.get']('static:zeekversion', 'COMMUNITY') %}
|
||||||
{% set GRAFANA = salt['pillar.get']('manager:grafana', '0') %}
|
{% set GRAFANA = salt['pillar.get']('manager:grafana', '0') %}
|
||||||
|
|
||||||
eval:
|
eval:
|
||||||
@@ -63,7 +63,7 @@ heavy_node:
|
|||||||
- so-suricata
|
- so-suricata
|
||||||
- so-wazuh
|
- so-wazuh
|
||||||
- so-filebeat
|
- so-filebeat
|
||||||
{% if BROVER != 'SURICATA' %}
|
{% if ZEEKVER != 'SURICATA' %}
|
||||||
- so-zeek
|
- so-zeek
|
||||||
{% endif %}
|
{% endif %}
|
||||||
helix:
|
helix:
|
||||||
@@ -186,7 +186,7 @@ sensor:
|
|||||||
- so-telegraf
|
- so-telegraf
|
||||||
- so-steno
|
- so-steno
|
||||||
- so-suricata
|
- so-suricata
|
||||||
{% if BROVER != 'SURICATA' %}
|
{% if ZEEKVER != 'SURICATA' %}
|
||||||
- so-zeek
|
- so-zeek
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- so-wazuh
|
- so-wazuh
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ base:
|
|||||||
|
|
||||||
'*_sensor':
|
'*_sensor':
|
||||||
- static
|
- static
|
||||||
- brologs
|
- zeeklogs
|
||||||
- healthcheck.sensor
|
- healthcheck.sensor
|
||||||
- minions.{{ grains.id }}
|
- minions.{{ grains.id }}
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ base:
|
|||||||
|
|
||||||
'*_eval':
|
'*_eval':
|
||||||
- data.*
|
- data.*
|
||||||
- brologs
|
- zeeklogs
|
||||||
- secrets
|
- secrets
|
||||||
- healthcheck.eval
|
- healthcheck.eval
|
||||||
- elasticsearch.eval
|
- elasticsearch.eval
|
||||||
@@ -45,7 +45,7 @@ base:
|
|||||||
- logstash.search
|
- logstash.search
|
||||||
- elasticsearch.search
|
- elasticsearch.search
|
||||||
- data.*
|
- data.*
|
||||||
- brologs
|
- zeeklogs
|
||||||
- secrets
|
- secrets
|
||||||
- healthcheck.standalone
|
- healthcheck.standalone
|
||||||
- static
|
- static
|
||||||
@@ -57,13 +57,13 @@ base:
|
|||||||
|
|
||||||
'*_heavynode':
|
'*_heavynode':
|
||||||
- static
|
- static
|
||||||
- brologs
|
- zeeklogs
|
||||||
- minions.{{ grains.id }}
|
- minions.{{ grains.id }}
|
||||||
|
|
||||||
'*_helix':
|
'*_helix':
|
||||||
- static
|
- static
|
||||||
- fireeye
|
- fireeye
|
||||||
- brologs
|
- zeeklogs
|
||||||
- logstash
|
- logstash
|
||||||
- logstash.helix
|
- logstash.helix
|
||||||
- minions.{{ grains.id }}
|
- minions.{{ grains.id }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
brologs:
|
zeeklogs:
|
||||||
enabled:
|
enabled:
|
||||||
- conn
|
- conn
|
||||||
- dce_rpc
|
- dce_rpc
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if role in ['heavynode', 'standalone'] %}
|
{% if role in ['heavynode', 'standalone'] %}
|
||||||
{{ append_containers('static', 'broversion', 'SURICATA') }}
|
{{ append_containers('static', 'zeekversion', 'SURICATA') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if role == 'searchnode' %}
|
{% if role == 'searchnode' %}
|
||||||
@@ -41,5 +41,5 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if role == 'sensor' %}
|
{% if role == 'sensor' %}
|
||||||
{{ append_containers('static', 'broversion', 'SURICATA') }}
|
{{ append_containers('static', 'zeekversion', 'SURICATA') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
local_salt_dir=/opt/so/saltstack/local
|
local_salt_dir=/opt/so/saltstack/local
|
||||||
|
|
||||||
bro_logs_enabled() {
|
zeek_logs_enabled() {
|
||||||
|
|
||||||
echo "brologs:" > $local_salt_dir/pillar/brologs.sls
|
echo "zeeklogs:" > $local_salt_dir/pillar/zeeklogs.sls
|
||||||
echo " enabled:" >> $local_salt_dir/pillar/brologs.sls
|
echo " enabled:" >> $local_salt_dir/pillar/zeeklogs.sls
|
||||||
for BLOG in ${BLOGS[@]}; do
|
for BLOG in ${BLOGS[@]}; do
|
||||||
echo " - $BLOG" | tr -d '"' >> $local_salt_dir/pillar/brologs.sls
|
echo " - $BLOG" | tr -d '"' >> $local_salt_dir/pillar/zeeklogs.sls
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail_manager_adv_service_brologs() {
|
whiptail_manager_adv_service_zeeklogs() {
|
||||||
|
|
||||||
BLOGS=$(whiptail --title "Security Onion Setup" --checklist "Please Select Logs to Send:" 24 78 12 \
|
BLOGS=$(whiptail --title "Security Onion Setup" --checklist "Please Select Logs to Send:" 24 78 12 \
|
||||||
"conn" "Connection Logging" ON \
|
"conn" "Connection Logging" ON \
|
||||||
@@ -54,5 +54,5 @@ whiptail_manager_adv_service_brologs() {
|
|||||||
"x509" "x.509 Logs" ON 3>&1 1>&2 2>&3 )
|
"x509" "x.509 Logs" ON 3>&1 1>&2 2>&3 )
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail_manager_adv_service_brologs
|
whiptail_manager_adv_service_zeeklogs
|
||||||
bro_logs_enabled
|
zeek_logs_enabled
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{%- set HOSTNAME = salt['grains.get']('host', '') %}
|
{%- set HOSTNAME = salt['grains.get']('host', '') %}
|
||||||
{%- set BROVER = salt['pillar.get']('static:broversion', 'COMMUNITY') %}
|
{%- set ZEEKVER = salt['pillar.get']('static:zeekversion', 'COMMUNITY') %}
|
||||||
{%- set WAZUHENABLED = salt['pillar.get']('static:wazuh', '0') %}
|
{%- set WAZUHENABLED = salt['pillar.get']('static:wazuh', '0') %}
|
||||||
{%- set STRELKAENABLED = salt['pillar.get']('strelka:enabled', '0') %}
|
{%- set STRELKAENABLED = salt['pillar.get']('strelka:enabled', '0') %}
|
||||||
{%- set FLEETMANAGER = salt['pillar.get']('static:fleet_manager', False) -%}
|
{%- set FLEETMANAGER = salt['pillar.get']('static:fleet_manager', False) -%}
|
||||||
@@ -100,8 +100,8 @@ filebeat.inputs:
|
|||||||
- drop_fields:
|
- drop_fields:
|
||||||
fields: ["source", "prospector", "input", "offset", "beat"]
|
fields: ["source", "prospector", "input", "offset", "beat"]
|
||||||
fields_under_root: true
|
fields_under_root: true
|
||||||
{%- if BROVER != 'SURICATA' %}
|
{%- if ZEEKVER != 'SURICATA' %}
|
||||||
{%- for LOGNAME in salt['pillar.get']('brologs:enabled', '') %}
|
{%- for LOGNAME in salt['pillar.get']('zeeklogs:enabled', '') %}
|
||||||
- type: log
|
- type: log
|
||||||
paths:
|
paths:
|
||||||
- /nsm/zeek/logs/current/{{ LOGNAME }}.log
|
- /nsm/zeek/logs/current/{{ LOGNAME }}.log
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
{% set interface = salt['pillar.get']('sensor:interface', 'bond0') %}
|
{% set interface = salt['pillar.get']('sensor:interface', 'bond0') %}
|
||||||
{% set BROVER = salt['pillar.get']('static:broversion', '') %}
|
{% set ZEEKVER = salt['pillar.get']('static:zeekversion', '') %}
|
||||||
{% set VERSION = salt['pillar.get']('static:soversion', 'HH1.2.2') %}
|
{% set VERSION = salt['pillar.get']('static:soversion', 'HH1.2.2') %}
|
||||||
{% set IMAGEREPO = salt['pillar.get']('static:imagerepo') %}
|
{% set IMAGEREPO = salt['pillar.get']('static:imagerepo') %}
|
||||||
{% set MANAGER = salt['grains.get']('master') %}
|
{% set MANAGER = salt['grains.get']('master') %}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ HOME_NET: "[{{salt['pillar.get']('static:hnmanager', '')}}]"
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% set surimeta_evelog_index = surimeta_evelog_index[0] %}
|
{% set surimeta_evelog_index = surimeta_evelog_index[0] %}
|
||||||
|
|
||||||
{% if salt['pillar.get']('static:broversion', 'ZEEK') == 'SURICATA' %}
|
{% if salt['pillar.get']('static:zeekversion', 'ZEEK') == 'SURICATA' %}
|
||||||
{% do suricata_defaults.suricata.config.outputs[default_evelog_index]['eve-log'].types.extend(suricata_meta.suricata.config.outputs[surimeta_evelog_index]['eve-log'].types) %}
|
{% do suricata_defaults.suricata.config.outputs[default_evelog_index]['eve-log'].types.extend(suricata_meta.suricata.config.outputs[surimeta_evelog_index]['eve-log'].types) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
10
salt/top.sls
10
salt/top.sls
@@ -1,4 +1,4 @@
|
|||||||
{%- set BROVER = salt['pillar.get']('static:broversion', '') -%}
|
{%- set ZEEKVER = salt['pillar.get']('static:zeekversion', '') -%}
|
||||||
{%- set WAZUH = salt['pillar.get']('static:wazuh', '0') -%}
|
{%- set WAZUH = salt['pillar.get']('static:wazuh', '0') -%}
|
||||||
{%- set THEHIVE = salt['pillar.get']('manager:thehive', '0') -%}
|
{%- set THEHIVE = salt['pillar.get']('manager:thehive', '0') -%}
|
||||||
{%- set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') -%}
|
{%- set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') -%}
|
||||||
@@ -48,7 +48,7 @@ base:
|
|||||||
- pcap
|
- pcap
|
||||||
- suricata
|
- suricata
|
||||||
- healthcheck
|
- healthcheck
|
||||||
{%- if BROVER != 'SURICATA' %}
|
{%- if ZEEKVER != 'SURICATA' %}
|
||||||
- zeek
|
- zeek
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
- wazuh
|
- wazuh
|
||||||
@@ -86,7 +86,7 @@ base:
|
|||||||
- kibana
|
- kibana
|
||||||
- pcap
|
- pcap
|
||||||
- suricata
|
- suricata
|
||||||
{%- if BROVER != 'SURICATA' %}
|
{%- if ZEEKVER != 'SURICATA' %}
|
||||||
- zeek
|
- zeek
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if STRELKA %}
|
{%- if STRELKA %}
|
||||||
@@ -188,7 +188,7 @@ base:
|
|||||||
- kibana
|
- kibana
|
||||||
- pcap
|
- pcap
|
||||||
- suricata
|
- suricata
|
||||||
{%- if BROVER != 'SURICATA' %}
|
{%- if ZEEKVER != 'SURICATA' %}
|
||||||
- zeek
|
- zeek
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if STRELKA %}
|
{%- if STRELKA %}
|
||||||
@@ -347,7 +347,7 @@ base:
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
- pcap
|
- pcap
|
||||||
- suricata
|
- suricata
|
||||||
{%- if BROVER != 'SURICATA' %}
|
{%- if ZEEKVER != 'SURICATA' %}
|
||||||
- zeek
|
- zeek
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
- filebeat
|
- filebeat
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ af_packet_fanout_id=23
|
|||||||
af_packet_fanout_mode=AF_Packet::FANOUT_HASH
|
af_packet_fanout_mode=AF_Packet::FANOUT_HASH
|
||||||
af_packet_buffer_size={{ salt['pillar.get']('sensor:zeek_buffer', 128*1024*1024) }}
|
af_packet_buffer_size={{ salt['pillar.get']('sensor:zeek_buffer', 128*1024*1024) }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
[brosa]
|
[zeeksa]
|
||||||
type=standalone
|
type=standalone
|
||||||
host=localhost
|
host=localhost
|
||||||
interface={{ interface }}
|
interface={{ interface }}
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ ADMINPASS1=onionuser
|
|||||||
ADMINPASS2=onionuser
|
ADMINPASS2=onionuser
|
||||||
ALLOW_CIDR=0.0.0.0/0
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
ALLOW_ROLE=a
|
ALLOW_ROLE=a
|
||||||
BASICBRO=7
|
BASICZEEK=7
|
||||||
BASICSURI=7
|
BASICSURI=7
|
||||||
# BLOGS=
|
# BLOGS=
|
||||||
BNICS=eth1
|
BNICS=eth1
|
||||||
BROVERSION=ZEEK
|
ZEEKVERSION=ZEEK
|
||||||
# CURCLOSEDAYS=
|
# CURCLOSEDAYS=
|
||||||
# EVALADVANCED=BASIC
|
# EVALADVANCED=BASIC
|
||||||
GRAFANA=1
|
GRAFANA=1
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ filter_unused_nics() {
|
|||||||
calculate_useable_cores() {
|
calculate_useable_cores() {
|
||||||
|
|
||||||
# Calculate reasonable core usage
|
# Calculate reasonable core usage
|
||||||
local cores_for_bro=$(( (num_cpu_cores/2) - 1 ))
|
local cores_for_zeek=$(( (num_cpu_cores/2) - 1 ))
|
||||||
local lb_procs_round
|
local lb_procs_round
|
||||||
lb_procs_round=$(printf "%.0f\n" $cores_for_bro)
|
lb_procs_round=$(printf "%.0f\n" $cores_for_zeek)
|
||||||
|
|
||||||
if [ "$lb_procs_round" -lt 1 ]; then lb_procs=1; else lb_procs=$lb_procs_round; fi
|
if [ "$lb_procs_round" -lt 1 ]; then lb_procs=1; else lb_procs=$lb_procs_round; fi
|
||||||
export lb_procs
|
export lb_procs
|
||||||
|
|||||||
@@ -143,18 +143,18 @@ secrets_pillar(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Enable Bro Logs
|
# Enable Bro Logs
|
||||||
bro_logs_enabled() {
|
zeek_logs_enabled() {
|
||||||
echo "Enabling Bro Logs" >> "$setup_log" 2>&1
|
echo "Enabling Bro Logs" >> "$setup_log" 2>&1
|
||||||
|
|
||||||
local brologs_pillar=./pillar/brologs.sls
|
local zeeklogs_pillar=./pillar/zeeklogs.sls
|
||||||
|
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
"brologs:"\
|
"zeeklogs:"\
|
||||||
" enabled:" > "$brologs_pillar"
|
" enabled:" > "$zeeklogs_pillar"
|
||||||
|
|
||||||
if [ "$MANAGERADV" = 'ADVANCED' ]; then
|
if [ "$MANAGERADV" = 'ADVANCED' ]; then
|
||||||
for BLOG in "${BLOGS[@]}"; do
|
for BLOG in "${BLOGS[@]}"; do
|
||||||
echo " - $BLOG" | tr -d '"' >> "$brologs_pillar"
|
echo " - $BLOG" | tr -d '"' >> "$zeeklogs_pillar"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
@@ -195,11 +195,11 @@ bro_logs_enabled() {
|
|||||||
" - weird"\
|
" - weird"\
|
||||||
" - mysql"\
|
" - mysql"\
|
||||||
" - socks"\
|
" - socks"\
|
||||||
" - x509" >> "$brologs_pillar"
|
" - x509" >> "$zeeklogs_pillar"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf '%s\n' '----' >> "$setup_log" 2>&1
|
printf '%s\n' '----' >> "$setup_log" 2>&1
|
||||||
cat "$brologs_pillar" >> "$setup_log" 2>&1
|
cat "$zeeklogs_pillar" >> "$setup_log" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
check_admin_pass() {
|
check_admin_pass() {
|
||||||
@@ -1002,7 +1002,7 @@ manager_static() {
|
|||||||
" hnmanager: $HNMANAGER"\
|
" hnmanager: $HNMANAGER"\
|
||||||
" ntpserver: $NTPSERVER"\
|
" ntpserver: $NTPSERVER"\
|
||||||
" proxy: $PROXY"\
|
" proxy: $PROXY"\
|
||||||
" broversion: $BROVERSION"\
|
" zeekversion: $ZEEKVERSION"\
|
||||||
" ids: $NIDS"\
|
" ids: $NIDS"\
|
||||||
" managerip: $MAINIP"\
|
" managerip: $MAINIP"\
|
||||||
" hiveuser: $WEBUSER"\
|
" hiveuser: $WEBUSER"\
|
||||||
@@ -1470,7 +1470,7 @@ sensor_pillar() {
|
|||||||
|
|
||||||
if [ "$NSMSETUP" = 'ADVANCED' ]; then
|
if [ "$NSMSETUP" = 'ADVANCED' ]; then
|
||||||
echo " zeek_pins:" >> "$pillar_file"
|
echo " zeek_pins:" >> "$pillar_file"
|
||||||
for PIN in "${BROPINS[@]}"; do
|
for PIN in "${ZEEKPINS[@]}"; do
|
||||||
PIN=$(echo "$PIN" | cut -d\" -f2)
|
PIN=$(echo "$PIN" | cut -d\" -f2)
|
||||||
echo " - $PIN" >> "$pillar_file"
|
echo " - $PIN" >> "$pillar_file"
|
||||||
done
|
done
|
||||||
@@ -1483,11 +1483,11 @@ sensor_pillar() {
|
|||||||
echo " zeek_lbprocs: $lb_procs" >> "$pillar_file"
|
echo " zeek_lbprocs: $lb_procs" >> "$pillar_file"
|
||||||
echo " suriprocs: $lb_procs" >> "$pillar_file"
|
echo " suriprocs: $lb_procs" >> "$pillar_file"
|
||||||
else
|
else
|
||||||
echo " zeek_lbprocs: $BASICBRO" >> "$pillar_file"
|
echo " zeek_lbprocs: $BASICZEEK" >> "$pillar_file"
|
||||||
echo " suriprocs: $BASICSURI" >> "$pillar_file"
|
echo " suriprocs: $BASICSURI" >> "$pillar_file"
|
||||||
fi
|
fi
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
" brobpf:"\
|
" zeekbpf:"\
|
||||||
" pcapbpf:"\
|
" pcapbpf:"\
|
||||||
" nidsbpf:"\
|
" nidsbpf:"\
|
||||||
" manager: $MSRV"\
|
" manager: $MSRV"\
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ if [[ $is_manager && $is_node ]]; then
|
|||||||
LSINPUTTHREADS=1
|
LSINPUTTHREADS=1
|
||||||
LSINPUTBATCHCOUNT=125
|
LSINPUTBATCHCOUNT=125
|
||||||
NIDS=Suricata
|
NIDS=Suricata
|
||||||
BROVERSION=ZEEK
|
ZEEKVERSION=ZEEK
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_node ]]; then
|
if [[ $is_node ]]; then
|
||||||
@@ -253,7 +253,7 @@ fi
|
|||||||
|
|
||||||
if [[ $is_manager && ! $is_eval ]]; then
|
if [[ $is_manager && ! $is_eval ]]; then
|
||||||
whiptail_manager_adv
|
whiptail_manager_adv
|
||||||
whiptail_bro_version
|
whiptail_zeek_version
|
||||||
whiptail_nids
|
whiptail_nids
|
||||||
whiptail_rule_setup
|
whiptail_rule_setup
|
||||||
|
|
||||||
@@ -261,8 +261,8 @@ if [[ $is_manager && ! $is_eval ]]; then
|
|||||||
whiptail_oinkcode
|
whiptail_oinkcode
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$MANAGERADV" = 'ADVANCED' ] && [ "$BROVERSION" != 'SURICATA' ]; then
|
if [ "$MANAGERADV" = 'ADVANCED' ] && [ "$ZEEKVERSION" != 'SURICATA' ]; then
|
||||||
whiptail_manager_adv_service_brologs
|
whiptail_manager_adv_service_zeeklogs
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -295,11 +295,11 @@ if [[ $is_sensor && ! $is_eval ]]; then
|
|||||||
whiptail_homenet_sensor
|
whiptail_homenet_sensor
|
||||||
whiptail_sensor_config
|
whiptail_sensor_config
|
||||||
if [ $NSMSETUP == 'ADVANCED' ]; then
|
if [ $NSMSETUP == 'ADVANCED' ]; then
|
||||||
whiptail_bro_pins
|
whiptail_zeek_pins
|
||||||
whiptail_suricata_pins
|
whiptail_suricata_pins
|
||||||
whiptail_bond_nics_mtu
|
whiptail_bond_nics_mtu
|
||||||
else
|
else
|
||||||
whiptail_basic_bro
|
whiptail_basic_zeek
|
||||||
whiptail_basic_suri
|
whiptail_basic_suri
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ source ./so-variables
|
|||||||
source ./so-common-functions
|
source ./so-common-functions
|
||||||
|
|
||||||
|
|
||||||
whiptail_basic_bro() {
|
whiptail_basic_zeek() {
|
||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
BASICBRO=$(whiptail --title "Security Onion Setup" --inputbox \
|
BASICZEEK=$(whiptail --title "Security Onion Setup" --inputbox \
|
||||||
"Enter the number of zeek processes:" 10 75 "$lb_procs" 3>&1 1>&2 2>&3)
|
"Enter the number of zeek processes:" 10 75 "$lb_procs" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
@@ -42,7 +42,7 @@ whiptail_basic_suri() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail_bro_pins() {
|
whiptail_zeek_pins() {
|
||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
@@ -51,20 +51,20 @@ whiptail_bro_pins() {
|
|||||||
cpu_core_list_whiptail+=("$item" "OFF")
|
cpu_core_list_whiptail+=("$item" "OFF")
|
||||||
done
|
done
|
||||||
|
|
||||||
BROPINS=$(whiptail --noitem --title "Pin Zeek CPUS" --checklist "Please select $lb_procs cores to pin Zeek to:" 20 75 12 "${cpu_core_list_whiptail[@]}" 3>&1 1>&2 2>&3 )
|
ZEEKPINS=$(whiptail --noitem --title "Pin Zeek CPUS" --checklist "Please select $lb_procs cores to pin Zeek to:" 20 75 12 "${cpu_core_list_whiptail[@]}" 3>&1 1>&2 2>&3 )
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
|
|
||||||
BROPINS=$(echo "$BROPINS" | tr -d '"')
|
ZEEKPINS=$(echo "$ZEEKPINS" | tr -d '"')
|
||||||
|
|
||||||
IFS=' ' read -ra BROPINS <<< "$BROPINS"
|
IFS=' ' read -ra ZEEKPINS <<< "$ZEEKPINS"
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail_bro_version() {
|
whiptail_zeek_version() {
|
||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
BROVERSION=$(whiptail --title "Security Onion Setup" --radiolist "What tool would you like to use to generate meta data?" 20 75 4 "ZEEK" "Install Zeek (aka Bro)" ON \
|
ZEEKVERSION=$(whiptail --title "Security Onion Setup" --radiolist "What tool would you like to use to generate meta data?" 20 75 4 "ZEEK" "Install Zeek (aka Bro)" ON \
|
||||||
"SURICATA" "Use Suricata 5" OFF 3>&1 1>&2 2>&3)
|
"SURICATA" "Use Suricata 5" OFF 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
@@ -642,7 +642,7 @@ whiptail_manager_adv() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Ask which additional components to install
|
# Ask which additional components to install
|
||||||
whiptail_manager_adv_service_brologs() {
|
whiptail_manager_adv_service_zeeklogs() {
|
||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
@@ -1122,7 +1122,7 @@ whiptail_suricata_pins() {
|
|||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
local filtered_core_list
|
local filtered_core_list
|
||||||
readarray -t filtered_core_list <<< "$(echo "${cpu_core_list[@]}" "${BROPINS[@]}" | xargs -n1 | sort | uniq -u | awk '{print $1}')"
|
readarray -t filtered_core_list <<< "$(echo "${cpu_core_list[@]}" "${ZEEKPINS[@]}" | xargs -n1 | sort | uniq -u | awk '{print $1}')"
|
||||||
|
|
||||||
local filtered_core_str=()
|
local filtered_core_str=()
|
||||||
for item in "${filtered_core_list[@]}"; do
|
for item in "${filtered_core_list[@]}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user