mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-07-28 03:33:28 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57d629683d |
@@ -35,6 +35,9 @@ case $1 in
|
||||
"elastic-fleet"|"elasticfleet")
|
||||
docker_check_running "elastic-fleet" "--stop"
|
||||
docker rm "so-elastic-fleet" 2> /dev/null
|
||||
# Removing the elastic fleet state directory, so that the next startup re-enrolls with a fresh policy
|
||||
rm -rf /opt/so/conf/elastic-fleet/state
|
||||
|
||||
salt-call state.apply elasticfleet queue=True
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -29,6 +29,8 @@ case $1 in
|
||||
"elasticfleet"|"elastic-fleet")
|
||||
docker_check_running "elastic-fleet" "--stop"
|
||||
docker rm "so-elastic-fleet" 2> /dev/null
|
||||
# Removing the elastic fleet state directory, so that the next startup re-enrolls with a fresh policy
|
||||
rm -rf /opt/so/conf/elastic-fleet/state
|
||||
;;
|
||||
*)
|
||||
docker_check_running "$1" "--stop"
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
{# This value is generated during node install and stored in minion pillar #}
|
||||
{% set SERVICETOKEN = salt['pillar.get']('elasticfleet:config:server:es_token','') %}
|
||||
{# Prevent Elastic Agent from re-enrolling with a new agent.id everytime the container starts up.
|
||||
- if a fresh enrollment is needed use 'so-stop elasticfleet'
|
||||
#}
|
||||
{% set ENROLLED = salt['file.file_exists']('/opt/so/conf/elastic-fleet/state/fleet.enc') %}
|
||||
|
||||
include:
|
||||
- ca
|
||||
@@ -66,6 +70,7 @@ so-elastic-fleet:
|
||||
- /etc/pki/elasticfleet-server.crt:/etc/pki/elasticfleet-server.crt:ro
|
||||
- /etc/pki/elasticfleet-server.key:/etc/pki/elasticfleet-server.key:ro
|
||||
- /etc/pki/tls/certs/intca.crt:/etc/pki/tls/certs/intca.crt:ro
|
||||
- /opt/so/conf/elastic-fleet/state:/usr/share/elastic-agent/state
|
||||
- /opt/so/log/elasticfleet:/usr/share/elastic-agent/logs
|
||||
{% if DOCKERMERGED.containers['so-elastic-fleet'].custom_bind_mounts %}
|
||||
{% for BIND in DOCKERMERGED.containers['so-elastic-fleet'].custom_bind_mounts %}
|
||||
@@ -73,6 +78,7 @@ so-elastic-fleet:
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
- environment:
|
||||
{% if not ENROLLED %}
|
||||
- FLEET_SERVER_ENABLE=true
|
||||
- FLEET_URL=https://{{ GLOBALS.hostname }}:8220
|
||||
- FLEET_SERVER_ELASTICSEARCH_HOST=https://{{ GLOBALS.manager }}:9200
|
||||
@@ -82,6 +88,9 @@ so-elastic-fleet:
|
||||
- FLEET_SERVER_CERT_KEY=/etc/pki/elasticfleet-server.key
|
||||
- FLEET_CA=/etc/pki/tls/certs/intca.crt
|
||||
- FLEET_SERVER_ELASTICSEARCH_CA=/etc/pki/tls/certs/intca.crt
|
||||
{% endif %}
|
||||
- STATE_PATH=/usr/share/elastic-agent/state
|
||||
- CONFIG_PATH=/usr/share/elastic-agent/state
|
||||
- LOGS_PATH=logs
|
||||
{% if DOCKERMERGED.containers['so-elastic-fleet'].extra_env %}
|
||||
{% for XTRAENV in DOCKERMERGED.containers['so-elastic-fleet'].extra_env %}
|
||||
@@ -100,6 +109,7 @@ so-elastic-fleet:
|
||||
- x509: etc_elasticfleet_crt
|
||||
- require:
|
||||
- file: trusttheca
|
||||
- file: eastatedir
|
||||
- x509: etc_elasticfleet_key
|
||||
- x509: etc_elasticfleet_crt
|
||||
|
||||
|
||||
@@ -980,10 +980,6 @@ up_to_3.2.0() {
|
||||
|
||||
pin_elasticsearch_data_retention_method
|
||||
|
||||
# Run so-elastic-fleet-es-url update with --force to ensure eval/import have
|
||||
# configured so-manager_elasicsearch as the default output for both monitoring and logs
|
||||
/usr/sbin/so-elastic-fleet-es-url-update --force
|
||||
|
||||
INSTALLEDVERSION=3.2.0
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ versionlock:
|
||||
# grain (compound supports nested grain matching via G@<key>:<subkey>:<value>).
|
||||
# pillar/vm/soc_vm.sls write path is referenced at salt/_runners/setup_hypervisor.py:856.
|
||||
vm:
|
||||
- state: vm
|
||||
- state: vm.user
|
||||
tgt: 'G@salt-cloud:driver:libvirt'
|
||||
|
||||
# zeek: sensor_roles + so-import (5 roles).
|
||||
|
||||
@@ -12,30 +12,6 @@ transformations:
|
||||
process.command_line: process.command_line.caseless
|
||||
process.parent.command_line: process.parent.command_line.caseless
|
||||
file.path: file.path.caseless
|
||||
# entity_id pivots must also match processes that were already running when the
|
||||
# agent started: Defend emits already_running (event.type:info), not start.
|
||||
# Kept out of Playbook sigma query because Sysmon has no equivalent concept.
|
||||
# contains_field is exact, so child pivots (process.parent.entity_id) stay
|
||||
# start-only. Drop must precede add;
|
||||
- id: playbook_process_lifecycle_drop_start_scope
|
||||
type: drop_detection_item
|
||||
field_name_conditions:
|
||||
- type: include_fields
|
||||
fields: ['event.type']
|
||||
rule_conditions:
|
||||
- type: logsource
|
||||
category: process_creation
|
||||
- type: contains_field
|
||||
field: process.entity_id
|
||||
- id: playbook_process_lifecycle_add-fields
|
||||
type: add_condition
|
||||
conditions:
|
||||
event.type: ['start', 'info']
|
||||
rule_conditions:
|
||||
- type: logsource
|
||||
category: process_creation
|
||||
- type: contains_field
|
||||
field: process.entity_id
|
||||
# file_activity: playbook-only pseudo-category spanning all file operations.
|
||||
- id: playbook_file_activity_add-fields
|
||||
type: add_condition
|
||||
|
||||
@@ -68,25 +68,13 @@ transformations:
|
||||
- type: logsource
|
||||
category: antivirus
|
||||
# OS-agnostic process_creation scoping for product-less (NIDS/host-pivot) rules.
|
||||
# pySigma: rule_cond_expr requires rule_conditions as a mapping, not a list.
|
||||
- id: process_creation_os_agnostic
|
||||
type: add_condition
|
||||
conditions:
|
||||
event.category: process
|
||||
rule_conditions:
|
||||
pc_cat:
|
||||
type: logsource
|
||||
category: process_creation
|
||||
pc_win:
|
||||
type: logsource
|
||||
product: windows
|
||||
pc_mac:
|
||||
type: logsource
|
||||
product: macos
|
||||
pc_lin:
|
||||
type: logsource
|
||||
product: linux
|
||||
rule_cond_expr: "pc_cat and not (pc_win or pc_mac or pc_lin)"
|
||||
- type: logsource
|
||||
category: process_creation
|
||||
# Transforms the `Hashes` field to ECS fields
|
||||
# ECS fields are used by the hash fields emitted by Elastic Defend
|
||||
# If shipped with Elastic Agent, sysmon logs will also have hashes mapped to ECS fields
|
||||
@@ -642,4 +630,4 @@ transformations:
|
||||
tags: '*file'
|
||||
rule_conditions:
|
||||
- type: logsource
|
||||
category: file
|
||||
category: file
|
||||
Reference in New Issue
Block a user