mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-20 16:03:06 +01:00
merge with dev
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
{
|
||||
"if": "ctx.exiftool?.keys !=null",
|
||||
"field": "exiftool.keys",
|
||||
"processor":{
|
||||
"processor": {
|
||||
"append": {
|
||||
"field": "scan.exiftool",
|
||||
"value": "{{_ingest._value.key}}={{_ingest._value.value}}"
|
||||
@@ -20,6 +20,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ "foreach":
|
||||
{
|
||||
"if": "ctx.exiftool?.keys !=null",
|
||||
"field": "exiftool.keys",
|
||||
"processor": {
|
||||
"set": {
|
||||
"field": "exiftool.{{_ingest._value.key}}",
|
||||
"value": "{{_ingest._value.value}}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ "foreach":
|
||||
{
|
||||
"if": "ctx.scan?.yara?.meta !=null",
|
||||
@@ -32,6 +44,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ "set": { "if": "ctx.exiftool?.SourceFile != null", "field": "file.source", "value": "{{exiftool.SourceFile}}", "ignore_failure": true }},
|
||||
{ "set": { "if": "ctx.exiftool?.FilePermissions != null", "field": "file.permissions", "value": "{{exiftool.FilePermissions}}", "ignore_failure": true }},
|
||||
{ "set": { "if": "ctx.exiftool?.FileName != null", "field": "file.name", "value": "{{exiftool.FileName}}", "ignore_failure": true }},
|
||||
{ "set": { "if": "ctx.exiftool?.FileModifyDate != null", "field": "file.mtime", "value": "{{exiftool.FileModifyDate}}", "ignore_failure": true }},
|
||||
{ "set": { "if": "ctx.exiftool?.FileAccessDate != null", "field": "file.accessed", "value": "{{exiftool.FileAccessDate}}", "ignore_failure": true }},
|
||||
{ "set": { "if": "ctx.exiftool?.FileInodeChangeDate != null", "field": "file.ctime", "value": "{{exiftool.FileInodeChangeDate}}", "ignore_failure": true }},
|
||||
{ "set": { "if": "ctx.exiftool?.FileDirectory != null", "field": "file.directory", "value": "{{exiftool.FileDirectory}}", "ignore_failure": true }},
|
||||
{ "set": { "if": "ctx.exiftool?.Subsystem != null", "field": "host.subsystem", "value": "{{exiftool.Subsystem}}", "ignore_failure": true }},
|
||||
{ "set": { "if": "ctx.scan?.yara?.matches != null", "field": "rule.name", "value": "{{scan.yara.matches.0}}" }},
|
||||
{ "set": { "if": "ctx.scan?.yara?.matches != null", "field": "dataset", "value": "alert", "override": true }},
|
||||
{ "rename": { "field": "file.flavors.mime", "target_field": "file.mime_type", "ignore_missing": true }},
|
||||
|
||||
@@ -18,12 +18,22 @@ filter_unused_nics() {
|
||||
fi
|
||||
|
||||
# Finally, set filtered_nics to any NICs we aren't using (and ignore interfaces that aren't of use)
|
||||
filtered_nics=$(ip link| awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2}' | grep -vwe "$grep_string" | sed 's/ //g')
|
||||
filtered_nics=$(ip link | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2}' | grep -vwe "$grep_string" | sed 's/ //g')
|
||||
readarray -t filtered_nics <<< "$filtered_nics"
|
||||
|
||||
nic_list=()
|
||||
for nic in "${filtered_nics[@]}"; do
|
||||
nic_list+=("$nic" "" "OFF")
|
||||
case $(cat "/sys/class/net/${nic}/carrier") in
|
||||
1)
|
||||
nic_list+=("$nic" "Link UP " "OFF")
|
||||
;;
|
||||
0)
|
||||
nic_list+=("$nic" "Link DOWN " "OFF")
|
||||
;;
|
||||
*)
|
||||
nic_list+=("$nic" "Link UNKNOWN " "OFF")
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
export nic_list
|
||||
|
||||
@@ -698,24 +698,24 @@ fi
|
||||
salt-call state.apply -l info fleet.event_update-custom-hostname pillar="$pillar_override" >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
set_progress_str 77 "$(print_salt_state_apply 'so-fleet-setup')"
|
||||
set_progress_str 78 "$(print_salt_state_apply 'so-fleet-setup')"
|
||||
so-fleet-setup "$FLEETNODEUSER" "$FLEETNODEPASSWD1" >> $setup_log 2>&1
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$WAZUH" = 1 ]]; then
|
||||
set_progress_str 78 "$(print_salt_state_apply 'wazuh')"
|
||||
set_progress_str 79 "$(print_salt_state_apply 'wazuh')"
|
||||
salt-call state.apply -l info wazuh >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
if [[ "$THEHIVE" = 1 ]]; then
|
||||
set_progress_str 79 "$(print_salt_state_apply 'thehive')"
|
||||
set_progress_str 80 "$(print_salt_state_apply 'thehive')"
|
||||
salt-call state.apply -l info thehive >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
if [[ "$STRELKA" = 1 ]]; then
|
||||
if [[ $is_sensor ]]; then
|
||||
set_progress_str 80 "$(print_salt_state_apply 'strelka')"
|
||||
set_progress_str 81 "$(print_salt_state_apply 'strelka')"
|
||||
salt-call state.apply -l info strelka >> $setup_log 2>&1
|
||||
fi
|
||||
if [[ $STRELKARULES == 1 ]]; then
|
||||
@@ -724,15 +724,15 @@ fi
|
||||
fi
|
||||
|
||||
if [[ $is_manager || $is_helix || $is_import ]]; then
|
||||
set_progress_str 81 "$(print_salt_state_apply 'utility')"
|
||||
set_progress_str 82 "$(print_salt_state_apply 'utility')"
|
||||
salt-call state.apply -l info utility >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
if [[ ( $is_helix || $is_manager || $is_node ) && ! $is_eval ]]; then
|
||||
set_progress_str 82 "$(print_salt_state_apply 'logstash')"
|
||||
set_progress_str 83 "$(print_salt_state_apply 'logstash')"
|
||||
salt-call state.apply -l info logstash >> $setup_log 2>&1
|
||||
|
||||
set_progress_str 83 "$(print_salt_state_apply 'filebeat')"
|
||||
set_progress_str 84 "$(print_salt_state_apply 'filebeat')"
|
||||
salt-call state.apply -l info filebeat >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user