mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
Merge branch 'dev' into feature/setup
This commit is contained in:
@@ -13,6 +13,8 @@
|
|||||||
# user: socore
|
# user: socore
|
||||||
|
|
||||||
log_file: /opt/so/log/salt/master
|
log_file: /opt/so/log/salt/master
|
||||||
|
log_level_logfile: info
|
||||||
|
log_level: info
|
||||||
|
|
||||||
##### File Server settings #####
|
##### File Server settings #####
|
||||||
##########################################
|
##########################################
|
||||||
|
|||||||
@@ -157,9 +157,7 @@ set_version() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_manager() {
|
require_manager() {
|
||||||
# Check to see if this is a manager
|
if is_manager; then
|
||||||
MANAGERCHECK=$(cat /etc/salt/grains | grep role | awk '{print $2}')
|
|
||||||
if [ $MANAGERCHECK == 'so-eval' ] || [ $MANAGERCHECK == 'so-manager' ] || [ $MANAGERCHECK == 'so-managersearch' ] || [ $MANAGERCHECK == 'so-standalone' ] || [ $MANAGERCHECK == 'so-helix' ] || [ $MANAGERCHECK == 'so-import' ]; then
|
|
||||||
echo "This is a manager, We can proceed."
|
echo "This is a manager, We can proceed."
|
||||||
else
|
else
|
||||||
echo "Please run this command on the manager; the manager controls the grid."
|
echo "Please run this command on the manager; the manager controls the grid."
|
||||||
@@ -167,12 +165,32 @@ require_manager() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_manager() {
|
||||||
|
# Check to see if this is a manager node
|
||||||
|
role=$(lookup_role)
|
||||||
|
is_single_node_grid && return 0
|
||||||
|
[ $role == 'manager' ] && return 0
|
||||||
|
[ $role == 'managersearch' ] && return 0
|
||||||
|
[ $role == 'helix' ] && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
is_sensor() {
|
||||||
|
# Check to see if this is a sensor (forward) node
|
||||||
|
role=$(lookup_role)
|
||||||
|
is_single_node_grid && return 0
|
||||||
|
[ $role == 'sensor' ] && return 0
|
||||||
|
[ $role == 'heavynode' ] && return 0
|
||||||
|
[ $role == 'helix' ] && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
is_single_node_grid() {
|
is_single_node_grid() {
|
||||||
role=$(lookup_role)
|
role=$(lookup_role)
|
||||||
if [ "$role" != "eval" ] && [ "$role" != "standalone" ] && [ "$role" != "import" ]; then
|
[ $role == 'eval' ] && return 0
|
||||||
|
[ $role == 'standalone' ] && return 0
|
||||||
|
[ $role == 'import' ] && return 0
|
||||||
return 1
|
return 1
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
@@ -187,6 +205,34 @@ get_random_value() {
|
|||||||
head -c 5000 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $length | head -n 1
|
head -c 5000 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $length | head -n 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
retry() {
|
||||||
|
maxAttempts=$1
|
||||||
|
sleepDelay=$2
|
||||||
|
cmd=$3
|
||||||
|
expectedOutput=$4
|
||||||
|
attempt=0
|
||||||
|
while [[ $attempt -lt $maxAttempts ]]; do
|
||||||
|
attempt=$((attempt+1))
|
||||||
|
info "Executing command with retry support: $cmd"
|
||||||
|
output=$($cmd)
|
||||||
|
info "Results: $output"
|
||||||
|
exitcode=$?
|
||||||
|
if [ -n "$expectedOutput" ]; then
|
||||||
|
if [[ "$output" =~ "$expectedOutput" ]]; then
|
||||||
|
return $exitCode
|
||||||
|
else
|
||||||
|
info "Expected '$expectedOutput' but got '$output'"
|
||||||
|
fi
|
||||||
|
elif [[ $exitcode -eq 0 ]]; then
|
||||||
|
return $exitCode
|
||||||
|
fi
|
||||||
|
info "Command failed with exit code $exitcode; will retry in $sleepDelay seconds ($attempt / $maxAttempts)..."
|
||||||
|
sleep $sleepDelay
|
||||||
|
done
|
||||||
|
error "Command continues to fail; giving up."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
wait_for_apt() {
|
wait_for_apt() {
|
||||||
local progress_callback=$1
|
local progress_callback=$1
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,25 @@ if ! [ "$(id -u)" = 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
display_help() {
|
||||||
|
cat <<HELP_USAGE
|
||||||
|
|
||||||
|
$0 [-h] [-q|--quiet]
|
||||||
|
|
||||||
|
-h Show this message.
|
||||||
|
-q|--quiet Suppress the output and only return a
|
||||||
|
single status code for overall status
|
||||||
|
0:Ok, 1:Error, 2:Starting/Pending, 99:Installing SO
|
||||||
|
HELP_USAGE
|
||||||
|
}
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
|
QUIET=false
|
||||||
|
EXITCODE=0
|
||||||
SYSTEM_START_TIME=$(date -d "$(</proc/uptime awk '{print $1}') seconds ago" +%s)
|
SYSTEM_START_TIME=$(date -d "$(</proc/uptime awk '{print $1}') seconds ago" +%s)
|
||||||
# file populated by salt.lasthighstate state at end of successful highstate run
|
# file populated by salt.lasthighstate state at end of successful highstate run
|
||||||
LAST_HIGHSTATE_END=$([ -e "/opt/so/log/salt/lasthighstate" ] && date -r /opt/so/log/salt/lasthighstate +%s || echo 0)
|
LAST_HIGHSTATE_END=$([ -e "/opt/so/log/salt/lasthighstate" ] && date -r /opt/so/log/salt/lasthighstate +%s || echo 0)
|
||||||
|
LAST_SOSETUP_LOG=$([ -e "/root/sosetup.log" ] && date -r /root/sosetup.log +%s || echo 0)
|
||||||
HIGHSTATE_RUNNING=$(salt-call --local saltutil.running --out=json | jq -r '.local[].fun' | grep -q 'state.highstate' && echo $?)
|
HIGHSTATE_RUNNING=$(salt-call --local saltutil.running --out=json | jq -r '.local[].fun' | grep -q 'state.highstate' && echo $?)
|
||||||
ERROR_STRING="ERROR"
|
ERROR_STRING="ERROR"
|
||||||
SUCCESS_STRING="OK"
|
SUCCESS_STRING="OK"
|
||||||
@@ -111,43 +126,43 @@ populate_container_lists() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parse_status() {
|
parse_status() {
|
||||||
local container_state=${1}
|
local service_name=${1}
|
||||||
local service_name=${2}
|
local container_state=${2}
|
||||||
|
|
||||||
for state in "${GOOD_STATUSES[@]}"; do
|
for state in "${GOOD_STATUSES[@]}"; do
|
||||||
[[ $container_state = "$state" ]] && printf $SUCCESS_STRING && return 0
|
[[ $container_state = "$state" ]] && [[ $QUIET = "false" ]] && printf $SUCCESS_STRING && return 0 || [[ $container_state = "$state" ]] && return 0
|
||||||
done
|
done
|
||||||
|
|
||||||
for state in "${BAD_STATUSES[@]}"; do
|
for state in "${BAD_STATUSES[@]}"; do
|
||||||
[[ " ${DISABLED_CONTAINERS[@]} " =~ " ${service_name} " ]] && printf $DISABLED_STRING && return 0
|
[[ " ${DISABLED_CONTAINERS[@]} " =~ " ${service_name} " ]] && [[ $QUIET = "false" ]] && printf $DISABLED_STRING && return 0 || [[ " ${DISABLED_CONTAINERS[@]} " =~ " ${service_name} " ]] && return 0
|
||||||
done
|
done
|
||||||
|
|
||||||
# if a highstate has finished running since the system has started
|
# if a highstate has finished running since the system has started
|
||||||
# then the containers should be running so let's check the status
|
# then the containers should be running so let's check the status
|
||||||
if [ $LAST_HIGHSTATE_END -ge $SYSTEM_START_TIME ]; then
|
if [ $LAST_HIGHSTATE_END -ge $SYSTEM_START_TIME ]; then
|
||||||
|
|
||||||
[[ $container_state = "missing" ]] && printf $MISSING_STRING && return 1
|
[[ $container_state = "missing" ]] && [[ $QUIET = "false" ]] && printf $MISSING_STRING && return 1 || [[ $container_state = "missing" ]] && [[ "$EXITCODE" -lt 2 ]] && EXITCODE=1 && return 1
|
||||||
|
|
||||||
for state in "${PENDING_STATUSES[@]}"; do
|
for state in "${PENDING_STATUSES[@]}"; do
|
||||||
[[ $container_state = "$state" ]] && printf $PENDING_STRING && return 0
|
[[ $container_state = "$state" ]] && [[ $QUIET = "false" ]] && printf $PENDING_STRING && return 0
|
||||||
done
|
done
|
||||||
|
|
||||||
# This is technically not needed since the default is error state
|
# This is technically not needed since the default is error state
|
||||||
for state in "${BAD_STATUSES[@]}"; do
|
for state in "${BAD_STATUSES[@]}"; do
|
||||||
[[ $container_state = "$state" ]] && printf $ERROR_STRING && return 1
|
[[ $container_state = "$state" ]] && [[ $QUIET = "false" ]] && printf $ERROR_STRING && return 1 || [[ $container_state = "$state" ]] && [[ "$EXITCODE" -lt 2 ]] && EXITCODE=1 && return 1
|
||||||
done
|
done
|
||||||
|
|
||||||
printf $ERROR_STRING && return 1
|
[[ $QUIET = "false" ]] && printf $ERROR_STRING && return 1 || [[ "$EXITCODE" -lt 2 ]] && EXITCODE=1 && return 1
|
||||||
|
|
||||||
# if a highstate has not run since system start time, but a highstate is currently running
|
# if a highstate has not run since system start time, but a highstate is currently running
|
||||||
# then show that the containers are STARTING
|
# then show that the containers are STARTING
|
||||||
elif [[ "$HIGHSTATE_RUNNING" == 0 ]]; then
|
elif [[ "$HIGHSTATE_RUNNING" == 0 ]]; then
|
||||||
printf $STARTING_STRING && return 0
|
[[ $QUIET = "false" ]] && printf $STARTING_STRING && return 2 || EXITCODE=2 && return 2
|
||||||
|
|
||||||
# if a highstate has not finished running since system startup and isn't currently running
|
# if a highstate has not finished running since system startup and isn't currently running
|
||||||
# then just show that the containers are WAIT_START; waiting to be started
|
# then just show that the containers are WAIT_START; waiting to be started
|
||||||
else
|
else
|
||||||
printf $WAIT_START_STRING && return 1
|
[[ $QUIET = "false" ]] && printf $WAIT_START_STRING && return 2 || EXITCODE=2 && return 2
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -156,18 +171,22 @@ parse_status() {
|
|||||||
|
|
||||||
print_line() {
|
print_line() {
|
||||||
local service_name=${1}
|
local service_name=${1}
|
||||||
local service_state="$( parse_status ${2} ${1} )"
|
local service_state="$( parse_status ${1} ${2} )"
|
||||||
local columns=$(tput cols)
|
local columns=$(tput cols)
|
||||||
local state_color="\e[0m"
|
local state_color="\e[0m"
|
||||||
|
|
||||||
local PADDING_CONSTANT=15
|
local PADDING_CONSTANT=15
|
||||||
|
|
||||||
if [[ $service_state = "$ERROR_STRING" ]] || [[ $service_state = "$MISSING_STRING" ]] || [[ $service_state = "$WAIT_START_STRING" ]]; then
|
if [[ $service_state = "$ERROR_STRING" ]] || [[ $service_state = "$MISSING_STRING" ]]; then
|
||||||
state_color="\e[1;31m"
|
state_color="\e[1;31m"
|
||||||
|
if [[ "$EXITCODE" -eq 0 ]]; then
|
||||||
|
EXITCODE=1
|
||||||
|
fi
|
||||||
elif [[ $service_state = "$SUCCESS_STRING" ]]; then
|
elif [[ $service_state = "$SUCCESS_STRING" ]]; then
|
||||||
state_color="\e[1;32m"
|
state_color="\e[1;32m"
|
||||||
elif [[ $service_state = "$PENDING_STRING" ]] || [[ $service_state = "$DISABLED_STRING" ]] || [[ $service_state = "$STARTING_STRING" ]]; then
|
elif [[ $service_state = "$PENDING_STRING" ]] || [[ $service_state = "$DISABLED_STRING" ]] || [[ $service_state = "$STARTING_STRING" ]] || [[ $service_state = "$WAIT_START_STRING" ]]; then
|
||||||
state_color="\e[1;33m"
|
state_color="\e[1;33m"
|
||||||
|
EXITCODE=2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf " $service_name "
|
printf " $service_name "
|
||||||
@@ -181,7 +200,15 @@ print_line() {
|
|||||||
|
|
||||||
non_term_print_line() {
|
non_term_print_line() {
|
||||||
local service_name=${1}
|
local service_name=${1}
|
||||||
local service_state="$( parse_status ${2} ${1} )"
|
local service_state="$( parse_status ${1} ${2} )"
|
||||||
|
|
||||||
|
if [[ $service_state = "$ERROR_STRING" ]] || [[ $service_state = "$MISSING_STRING" ]]; then
|
||||||
|
if [[ "$EXITCODE" -eq 0 ]]; then
|
||||||
|
EXITCODE=1
|
||||||
|
fi
|
||||||
|
elif [[ $service_state = "$PENDING_STRING" ]] || [[ $service_state = "$DISABLED_STRING" ]] || [[ $service_state = "$STARTING_STRING" ]] || [[ $service_state = "$WAIT_START_STRING" ]]; then
|
||||||
|
EXITCODE=2
|
||||||
|
fi
|
||||||
|
|
||||||
printf " $service_name "
|
printf " $service_name "
|
||||||
for i in $(seq 0 $(( 35 - ${#service_name} - ${#service_state} ))); do
|
for i in $(seq 0 $(( 35 - ${#service_name} - ${#service_state} ))); do
|
||||||
@@ -222,33 +249,63 @@ main() {
|
|||||||
# else if running from a terminal
|
# else if running from a terminal
|
||||||
else
|
else
|
||||||
|
|
||||||
|
if [ "$QUIET" = true ]; then
|
||||||
|
if [ $SYSTEM_START_TIME -lt $LAST_SOSETUP_LOG ]; then
|
||||||
|
exit 99
|
||||||
|
fi
|
||||||
|
print_or_parse="parse_status"
|
||||||
|
else
|
||||||
|
print_or_parse="print_line"
|
||||||
|
|
||||||
local focus_color="\e[1;34m"
|
local focus_color="\e[1;34m"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "${focus_color}%b\e[0m" "Checking Docker status\n\n"
|
printf "${focus_color}%b\e[0m" "Checking Docker status\n\n"
|
||||||
|
fi
|
||||||
|
|
||||||
systemctl is-active --quiet docker
|
systemctl is-active --quiet docker
|
||||||
if [[ $? = 0 ]]; then
|
if [[ $? = 0 ]]; then
|
||||||
print_line "Docker" "running"
|
${print_or_parse} "Docker" "running"
|
||||||
else
|
else
|
||||||
print_line "Docker" "exited"
|
${print_or_parse} "Docker" "exited"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
populate_container_lists
|
populate_container_lists
|
||||||
|
|
||||||
|
if [ "$QUIET" = false ]; then
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "${focus_color}%b\e[0m" "Checking container statuses\n\n"
|
printf "${focus_color}%b\e[0m" "Checking container statuses\n\n"
|
||||||
|
fi
|
||||||
|
|
||||||
local num_containers=${#container_name_list[@]}
|
local num_containers=${#container_name_list[@]}
|
||||||
|
|
||||||
for i in $(seq 0 $(($num_containers - 1 ))); do
|
for i in $(seq 0 $(($num_containers - 1 ))); do
|
||||||
print_line ${container_name_list[$i]} ${container_state_list[$i]}
|
${print_or_parse} ${container_name_list[$i]} ${container_state_list[$i]}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$QUIET" = false ]; then
|
||||||
printf "\n"
|
printf "\n"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# {% endraw %}
|
# {% endraw %}
|
||||||
|
|
||||||
|
while getopts ':hq' OPTION; do
|
||||||
|
case "$OPTION" in
|
||||||
|
h)
|
||||||
|
display_help
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
q)
|
||||||
|
QUIET=true
|
||||||
|
;;
|
||||||
|
\?)
|
||||||
|
display_help
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
||||||
|
exit $EXITCODE
|
||||||
@@ -47,13 +47,26 @@ if ! docker ps | grep -q so-tcpreplay; then
|
|||||||
echo "Replay functionality not enabled; attempting to enable now (may require Internet access)..."
|
echo "Replay functionality not enabled; attempting to enable now (may require Internet access)..."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
if is_manager; then
|
||||||
TRUSTED_CONTAINERS=("so-tcpreplay")
|
TRUSTED_CONTAINERS=("so-tcpreplay")
|
||||||
mkdir -p /opt/so/log/tcpreplay
|
mkdir -p /opt/so/log/tcpreplay
|
||||||
update_docker_containers "tcpreplay" "" "" "/opt/so/log/tcpreplay/init.log"
|
update_docker_containers "tcpreplay" "" "" "/opt/so/log/tcpreplay/init.log"
|
||||||
|
fi
|
||||||
|
if is_sensor; then
|
||||||
|
if ! is_manager; then
|
||||||
|
echo "Attempting to start replay container. If this fails then you may need to run this command on the manager first."
|
||||||
|
fi
|
||||||
so-tcpreplay-start || fail "Unable to initialize tcpreplay"
|
so-tcpreplay-start || fail "Unable to initialize tcpreplay"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if is_sensor; then
|
||||||
echo "Replaying PCAP(s) at ${REPLAYSPEED} Mbps on interface ${REPLAYIFACE}..."
|
echo "Replaying PCAP(s) at ${REPLAYSPEED} Mbps on interface ${REPLAYIFACE}..."
|
||||||
docker exec so-tcpreplay /usr/bin/bash -c "/usr/local/bin/tcpreplay -i ${REPLAYIFACE} -M${REPLAYSPEED} $@"
|
docker exec so-tcpreplay /usr/bin/bash -c "/usr/local/bin/tcpreplay -i ${REPLAYIFACE} -M${REPLAYSPEED} $@"
|
||||||
|
|
||||||
echo "Replay completed. Warnings shown above are typically expected."
|
echo "Replay completed. Warnings shown above are typically expected."
|
||||||
|
elif is_manager; then
|
||||||
|
echo "The sensor nodes in this grid can now replay traffic."
|
||||||
|
else
|
||||||
|
echo "Unable to replay traffic since this node is not a sensor node."
|
||||||
|
fi
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
{%- set interface = salt['pillar.get']('sensor:interface', 'bond0') %}
|
{%- set interface = salt['pillar.get']('sensor:interface', 'bond0') %}
|
||||||
|
{%- set diskfreepercentage = salt['pillar.get']('steno:diskfreepercentage', 10) %}
|
||||||
|
|
||||||
{
|
{
|
||||||
"Threads": [
|
"Threads": [
|
||||||
{ "PacketsDirectory": "/nsm/pcap"
|
{ "PacketsDirectory": "/nsm/pcap"
|
||||||
, "IndexDirectory": "/nsm/pcapindex"
|
, "IndexDirectory": "/nsm/pcapindex"
|
||||||
, "MaxDirectoryFiles": 30000
|
, "MaxDirectoryFiles": 30000
|
||||||
, "DiskFreePercentage": 10
|
, "DiskFreePercentage": {{ diskfreepercentage }}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
, "StenotypePath": "/usr/bin/stenotype"
|
, "StenotypePath": "/usr/bin/stenotype"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
{% if 'strelka' in top_states %}
|
{% if 'strelka' in top_states %}
|
||||||
|
|
||||||
{%- set MANAGER = salt['grains.get']('master') %}
|
{% set MANAGER = salt['grains.get']('master') %}
|
||||||
{%- set MANAGERIP = salt['pillar.get']('global:managerip', '') %}
|
{% set MANAGERIP = salt['pillar.get']('global:managerip', '') %}
|
||||||
{% set VERSION = salt['pillar.get']('global:soversion', 'HH1.2.2') %}
|
{% set VERSION = salt['pillar.get']('global:soversion', 'HH1.2.2') %}
|
||||||
{% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %}
|
{% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %}
|
||||||
{% set STRELKA_RULES = salt['pillar.get']('strelka:rules', '1') %}
|
{% set STRELKA_RULES = salt['pillar.get']('strelka:rules', '1') %}
|
||||||
@@ -47,7 +47,7 @@ strelkasync:
|
|||||||
- group: 939
|
- group: 939
|
||||||
- template: jinja
|
- template: jinja
|
||||||
|
|
||||||
{%- if STRELKA_RULES == 1 %}
|
{% if STRELKA_RULES == 1 %}
|
||||||
|
|
||||||
strelkarules:
|
strelkarules:
|
||||||
file.recurse:
|
file.recurse:
|
||||||
@@ -56,13 +56,15 @@ strelkarules:
|
|||||||
- user: 939
|
- user: 939
|
||||||
- group: 939
|
- group: 939
|
||||||
|
|
||||||
|
{% if grains['role'] in ['so-eval','so-managersearch', 'so-manager', 'so-standalone', 'so-import'] %}
|
||||||
strelkarepos:
|
strelkarepos:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /opt/so/saltstack/default/salt/strelka/rules/repos.txt
|
- name: /opt/so/saltstack/default/salt/strelka/rules/repos.txt
|
||||||
- source: salt://strelka/rules/repos.txt.jinja
|
- source: salt://strelka/rules/repos.txt.jinja
|
||||||
- template: jinja
|
- template: jinja
|
||||||
|
|
||||||
{%- endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
strelkadatadir:
|
strelkadatadir:
|
||||||
file.directory:
|
file.directory:
|
||||||
|
|||||||
@@ -33,16 +33,16 @@ if [ $CHECKIT == 2 ]; then
|
|||||||
|
|
||||||
CURRENTDROP=${RESULT[4]}
|
CURRENTDROP=${RESULT[4]}
|
||||||
PASTDROP=${RESULT[14]}
|
PASTDROP=${RESULT[14]}
|
||||||
DROPPED=$(($CURRENTDROP - $PASTDROP))
|
DROPPED=$((CURRENTDROP - PASTDROP))
|
||||||
if [ $DROPPED == 0 ]; then
|
if [ $DROPPED == 0 ]; then
|
||||||
LOSS=0
|
LOSS=0
|
||||||
echo "suridrop drop=0"
|
echo "suridrop drop=0"
|
||||||
else
|
else
|
||||||
CURRENTPACKETS=${RESULT[9]}
|
CURRENTPACKETS=${RESULT[9]}
|
||||||
PASTPACKETS=${RESULT[19]}
|
PASTPACKETS=${RESULT[19]}
|
||||||
TOTALCURRENT=$(($CURRENTPACKETS + $CURRENTDROP))
|
TOTALCURRENT=$((CURRENTPACKETS + CURRENTDROP))
|
||||||
TOTALPAST=$(($PASTPACKETS + $PASTDROP))
|
TOTALPAST=$((PASTPACKETS + PASTDROP))
|
||||||
TOTAL=$(($TOTALCURRENT - $TOTALPAST))
|
TOTAL=$((TOTALCURRENT - TOTALPAST))
|
||||||
|
|
||||||
LOSS=$(echo 4 k $DROPPED $TOTAL / p | dc)
|
LOSS=$(echo 4 k $DROPPED $TOTAL / p | dc)
|
||||||
echo "suridrop drop=$LOSS"
|
echo "suridrop drop=$LOSS"
|
||||||
|
|||||||
@@ -29,15 +29,22 @@ echo $$ > $lf
|
|||||||
ZEEKLOG=$(tac /host/nsm/zeek/logs/packetloss.log | head -2)
|
ZEEKLOG=$(tac /host/nsm/zeek/logs/packetloss.log | head -2)
|
||||||
declare RESULT=($ZEEKLOG)
|
declare RESULT=($ZEEKLOG)
|
||||||
CURRENTDROP=${RESULT[3]}
|
CURRENTDROP=${RESULT[3]}
|
||||||
|
# zeek likely not running if this is true
|
||||||
|
if [[ $CURRENTDROP == "rcvd:" ]]; then
|
||||||
|
CURRENTDROP=0
|
||||||
|
PASTDROP=0
|
||||||
|
DROPPED=0
|
||||||
|
else
|
||||||
PASTDROP=${RESULT[9]}
|
PASTDROP=${RESULT[9]}
|
||||||
DROPPED=$((CURRENTDROP - PASTDROP))
|
DROPPED=$((CURRENTDROP - PASTDROP))
|
||||||
if [ $DROPPED == 0 ]; then
|
fi
|
||||||
|
if [[ "$DROPPED" -le 0 ]]; then
|
||||||
LOSS=0
|
LOSS=0
|
||||||
echo "zeekdrop drop=0"
|
echo "zeekdrop drop=0"
|
||||||
else
|
else
|
||||||
CURRENTPACKETS=${RESULT[5]}
|
CURRENTPACKETS=${RESULT[5]}
|
||||||
PASTPACKETS=${RESULT[11]}
|
PASTPACKETS=${RESULT[11]}
|
||||||
TOTAL=$((CURRENTPACKETS - PASTPACKETS))
|
TOTAL=$((CURRENTPACKETS - PASTPACKETS))
|
||||||
LOSS=$(echo $DROPPED $TOTAL / p | dc)
|
LOSS=$(echo 4 k $DROPPED $TOTAL / p | dc)
|
||||||
echo "zeekdrop drop=$LOSS"
|
echo "zeekdrop drop=$LOSS"
|
||||||
fi
|
fi
|
||||||
78
setup/automation/distributed-airgap-manager
Normal file
78
setup/automation/distributed-airgap-manager
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
#BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=distributed-manager
|
||||||
|
install_type=MANAGER
|
||||||
|
INTERWEBS=AIRGAP
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
78
setup/automation/distributed-airgap-search
Normal file
78
setup/automation/distributed-airgap-search
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
# ALLOW_CIDR=0.0.0.0/0
|
||||||
|
# ALLOW_ROLE=a
|
||||||
|
# BASICZEEK=7
|
||||||
|
# BASICSURI=7
|
||||||
|
# BLOGS=
|
||||||
|
# BNICS=eth1
|
||||||
|
# ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
# GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=distributed-search
|
||||||
|
install_type=SEARCHNODE
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
# MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
MSRV=distributed-manager
|
||||||
|
MSRVIP=10.66.166.42
|
||||||
|
# MTU=
|
||||||
|
# NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
# OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
# PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
# REDIRECTINFO=IP
|
||||||
|
# RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
# STRELKA=1
|
||||||
|
# THEHIVE=1
|
||||||
|
# WAZUH=1
|
||||||
|
# WEBUSER=onionuser@somewhere.invalid
|
||||||
|
# WEBPASSWD1=0n10nus3r
|
||||||
|
# WEBPASSWD2=0n10nus3r
|
||||||
78
setup/automation/distributed-airgap-sensor
Normal file
78
setup/automation/distributed-airgap-sensor
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
# ALLOW_CIDR=0.0.0.0/0
|
||||||
|
# ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
# GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=distributed-sensor
|
||||||
|
install_type=SENSOR
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
# MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
MSRV=distributed-manager
|
||||||
|
MSRVIP=10.66.166.42
|
||||||
|
# MTU=
|
||||||
|
# NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
# NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
# OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
# PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
# REDIRECTINFO=IP
|
||||||
|
# RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
# STRELKA=1
|
||||||
|
# THEHIVE=1
|
||||||
|
# WAZUH=1
|
||||||
|
# WEBUSER=onionuser@somewhere.invalid
|
||||||
|
# WEBPASSWD1=0n10nus3r
|
||||||
|
# WEBPASSWD2=0n10nus3r
|
||||||
78
setup/automation/distributed-ami-forwardnode
Normal file
78
setup/automation/distributed-ami-forwardnode
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
#ALLOW_CIDR=0.0.0.0/0
|
||||||
|
#ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=ens6
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
#GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=forwardnode-aws
|
||||||
|
install_type=SENSOR
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
#MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=ens5
|
||||||
|
# MSEARCH=
|
||||||
|
MSRV=manager-aws
|
||||||
|
MSRVIP=172.16.163.10
|
||||||
|
# MTU=
|
||||||
|
#NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
#NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
#OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
#PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
#REDIRECTINFO=HOSTNAME
|
||||||
|
#RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
SKIP_REBOOT=0
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
#STRELKA=1
|
||||||
|
#THEHIVE=1
|
||||||
|
#WAZUH=1
|
||||||
|
# WEBUSER=onionuser@somewhere.invalid
|
||||||
|
# WEBPASSWD1=0n10nus3r
|
||||||
|
# WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/distributed-ami-manager
Normal file
77
setup/automation/distributed-ami-manager
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=ens6
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=manager-aws
|
||||||
|
install_type=MANAGER
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=ens5
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=HOSTNAME
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
SKIP_REBOOT=0
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
78
setup/automation/distributed-ami-searchnode
Normal file
78
setup/automation/distributed-ami-searchnode
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
#ALLOW_CIDR=0.0.0.0/0
|
||||||
|
#ALLOW_ROLE=a
|
||||||
|
#BASICZEEK=7
|
||||||
|
#BASICSURI=7
|
||||||
|
# BLOGS=
|
||||||
|
#BNICS=ens6
|
||||||
|
#ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
#GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=searchnode-aws
|
||||||
|
install_type=SEARCHNODE
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
#MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=ens5
|
||||||
|
# MSEARCH=
|
||||||
|
MSRV=manager-aws
|
||||||
|
MSRVIP=172.16.163.10
|
||||||
|
# MTU=
|
||||||
|
#NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
#OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
#PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
#REDIRECTINFO=HOSTNAME
|
||||||
|
#RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
SKIP_REBOOT=0
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
#STRELKA=1
|
||||||
|
#THEHIVE=1
|
||||||
|
#WAZUH=1
|
||||||
|
# WEBUSER=onionuser@somewhere.invalid
|
||||||
|
# WEBPASSWD1=0n10nus3r
|
||||||
|
# WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/distributed-iso-manager
Normal file
77
setup/automation/distributed-iso-manager
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=7
|
||||||
|
BASICSURI=7
|
||||||
|
# BLOGS=
|
||||||
|
#BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=distributed-manager
|
||||||
|
install_type=MANAGER
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
78
setup/automation/distributed-iso-search
Normal file
78
setup/automation/distributed-iso-search
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
# ALLOW_CIDR=0.0.0.0/0
|
||||||
|
# ALLOW_ROLE=a
|
||||||
|
# BASICZEEK=7
|
||||||
|
# BASICSURI=7
|
||||||
|
# BLOGS=
|
||||||
|
# BNICS=eth1
|
||||||
|
# ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
# GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=distributed-search
|
||||||
|
install_type=SEARCHNODE
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
# MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
MSRV=distributed-manager
|
||||||
|
MSRVIP=10.66.166.42
|
||||||
|
# MTU=
|
||||||
|
# NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
# OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
# PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
# REDIRECTINFO=IP
|
||||||
|
# RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
# STRELKA=1
|
||||||
|
# THEHIVE=1
|
||||||
|
# WAZUH=1
|
||||||
|
# WEBUSER=onionuser@somewhere.invalid
|
||||||
|
# WEBPASSWD1=0n10nus3r
|
||||||
|
# WEBPASSWD2=0n10nus3r
|
||||||
78
setup/automation/distributed-iso-sensor
Normal file
78
setup/automation/distributed-iso-sensor
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
# ALLOW_CIDR=0.0.0.0/0
|
||||||
|
# ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
# GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=distributed-sensor
|
||||||
|
install_type=SENSOR
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
# MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
MSRV=distributed-manager
|
||||||
|
MSRVIP=10.66.166.42
|
||||||
|
# MTU=
|
||||||
|
# NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
# NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
# OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
# PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
# REDIRECTINFO=IP
|
||||||
|
# RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
# STRELKA=1
|
||||||
|
# THEHIVE=1
|
||||||
|
# WAZUH=1
|
||||||
|
# WEBUSER=onionuser@somewhere.invalid
|
||||||
|
# WEBPASSWD1=0n10nus3r
|
||||||
|
# WEBPASSWD2=0n10nus3r
|
||||||
@@ -23,8 +23,8 @@ 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
|
||||||
BASICZEEK=1
|
BASICZEEK=2
|
||||||
BASICSURI=1
|
BASICSURI=2
|
||||||
# BLOGS=
|
# BLOGS=
|
||||||
BNICS=ens6
|
BNICS=ens6
|
||||||
ZEEKVERSION=ZEEK
|
ZEEKVERSION=ZEEK
|
||||||
@@ -70,9 +70,9 @@ PATCHSCHEDULENAME=auto
|
|||||||
SKIP_REBOOT=0
|
SKIP_REBOOT=0
|
||||||
SOREMOTEPASS1=onionuser
|
SOREMOTEPASS1=onionuser
|
||||||
SOREMOTEPASS2=onionuser
|
SOREMOTEPASS2=onionuser
|
||||||
STRELKA=1
|
#STRELKA=1
|
||||||
#THEHIVE=1
|
#THEHIVE=1
|
||||||
WAZUH=1
|
#WAZUH=1
|
||||||
WEBUSER=onionuser@somewhere.invalid
|
# WEBUSER=onionuser@somewhere.invalid
|
||||||
WEBPASSWD1=0n10nus3r
|
# WEBPASSWD1=0n10nus3r
|
||||||
WEBPASSWD2=0n10nus3r
|
# WEBPASSWD2=0n10nus3r
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ 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
|
||||||
BASICZEEK=7
|
BASICZEEK=2
|
||||||
BASICSURI=7
|
BASICSURI=2
|
||||||
# BLOGS=
|
# BLOGS=
|
||||||
BNICS=ens6
|
BNICS=ens6
|
||||||
ZEEKVERSION=ZEEK
|
ZEEKVERSION=ZEEK
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ ADMINUSER=onionuser
|
|||||||
ADMINPASS1=onionuser
|
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
|
||||||
#BASICZEEK=7
|
#BASICZEEK=7
|
||||||
#BASICSURI=7
|
#BASICSURI=7
|
||||||
# BLOGS=
|
# BLOGS=
|
||||||
@@ -72,7 +72,7 @@ SOREMOTEPASS1=onionuser
|
|||||||
SOREMOTEPASS2=onionuser
|
SOREMOTEPASS2=onionuser
|
||||||
#STRELKA=1
|
#STRELKA=1
|
||||||
#THEHIVE=1
|
#THEHIVE=1
|
||||||
WAZUH=1
|
#WAZUH=1
|
||||||
WEBUSER=onionuser@somewhere.invalid
|
# WEBUSER=onionuser@somewhere.invalid
|
||||||
WEBPASSWD1=0n10nus3r
|
# WEBPASSWD1=0n10nus3r
|
||||||
WEBPASSWD2=0n10nus3r
|
# WEBPASSWD2=0n10nus3r
|
||||||
|
|||||||
78
setup/automation/eval-airgap
Normal file
78
setup/automation/eval-airgap
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=eval
|
||||||
|
install_type=EVAL
|
||||||
|
INTERWEBS=AIRGAP
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/eval-ami
Normal file
77
setup/automation/eval-ami
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=eval-aws
|
||||||
|
install_type=EVAL
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
REDIRECTHOST=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
|
||||||
|
REDIRECTINFO=OTHER
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/eval-iso
Normal file
77
setup/automation/eval-iso
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=eval
|
||||||
|
install_type=EVAL
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/eval-net-centos
Normal file
77
setup/automation/eval-net-centos
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
# address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=standalone
|
||||||
|
install_type=EVAL
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/eval-net-ubuntu
Normal file
77
setup/automation/eval-net-ubuntu
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
# address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=ens19
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=standalone
|
||||||
|
install_type=STANDALONE
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=ens18
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
@@ -23,10 +23,10 @@ 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
|
||||||
BASICZEEK=7
|
BASICZEEK=2
|
||||||
BASICSURI=7
|
BASICSURI=2
|
||||||
# BLOGS=
|
# BLOGS=
|
||||||
BNICS=ens6
|
BNICS=eth1
|
||||||
ZEEKVERSION=ZEEK
|
ZEEKVERSION=ZEEK
|
||||||
# CURCLOSEDAYS=
|
# CURCLOSEDAYS=
|
||||||
# EVALADVANCED=BASIC
|
# EVALADVANCED=BASIC
|
||||||
@@ -34,7 +34,7 @@ GRAFANA=1
|
|||||||
# HELIXAPIKEY=
|
# HELIXAPIKEY=
|
||||||
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
HNSENSOR=inherit
|
HNSENSOR=inherit
|
||||||
HOSTNAME=eval-aws
|
HOSTNAME=eval
|
||||||
install_type=EVAL
|
install_type=EVAL
|
||||||
# LSINPUTBATCHCOUNT=
|
# LSINPUTBATCHCOUNT=
|
||||||
# LSINPUTTHREADS=
|
# LSINPUTTHREADS=
|
||||||
@@ -46,7 +46,7 @@ MANAGERUPDATES=1
|
|||||||
# MGATEWAY=
|
# MGATEWAY=
|
||||||
# MIP=
|
# MIP=
|
||||||
# MMASK=
|
# MMASK=
|
||||||
MNIC=ens5
|
MNIC=eth0
|
||||||
# MSEARCH=
|
# MSEARCH=
|
||||||
# MSRV=
|
# MSRV=
|
||||||
# MTU=
|
# MTU=
|
||||||
@@ -63,10 +63,14 @@ OSQUERY=1
|
|||||||
PATCHSCHEDULENAME=auto
|
PATCHSCHEDULENAME=auto
|
||||||
PLAYBOOK=1
|
PLAYBOOK=1
|
||||||
# REDIRECTHOST=
|
# REDIRECTHOST=
|
||||||
REDIRECTINFO=HOSTNAME
|
REDIRECTINFO=IP
|
||||||
RULESETUP=ETOPEN
|
RULESETUP=ETOPEN
|
||||||
# SHARDCOUNT=
|
# SHARDCOUNT=
|
||||||
|
<<<<<<< HEAD:setup/automation/eval_ami
|
||||||
# SKIP_REBOOT=0
|
# SKIP_REBOOT=0
|
||||||
|
=======
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
>>>>>>> dev:setup/automation/eval-iso
|
||||||
SOREMOTEPASS1=onionuser
|
SOREMOTEPASS1=onionuser
|
||||||
SOREMOTEPASS2=onionuser
|
SOREMOTEPASS2=onionuser
|
||||||
STRELKA=1
|
STRELKA=1
|
||||||
|
|||||||
78
setup/automation/standalone-airgap
Normal file
78
setup/automation/standalone-airgap
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=standalone
|
||||||
|
install_type=STANDALONE
|
||||||
|
INTERWEBS=AIRGAP
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/standalone-ami
Normal file
77
setup/automation/standalone-ami
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=standalone-aws
|
||||||
|
install_type=STANDALONE
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
REDIRECTHOST=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
|
||||||
|
REDIRECTINFO=OTHER
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/standalone-iso
Normal file
77
setup/automation/standalone-iso
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=standalone
|
||||||
|
install_type=STANDALONE
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/standalone-net-centos
Normal file
77
setup/automation/standalone-net-centos
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
# address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=eth1
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=standalone
|
||||||
|
install_type=STANDALONE
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=eth0
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
77
setup/automation/standalone-net-ubuntu
Normal file
77
setup/automation/standalone-net-ubuntu
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TESTING=true
|
||||||
|
|
||||||
|
# address_type=DHCP
|
||||||
|
ADMINUSER=onionuser
|
||||||
|
ADMINPASS1=onionuser
|
||||||
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=0.0.0.0/0
|
||||||
|
ALLOW_ROLE=a
|
||||||
|
BASICZEEK=2
|
||||||
|
BASICSURI=2
|
||||||
|
# BLOGS=
|
||||||
|
BNICS=ens19
|
||||||
|
ZEEKVERSION=ZEEK
|
||||||
|
# CURCLOSEDAYS=
|
||||||
|
# EVALADVANCED=BASIC
|
||||||
|
GRAFANA=1
|
||||||
|
# HELIXAPIKEY=
|
||||||
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
|
HNSENSOR=inherit
|
||||||
|
HOSTNAME=standalone
|
||||||
|
install_type=STANDALONE
|
||||||
|
# LSINPUTBATCHCOUNT=
|
||||||
|
# LSINPUTTHREADS=
|
||||||
|
# LSPIPELINEBATCH=
|
||||||
|
# LSPIPELINEWORKERS=
|
||||||
|
MANAGERADV=BASIC
|
||||||
|
MANAGERUPDATES=1
|
||||||
|
# MDNS=
|
||||||
|
# MGATEWAY=
|
||||||
|
# MIP=
|
||||||
|
# MMASK=
|
||||||
|
MNIC=ens18
|
||||||
|
# MSEARCH=
|
||||||
|
# MSRV=
|
||||||
|
# MTU=
|
||||||
|
NIDS=Suricata
|
||||||
|
# NODE_ES_HEAP_SIZE=
|
||||||
|
# NODE_LS_HEAP_SIZE=
|
||||||
|
NODESETUP=NODEBASIC
|
||||||
|
NSMSETUP=BASIC
|
||||||
|
NODEUPDATES=MANAGER
|
||||||
|
# OINKCODE=
|
||||||
|
OSQUERY=1
|
||||||
|
# PATCHSCHEDULEDAYS=
|
||||||
|
# PATCHSCHEDULEHOURS=
|
||||||
|
PATCHSCHEDULENAME=auto
|
||||||
|
PLAYBOOK=1
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
RULESETUP=ETOPEN
|
||||||
|
# SHARDCOUNT=
|
||||||
|
# SKIP_REBOOT=
|
||||||
|
SOREMOTEPASS1=onionuser
|
||||||
|
SOREMOTEPASS2=onionuser
|
||||||
|
STRELKA=1
|
||||||
|
THEHIVE=1
|
||||||
|
WAZUH=1
|
||||||
|
WEBUSER=onionuser@somewhere.invalid
|
||||||
|
WEBPASSWD1=0n10nus3r
|
||||||
|
WEBPASSWD2=0n10nus3r
|
||||||
@@ -23,8 +23,8 @@ 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
|
||||||
BASICZEEK=7
|
BASICZEEK=2
|
||||||
BASICSURI=7
|
BASICSURI=2
|
||||||
# BLOGS=
|
# BLOGS=
|
||||||
BNICS=eth1
|
BNICS=eth1
|
||||||
ZEEKVERSION=ZEEK
|
ZEEKVERSION=ZEEK
|
||||||
@@ -34,8 +34,9 @@ GRAFANA=1
|
|||||||
# HELIXAPIKEY=
|
# HELIXAPIKEY=
|
||||||
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
HNSENSOR=inherit
|
HNSENSOR=inherit
|
||||||
HOSTNAME=standalone-aws
|
HOSTNAME=standalone
|
||||||
install_type=STANDALONE
|
install_type=STANDALONE
|
||||||
|
INTERWEBS=AIRGAP
|
||||||
# LSINPUTBATCHCOUNT=
|
# LSINPUTBATCHCOUNT=
|
||||||
# LSINPUTTHREADS=
|
# LSINPUTTHREADS=
|
||||||
# LSPIPELINEBATCH=
|
# LSPIPELINEBATCH=
|
||||||
@@ -62,8 +63,13 @@ OSQUERY=1
|
|||||||
# PATCHSCHEDULEHOURS=
|
# PATCHSCHEDULEHOURS=
|
||||||
PATCHSCHEDULENAME=auto
|
PATCHSCHEDULENAME=auto
|
||||||
PLAYBOOK=1
|
PLAYBOOK=1
|
||||||
|
<<<<<<< HEAD:setup/automation/standalone_ami
|
||||||
REDIRECTHOST=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
|
REDIRECTHOST=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
|
||||||
REDIRECTINFO=OTHER
|
REDIRECTINFO=OTHER
|
||||||
|
=======
|
||||||
|
# REDIRECTHOST=
|
||||||
|
REDIRECTINFO=IP
|
||||||
|
>>>>>>> dev:setup/automation/standalone-airgap
|
||||||
RULESETUP=ETOPEN
|
RULESETUP=ETOPEN
|
||||||
# SHARDCOUNT=
|
# SHARDCOUNT=
|
||||||
# SKIP_REBOOT=
|
# SKIP_REBOOT=
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ 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
|
||||||
BASICZEEK=7
|
BASICZEEK=2
|
||||||
BASICSURI=7
|
BASICSURI=2
|
||||||
# BLOGS=
|
# BLOGS=
|
||||||
BNICS=eth1
|
BNICS=eth1
|
||||||
ZEEKVERSION=ZEEK
|
ZEEKVERSION=ZEEK
|
||||||
|
|||||||
@@ -97,8 +97,6 @@ airgap_rules() {
|
|||||||
|
|
||||||
# Don't leave Strelka out
|
# Don't leave Strelka out
|
||||||
cp -Rv /root/SecurityOnion/agrules/strelka /nsm/repo/rules/
|
cp -Rv /root/SecurityOnion/agrules/strelka /nsm/repo/rules/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
analyze_system() {
|
analyze_system() {
|
||||||
@@ -116,13 +114,11 @@ accept_salt_key_remote() {
|
|||||||
|
|
||||||
echo "Accept the key remotely on the manager" >> "$setup_log" 2>&1
|
echo "Accept the key remotely on the manager" >> "$setup_log" 2>&1
|
||||||
# Delete the key just in case.
|
# Delete the key just in case.
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo salt-key -d "$MINION_ID" -y
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo salt-key -d "$MINION_ID" -y
|
||||||
salt-call state.apply ca >> /dev/null 2>&1
|
salt-call state.apply ca >> /dev/null 2>&1
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo salt-key -a "$MINION_ID" -y
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo salt-key -a "$MINION_ID" -y
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add_admin_user() {
|
add_admin_user() {
|
||||||
# Add an admin user with full sudo rights if this is an ISO install.
|
# Add an admin user with full sudo rights if this is an ISO install.
|
||||||
{
|
{
|
||||||
@@ -753,6 +749,8 @@ configure_minion() {
|
|||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
"use_superseded:"\
|
"use_superseded:"\
|
||||||
" - module.run"\
|
" - module.run"\
|
||||||
|
"log_level: info"\
|
||||||
|
"log_level_logfile: info"\
|
||||||
"log_file: /opt/so/log/salt/minion" >> "$minion_config"
|
"log_file: /opt/so/log/salt/minion" >> "$minion_config"
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -840,7 +838,7 @@ check_requirements() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compare_versions() {
|
compare_versions() {
|
||||||
manager_ver=$(ssh -i /root/.ssh/so.key soremote@"$MSRV" cat /etc/soversion)
|
manager_ver=$($sshcmd -i /root/.ssh/so.key soremote@"$MSRV" cat /etc/soversion)
|
||||||
|
|
||||||
if [[ $manager_ver == "" ]]; then
|
if [[ $manager_ver == "" ]]; then
|
||||||
rm /root/install_opt
|
rm /root/install_opt
|
||||||
@@ -910,6 +908,7 @@ copy_salt_master_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
copy_minion_tmp_files() {
|
copy_minion_tmp_files() {
|
||||||
|
|
||||||
case "$install_type" in
|
case "$install_type" in
|
||||||
'MANAGER' | 'EVAL' | 'HELIXSENSOR' | 'MANAGERSEARCH' | 'STANDALONE' | 'IMPORT')
|
'MANAGER' | 'EVAL' | 'HELIXSENSOR' | 'MANAGERSEARCH' | 'STANDALONE' | 'IMPORT')
|
||||||
echo "Copying pillar and salt files in $temp_install_dir to $local_salt_dir"
|
echo "Copying pillar and salt files in $temp_install_dir to $local_salt_dir"
|
||||||
@@ -921,15 +920,15 @@ copy_minion_tmp_files() {
|
|||||||
*)
|
*)
|
||||||
{
|
{
|
||||||
echo "scp pillar and salt files in $temp_install_dir to manager $local_salt_dir";
|
echo "scp pillar and salt files in $temp_install_dir to manager $local_salt_dir";
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" mkdir -p /tmp/"$MINION_ID"/pillar;
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" mkdir -p /tmp/"$MINION_ID"/pillar;
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" mkdir -p /tmp/"$MINION_ID"/schedules;
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" mkdir -p /tmp/"$MINION_ID"/schedules;
|
||||||
scp -prv -i /root/.ssh/so.key "$temp_install_dir"/pillar/minions/* soremote@"$MSRV":/tmp/"$MINION_ID"/pillar/;
|
$scpcmd -prv -i /root/.ssh/so.key "$temp_install_dir"/pillar/minions/* soremote@"$MSRV":/tmp/"$MINION_ID"/pillar/;
|
||||||
if [ -d $temp_install_dir/salt/patch/os/schedules/ ]; then
|
if [ -d $temp_install_dir/salt/patch/os/schedules/ ]; then
|
||||||
if [ "$(ls -A $temp_install_dir/salt/patch/os/schedules/)" ]; then
|
if [ "$(ls -A $temp_install_dir/salt/patch/os/schedules/)" ]; then
|
||||||
scp -prv -i /root/.ssh/so.key $temp_install_dir/salt/patch/os/schedules/* soremote@$MSRV:/tmp/$MINION_ID/schedules;
|
$scpcmd -prv -i /root/.ssh/so.key $temp_install_dir/salt/patch/os/schedules/* soremote@$MSRV:/tmp/$MINION_ID/schedules;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/manager/files/add_minion.sh "$MINION_ID";
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/manager/files/add_minion.sh "$MINION_ID";
|
||||||
} >> "$setup_log" 2>&1
|
} >> "$setup_log" 2>&1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -948,7 +947,7 @@ copy_ssh_key() {
|
|||||||
|
|
||||||
echo "Copying the SSH key to the manager"
|
echo "Copying the SSH key to the manager"
|
||||||
#Copy the key over to the manager
|
#Copy the key over to the manager
|
||||||
ssh-copy-id -f -i /root/.ssh/so.key soremote@"$MSRV"
|
$sshcopyidcmd -f -i /root/.ssh/so.key soremote@"$MSRV"
|
||||||
}
|
}
|
||||||
|
|
||||||
create_local_directories() {
|
create_local_directories() {
|
||||||
@@ -2022,7 +2021,7 @@ saltify() {
|
|||||||
# Copy down the gpg keys and install them from the manager
|
# Copy down the gpg keys and install them from the manager
|
||||||
mkdir "$temp_install_dir"/gpg >> "$setup_log" 2>&1
|
mkdir "$temp_install_dir"/gpg >> "$setup_log" 2>&1
|
||||||
echo "scp the gpg keys and install them from the manager" >> "$setup_log" 2>&1
|
echo "scp the gpg keys and install them from the manager" >> "$setup_log" 2>&1
|
||||||
scp -v -i /root/.ssh/so.key soremote@"$MSRV":/opt/so/gpg/* "$temp_install_dir"/gpg >> "$setup_log" 2>&1
|
$scpcmd -v -i /root/.ssh/so.key soremote@"$MSRV":/opt/so/gpg/* "$temp_install_dir"/gpg >> "$setup_log" 2>&1
|
||||||
echo "Using apt-key add to add SALTSTACK-GPG-KEY.pub and GPG-KEY-WAZUH" >> "$setup_log" 2>&1
|
echo "Using apt-key add to add SALTSTACK-GPG-KEY.pub and GPG-KEY-WAZUH" >> "$setup_log" 2>&1
|
||||||
apt-key add "$temp_install_dir"/gpg/SALTSTACK-GPG-KEY.pub >> "$setup_log" 2>&1
|
apt-key add "$temp_install_dir"/gpg/SALTSTACK-GPG-KEY.pub >> "$setup_log" 2>&1
|
||||||
apt-key add "$temp_install_dir"/gpg/GPG-KEY-WAZUH >> "$setup_log" 2>&1
|
apt-key add "$temp_install_dir"/gpg/GPG-KEY-WAZUH >> "$setup_log" 2>&1
|
||||||
@@ -2218,12 +2217,28 @@ set_progress_str() {
|
|||||||
|
|
||||||
echo -e "$percentage_str"
|
echo -e "$percentage_str"
|
||||||
|
|
||||||
|
info "Progressing ($percentage%): $progress_bar_text"
|
||||||
|
|
||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
'----'\
|
'----'\
|
||||||
"$percentage% - ${progress_bar_text^^}"\
|
"$percentage% - ${progress_bar_text^^}"\
|
||||||
"----" >> "$setup_log" 2>&1
|
"----" >> "$setup_log" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_ssh_cmds() {
|
||||||
|
local automated=$1
|
||||||
|
|
||||||
|
if [ $automated == yes ]; then
|
||||||
|
sshcmd="sshpass -p $SOREMOTEPASS1 ssh -o StrictHostKeyChecking=no"
|
||||||
|
sshcopyidcmd="sshpass -p $SOREMOTEPASS1 ssh-copy-id -o StrictHostKeyChecking=no"
|
||||||
|
scpcmd="sshpass -p $SOREMOTEPASS1 scp -o StrictHostKeyChecking=no"
|
||||||
|
else
|
||||||
|
sshcmd='ssh'
|
||||||
|
sshcopyidcmd='ssh-copy-id'
|
||||||
|
scpcmd='scp'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
sensor_pillar() {
|
sensor_pillar() {
|
||||||
|
|
||||||
local pillar_file=$temp_install_dir/pillar/minions/$MINION_ID.sls
|
local pillar_file=$temp_install_dir/pillar/minions/$MINION_ID.sls
|
||||||
@@ -2341,24 +2356,24 @@ set_initial_firewall_policy() {
|
|||||||
$default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost sensor "$MAINIP"
|
$default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost sensor "$MAINIP"
|
||||||
;;
|
;;
|
||||||
'SENSOR' | 'SEARCHNODE' | 'HEAVYNODE' | 'FLEET')
|
'SENSOR' | 'SEARCHNODE' | 'HEAVYNODE' | 'FLEET')
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall includehost minion "$MAINIP"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall includehost minion "$MAINIP"
|
||||||
case "$install_type" in
|
case "$install_type" in
|
||||||
'SENSOR')
|
'SENSOR')
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost sensor "$MAINIP"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost sensor "$MAINIP"
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh sensorstab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm" "$INTERFACE"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh sensorstab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm" "$INTERFACE"
|
||||||
;;
|
;;
|
||||||
'SEARCHNODE')
|
'SEARCHNODE')
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost search_node "$MAINIP"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost search_node "$MAINIP"
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh nodestab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh nodestab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm"
|
||||||
;;
|
;;
|
||||||
'HEAVYNODE')
|
'HEAVYNODE')
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall includehost sensor "$MAINIP"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall includehost sensor "$MAINIP"
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost heavy_node "$MAINIP"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost heavy_node "$MAINIP"
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh sensorstab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm" "$INTERFACE"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh sensorstab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm" "$INTERFACE"
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh nodestab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/pillar/data/addtotab.sh nodestab "$MINION_ID" "$MAINIP" "$num_cpu_cores" "$random_uid" "$MNIC" "$filesystem_root" "$filesystem_nsm"
|
||||||
;;
|
;;
|
||||||
'FLEET')
|
'FLEET')
|
||||||
ssh -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost beats_endpoint_ssl "$MAINIP"
|
$sshcmd -i /root/.ssh/so.key soremote@"$MSRV" sudo $default_salt_dir/salt/common/tools/sbin/so-firewall --apply includehost beats_endpoint_ssl "$MAINIP"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -2454,6 +2469,13 @@ mark_version() {
|
|||||||
echo "$SOVERSION" > /etc/soversion
|
echo "$SOVERSION" > /etc/soversion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_sudoers_for_testing() {
|
||||||
|
if [ -n "$TESTING" ]; then
|
||||||
|
info "Ensuring $INSTALLUSERNAME has password-less sudo access for automated testing purposes."
|
||||||
|
sed -i "s/^$INSTALLUSERNAME ALL=(ALL) ALL/$INSTALLUSERNAME ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
update_sudoers() {
|
update_sudoers() {
|
||||||
|
|
||||||
if ! grep -qE '^soremote\ ALL=\(ALL\)\ NOPASSWD:(\/usr\/bin\/salt\-key|\/opt\/so\/saltstack)' /etc/sudoers; then
|
if ! grep -qE '^soremote\ ALL=\(ALL\)\ NOPASSWD:(\/usr\/bin\/salt\-key|\/opt\/so\/saltstack)' /etc/sudoers; then
|
||||||
|
|||||||
@@ -124,6 +124,15 @@ if [[ -f automation/$automation && $(basename $automation) == $automation ]]; th
|
|||||||
ip a | grep "$MNIC:" | grep "state UP" >> $setup_log 2>&1
|
ip a | grep "$MNIC:" | grep "state UP" >> $setup_log 2>&1
|
||||||
done
|
done
|
||||||
echo "Network is up on $MNIC" >> $setup_log 2>&1
|
echo "Network is up on $MNIC" >> $setup_log 2>&1
|
||||||
|
|
||||||
|
if [[ ! $is_iso ]]; then
|
||||||
|
echo "Installing sshpass for automated testing." >> $setup_log 2>&1
|
||||||
|
if [ "$OS" == ubuntu ]; then
|
||||||
|
apt-get -y install sshpass >> $setup_log 2>&1
|
||||||
|
else
|
||||||
|
yum -y install sshpass >> $setup_log 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$setup_type" in
|
case "$setup_type" in
|
||||||
@@ -136,6 +145,9 @@ case "$setup_type" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
#set ssh commands that will be used based on if this is an automated test install or not
|
||||||
|
set_ssh_cmds $automated
|
||||||
|
|
||||||
# Allow execution of SO tools during setup
|
# Allow execution of SO tools during setup
|
||||||
local_sbin="$(pwd)/../salt/common/tools/sbin"
|
local_sbin="$(pwd)/../salt/common/tools/sbin"
|
||||||
export PATH=$PATH:$local_sbin
|
export PATH=$PATH:$local_sbin
|
||||||
@@ -285,7 +297,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_minion ]]; then
|
if [[ $is_minion ]]; then
|
||||||
[ "$automated" == no ] && copy_ssh_key >> $setup_log 2>&1
|
copy_ssh_key >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_minion ]] && ! (compare_versions); then
|
if [[ $is_minion ]] && ! (compare_versions); then
|
||||||
@@ -586,6 +598,8 @@ set_redirect >> $setup_log 2>&1
|
|||||||
set_progress_str 8 'Initializing Salt minion'
|
set_progress_str 8 'Initializing Salt minion'
|
||||||
configure_minion "$minion_type" >> $setup_log 2>&1
|
configure_minion "$minion_type" >> $setup_log 2>&1
|
||||||
|
|
||||||
|
update_sudoers_for_testing >> $setup_log 2>&1
|
||||||
|
|
||||||
if [[ $is_manager || $is_helix || $is_import ]]; then
|
if [[ $is_manager || $is_helix || $is_import ]]; then
|
||||||
set_progress_str 9 'Configuring Salt master'
|
set_progress_str 9 'Configuring Salt master'
|
||||||
{
|
{
|
||||||
@@ -628,12 +642,12 @@ set_redirect >> $setup_log 2>&1
|
|||||||
|
|
||||||
if [[ $is_minion ]]; then
|
if [[ $is_minion ]]; then
|
||||||
set_progress_str 20 'Accepting Salt key on manager'
|
set_progress_str 20 'Accepting Salt key on manager'
|
||||||
accept_salt_key_remote >> $setup_log 2>&1
|
retry 20 10 accept_salt_key_remote "going to be accepted"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_manager || $is_import || $is_helix ]]; then
|
if [[ $is_manager || $is_import || $is_helix ]]; then
|
||||||
set_progress_str 20 'Accepting Salt key'
|
set_progress_str 20 'Accepting Salt key'
|
||||||
salt-key -ya "$MINION_ID" >> $setup_log 2>&1
|
retry 20 10 "salt-key -ya $MINION_ID" "going to be accepted"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set_progress_str 21 'Copying minion pillars to manager'
|
set_progress_str 21 'Copying minion pillars to manager'
|
||||||
@@ -842,7 +856,7 @@ if [[ -n $SO_ERROR ]]; then
|
|||||||
else
|
else
|
||||||
echo "Successfully completed setup! Continuing with post-installation steps" >> $setup_log 2>&1
|
echo "Successfully completed setup! Continuing with post-installation steps" >> $setup_log 2>&1
|
||||||
{
|
{
|
||||||
[ -n "$TESTING" ] && logCmd so-test
|
[[ -n "$TESTING" ]] && logCmd so-test
|
||||||
|
|
||||||
export percentage=95 # set to last percentage used in previous subshell
|
export percentage=95 # set to last percentage used in previous subshell
|
||||||
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user