Setup - Fix prompts and disable onion user if iso

This commit is contained in:
Mike Reeves
2019-12-11 13:44:40 -05:00
parent e52f469915
commit 989641eb5a
3 changed files with 75 additions and 31 deletions

View File

@@ -117,13 +117,13 @@ nginxtmp:
# Start the core docker # Start the core docker
so-coreimage: so-coreimage:
cmd.run: cmd.run:
- name: docker pull --disable-content-trust=false docker.io/soshybridhunter/so-core:HH1.1.2 - name: docker pull --disable-content-trust=false docker.io/soshybridhunter/so-core:HH1.1.3
so-core: so-core:
docker_container.running: docker_container.running:
- require: - require:
- so-coreimage - so-coreimage
- image: docker.io/soshybridhunter/so-core:HH1.1.2 - image: docker.io/soshybridhunter/so-core:HH1.1.3
- hostname: so-core - hostname: so-core
- user: socore - user: socore
- binds: - binds:

View File

@@ -1,7 +1,7 @@
{% set HELIX_API_KEY = salt['pillar.get']('fireeye:helix:api_key', '') %} {% set HELIX_API_KEY = salt['pillar.get']('fireeye:helix:api_key', '') %}
filter { filter {
if [type] =~ /^bro_conn|bro_dns|bro_http|bro_files|bro_ssl$/ { if [type] =~ /^bro_conn|bro_dns|bro_http|bro_files|bro_ssl|bro_dhcp|bro_x509$/ {
grok { grok {
match => [ match => [
"source_ip", "^%{IPV4:srcipv4}$", "source_ip", "^%{IPV4:srcipv4}$",
@@ -72,7 +72,8 @@ filter {
if "bro_dhcp" in [class] { if "bro_dhcp" in [class] {
mutate{ mutate{
#add_field = { "metaclass" => "dhcp"} #add_field = { "metaclass" => "dhcp"}
rename => { "ips" => "ip" } rename => { "message_types" => "direction" }
rename => { "lease_time" => "duration" }
} }
} }
if "bro_files" in [class] { if "bro_files" in [class] {
@@ -109,25 +110,35 @@ filter {
rename => { "request_body_len" => "sentbodybytes" } rename => { "request_body_len" => "sentbodybytes" }
} }
} }
} if "bro_weird" in [class] {
} mutate{
#add_field = { "metaclass" => "dns"}
#output { rename => { "name" => "eventname" }
# if [event_type] =~ /^bro_conn|bro_dns|bro_http|bro_files|bro_ssl$/ { }
# http { }
# url => "https://helix-integrations.cloud.aws.apps.fireeye.com/api/upload" if "bro_x509" in [class] {
# http_method => post mutate{
# http_compression => true #add_field = { "metaclass" => "dns"}
# socket_timeout => 60 rename => { "certificate_common_name" => "certname" }
# headers => ["Authorization","{{ HELIX_API_KEY }}"] rename => { "certificate_subject" => "certsubject" }
# format => json_batch rename => { "issuer_common_name" => "issuer" }
# } reanme => { "certificate_issuer" => "issuersubject" }
# } rename => { "certificate_not_valid_before" => "issuetime" }
#} rename => { "certificate_key_type" => "cert_type" }
output { }
if [event_type] =~ /^bro_conn|bro_dns|bro_http|bro_files|bro_ssl$/ { }
file { }
path => "/var/log/logstash/output.json" }
output {
if [event_type] =~ /^bro_conn|bro_dns|bro_http|bro_files|bro_ssl|bro_dhcp|bro_x509$/ {
http {
url => "https://helix-integrations.cloud.aws.apps.fireeye.com/api/upload"
http_method => post
http_compression => true
socket_timeout => 60
headers => ["Authorization","{{ HELIX_API_KEY }}"]
format => json_batch
} }
} }
} }

View File

@@ -71,13 +71,13 @@ if (whiptail_you_sure) ; then
# Set management nic # Set management nic
whiptail_management_nic whiptail_management_nic
whiptail_create_socore_user # whiptail_create_socore_user
SCMATCH=no # SCMATCH=no
while [ $SCMATCH != yes ]; do # while [ $SCMATCH != yes ]; do
whiptail_create_socore_user_password1 # whiptail_create_socore_user_password1
whiptail_create_socore_user_password2 # whiptail_create_socore_user_password2
check_socore_pass # check_socore_pass
done # done
else else
@@ -166,7 +166,10 @@ if (whiptail_you_sure) ; then
get_filesystem_root get_filesystem_root
get_filesystem_nsm get_filesystem_nsm
get_main_ip get_main_ip
add_socore_user_master if [ $INSTALLMETHOD == iso ]; then
disable_onion_user
fi
#add_socore_user_master
# Install salt and dependencies # Install salt and dependencies
{ {
sleep 0.5 sleep 0.5
@@ -285,6 +288,15 @@ if (whiptail_you_sure) ; then
fi fi
fi fi
# Get a password for the socore user
whiptail_create_socore_user
SCMATCH=no
while [ $SCMATCH != yes ]; do
whiptail_create_socore_user_password1
whiptail_create_socore_user_password2
check_socore_pass
done
# Last Chance to back out # Last Chance to back out
whiptail_make_changes whiptail_make_changes
set_hostname set_hostname
@@ -300,6 +312,9 @@ if (whiptail_you_sure) ; then
# Figure out the main IP address # Figure out the main IP address
get_main_ip get_main_ip
if [ $INSTALLMETHOD == iso ]; then
disable_onion_user
fi
# Add the user so we can sit back and relax # Add the user so we can sit back and relax
#echo "" #echo ""
@@ -441,6 +456,9 @@ if (whiptail_you_sure) ; then
mkdir -p /nsm mkdir -p /nsm
get_filesystem_root get_filesystem_root
get_filesystem_nsm get_filesystem_nsm
if [ $INSTALLMETHOD == iso ]; then
disable_onion_user
fi
copy_ssh_key >> $SETUPLOG 2>&1 copy_ssh_key >> $SETUPLOG 2>&1
{ {
sleep 0.5 sleep 0.5
@@ -525,6 +543,15 @@ if (whiptail_you_sure) ; then
BROVERSION=ZEEK BROVERSION=ZEEK
CURCLOSEDAYS=30 CURCLOSEDAYS=30
process_components process_components
# Get a password for the socore user
whiptail_create_socore_user
SCMATCH=no
while [ $SCMATCH != yes ]; do
whiptail_create_socore_user_password1
whiptail_create_socore_user_password2
check_socore_pass
done
whiptail_make_changes whiptail_make_changes
set_hostname set_hostname
generate_passwords generate_passwords
@@ -535,6 +562,9 @@ if (whiptail_you_sure) ; then
get_filesystem_nsm get_filesystem_nsm
get_log_size_limit get_log_size_limit
get_main_ip get_main_ip
if [ $INSTALLMETHOD == iso ]; then
disable_onion_user
fi
# Add the user so we can sit back and relax # Add the user so we can sit back and relax
add_socore_user_master add_socore_user_master
{ {
@@ -688,6 +718,9 @@ if (whiptail_you_sure) ; then
mkdir -p /nsm mkdir -p /nsm
get_filesystem_root get_filesystem_root
get_filesystem_nsm get_filesystem_nsm
if [ $INSTALLMETHOD == iso ]; then
disable_onion_user
fi
copy_ssh_key >> $SETUPLOG 2>&1 copy_ssh_key >> $SETUPLOG 2>&1
{ {
sleep 0.5 sleep 0.5