mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-03-13 16:25:34 +01:00
Compare commits
20 Commits
jertel/wip
...
TOoSmOotH-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89f144df75 | ||
|
|
cfccbe2bed | ||
|
|
3dd9a06d67 | ||
|
|
4bfe9039ed | ||
|
|
75cddbf444 | ||
|
|
89b18341c5 | ||
|
|
90137f7093 | ||
|
|
480187b1f5 | ||
|
|
b3ed54633f | ||
|
|
2bec5afcdd | ||
|
|
4539024280 | ||
|
|
91759587f5 | ||
|
|
bc9841ea8c | ||
|
|
685e22bd68 | ||
|
|
0738208627 | ||
|
|
a3720219d8 | ||
|
|
385726b87c | ||
|
|
d78a5867b8 | ||
|
|
ad960c2101 | ||
|
|
90bea975d0 |
@@ -8,5 +8,12 @@
|
||||
"base": "172.17.0.0/24",
|
||||
"size": 24
|
||||
}
|
||||
]
|
||||
],
|
||||
"default-ulimits": {
|
||||
"nofile": {
|
||||
"Name": "nofile",
|
||||
"Soft": 1048576,
|
||||
"Hard": 1048576
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
59
salt/pcap/cleanup.sls
Normal file
59
salt/pcap/cleanup.sls
Normal file
@@ -0,0 +1,59 @@
|
||||
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
||||
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||
# Elastic License 2.0.
|
||||
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
|
||||
{% if GLOBALS.is_sensor %}
|
||||
|
||||
delete_so-steno_so-status.conf:
|
||||
file.line:
|
||||
- name: /opt/so/conf/so-status/so-status.conf
|
||||
- mode: delete
|
||||
- match: so-steno
|
||||
|
||||
remove_stenographer_user:
|
||||
user.absent:
|
||||
- name: stenographer
|
||||
- force: True
|
||||
|
||||
remove_stenographer_log_dir:
|
||||
file.absent:
|
||||
- name: /opt/so/log/stenographer
|
||||
|
||||
remove_stenoloss_script:
|
||||
file.absent:
|
||||
- name: /opt/so/conf/telegraf/scripts/stenoloss.sh
|
||||
|
||||
remove_steno_conf_dir:
|
||||
file.absent:
|
||||
- name: /opt/so/conf/steno
|
||||
|
||||
remove_so_pcap_export:
|
||||
file.absent:
|
||||
- name: /usr/sbin/so-pcap-export
|
||||
|
||||
remove_so_pcap_restart:
|
||||
file.absent:
|
||||
- name: /usr/sbin/so-pcap-restart
|
||||
|
||||
remove_so_pcap_start:
|
||||
file.absent:
|
||||
- name: /usr/sbin/so-pcap-start
|
||||
|
||||
remove_so_pcap_stop:
|
||||
file.absent:
|
||||
- name: /usr/sbin/so-pcap-stop
|
||||
|
||||
so-steno:
|
||||
docker_container.absent:
|
||||
- force: True
|
||||
|
||||
{% else %}
|
||||
|
||||
{{sls}}.non_sensor_node:
|
||||
test.show_notification:
|
||||
- text: "Stenographer cleanup not applicable on non-sensor nodes."
|
||||
|
||||
{% endif %}
|
||||
@@ -29,7 +29,11 @@ sool9_{{host}}:
|
||||
hypervisor_host: {{host ~ "_" ~ role}}
|
||||
preflight_cmds:
|
||||
- |
|
||||
tee -a /etc/hosts <<< "{{ MANAGERIP }} {{ MANAGERHOSTNAME }}"
|
||||
{%- set hostnames = [MANAGERHOSTNAME] %}
|
||||
{%- if not (URL_BASE | ipaddr) and URL_BASE != MANAGERHOSTNAME %}
|
||||
{%- do hostnames.append(URL_BASE) %}
|
||||
{%- endif %}
|
||||
tee -a /etc/hosts <<< "{{ MANAGERIP }} {{ hostnames | join(' ') }}"
|
||||
- |
|
||||
timeout 600 bash -c 'trap "echo \"Preflight Check: Failed to establish repo connectivity\"; exit 1" TERM; \
|
||||
while ! dnf makecache --repoid=securityonion >/dev/null 2>&1; do echo "Preflight Check: Waiting for repo connectivity..."; \
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
{% if 'vrt' in salt['pillar.get']('features', []) %}
|
||||
{% set HYPERVISORS = salt['pillar.get']('hypervisor:nodes', {} ) %}
|
||||
{% from 'salt/map.jinja' import SALTVERSION %}
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
|
||||
{% if HYPERVISORS %}
|
||||
cloud_providers:
|
||||
@@ -34,6 +35,7 @@ cloud_profiles:
|
||||
MANAGERHOSTNAME: {{ grains.host }}
|
||||
MANAGERIP: {{ pillar.host.mainip }}
|
||||
SALTVERSION: {{ SALTVERSION }}
|
||||
URL_BASE: {{ GLOBALS.url_base }}
|
||||
- template: jinja
|
||||
- makedirs: True
|
||||
{% else %}
|
||||
|
||||
@@ -805,11 +805,6 @@ def process_vm_creation(hypervisor_path: str, vm_config: dict) -> None:
|
||||
mark_invalid_hardware(hypervisor_path, vm_name, vm_config,
|
||||
{'nsm_size': 'Invalid nsm_size: must be positive integer'})
|
||||
return
|
||||
if size > 10000: # 10TB reasonable maximum
|
||||
log.error("VM: %s - nsm_size %dGB exceeds reasonable maximum (10000GB)", vm_name, size)
|
||||
mark_invalid_hardware(hypervisor_path, vm_name, vm_config,
|
||||
{'nsm_size': f'Invalid nsm_size: {size}GB exceeds maximum (10000GB)'})
|
||||
return
|
||||
log.debug("VM: %s - nsm_size validated: %dGB", vm_name, size)
|
||||
except (ValueError, TypeError) as e:
|
||||
log.error("VM: %s - nsm_size must be a valid integer, got: %s", vm_name, vm_config.get('nsm_size'))
|
||||
|
||||
@@ -31,8 +31,9 @@ mkdir -p /tmp/nids-testing/output
|
||||
chown suricata:socore /tmp/nids-testing/output
|
||||
mkdir -p /tmp/nids-testing/rules
|
||||
|
||||
cp /opt/so/conf/suricata/rules/all.rules /tmp/nids-testing/rules/all.rules
|
||||
cat $TESTRULE >> /tmp/nids-testing/rules/all.rules
|
||||
cp /opt/so/rules/suricata/all-rulesets.rules /tmp/nids-testing/rules/all-rulesets.rules
|
||||
cat $TESTRULE >> /tmp/nids-testing/rules/all-rulesets.rules
|
||||
|
||||
|
||||
echo "==== Begin Suricata Output ==="
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ base:
|
||||
- elastalert
|
||||
- utility
|
||||
- elasticfleet
|
||||
- pcap.cleanup
|
||||
|
||||
'*_standalone and G@saltversion:{{saltversion}} and not I@node_data:False':
|
||||
- match: compound
|
||||
@@ -116,6 +117,7 @@ base:
|
||||
- elasticfleet
|
||||
- stig
|
||||
- kafka
|
||||
- pcap.cleanup
|
||||
|
||||
'*_manager or *_managerhype and G@saltversion:{{saltversion}} and not I@node_data:False':
|
||||
- match: compound
|
||||
@@ -197,6 +199,7 @@ base:
|
||||
- suricata
|
||||
- zeek
|
||||
- elasticfleet
|
||||
- pcap.cleanup
|
||||
|
||||
'*_searchnode and G@saltversion:{{saltversion}}':
|
||||
- match: compound
|
||||
@@ -223,6 +226,7 @@ base:
|
||||
- strelka
|
||||
- elasticfleet.install_agent_grid
|
||||
- stig
|
||||
- pcap.cleanup
|
||||
|
||||
'*_heavynode and G@saltversion:{{saltversion}}':
|
||||
- match: compound
|
||||
@@ -240,6 +244,7 @@ base:
|
||||
- zeek
|
||||
- elasticfleet.install_agent_grid
|
||||
- elasticagent
|
||||
- pcap.cleanup
|
||||
|
||||
'*_receiver and G@saltversion:{{saltversion}}':
|
||||
- match: compound
|
||||
|
||||
Reference in New Issue
Block a user