Compare commits

...

1191 Commits

Author SHA1 Message Date
Mike Reeves
5344d30d56 Merge pull request #2003 from Security-Onion-Solutions/dev
2.3.10
2020-11-19 16:48:53 -05:00
Mike Reeves
4051111999 Update hashes and keys 2020-11-19 16:00:40 -05:00
Mike Reeves
316a1c02f1 Update soup to display what its doing 2020-11-19 15:19:50 -05:00
Josh Patterson
c07f62f8d1 Merge pull request #2007 from Security-Onion-Solutions/fix/minon
kill salt process with soup and dont restart salt-minion service when…
2020-11-19 15:17:58 -05:00
m0duspwnens
cdc7a5cc7c kill salt process with soup and dont restart salt-minion service when salt upgrade 2020-11-19 15:17:11 -05:00
Josh Patterson
10a3e6f414 Merge pull request #2006 from Security-Onion-Solutions/fix/minon
change typo on minon to minion
2020-11-19 15:11:16 -05:00
m0duspwnens
2a3951ab36 change typo on minon to minion 2020-11-19 15:08:08 -05:00
Mike Reeves
67a8c4e8cb Update Readme 2020-11-19 11:27:15 -05:00
Mike Reeves
177819447b Update Sigs and Hashes 2020-11-19 11:26:08 -05:00
Mike Reeves
3be1c9ae32 Clean up 2.3.1 dockers 2020-11-19 09:58:08 -05:00
Josh Brower
b79e1c3225 Merge pull request #1987 from Security-Onion-Solutions/bugfix/playbookdb-user
playbook mysqluser
2020-11-18 20:48:49 -05:00
Josh Brower
d3065005ca playbook mysqluser 2020-11-18 20:48:02 -05:00
Josh Patterson
26e97d5875 Merge pull request #1984 from Security-Onion-Solutions/salt/3002.2
upgrade from salt 3002.1 to salt 3002.2
2020-11-18 18:26:11 -05:00
m0duspwnens
d68726f6ef upgrade from salt 3002.1 to salt 3002.2 2020-11-18 18:25:02 -05:00
Josh Patterson
f81da406da Merge pull request #1983 from Security-Onion-Solutions/soup-verify-salt
dont highstate, just restart salt-minion
2020-11-18 17:40:36 -05:00
m0duspwnens
afd466cd2b dont highstate, just restart salt-minion 2020-11-18 17:27:25 -05:00
Josh Patterson
6d228a836f Merge pull request #1982 from Security-Onion-Solutions/soup-verify-salt
add -X so bootstrap doesnt try to start salt-minion during soup
2020-11-18 16:45:05 -05:00
m0duspwnens
1805effdc0 add -X so bootstrap doesnt try to start salt-minion during soup 2020-11-18 16:32:53 -05:00
Jason Ertel
1170b04a87 Update changes for 2.3.10 2020-11-18 16:18:00 -05:00
Josh Patterson
c0b43d3319 Merge pull request #1981 from Security-Onion-Solutions/soup-verify-salt
add back -s
2020-11-18 15:50:04 -05:00
m0duspwnens
6cc9d1c076 add back -s 2020-11-18 15:49:30 -05:00
William Wernert
1c55bb6db2 [fix] Only backup /nsm/mysql and /nsm/wazuh 2020-11-18 15:34:40 -05:00
Josh Brower
3d0003555a Merge pull request #1980 from Security-Onion-Solutions/bugfix/soup-regen-osquery
SOUP - Regen Osquery Packages
2020-11-18 14:56:23 -05:00
Josh Brower
0830f63c4e SOUP - Regen Osquery Packages 2020-11-18 14:55:14 -05:00
Josh Patterson
adbd8d6956 Merge pull request #1979 from Security-Onion-Solutions/soup-verify-salt
Soup verify salt
2020-11-18 14:49:03 -05:00
William Wernert
80d0080f70 [fix] Only set is_reinstall if it's needed 2020-11-18 14:47:53 -05:00
m0duspwnens
af6e14dc6f highstate , merge with dev fix conflict 2020-11-18 14:47:40 -05:00
William Wernert
8b6b7cbd11 [fix] Check if $is_reinstall is true 2020-11-18 14:46:22 -05:00
William Wernert
e65c53dbb1 [fix] Don't rename /nsm/docker-registry 2020-11-18 14:01:33 -05:00
m0duspwnens
ceef07b74b remove pkill 2020-11-18 14:00:01 -05:00
William Wernert
280cde43ff [fix] install_type -> setup_type 2020-11-18 13:51:55 -05:00
William Wernert
81b9658499 [fix] Don't remove accept_changes file 2020-11-18 13:51:55 -05:00
weslambert
04c6bed779 Merge pull request #1977 from Security-Onion-Solutions/fix/zeek_log_inode_cleanup
Change clean_removed to true to clean up tracking of Zeek logs removed fr…
2020-11-18 13:49:46 -05:00
weslambert
6b4af30fc1 Change clean_removed to true cleanup tracking of Zeek logs removed from current 2020-11-18 13:47:32 -05:00
m0duspwnens
1e2b404836 remove -s 2020-11-18 13:29:42 -05:00
m0duspwnens
276c011a4f queue state and change upgrade command https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-18 13:22:11 -05:00
William Wernert
34fd80182e [fix][wip] Don't use variable for accept_changes file 2020-11-18 12:54:36 -05:00
Jason Ertel
57e9f69c97 Add new so-ip-update script (Work in progress) 2020-11-18 12:35:38 -05:00
William Wernert
0542e0aa04 [fix] info -> title 2020-11-18 12:35:16 -05:00
m0duspwnens
d0e7b5b55a only ensure salt-minion service is running if salt is on right verison https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-18 12:32:21 -05:00
William Wernert
ad74b4b3e0 [refactor][fix] Update reinstall logic
* Only set reinstall flag if new accept_changes file exists
* Instead of stopping highstate from running, kill all salt processes and remove their configs
* Make end of non-reinstall logs clear in cases where user cancels (and log not rotated)
2020-11-18 12:29:54 -05:00
m0duspwnens
ce70e0a61f changes to upgradecommand https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-18 11:51:28 -05:00
William Wernert
8a4defcffa [refactor] Check for setup log earlier
* Check for sosetuo.log before any scripts besides so-variables are sourced to make sure the log hasn't been created yet.
2020-11-18 11:16:36 -05:00
m0duspwnens
bddc3d6df9 kill all salt-minion again since they hang and redirect highstate to a logfile 2020-11-18 10:40:23 -05:00
m0duspwnens
4bb1ad9799 dont restart or kill salt-minon in upgrade command https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-18 09:29:09 -05:00
William Wernert
bc0c395b7f Merge pull request #1963 from Security-Onion-Solutions/feature/rem-so-setup-perm-entry
Feature/rem so-setup perm entry
2020-11-18 09:12:25 -05:00
m0duspwnens
67dc71ab49 Merge remote-tracking branch 'remotes/origin/dev' into soup-verify-salt 2020-11-18 08:36:23 -05:00
m0duspwnens
c95619d335 change upgradecommand order https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-18 08:35:56 -05:00
Jason Ertel
bfbc0f354c Only default to logging out to tty if tty exists as a character device 2020-11-17 22:48:40 -05:00
m0duspwnens
5c6e9e0e3a run a highstate and let that start the salt-minion back up https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-17 19:40:42 -05:00
m0duspwnens
7291d64e82 pkill salt-minion before restartiong salt-minion service https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-17 18:38:01 -05:00
m0duspwnens
695cce0b50 upgrad command changes https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-17 17:54:56 -05:00
m0duspwnens
42126f125b change verison check to != 2020-11-17 17:00:59 -05:00
m0duspwnens
2bfc48be35 change check of salt was upgraded during soup for ubuntu and centos 2020-11-17 16:31:11 -05:00
m0duspwnens
7d1cf56160 change check of salt was upgraded during soup for ubuntu and centos 2020-11-17 16:29:35 -05:00
m0duspwnens
1fd2196dd5 fix check of salt was upgraded during soup for ubuntu and centos 2020-11-17 16:18:50 -05:00
m0duspwnens
65b84f1bd7 Merge remote-tracking branch 'remotes/origin/dev' into soup-verify-salt 2020-11-17 16:09:47 -05:00
m0duspwnens
fcfd3e3758 change location yum/apt verison locks https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-17 16:09:30 -05:00
William Wernert
ee3708a428 [fix] Move sudoers check in soup to correct place + fix styling issue 2020-11-17 15:44:20 -05:00
William Wernert
b146700303 [feat] Remove so-setup permission from sudoers file after iso setup
Closes #1701
2020-11-17 15:36:25 -05:00
Jason Ertel
1ec8b52353 Replace scan.exiftool.* fields due to reduction in strelka field counts 2020-11-17 15:12:06 -05:00
Josh Patterson
f8346cde08 Merge pull request #1962 from Security-Onion-Solutions/soup-verify-salt
Soup verify salt
2020-11-17 15:08:32 -05:00
m0duspwnens
e162be2e1d change salt upgrade command https://github.com/Security-Onion-Solutions/securityonion/issues/1961 2020-11-17 14:29:39 -05:00
m0duspwnens
4f4f64a47d Merge remote-tracking branch 'remotes/origin/dev' into soup-verify-salt 2020-11-17 13:16:18 -05:00
m0duspwnens
4cd1086efa new way for soup to install and resart salt for upgrade 2020-11-17 13:15:55 -05:00
Mike Reeves
2184c3b8ee Revert "The Hive ES update"
This reverts commit 88c2ee0d36.
2020-11-17 12:51:42 -05:00
Mike Reeves
65d28f98b5 Revert "The Hive ES Update"
This reverts commit f31d459a24.
2020-11-17 12:51:13 -05:00
Jason Ertel
aa8d9c12a0 Remove yara rule update that can't succeed since the script doesn't exist at this point of the setup process 2020-11-17 12:15:27 -05:00
Mike Reeves
f31d459a24 The Hive ES Update 2020-11-17 11:59:03 -05:00
Mike Reeves
88c2ee0d36 The Hive ES update 2020-11-17 11:58:22 -05:00
Jason Ertel
d13733e716 Queue the registry state in case a highstate is already active 2020-11-17 09:59:09 -05:00
Josh Patterson
86922a2388 Merge pull request #1959 from Security-Onion-Solutions/soup-verify-salt
verify new salt version is installed during soup if not, exit before proceeding
2020-11-17 09:53:08 -05:00
m0duspwnens
65440f9aef verify new salt version is installed during soup if not, exit before proceeding 2020-11-17 09:51:28 -05:00
William Wernert
12c661101a Merge pull request #1958 from Security-Onion-Solutions/feat/require-min-nics
Feat/require min nics
2020-11-17 09:49:09 -05:00
William Wernert
79b63ed14b [fix] Use singular when needed for requirements 2020-11-17 09:47:08 -05:00
Josh Brower
cc4357d567 Merge pull request #1954 from Security-Onion-Solutions/bugfix/ingest-mappings
Cleanup & fix sysmon pid ingest
2020-11-17 09:05:31 -05:00
Jason Ertel
b9267ee015 Add missing newline after armor header 2020-11-17 09:00:02 -05:00
Jason Ertel
5c310327e4 Merge pull request #1942 from Security-Onion-Solutions/jertel/refactor-seed
Jertel/refactor seed
2020-11-16 18:46:28 -05:00
Jason Ertel
4311f66110 Remove unnecessary redirect 2020-11-16 16:58:09 -05:00
Josh Patterson
a8644478b5 Merge pull request #1939 from Security-Onion-Solutions/fix/nginx-nonmanager
fix nginx for non manaager/fleet nodes
2020-11-16 16:47:39 -05:00
m0duspwnens
4436f02f6d fix nginx for non manaager/fleet nodes 2020-11-16 16:46:22 -05:00
Jason Ertel
3cf8afc1dd Remove unused redirect descriptors and ensure gpg import output is not leaked to console 2020-11-16 16:39:54 -05:00
Josh Patterson
f1e33b6eea Merge pull request #1938 from Security-Onion-Solutions/fix/so.status-module
fix so-status to work with so.status module and change padding
2020-11-16 16:35:08 -05:00
m0duspwnens
0d9b22fe2d fix so-status to work with so.status module and change padding 2020-11-16 16:33:29 -05:00
William Wernert
a08923030b [feat] Exit setup if less than required number of NICs present 2020-11-16 16:26:38 -05:00
Jason Ertel
1ec4af1a4d Destroy the old registry before updating SO images 2020-11-16 15:41:15 -05:00
Jason Ertel
5ae78d4108 Install curl in order to test for cloud 2020-11-16 15:31:40 -05:00
Jason Ertel
3bae243915 Continued refactoring of bash 2020-11-16 15:20:00 -05:00
Jason Ertel
8234b6f835 Switch remaining containers over to new registries; Continued bash refactoring 2020-11-16 15:11:08 -05:00
Josh Patterson
55231eab25 Merge pull request #1934 from Security-Onion-Solutions/fix/so-status-in-setup
redirect output from setting up so-status stuff in so-setup
2020-11-16 14:57:58 -05:00
m0duspwnens
e956ee9324 redirect output from setting up so-status stuff in so-setup 2020-11-16 14:56:20 -05:00
Jason Ertel
a343e3f31e Save descriptors while inside the progress pipe 2020-11-16 14:10:48 -05:00
Jason Ertel
2ff738a61c Refactor docker_seed_registry to eliminate duplicate logic 2020-11-16 13:27:23 -05:00
William Wernert
c226c1d902 [fix] Redirect stderr when checking for link state 2020-11-16 11:30:47 -05:00
Josh Patterson
7a49c55ea0 Merge pull request #1930 from Security-Onion-Solutions/issue/1831
Issue/1831
2020-11-16 10:09:49 -05:00
m0duspwnens
cc50eba6cb make sure /opt/so/log/salt/so-salt-minion-check gets touched even if salt-minon verison isnt correct https://github.com/Security-Onion-Solutions/securityonion/issues/1831 2020-11-16 10:01:40 -05:00
m0duspwnens
5c25dcf192 add /opt/so/log/salt/so-salt-minion-check to log rotate https://github.com/Security-Onion-Solutions/securityonion/issues/1831 2020-11-16 09:50:10 -05:00
Jason Ertel
c744d389f7 More bash cleanup 2020-11-15 10:44:14 -05:00
Jason Ertel
76c917d977 Continued bash cleanup 2020-11-15 09:57:12 -05:00
Josh Brower
1908a68330 Cleanup & fix sysmon pid ingest 2020-11-14 16:19:23 -05:00
Jason Ertel
d22040fb5d Annual fall bash cleanup event 2020-11-14 11:53:31 -05:00
Jason Ertel
372f694cc1 Set curl type to 'features' when adding features to existing installation 2020-11-14 11:04:40 -05:00
Jason Ertel
1c079f7ff4 Remove duplicate docker pull/sigverify logic from so-features-enable; Provide current SO version to curl 2020-11-14 10:35:45 -05:00
m0duspwnens
4e6e29e7dc update logging 2020-11-13 20:26:06 -05:00
m0duspwnens
43a244e0da change log path https://github.com/Security-Onion-Solutions/securityonion/issues/1831 2020-11-13 19:37:03 -05:00
m0duspwnens
e958246457 touch file at start of highstate, just kill salt dont systemctl stop it https://github.com/Security-Onion-Solutions/securityonion/issues/1831 2020-11-13 19:34:17 -05:00
m0duspwnens
b210092534 logging changes issue/1831 2020-11-13 19:09:53 -05:00
m0duspwnens
e820c6fa42 logging changes issue/1831 2020-11-13 19:04:09 -05:00
m0duspwnens
71a409f210 fix threshold logic https://github.com/Security-Onion-Solutions/securityonion/issues/1831 2020-11-13 18:23:55 -05:00
m0duspwnens
a5823be0ac fix typo 2020-11-13 17:55:19 -05:00
Mike Reeves
13c261178a fix soup so-image-common 2020-11-13 17:26:04 -05:00
m0duspwnens
2f0eaff8b3 sbin 2020-11-13 17:25:45 -05:00
Mike Reeves
977eea131e fix soup so-image-common 2020-11-13 17:18:55 -05:00
Mike Reeves
fb9b07b0eb fix soup so-image-common 2020-11-13 17:13:05 -05:00
m0duspwnens
6a010bb3e6 change var name 2020-11-13 17:08:47 -05:00
Mike Reeves
51b3e066be fix soup so-image-common 2020-11-13 17:01:42 -05:00
Mike Reeves
7dfb8f5b12 fix soup so-image-common 2020-11-13 16:50:12 -05:00
Mike Reeves
23f2dee840 fix soup so-image-common 2020-11-13 16:30:34 -05:00
m0duspwnens
4275fcbf22 Merge remote-tracking branch 'remotes/origin/dev' into issue/1831 2020-11-13 16:28:58 -05:00
Jason Ertel
ee97f5eaac Remove unnecessary branch var; allow skipping of tag/push step 2020-11-13 16:17:09 -05:00
m0duspwnens
0a807621cc check health of salt-minion https://github.com/Security-Onion-Solutions/securityonion/issues/1831 2020-11-13 16:02:28 -05:00
Mike Reeves
8577fa63a3 fix network install download 2020-11-13 14:28:27 -05:00
Mike Reeves
50175f7e42 soup should now copy the common image functions 2020-11-13 14:25:29 -05:00
Mike Reeves
3173c6fd3c Change user agent string for docker refresh 2020-11-13 14:09:29 -05:00
Mike Reeves
069908ec56 Change user agent string for docker refresh 2020-11-13 13:55:26 -05:00
Mike Reeves
09f3199cc2 Change user agent string for docker refresh 2020-11-13 13:39:52 -05:00
Josh Brower
adec9ad48b Merge pull request #1916 from Security-Onion-Solutions/feature/so-playbook-reset
Feature/so playbook reset
2020-11-13 11:21:50 -05:00
Josh Brower
8b3262ce1b Add so-playbook-reset 2020-11-13 11:20:39 -05:00
weslambert
4fad0e3a98 Merge pull request #1914 from Security-Onion-Solutions/fix/syslog_parsing
Syslog updates
2020-11-13 11:07:53 -05:00
Wes Lambert
fddfb8eb92 Syslog updates 2020-11-13 16:06:22 +00:00
Jason Ertel
210a7bc65b Merge curator closed-delete-delete changes from the abandoned 2.3.3 release 2020-11-13 10:05:23 -05:00
William Wernert
8a7ff3260d Merge pull request #1911 from Security-Onion-Solutions/feature/ssh-harden-script
[feat] Add ssh-harden script
2020-11-13 09:00:07 -05:00
William Wernert
2f27b6f2fa [feat] Add ssh-harden script 2020-11-13 08:51:28 -05:00
Mike Reeves
52e909007f Change url and clean up sigs 2020-11-12 16:08:27 -05:00
Mike Reeves
80aeffe1ad Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into dev 2020-11-12 11:53:41 -05:00
Mike Reeves
cbca2d702f Add Version back to sig files 2020-11-12 11:53:30 -05:00
Automation
af44cce423 Auto-publish so-acng image signature 2020-11-12 16:39:54 +00:00
Automation
7d81080076 Auto-publish so-grafana image signature 2020-11-12 16:39:24 +00:00
Automation
6194d85180 Auto-publish so-idstools image signature 2020-11-12 16:38:38 +00:00
Automation
88675ec2ee Auto-publish so-strelka-manager image signature 2020-11-12 16:37:53 +00:00
Automation
9c0a1bc8b9 Auto-publish so-fleet image signature 2020-11-12 16:37:24 +00:00
Automation
52babc686d Auto-publish so-fleet-launcher image signature 2020-11-12 16:36:51 +00:00
Automation
9370e5b8bc Auto-publish so-freqserver image signature 2020-11-12 16:36:01 +00:00
Automation
6c1d5451eb Auto-publish so-strelka-backend image signature 2020-11-12 16:35:16 +00:00
Automation
f50e6ab929 Auto-publish so-strelka-filestream image signature 2020-11-12 16:34:12 +00:00
Automation
67f18a02ea Auto-publish so-strelka-frontend image signature 2020-11-12 16:33:37 +00:00
Mike Reeves
7f491545fa Fix Variable for docker inspect 2020-11-12 11:31:27 -05:00
Automation
9b33201ba5 Auto-publish so-minio image signature 2020-11-12 16:30:56 +00:00
Mike Reeves
aefcb9a491 Fix Variable for docker 2020-11-12 11:28:58 -05:00
Automation
fee52f8b86 Auto-publish so-redis image signature 2020-11-12 16:28:23 +00:00
Automation
e434ccd3d3 Auto-publish so-soctopus image signature 2020-11-12 16:18:25 +00:00
Automation
70a0cbae23 Auto-publish so-telegraf image signature 2020-11-12 16:17:22 +00:00
Automation
04263101cf Auto-publish so-kibana image signature 2020-11-12 16:15:27 +00:00
Mike Reeves
312f99966e Change docker inspect to a variable to speed it up 2020-11-12 09:39:13 -05:00
Mike Reeves
667800d830 Change docker inspect to variable to speed it up 2020-11-12 09:35:19 -05:00
Mike Reeves
2fba02f71b Grab specific digest so re-installs work 2020-11-12 09:29:18 -05:00
Josh Patterson
4ce0b770a5 Merge pull request #1898 from jtgreen-cse/patch-3
fix for #1725, grafana queries use non_negative_ variants
2020-11-12 08:55:12 -05:00
Mike Reeves
1de862985c Merge pull request #1893 from Security-Onion-Solutions/gpg
GPG Docker Image Verification
2020-11-12 08:46:34 -05:00
Jason Green
4e40392c55 fix for #1725, grafana queries use non_negative_ variants 2020-11-12 07:34:51 -05:00
Automation
d1fe79b642 Auto-publish so-thehive-es image signature 2020-11-12 02:55:19 +00:00
Automation
f96cc35d37 Auto-publish so-thehive-cortex image signature 2020-11-12 02:53:56 +00:00
Automation
388f1e753d Auto-publish so-strelka-manager image signature 2020-11-12 02:52:24 +00:00
Automation
42382d00d8 Auto-publish so-strelka-frontend image signature 2020-11-12 02:51:38 +00:00
Automation
b086f5e5c1 Auto-publish so-strelka-filestream image signature 2020-11-12 02:50:51 +00:00
Automation
0b0f9854f9 Auto-publish so-strelka-backend image signature 2020-11-12 02:49:47 +00:00
Automation
3107f46940 Auto-publish so-logstash image signature 2020-11-12 02:48:28 +00:00
Automation
202c672798 Auto-publish so-kibana image signature 2020-11-12 02:47:00 +00:00
Automation
6ac1bc5623 Auto-publish so-freqserver image signature 2020-11-12 02:45:21 +00:00
Automation
e002015ce2 Auto-publish so-fleet-launcher image signature 2020-11-12 02:44:31 +00:00
Automation
61b5e009c7 Auto-publish so-filebeat image signature 2020-11-12 02:43:27 +00:00
Automation
f3aadcd553 Auto-publish so-elasticsearch image signature 2020-11-12 02:42:22 +00:00
Automation
71370d4522 Auto-publish so-elasticsearch image signature 2020-11-12 02:41:12 +00:00
Automation
c287b5f826 Auto-publish so-elastalert image signature 2020-11-12 02:39:48 +00:00
Automation
4286ac0dfd Auto-publish so-domainstats image signature 2020-11-12 02:38:46 +00:00
Automation
adc937295b Auto-publish so-tcpreplay image signature 2020-11-12 02:37:39 +00:00
Automation
96bf2c57e7 Auto-publish so-pcaptools image signature 2020-11-12 02:36:20 +00:00
Automation
5f7a28dd5d Auto-publish so-telegraf image signature 2020-11-12 02:35:22 +00:00
Automation
3560ba933b Auto-publish so-suricata image signature 2020-11-12 02:34:18 +00:00
Automation
9c20450832 Auto-publish so-soctopus image signature 2020-11-12 02:33:10 +00:00
Automation
d71daef2e9 Auto-publish so-playbook image signature 2020-11-12 02:31:59 +00:00
Automation
c3ae80e2c1 Auto-publish so-logstash image signature 2020-11-12 02:30:36 +00:00
Automation
2098dd16ff Auto-publish so-influxdb image signature 2020-11-12 02:29:02 +00:00
Automation
3b4c9e02e7 Auto-publish so-idstools image signature 2020-11-12 02:28:04 +00:00
Automation
adc99ff06d Auto-publish so-filebeat image signature 2020-11-12 02:26:57 +00:00
Automation
f9b26c9a8f Auto-publish so-thehive image signature 2020-11-12 02:25:44 +00:00
Automation
41a123c22b Auto-publish so-grafana image signature 2020-11-12 02:24:19 +00:00
Automation
966089e1d0 Auto-publish so-curator image signature 2020-11-12 02:22:56 +00:00
Automation
3034d5ef98 Auto-publish so-kratos image signature 2020-11-12 02:22:11 +00:00
Automation
5ab169ea52 Auto-publish so-kibana image signature 2020-11-12 02:21:20 +00:00
Automation
f858027da1 Auto-publish so-wazuh image signature 2020-11-12 02:19:52 +00:00
Automation
c7517b37fa Auto-publish so-steno image signature 2020-11-12 02:18:25 +00:00
Automation
2f315ba5a0 Auto-publish so-redis image signature 2020-11-12 02:17:06 +00:00
Automation
ed883f173b Auto-publish so-mysql image signature 2020-11-12 02:16:12 +00:00
Automation
a46ad6fe81 Auto-publish so-minio image signature 2020-11-12 02:15:06 +00:00
Automation
42fc0add5e Auto-publish so-fleet image signature 2020-11-12 02:14:08 +00:00
Automation
f6c2983bd1 Auto-publish so-zeek image signature 2020-11-12 02:12:58 +00:00
Automation
0b8e19bfc8 Auto-publish so-acng image signature 2020-11-12 02:11:20 +00:00
Automation
bee829697e Auto-publish so-soc image signature 2020-11-12 02:10:11 +00:00
Mike Reeves
ed025851ca Change soup for new gpg verification 2020-11-11 20:13:21 -05:00
Automation
94ab77b14d Auto-publish so-nginx image signature 2020-11-12 00:57:45 +00:00
Mike Reeves
b113dce140 remove size from gpg sig 2020-11-11 19:49:25 -05:00
Automation
a2ef12eb6a Auto-publish so-nginx image signature 2020-11-12 00:46:11 +00:00
Automation
eb0b909cd2 Auto-publish so-nginx image signature 2020-11-12 00:41:23 +00:00
Automation
7ef2056f17 Auto-publish so-steno image signature 2020-11-11 22:17:26 +00:00
Automation
b12f29d48a Auto-publish so-thehive-es image signature 2020-11-11 22:16:06 +00:00
Automation
5fd1fd9b0d Auto-publish so-thehive-cortex image signature 2020-11-11 22:14:47 +00:00
Automation
ad0ecff8c5 Auto-publish so-strelka-manager image signature 2020-11-11 22:13:19 +00:00
Automation
88b6ae1b2f Auto-publish so-strelka-frontend image signature 2020-11-11 22:12:32 +00:00
Automation
9772fd181c Auto-publish so-strelka-filestream image signature 2020-11-11 22:11:36 +00:00
Automation
cfff8319bb Auto-publish so-strelka-backend image signature 2020-11-11 22:10:44 +00:00
Automation
0dc7c8b0e7 Auto-publish so-logstash image signature 2020-11-11 22:09:47 +00:00
Automation
3ccd8b40b2 Auto-publish so-kibana image signature 2020-11-11 22:08:21 +00:00
Automation
ca94bd12cf Auto-publish so-fleet-launcher image signature 2020-11-11 22:06:47 +00:00
Automation
d650e68472 Auto-publish so-filebeat image signature 2020-11-11 22:05:38 +00:00
Automation
70f9bad827 Auto-publish so-elasticsearch image signature 2020-11-11 22:04:36 +00:00
Automation
c3d6e168ae Auto-publish so-elasticsearch image signature 2020-11-11 22:03:08 +00:00
Automation
5c9c1915f1 Auto-publish so-domainstats image signature 2020-11-11 22:01:41 +00:00
Automation
32912f2c87 Auto-publish so-freqserver image signature 2020-11-11 22:00:41 +00:00
Automation
fb70e1e40c Auto-publish so-elastalert image signature 2020-11-11 21:59:35 +00:00
Automation
4106d88338 Auto-publish so-tcpreplay image signature 2020-11-11 21:58:50 +00:00
Automation
93f57b73e2 Auto-publish so-pcaptools image signature 2020-11-11 21:57:37 +00:00
Automation
4fa0b6be0e Auto-publish so-telegraf image signature 2020-11-11 21:56:53 +00:00
Automation
7ec2d85286 Auto-publish so-suricata image signature 2020-11-11 21:56:06 +00:00
Automation
763d5425a5 Auto-publish so-soctopus image signature 2020-11-11 21:55:11 +00:00
Automation
4be594cbb9 Auto-publish so-playbook image signature 2020-11-11 21:54:12 +00:00
Automation
e6fd3160ca Auto-publish so-logstash image signature 2020-11-11 21:52:59 +00:00
Automation
07871987e4 Auto-publish so-influxdb image signature 2020-11-11 21:51:49 +00:00
Automation
3c33a38098 Auto-publish so-idstools image signature 2020-11-11 21:50:43 +00:00
Automation
b24bf9b6a9 Auto-publish so-filebeat image signature 2020-11-11 21:49:41 +00:00
Automation
373d9256f2 Auto-publish so-thehive image signature 2020-11-11 21:48:26 +00:00
Automation
dde7e0bd11 Auto-publish so-grafana image signature 2020-11-11 21:46:55 +00:00
Automation
017c9c9874 Auto-publish so-curator image signature 2020-11-11 21:45:36 +00:00
Automation
871f919c27 Auto-publish so-kratos image signature 2020-11-11 21:44:53 +00:00
Automation
f67c26a8f2 Auto-publish so-kibana image signature 2020-11-11 21:43:58 +00:00
Automation
038e8fceb7 Auto-publish so-wazuh image signature 2020-11-11 21:42:21 +00:00
weslambert
8c6adc21a8 Merge pull request #1891 from Security-Onion-Solutions/syslog_cef
Update syslog pipeline to allow for initial CEF parsing and pipeline …
2020-11-11 16:40:55 -05:00
Automation
75b26fb2af Auto-publish so-redis image signature 2020-11-11 21:39:49 +00:00
Wes Lambert
8258b782fc Update syslog pipeline to allow for initial CEF parsing and pipeline targeting 2020-11-11 21:39:40 +00:00
Automation
d73542d274 Auto-publish so-nginx image signature 2020-11-11 21:38:45 +00:00
Automation
1092aa2cb1 Auto-publish so-mysql image signature 2020-11-11 21:37:49 +00:00
Automation
8668cf9a9c Auto-publish so-minio image signature 2020-11-11 21:36:45 +00:00
Automation
b9440364f7 Auto-publish so-fleet image signature 2020-11-11 21:35:44 +00:00
Automation
4f0ebfaf1f Auto-publish so-zeek image signature 2020-11-11 21:34:50 +00:00
Automation
b090656269 Auto-publish so-acng image signature 2020-11-11 21:33:29 +00:00
Automation
16e0a26869 Auto-publish so-soc image signature 2020-11-11 21:30:17 +00:00
Automation
bc362acf82 Auto-publish so-soc image signature 2020-11-11 21:05:43 +00:00
Jason Ertel
79cbc747ea Run leaktest on any branch 2020-11-11 15:52:48 -05:00
Mike Reeves
2269695e75 Change gpg to sig 2020-11-11 15:50:52 -05:00
Jason Ertel
710afe9355 Merge pull request #1889 from Security-Onion-Solutions/leaktest
Create leaktest.yml
2020-11-11 15:46:50 -05:00
Jason Ertel
ac236a0538 Move image sigs into versioned dir 2020-11-11 15:42:25 -05:00
Jason Ertel
eb7e8079ec Create leaktest.yml 2020-11-11 15:39:06 -05:00
Mike Reeves
8512042132 Change Sig Path 2020-11-11 15:37:11 -05:00
Automation
a234e1c898 Auto-publish so-thehive-es image signature 2020-11-11 20:20:56 +00:00
Automation
25c91192a1 Auto-publish so-thehive-cortex image signature 2020-11-11 20:19:33 +00:00
Automation
22f19bbe9e Auto-publish so-strelka-manager image signature 2020-11-11 20:18:03 +00:00
Automation
3b31a8d8cb Auto-publish so-strelka-frontend image signature 2020-11-11 20:17:09 +00:00
Automation
cd868d1edb Auto-publish so-strelka-filestream image signature 2020-11-11 20:16:30 +00:00
Automation
b31ea84c00 Auto-publish so-strelka-backend image signature 2020-11-11 20:15:36 +00:00
Automation
4ed6355186 Auto-publish so-logstash image signature 2020-11-11 20:14:14 +00:00
Automation
e51c2152fa Auto-publish so-kibana image signature 2020-11-11 20:12:38 +00:00
Automation
7af1b7a539 Auto-publish so-fleet-launcher image signature 2020-11-11 20:11:29 +00:00
Automation
debbe965fe Auto-publish so-filebeat image signature 2020-11-11 20:10:27 +00:00
Automation
3bbaca41c9 Auto-publish so-elasticsearch image signature 2020-11-11 20:09:30 +00:00
Automation
f2d25439e2 Auto-publish so-elasticsearch image signature 2020-11-11 20:08:10 +00:00
Automation
472fdd935e Auto-publish so-domainstats image signature 2020-11-11 20:06:33 +00:00
Automation
14304c0f28 Auto-publish so-freqserver image signature 2020-11-11 20:05:36 +00:00
Automation
6a60890c36 Auto-publish so-elastalert image signature 2020-11-11 20:04:37 +00:00
Automation
687120ce4a Auto-publish so-tcpreplay image signature 2020-11-11 20:03:28 +00:00
Automation
5e3f99c567 Auto-publish so-pcaptools image signature 2020-11-11 20:02:05 +00:00
Automation
c2ed0a6c72 Auto-publish so-telegraf image signature 2020-11-11 20:00:55 +00:00
Automation
8ed6a3ed78 Auto-publish so-suricata image signature 2020-11-11 19:59:46 +00:00
Automation
0511c851a2 Auto-publish so-soctopus image signature 2020-11-11 19:58:35 +00:00
Automation
0c7db56053 Auto-publish so-playbook image signature 2020-11-11 19:57:18 +00:00
Automation
7fae7500e8 Auto-publish so-logstash image signature 2020-11-11 19:55:41 +00:00
Automation
25b771d36f Auto-publish so-influxdb image signature 2020-11-11 19:54:19 +00:00
Automation
6febc290a8 Auto-publish so-idstools image signature 2020-11-11 19:53:15 +00:00
Automation
9e9a023377 Auto-publish so-thehive image signature 2020-11-11 19:52:11 +00:00
Automation
f069b8cced Auto-publish so-filebeat image signature 2020-11-11 19:50:50 +00:00
Automation
0d42bfb7f4 Auto-publish so-grafana image signature 2020-11-11 19:49:26 +00:00
Automation
4ccc898054 Auto-publish so-curator image signature 2020-11-11 19:48:16 +00:00
Automation
2010712929 Auto-publish so-kratos image signature 2020-11-11 19:47:11 +00:00
Automation
0ad0255e8c Auto-publish so-kibana image signature 2020-11-11 19:46:20 +00:00
Automation
ca28cc7a17 Auto-publish so-wazuh image signature 2020-11-11 19:44:58 +00:00
Automation
0fce6823db Auto-publish so-steno image signature 2020-11-11 19:43:44 +00:00
Automation
0db072d9b2 Auto-publish so-redis image signature 2020-11-11 19:42:27 +00:00
Automation
0c3a7a6214 Auto-publish so-nginx image signature 2020-11-11 19:41:26 +00:00
Automation
a58b487a0a Auto-publish so-mysql image signature 2020-11-11 19:40:32 +00:00
Automation
061b8d5b9b Auto-publish so-minio image signature 2020-11-11 19:39:38 +00:00
Automation
ff1dab283c Auto-publish so-fleet image signature 2020-11-11 19:38:45 +00:00
Automation
319867ef10 Auto-publish so-zeek image signature 2020-11-11 19:38:01 +00:00
Automation
c21131b77a Auto-publish so-acng image signature 2020-11-11 19:36:46 +00:00
Automation
638d9ddee3 Auto-publish so-soc image signature 2020-11-11 19:35:45 +00:00
Automation
dded28a54a Auto-publish so-kibana image signature 2020-11-11 19:33:55 +00:00
Automation
7132011ece Auto-publish so-steno image signature 2020-11-11 19:32:05 +00:00
Mike Reeves
3a622ee71e Hash and sig update 2020-11-11 14:29:47 -05:00
Automation
fdc1468a11 Auto-publish so-wazuh image signature 2020-11-11 18:54:25 +00:00
Automation
691f64f8a3 Auto-publish so-nginx image signature 2020-11-11 18:53:13 +00:00
Mike Reeves
a29def504e Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into gpg 2020-11-11 13:52:31 -05:00
Mike Reeves
8160ef104d Merge pull request #1887 from Security-Onion-Solutions/scriptpids
Make sure scripts don't run if they are already running
2020-11-11 13:51:51 -05:00
Automation
52ee26c334 Auto-publish so-mysql image signature 2020-11-11 18:25:23 +00:00
Automation
d2c1fed2df Auto-publish so-strelka-backend image signature 2020-11-11 18:14:28 +00:00
Automation
1521224100 Auto-publish so-strelka-filestream image signature 2020-11-11 18:12:47 +00:00
Automation
97f5f8438c Auto-publish so-thehive-es image signature 2020-11-11 18:11:17 +00:00
Mike Reeves
978ba5b3ad Update zeekloss.sh 2020-11-11 13:09:52 -05:00
Automation
80b926bc31 Auto-publish so-logstash image signature 2020-11-11 18:09:41 +00:00
Mike Reeves
a4df3623be Update zeekcaptureloss.sh 2020-11-11 13:09:31 -05:00
Mike Reeves
4a80c37167 Update suriloss.sh 2020-11-11 13:09:08 -05:00
Mike Reeves
8e88c350d5 Update stenoloss.sh 2020-11-11 13:08:43 -05:00
Mike Reeves
a6a9f03cb0 Update redis.sh 2020-11-11 13:08:28 -05:00
Automation
3a9c9e3d99 Auto-publish so-strelka-frontend image signature 2020-11-11 18:08:03 +00:00
Automation
307af1248c Auto-publish so-thehive-cortex image signature 2020-11-11 18:05:26 +00:00
Automation
0224adb7c8 Auto-publish so-strelka-manager image signature 2020-11-11 18:02:54 +00:00
Automation
f4a804b88c Auto-publish so-fleet-launcher image signature 2020-11-11 17:58:56 +00:00
Automation
ea88fa7319 Auto-publish so-soctopus image signature 2020-11-11 17:56:28 +00:00
Mike Reeves
c9bfd8a253 Update oldpcap.sh 2020-11-11 12:55:28 -05:00
Mike Reeves
ee0e1ce8d7 Update influxdbsize.sh 2020-11-11 12:55:08 -05:00
Mike Reeves
814aa85dba Update helixeps.sh 2020-11-11 12:54:48 -05:00
Mike Reeves
c5ddddda2a Update checkfiles.sh 2020-11-11 12:54:31 -05:00
Mike Reeves
c75536db6d Update so-curator-delete 2020-11-11 12:54:04 -05:00
Mike Reeves
c11d8367fa Update so-curator-closed-delete-delete 2020-11-11 12:53:36 -05:00
Mike Reeves
8320421d42 Update so-curator-closed-delete 2020-11-11 12:53:05 -05:00
Automation
33bf799b47 Auto-publish so-freqserver image signature 2020-11-11 17:52:55 +00:00
Mike Reeves
047ab95e68 Update so-curator-close 2020-11-11 12:52:38 -05:00
Mike Reeves
2eb3378b62 Update so-curator-closed-delete 2020-11-11 12:50:59 -05:00
Automation
a354a6279b Auto-publish so-idstools image signature 2020-11-11 17:49:25 +00:00
Mike Reeves
578250a994 Update so-curator-delete 2020-11-11 12:48:55 -05:00
Mike Reeves
e68f90c3b5 Update so-curator-closed-delete-delete 2020-11-11 12:48:28 -05:00
Automation
5a9211693c Auto-publish so-kratos image signature 2020-11-11 17:48:03 +00:00
Automation
1e2df983af Auto-publish so-redis image signature 2020-11-11 17:46:57 +00:00
Mike Reeves
d85c99abf3 Update so-curator-close 2020-11-11 12:46:44 -05:00
Mike Reeves
c0897c7e5a Update so-curator-close 2020-11-11 12:46:19 -05:00
Automation
b4989c6c0e Auto-publish so-minio image signature 2020-11-11 17:43:17 +00:00
Automation
7a79ef6ddb Auto-publish so-zeek image signature 2020-11-11 17:41:08 +00:00
Automation
8aa3a508fa Auto-publish so-acng image signature 2020-11-11 17:39:18 +00:00
Automation
b320a1d63e Auto-publish so-fleet image signature 2020-11-11 17:12:03 +00:00
Automation
2a119d7824 Auto-publish so-soc image signature 2020-11-11 17:08:52 +00:00
Mike Reeves
73c17b77ae Update zeekcaptureloss.sh 2020-11-11 11:43:48 -05:00
Mike Reeves
edb0d71e87 Update zeekloss.sh 2020-11-11 11:43:28 -05:00
Mike Reeves
6ff1922788 Update zeekcaptureloss.sh 2020-11-11 11:42:58 -05:00
Josh Patterson
758bee3a20 Merge pull request #1886 from Security-Onion-Solutions/issue/1681
Issue/1681
2020-11-11 11:40:08 -05:00
m0duspwnens
529da993aa Merge remote-tracking branch 'remotes/origin/dev' into issue/1681 2020-11-11 11:39:08 -05:00
m0duspwnens
5a95159ec3 just use so-status.conf for containers to fix salt warning https://github.com/Security-Onion-Solutions/securityonion/issues/1681 2020-11-11 11:38:48 -05:00
Automation
fc9c31706d Auto-publish so-acng image signature 2020-11-11 16:31:42 +00:00
Mike Reeves
9548b3df54 Update stenoloss.sh 2020-11-11 11:23:20 -05:00
Mike Reeves
d3f65ac1a8 Update redis.sh 2020-11-11 11:22:52 -05:00
Mike Reeves
cb46c13054 Update oldpcap.sh 2020-11-11 11:22:28 -05:00
Mike Reeves
a4d3e109e6 Update influxdbsize.sh 2020-11-11 11:17:18 -05:00
Mike Reeves
711f5ab38f Update helixeps.sh 2020-11-11 11:16:47 -05:00
Mike Reeves
ea1227de9d Update checkfiles.sh 2020-11-11 11:16:15 -05:00
Mike Reeves
f9b52677d7 Update suriloss.sh 2020-11-11 11:15:45 -05:00
weslambert
533a65205f Merge pull request #1885 from Security-Onion-Solutions/fix/syslog_application
Add check for field
2020-11-11 10:33:24 -05:00
weslambert
ea1f53b40c Add check for field 2020-11-11 10:29:58 -05:00
Josh Patterson
0f4f029e92 Merge pull request #1883 from Security-Onion-Solutions/issue/1857
add top change for fleet getting mysql state back
2020-11-11 09:18:06 -05:00
m0duspwnens
da9a915421 add top change for fleet getting mysql state back was reverted in https://github.com/Security-Onion-Solutions/securityonion/pull/1880/files 2020-11-11 09:15:50 -05:00
weslambert
280fc501f9 Merge pull request #1882 from Security-Onion-Solutions/fix/extra_top_var
Fix duplicate vars
2020-11-11 08:53:43 -05:00
weslambert
625307ac5f Fix duplicate vars 2020-11-11 08:52:39 -05:00
weslambert
44677ad521 Merge pull request #1880 from Security-Onion-Solutions/disable_elastic
Allow for disabling Elastic stack via pillar
2020-11-11 08:29:23 -05:00
Wes Lambert
1c326f561b Allow for disabling Elastic stack via pillar 2020-11-11 13:26:59 +00:00
Josh Patterson
7b64f93bce Merge pull request #1874 from Security-Onion-Solutions/issue/1681
Issue/1681
2020-11-10 17:57:48 -05:00
m0duspwnens
15f243f0ce change names of acng and docker registry containers https://github.com/Security-Onion-Solutions/securityonion/issues/1681 2020-11-10 17:51:00 -05:00
m0duspwnens
edb00c2058 remove redundant common from top, create so-status conf files on manager before registry state https://github.com/Security-Onion-Solutions/securityonion/issues/1681 2020-11-10 17:09:38 -05:00
m0duspwnens
9e612e98ed merge with dev 2020-11-10 15:43:40 -05:00
m0duspwnens
1fc94a8f59 change to so-acng for so-status https://github.com/Security-Onion-Solutions/securityonion/issues/1681 2020-11-10 15:37:03 -05:00
m0duspwnens
c58039ab47 rename state https://github.com/Security-Onion-Solutions/securityonion/issues/1681 2020-11-10 15:34:10 -05:00
m0duspwnens
1fca5e65df redo how containers get added to so-status https://github.com/Security-Onion-Solutions/securityonion/issues/1681 2020-11-10 15:31:47 -05:00
Mike Reeves
9a59ceee4e move to so-image-common 2020-11-10 12:16:54 -05:00
Mike Reeves
c5bf9bf90d rework soup and docker refresh 2020-11-10 12:05:08 -05:00
William Wernert
676b4f0777 [fix] Close connection in mysql_conn module 2020-11-10 11:42:40 -05:00
William Wernert
6557155a8a Merge pull request #1868 from Security-Onion-Solutions/feature/improve-mysql-dep
Feature/improve mysql dep
2020-11-10 11:04:23 -05:00
William Wernert
d3227bbcb1 [refactor] Code cleanup pt. 3 2020-11-10 11:03:43 -05:00
William Wernert
7f218e5297 [feat] Also run query against mysql to ensure queries can complete 2020-11-10 11:02:34 -05:00
William Wernert
b3c527e7a9 [refactor] Code cleanup pt. 2 2020-11-10 10:05:06 -05:00
William Wernert
54d732a060 [refactor] Code cleanup 2020-11-10 10:01:10 -05:00
William Wernert
22b7de819c [fix] Put mysql import in try,catch in case it hasn't been installed 2020-11-10 10:00:21 -05:00
William Wernert
dba30fb0ed [refactor] Split 15 min mysql startup between two wait states 2020-11-10 09:48:20 -05:00
Mike Reeves
7ca8fefded gpg sign images 2020-11-10 09:45:06 -05:00
Josh Patterson
95b24b1684 Merge pull request #1865 from Security-Onion-Solutions/issue/1864
make so-status line color same as service state
2020-11-09 18:17:05 -05:00
m0duspwnens
66cd91c0a7 make so-status line color same as service state https://github.com/Security-Onion-Solutions/securityonion/issues/1864 2020-11-09 18:16:02 -05:00
Josh Patterson
64199c81e1 Merge pull request #1863 from Security-Onion-Solutions/issue/1857
Issue/1857
2020-11-09 17:54:25 -05:00
m0duspwnens
ae5bc297dd remove extra squigly https://github.com/Security-Onion-Solutions/securityonion/issues/1857 2020-11-09 17:06:32 -05:00
m0duspwnens
f5a1bd4074 only try to get enrollsecret if fleet is already enabled https://github.com/Security-Onion-Solutions/securityonion/issues/1857 2020-11-09 16:25:28 -05:00
m0duspwnens
407a655717 merge with dev 2020-11-09 15:29:19 -05:00
m0duspwnens
0e19594c97 enable fleet in global pillars before running fleet state during setup https://github.com/Security-Onion-Solutions/securityonion/issues/1857 2020-11-09 15:25:11 -05:00
William Wernert
ff4d7a6cb6 [fix] Sync modules so states can use our modules during setup 2020-11-09 14:01:19 -05:00
William Wernert
f647a06239 [fix] Correct percentage steps 2020-11-09 13:37:42 -05:00
Josh Patterson
d122ca1ba3 Merge pull request #1861 from Security-Onion-Solutions/issue/1857
fix top logic for mysql for fleet/playbook
2020-11-09 13:16:28 -05:00
m0duspwnens
5616aa6beb fix top logic for mysql - https://github.com/Security-Onion-Solutions/securityonion/issues/1857 2020-11-09 13:12:45 -05:00
William Wernert
394fa727cb [fix] Don't overwrite mysql module 2020-11-09 13:05:29 -05:00
William Wernert
9960cf0592 [feat] Add salt module to check if mysql is accepting db connections 2020-11-09 12:05:37 -05:00
weslambert
059c4e03e1 Merge pull request #1860 from Security-Onion-Solutions/strelka-parsing
Pull out additional fields from Exif info
2020-11-09 11:54:55 -05:00
Wes Lambert
7e578d2ce0 Pull out additional fields from Exif info 2020-11-09 16:53:53 +00:00
William Wernert
12125deecb [feat] Show link state in whiptail menus 2020-11-09 11:06:08 -05:00
William Wernert
51256983da [fix] Make sure pip is installed on Ubuntu 2020-11-06 08:53:30 -05:00
William Wernert
0718dbbd4d Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion into dev 2020-11-06 08:52:42 -05:00
William Wernert
6b2ab67c58 [fix] Bump version of navigator json to 3.0 + fix booleans 2020-11-06 08:52:36 -05:00
Josh Patterson
64fd27fd78 Merge pull request #1843 from Security-Onion-Solutions/issue/1536
increase so-status padding by 1
2020-11-05 19:10:06 -05:00
m0duspwnens
7eb0dab6c7 increase padding by 1 - https://github.com/Security-Onion-Solutions/securityonion/issues/1536 2020-11-05 19:08:19 -05:00
Josh Patterson
0caf054da0 Merge pull request #1842 from Security-Onion-Solutions/issue/1764
show if disabled regardless of highstate status
2020-11-05 18:50:09 -05:00
m0duspwnens
21b284fb10 show if disabled regardless of highstate status - https://github.com/Security-Onion-Solutions/securityonion/issues/1764 2020-11-05 18:46:11 -05:00
Josh Patterson
3d1412a138 Merge pull request #1841 from Security-Onion-Solutions/issue/1764
Issue/1764
2020-11-05 18:24:51 -05:00
m0duspwnens
c7b4a5351c fix logic - https://github.com/Security-Onion-Solutions/securityonion/issues/1764 2020-11-05 18:17:11 -05:00
m0duspwnens
a95129b8c2 add color - https://github.com/Security-Onion-Solutions/securityonion/issues/1764 2020-11-05 18:03:42 -05:00
m0duspwnens
695bace3e8 https://github.com/Security-Onion-Solutions/securityonion/issues/1764 2020-11-05 17:54:10 -05:00
m0duspwnens
47cac59adb https://github.com/Security-Onion-Solutions/securityonion/issues/1764 2020-11-05 17:52:28 -05:00
m0duspwnens
1a75ebdca3 https://github.com/Security-Onion-Solutions/securityonion/issues/1764 2020-11-05 17:51:51 -05:00
m0duspwnens
8da070d511 https://github.com/Security-Onion-Solutions/securityonion/issues/1764 2020-11-05 17:46:23 -05:00
William Wernert
d2ea197ce0 [fix] Remove old entry for manager from known_hosts
Resolves #1839
2020-11-05 14:40:00 -05:00
William Wernert
b528fe1a03 [fix] Only show analyst on network installs
Closes #1682
2020-11-05 14:39:04 -05:00
weslambert
3abe8cb397 Merge pull request #1836 from Security-Onion-Solutions/fix/wazuh_agent_register
Don't sleep if not registering agent
2020-11-05 14:03:32 -05:00
weslambert
2911e37b70 Don't sleep if not registering agent 2020-11-05 14:03:08 -05:00
William Wernert
4fed5c2518 Merge pull request #1822 from Security-Onion-Solutions/feature/setup-idempotency
Feature/setup idempotency
2020-11-05 13:48:18 -05:00
William Wernert
a5833f1f77 Merge branch 'dev' into feature/setup-idempotency
# Conflicts:
#	setup/so-functions
2020-11-05 13:48:05 -05:00
William Wernert
b27b2e358b [fix] Set MSRVIP variable before hosts file is overwritten 2020-11-05 13:38:08 -05:00
William Wernert
915aaf58f2 [fix] Always set MSRVIP because /etc/hosts is wiped 2020-11-05 13:28:21 -05:00
William Wernert
f058fb460d [fix] Don't modify hosts file during whiptail menus 2020-11-05 13:25:02 -05:00
William Wernert
f7394559d4 [fix] Only add entry to /etc/hosts if unable to resolve hostname 2020-11-05 13:16:52 -05:00
Josh Patterson
ec3f35c360 Merge pull request #1832 from Security-Onion-Solutions/patch_2.3.3
Patch 2.3.3
2020-11-05 10:00:43 -05:00
Josh Patterson
fea6e6f4f9 Merge branch 'dev' into patch_2.3.3 2020-11-05 09:58:43 -05:00
William Wernert
cb75b2df65 [revert] Remove wazuh-agent package as well 2020-11-04 16:23:51 -05:00
William Wernert
4369b8d0f6 [fix] Remove wazuh-agent package as well 2020-11-04 16:14:58 -05:00
William Wernert
5cb8d0beda [fix] Add -q flag to grep 2020-11-04 14:23:24 -05:00
William Wernert
b4446cba9a [refactor][wip] Also backup directories in /nsm 2020-11-04 14:20:51 -05:00
William Wernert
1e41b9ba31 [fix] Add conditions for commands so they're less likely to fail 2020-11-04 14:20:26 -05:00
William Wernert
b2759c4c7c [fix] Uninstall launcher if installed 2020-11-04 14:19:25 -05:00
Mike Reeves
6b144903fc Update VERIFY_ISO.md 2020-11-04 13:47:37 -05:00
Mike Reeves
3825becd1b Update changes.json 2020-11-04 13:44:52 -05:00
Mike Reeves
2aa21512e5 Update soup 2020-11-04 13:40:45 -05:00
William Wernert
3150367b1d [fix] Add epoch string to /opt/so folder name 2020-11-04 12:52:37 -05:00
William Wernert
3ac9c43b7b Merge branch 'dev' into feature/setup-idempotency 2020-11-04 12:44:14 -05:00
William Wernert
b643363e82 [fix] Directories need -r flag 2020-11-04 12:07:34 -05:00
Jason Ertel
8d5c29340e Add screenshots to readme 2020-11-04 12:03:57 -05:00
Jason Ertel
1e9e156a87 Improve issue template directions 2020-11-04 11:49:22 -05:00
Jason Ertel
a364f13d24 Add issue template 2020-11-04 11:42:39 -05:00
William Wernert
3d70698647 [fix] Remove old mysql db directory 2020-11-04 11:26:56 -05:00
Mike Reeves
e989fc7041 Update map.jinja 2020-11-04 10:58:52 -05:00
William Wernert
49af35b440 [fix][wip] Add reinstall_init function (part 3)
Create a function that, if the setup log exists, puts the system into a state where
the installer can run again without issue.

This is WIP, there are most likely still issues.
2020-11-04 10:38:48 -05:00
Mike Reeves
4592e2d4d7 add airgap option to upgradecommand 2020-11-04 10:08:01 -05:00
Mike Reeves
ec64314b70 Fix soup to clear yum cache for airgap 2020-11-04 10:00:44 -05:00
Mike Reeves
cf001875c2 Update soup 2020-11-03 20:14:15 -05:00
Mike Reeves
c7367eea38 Fix AGREPO Variable 2020-11-03 19:08:58 -05:00
William Wernert
db31cf3083 [refactor][fix] Remove old so-* containers, make fs changes after whiptail menus 2020-11-03 18:10:16 -05:00
Mike Reeves
8edb1529a9 Update soup 2020-11-03 17:36:53 -05:00
Mike Reeves
e8616e4d46 Update soup 2020-11-03 17:19:55 -05:00
William Wernert
3bf57382ce [fix] Change when /opt/so is removed 2020-11-03 17:05:34 -05:00
Jason Ertel
def993f4ed Improve salt version update comment 2020-11-03 16:50:22 -05:00
William Wernert
96ec483ae4 [fix][wip] Remove /opt/so directory during reinstall 2020-11-03 16:49:00 -05:00
William Wernert
6169758f4e [fix] 0 -> root so file owner is set correctly 2020-11-03 16:47:59 -05:00
William Wernert
1c91e2d50b [fix] Add minion_config variable so sed works 2020-11-03 15:48:08 -05:00
William Wernert
57e7e61f21 [fix] Don't add proxy to yum.conf on manager nodes 2020-11-03 15:45:19 -05:00
William Wernert
93ab4b5d4f [fix][wip] Add reinstall_init function (part 2)
Create a function that, if the setup log exists, puts the system into a state where
the installer can run again without issue.

This is WIP, there are most likely still issues.
2020-11-03 15:44:37 -05:00
William Wernert
00fc256c37 [fix][wip] Add reinstall_init function
Create a function that, if the setup log exists, puts the system into a state where
the installer can run again without issue.

This is WIP, there are most likely still issues.
2020-11-03 14:51:35 -05:00
Mike Reeves
887f412e48 Remove docker_clean from docker_update function 2020-11-03 13:54:00 -05:00
Jason Ertel
aa9aa59213 Correct cheatsheetUrl for airgap installs 2020-11-03 12:27:55 -05:00
m0duspwnens
a859aa4f48 upgrade from salt 3001.1 to salt 3002.1 - https://github.com/Security-Onion-Solutions/securityonion/issues/1807 2020-11-03 11:54:28 -05:00
Jason Ertel
82a7b7e02d Upgrade to Kratos 0.5.3-alpha1 2020-11-03 11:50:25 -05:00
Mike Reeves
85ea61bf98 Update VERSION 2020-11-03 11:40:03 -05:00
Mike Reeves
7f4b8e8183 Update README.md 2020-11-03 11:39:42 -05:00
Josh Patterson
1f8b139462 Merge pull request #1806 from Security-Onion-Solutions/issue/1782
Issue/1782
2020-11-03 11:23:22 -05:00
m0duspwnens
562a016579 remove more from sosetup.log 2020-11-03 10:23:56 -05:00
weslambert
e040009d0b Merge pull request #1804 from Security-Onion-Solutions/fix/wazuh_api_creds_remove
Remove Wazuh API creds after registering initial agent
2020-11-03 09:57:58 -05:00
Wes Lambert
7dca988c11 Remove Wazuh API creds after registering intial agent 2020-11-03 14:53:50 +00:00
Mike Reeves
f007ef0ef5 Update so-functions 2020-11-02 17:00:02 -05:00
weslambert
bfe98433f6 Merge pull request #1789 from Security-Onion-Solutions/fix/zeek_intel
Add Zeek intel.dat
2020-11-02 16:38:16 -05:00
Wes Lambert
05549a2362 Add Zeek intel.dat 2020-11-02 21:36:44 +00:00
m0duspwnens
7e090b0894 dont echo salt minion config file to prevent mysql.pass from showing in sosetup.log 2020-11-02 16:23:34 -05:00
weslambert
8a645edb34 Merge pull request #1788 from Security-Onion-Solutions/feature/nids_rules
Allow for muliple files for rules
2020-11-02 16:05:53 -05:00
Wes Lambert
24a54a326c Allow for muliple files for rules 2020-11-02 21:03:45 +00:00
Jason Ertel
184d163d65 Do not persist the Cortex PID file; This allows Cortex to recover from non-graceful container shutdowns, such as a power loss event on the host machine 2020-11-02 15:04:13 -05:00
weslambert
bb0cf9b8c7 Merge pull request #1784 from Security-Onion-Solutions/fix/strelka_exif_parsing
Fix/strelka exif parsing
2020-11-02 14:32:45 -05:00
Wes Lambert
3113d5fbdb Format scan.exiftool as text 2020-11-02 19:31:14 +00:00
Wes Lambert
6420ee0310 Update parsing for scan.exiftool 2020-11-02 19:28:12 +00:00
William Wernert
033f5dbb9c [fix] Use (mostly) absolute path when adding to PATH 2020-11-02 14:25:46 -05:00
William Wernert
1c4abcef15 [fix] Kill all jobs before checking if we can reach the salt master 2020-11-02 14:25:02 -05:00
Jason Ertel
2acb930a2e fix: Remove crontab for automation installs 2020-11-02 11:08:45 -05:00
weslambert
37c630d6ab Merge pull request #1776 from Security-Onion-Solutions/bugfix/af-packet-ring-size
Match max-pending-packets size
2020-11-02 08:39:21 -05:00
weslambert
71a260a000 Match max-pending-packets size 2020-11-02 08:38:45 -05:00
William Wernert
b489fee8b5 Merge pull request #1738 from Security-Onion-Solutions/bugfix/nginx-redirect
Bugfix/nginx redirect
2020-10-29 14:33:38 -04:00
William Wernert
91221c4332 [revert] Move proxy_pass back to ip 2020-10-29 10:23:12 -04:00
William Wernert
3abd1c9f16 [fix] Configure soctopus to use url_base 2020-10-28 16:08:19 -04:00
Mike Reeves
b14c1d0999 Merge pull request #1713 from Security-Onion-Solutions/logstashbind
Add a place where custom logstash certs can go
2020-10-28 15:27:26 -04:00
Mike Reeves
13be0da484 Add a place where custom logstash certs can go 2020-10-28 15:26:41 -04:00
Mike Reeves
3385d98a2a Merge pull request #1712 from Security-Onion-Solutions/logstashbind
Add a place where custom logstash certs can go
2020-10-28 15:26:08 -04:00
Mike Reeves
361b13dc88 Add a place where custom logstash certs can go 2020-10-28 15:25:00 -04:00
Jason Ertel
98c669e80b Disable nginx server version and TLSv1.0/TLSv1.1 2020-10-28 14:29:29 -04:00
William Wernert
b02d434a0e [fix] Change any scripts using auth headers to url_base 2020-10-28 12:29:09 -04:00
William Wernert
3ee9f23d26 [fix] Use url_base in sensoroni.json instead of manager hostname 2020-10-28 12:28:34 -04:00
Jason Ertel
348c2feee2 Prevent usage of dollar signs in admin passwords during setup 2020-10-28 11:07:05 -04:00
Mike Reeves
b238c492e4 Update so-functions 2020-10-28 10:50:10 -04:00
Mike Reeves
97207bd006 Merge pull request #1702 from Security-Onion-Solutions/dockernet
Custom Docker IP Range
2020-10-28 10:48:56 -04:00
Mike Reeves
bed70ab6bf Update whiptail menu for docker question 2020-10-28 10:19:15 -04:00
Mike Reeves
8173cb589b Update whiptail menu for docker question 2020-10-28 10:17:53 -04:00
Mike Reeves
563a606e0e Upodate dockernet menu 2020-10-28 10:14:14 -04:00
Mike Reeves
8d952eca7e Upodate dockernet menu 2020-10-28 10:12:07 -04:00
Mike Reeves
8f7dffea4b Upodate dockernet menu 2020-10-28 10:10:43 -04:00
weslambert
7ea8dc84b6 Merge pull request #1696 from Security-Onion-Solutions/feature/wazuh-user-mods
Add Wazuh user management scripts
2020-10-28 08:24:15 -04:00
Wes Lambert
453247971e Add Wazuh user management scripts 2020-10-28 12:22:50 +00:00
Mike Reeves
741e17a637 add bip for docker 2020-10-27 18:21:53 -04:00
Mike Reeves
fedf334ee9 add bip for docker 2020-10-27 18:21:09 -04:00
Mike Reeves
8fee19ee1b add bip for docker 2020-10-27 18:01:48 -04:00
Mike Reeves
697bc53aec Dockernet Modifications 2020-10-27 15:08:34 -04:00
Jason Ertel
5a705fc0f2 Add Hunt quick action for hunted events, grouping by dataset and module 2020-10-27 12:30:33 -04:00
William Wernert
7b17b4abc7 Merge pull request #1680 from Security-Onion-Solutions/feature/setup-fixes
Feature/setup fixes
2020-10-27 12:17:21 -04:00
William Wernert
a043bc7cc4 [fix] Second if to elif 2020-10-27 12:16:19 -04:00
William Wernert
72dc267ab5 [fix] Menu sizing fixes 2020-10-27 12:14:44 -04:00
William Wernert
970be4d530 [fix] Change cd to relative
Since the script already changes to the correct dir, we can work from relative directories now.
2020-10-27 12:13:07 -04:00
Jason Ertel
474c4e54b4 Ensure labels and icons are associated with all quick actions 2020-10-27 12:04:57 -04:00
Mike Reeves
d4dd4aa416 Add missing comma in daemon.json 2020-10-27 11:25:45 -04:00
William Wernert
5054138be9 [feat] Add analyst option + add back helix option 2020-10-27 11:21:03 -04:00
William Wernert
83c23dd5de [fix] Remove old got_root call 2020-10-27 11:20:39 -04:00
Mike Reeves
42e00514f5 Adding docker net setting 2020-10-27 11:09:14 -04:00
William Wernert
e75f8ba257 [fix] Move root check to top of so-setup 2020-10-27 09:39:29 -04:00
William Wernert
564ac3a4ff Merge pull request #980 from Security-Onion-Solutions/feature/nginx-update
Feature/nginx update
2020-10-27 09:29:43 -04:00
William Wernert
c58deef2e0 Merge branch 'dev' into feature/nginx-update 2020-10-27 09:29:06 -04:00
Mike Reeves
0ad65c8cd4 Merge pull request #1568 from jtgreen-cse/patch-1
fix for rendering error >1 search node
2020-10-26 16:57:17 -04:00
William Wernert
0aaf8d6d9a [fix] Change 301 to 307 so curl requests work as intended 2020-10-26 16:37:16 -04:00
William Wernert
37ede9b993 [wip] Redirect so-user-add to separate log so ERROR isn't in main log 2020-10-26 15:03:27 -04:00
Mike Reeves
5395983fc7 Merge pull request #1580 from Security-Onion-Solutions/feature/thehive-casetemplates
Add case_template field to Playbook alerts
2020-10-26 14:13:54 -04:00
William Wernert
3648e293a1 [fix] Add -L option to curl to respect redirects 2020-10-26 14:08:52 -04:00
Mike Reeves
12acc2e123 Merge pull request #1663 from Security-Onion-Solutions/TOoSmOotH-patch-1
Update VERIFY_ISO.md
2020-10-26 13:10:18 -04:00
Mike Reeves
8d84718c91 Update VERIFY_ISO.md 2020-10-26 13:08:30 -04:00
Jason Ertel
3809573963 Correct cheatsheet URL for airgap installs 2020-10-26 12:16:55 -04:00
Jason Ertel
571550c019 Merge master into dev 2020-10-26 10:30:26 -04:00
William Wernert
e613bb3740 Merge branch 'dev' into feature/nginx-update 2020-10-26 10:28:14 -04:00
William Wernert
4662837075 [fix] Revert changes from merging dev 2020-10-26 10:25:16 -04:00
Mike Reeves
892ca294dc Merge pull request #1655 from Security-Onion-Solutions/patch_2.3.2
2.3.2
2020-10-26 10:17:23 -04:00
Mike Reeves
45fd325307 Update VERIFY_ISO.md 2020-10-26 10:11:58 -04:00
Mike Reeves
653561ad95 Update VERIFY_ISO.md 2020-10-26 10:09:25 -04:00
Mike Reeves
f75badf43a 2.3.2 ISO info 2020-10-26 09:53:26 -04:00
Doug Burks
c61199618a Update so-curator-closed-delete-delete 2020-10-24 07:15:43 -04:00
Mike Reeves
d9c021e86a Update so-curator-closed-delete-delete 2020-10-23 17:07:16 -04:00
Mike Reeves
951f6ab3e2 Update VERIFY_ISO.md 2020-10-23 16:48:05 -04:00
Mike Reeves
da488945e0 Update VERIFY_ISO.md 2020-10-23 16:47:43 -04:00
Mike Reeves
b6f1cfada6 Update changes.json 2020-10-23 16:44:02 -04:00
Jason Ertel
85e0b2cab3 Add cheatsheet URL to soc.json 2020-10-23 16:35:35 -04:00
Mike Reeves
c8a6b232d5 Fix which field we return for Elastic index 2020-10-23 15:58:35 -04:00
William Wernert
fdb7cb90e3 [wip] Test alt variable usage 2020-10-23 15:36:01 -04:00
William Wernert
73b83584e6 [fix] Remove bad '_' character 2020-10-23 14:32:43 -04:00
Mike Reeves
801f4aae8e Update README.md 2020-10-23 10:09:07 -04:00
Mike Reeves
c066cc67dc Update VERSION 2020-10-23 10:08:45 -04:00
Josh Patterson
1185e43064 Merge pull request #1614 from Security-Onion-Solutions/issue/1573
Issue/1573 and Issue/1601
2020-10-22 15:57:40 -04:00
Mike Reeves
51ca661219 update wording for USB device vs CDROM 2020-10-22 14:54:34 -04:00
m0duspwnens
50a767ca6c dont list aptcacherng in so-status if user chose open updates during setup - https://github.com/Security-Onion-Solutions/securityonion/issues/1573 2020-10-22 14:52:07 -04:00
Mike Reeves
174bbc6cd9 Update VERSION 2020-10-22 14:14:57 -04:00
William Wernert
6a08086dfa [refactor] Make variable names consistent 2020-10-22 14:10:06 -04:00
Mike Reeves
a3579b88ae Merge pull request #1604 from Security-Onion-Solutions/dev
2.3.1
2020-10-22 14:08:41 -04:00
William Wernert
6a3e921924 [fix] Fixes for fleet install 2020-10-22 13:09:26 -04:00
Mike Reeves
4a0796359b Update README.md 2020-10-22 12:54:05 -04:00
m0duspwnens
0bfdef274b update so-status to work with disabled containers - https://github.com/Security-Onion-Solutions/securityonion/issues/1601 2020-10-22 12:09:19 -04:00
Mike Reeves
92d397d573 Update ISO instructions 2020-10-22 11:59:39 -04:00
m0duspwnens
0b6b6e38fc fix map for steno 2020-10-22 11:24:18 -04:00
m0duspwnens
aa59eff1ac fix if statement 2020-10-22 10:59:03 -04:00
m0duspwnens
172ca9aa8d add option to enable or disable to steno docker container - https://github.com/Security-Onion-Solutions/securityonion/issues/1601 2020-10-22 10:52:34 -04:00
William Wernert
79c4f07ff7 [fix] Don't listen on port 80 on all installs 2020-10-22 10:43:24 -04:00
Mike Reeves
460a391460 Update changes.json 2020-10-22 10:00:20 -04:00
Mike Reeves
905fcd06a6 Remove old 2.3.0 dockers 2020-10-22 08:51:40 -04:00
Josh Patterson
0b7f1fb189 Merge pull request #1594 from Security-Onion-Solutions/issue/1593
fix grabbing soversion in so-features-enable
2020-10-21 16:51:06 -04:00
m0duspwnens
712dc6b277 fix grabbing soversion in so-features-enable 2020-10-21 16:47:48 -04:00
Josh Patterson
b93709e05f Merge pull request #1591 from Security-Onion-Solutions/issue/1590
fix arg for so-firewall addhostgroup
2020-10-21 15:48:02 -04:00
m0duspwnens
32294eb2ed fix arg for so-firewall addhostgroup 2020-10-21 15:34:35 -04:00
Josh Patterson
2da656ff95 Merge pull request #1589 from Security-Onion-Solutions/issue/1551
only allow hosts in syslog host group to connect to manager type nodes
2020-10-21 14:41:50 -04:00
m0duspwnens
ef1e05db3e only allow hosts in syslog host group to connect to manager type nodes 2020-10-21 14:41:03 -04:00
Josh Patterson
798abdbcde Merge pull request #1584 from Security-Onion-Solutions/issue/1551
firewall to allow search nodes to connect to beats on manager
2020-10-21 12:50:49 -04:00
m0duspwnens
8805fef187 firewall to allow search nodes to connect to beats on manager 2020-10-21 12:43:28 -04:00
Josh Patterson
aafd365f2b Merge pull request #1583 from Security-Onion-Solutions/issue/1551
add firewall rules for syslog
2020-10-21 11:21:18 -04:00
m0duspwnens
5f43380aa0 add firewall rules for syslog 2020-10-21 11:20:34 -04:00
Josh Brower
844ffe8fdf nest case_template 2020-10-21 09:58:31 -04:00
Josh Brower
1e14d66f54 Add case_template field to Playbook alerts 2020-10-21 08:59:26 -04:00
weslambert
e2d95e0deb Merge pull request #1576 from Security-Onion-Solutions/fix/comon_nids_rule_ruleset
Change rule_ruleset to rule.ruleset
2020-10-20 22:15:00 -04:00
weslambert
4765ef5f5c Change rule_ruleset to rule.ruleset 2020-10-20 22:14:23 -04:00
William Wernert
d63358c8f0 [fix] Correct pillar reference + nginx errors 2020-10-20 14:30:06 -04:00
Jason Ertel
d37ddf584a Correct quick action defaults 2020-10-20 14:12:23 -04:00
jtgreen-cse
eaa41266a2 fix for rendering error >1 search node
Fails rendering if you have more than one search node.
2020-10-20 13:24:53 -04:00
Mike Reeves
4a9fcfb8cf Fix missing quote 2020-10-20 13:17:40 -04:00
Mike Reeves
a119d8f27d Fix config for airgap installs 2020-10-20 11:28:49 -04:00
Josh Patterson
ba1dfcd774 Merge pull request #1554 from Security-Onion-Solutions/issue/1551
Issue/1551
2020-10-19 16:10:50 -04:00
m0duspwnens
10e4248cfc and node that gets filebeat state now can listen for syslog - https://github.com/Security-Onion-Solutions/securityonion/issues/1551 2020-10-19 16:10:20 -04:00
William Wernert
42e285cfbe Merge branch 'dev' into feature/nginx-update
# Conflicts:
#	salt/nginx/etc/nginx.conf
#	salt/nginx/etc/nginx.conf.so-eval
#	salt/nginx/etc/nginx.conf.so-manager
#	salt/nginx/etc/nginx.conf.so-standalone
2020-10-19 13:25:46 -04:00
m0duspwnens
79854f111e add 514 tcp listener to filebeat docker and add syslog listener to fb config for manager and manager search - https://github.com/Security-Onion-Solutions/securityonion/issues/1551 2020-10-19 10:27:40 -04:00
Josh Patterson
a05329e7d8 Merge pull request #1532 from Masaya-A/patch-1
Grafana /nsm fix for eval/standalone
2020-10-16 16:48:12 -04:00
Masaya-A
47652ac080 Update eval.json 2020-10-17 04:45:12 +09:00
Masaya-A
964919109d Update standalone.json 2020-10-17 04:35:39 +09:00
Jason Ertel
a968e5c23f Increment version to 2.3.1 2020-10-16 10:57:31 -04:00
Mike Reeves
ba7b34a8ce Merge pull request #1529 from Security-Onion-Solutions/dev
2.3.0 GA!
2020-10-16 10:53:53 -04:00
Mike Reeves
e2f16d51a6 Update VERIFY_ISO.md 2020-10-15 20:54:11 -04:00
Mike Reeves
42a6693101 Sig File for ISO 2020-10-15 20:36:08 -04:00
Jason Ertel
2326701cc0 Moved known issues underneath new changes 2020-10-15 19:29:33 -04:00
Jason Ertel
6ee37977c3 Fixed quotes and href targets 2020-10-15 19:25:26 -04:00
Mike Reeves
1ae35a39c3 Update changes.json 2020-10-15 19:11:55 -04:00
Mike Reeves
943aa82ce4 Update changes.json 2020-10-15 19:09:46 -04:00
Mike Reeves
131e105106 Update changes.json 2020-10-15 19:07:37 -04:00
Mike Reeves
cc56dc5a7f Update changes.json 2020-10-15 19:05:47 -04:00
weslambert
657e251f51 Merge pull request #1528 from Security-Onion-Solutions/fix/kibana_ack
Update Kibana mappings for event ack/eslacation
2020-10-15 14:48:00 -04:00
Wes Lambert
d863f26f9d Update Kibana mappings for event ack/eslacation 2020-10-15 18:46:37 +00:00
Mike Reeves
a7e0df84bb Update README.md 2020-10-15 14:46:13 -04:00
William Wernert
1fdf431c12 [fix] so-user spelling+syntax fixes
* Consistent ending punctuation
* Consistent capitalization
* Correct comparison operators
2020-10-15 13:44:23 -04:00
Mike Reeves
35b10b1f91 Sensors should clean up their dockers as well 2020-10-15 10:31:51 -04:00
weslambert
36b9450a39 Merge pull request #1526 from Security-Onion-Solutions/fix/kibana_things
Intel mapping enforcement and winlog.verion
2020-10-15 08:43:34 -04:00
Wes Lambert
af9daa4d71 Intel mapping enforcement and winlog.verion 2020-10-15 12:42:33 +00:00
weslambert
c81ee9621d Merge pull request #1525 from Security-Onion-Solutions/fix/kibana_discover_default
Fix default discover query
2020-10-14 17:44:55 -04:00
Wes Lambert
e7401b3e0c Fix default discover query 2020-10-14 21:43:19 +00:00
weslambert
f2125242f9 Merge pull request #1523 from Security-Onion-Solutions/fix/strelka_file_mime_type
Rename file.flavors.mime to file.mime_type
2020-10-14 14:58:15 -04:00
Wes Lambert
54c4ee796f Rename file.flavors.mime to file.mime_type 2020-10-14 18:56:44 +00:00
weslambert
8d4fd6c18d Merge pull request #1522 from Security-Onion-Solutions/fix/pipeline_commmon_remove_ignore_missing
Fix common pipeline field removal so won't fail for missing fields
2020-10-14 09:56:34 -04:00
Wes Lambert
3c820365ab Fix common pipeline field removal so won't fail for missing fields 2020-10-14 13:55:24 +00:00
Doug Burks
a106913d1a Heavy node filebeat needs extra_hosts for the heavy node itself #1521 2020-10-14 09:51:59 -04:00
Josh Patterson
493c9a11df Merge pull request #1520 from Security-Onion-Solutions/issue/1519
disable strelka by default for sensor nodes during setup
2020-10-14 09:38:50 -04:00
m0duspwnens
1283708186 disable strelka by default for sensor nodes during setup 2020-10-14 09:36:59 -04:00
Josh Patterson
2e62494793 Merge pull request #1518 from Security-Onion-Solutions/issue/1153
fix issue with schedule being placed in wrong location
2020-10-14 09:26:31 -04:00
Doug Burks
f88403e83e use ssl on nodes that support it 2020-10-14 05:50:29 -04:00
m0duspwnens
a08d0c8b6f fix issue with schedule being placed in wrong location 2020-10-13 18:24:44 -04:00
Josh Patterson
9f6fcb3763 Merge pull request #1516 from Security-Onion-Solutions/quickfix/managerestempalte
add elasticsearch template manager pillar and assign to manager node
2020-10-13 16:09:24 -04:00
m0duspwnens
1afa12e607 add elasticsearch template manager pillar and assign to manager node 2020-10-13 16:08:15 -04:00
Doug Burks
190869a1f2 enable https on elasticsearch nodes that support it 2020-10-13 16:04:55 -04:00
William Wernert
f6296c095f [fix] Redirect stderr to stdout for crontab -l 2020-10-13 15:00:00 -04:00
Josh Patterson
15ea152b84 Merge pull request #1515 from Security-Onion-Solutions/issue/1511
changes for https://github.com/Security-Onion-Solutions/securityonion/issues/1511
2020-10-13 14:17:28 -04:00
weslambert
4fff105986 Merge pull request #1514 from Security-Onion-Solutions/fix/replay_verbiage
Replay verbiage -- let users know when preparing to replay
2020-10-13 14:14:41 -04:00
Wes Lambert
3f8f0da468 Replay verbiage -- let users know when preparing to replay 2020-10-13 18:13:36 +00:00
m0duspwnens
2456605a54 changes for https://github.com/Security-Onion-Solutions/securityonion/issues/1511 2020-10-13 14:10:24 -04:00
William Wernert
675db1da1b [fix] Remove tab from string in whiptail menu 2020-10-13 13:44:51 -04:00
Doug Burks
0f68a53af4 Update so-curator-closed-delete-delete 2020-10-13 13:22:35 -04:00
Doug Burks
b004a9149e Update so-index-list 2020-10-13 12:40:45 -04:00
Doug Burks
e5ece6cd50 Update so-index-list 2020-10-13 12:34:49 -04:00
Jason Ertel
2ad6ab7dfc Dynamically alter docs URL based on airgap setting 2020-10-13 12:29:59 -04:00
Doug Burks
a75e986836 Update so-elastic-clear 2020-10-13 12:18:27 -04:00
Mike Reeves
c388966e7e Add airgap config 2020-10-13 12:05:19 -04:00
William Wernert
0cd80de2b3 [fix] Hard code NIDS to Suricata since Snort is not yet supported 2020-10-13 10:31:44 -04:00
William Wernert
a459511812 Merge pull request #1512 from Security-Onion-Solutions/bugfix/whiptail-punctuation
Bugfix/whiptail punctuation
2020-10-13 10:26:26 -04:00
William Wernert
9dc491bd71 [refactor] Fixes per style guide 2020-10-13 10:23:47 -04:00
William Wernert
f5ea8325fe [fix] Standardize input prompts
* All prompts that are questions end in "?"
* All other prompts end in ":"
* Any additional sentences after a prompt follow normal grammatical rules for punctuation
2020-10-13 09:45:32 -04:00
Doug Burks
ad50b5d640 elasticsearch _cat/indices output has changed between 6 and 7 2020-10-13 06:33:40 -04:00
Doug Burks
21b1becd7e Update so-elasticsearch-pipelines-list 2020-10-12 16:34:30 -04:00
Doug Burks
5458c57cc9 Update so-elasticsearch-pipeline-stats 2020-10-12 16:32:11 -04:00
Doug Burks
68e34b781a Update so-elasticsearch-templates-load 2020-10-12 16:10:38 -04:00
Doug Burks
4c43262610 Update so-elasticsearch-templates-list 2020-10-12 16:08:06 -04:00
weslambert
a17a2ad3de Merge pull request #1507 from Security-Onion-Solutions/fix/zeek_smb_ts_common
Ensure Zeek logs without ts field have an @timestamp field associated
2020-10-12 13:21:15 -04:00
Wes Lambert
14559b081d Ensure Zeek logs without ts field have an @timestamp field associated 2020-10-12 17:19:23 +00:00
weslambert
748ff0dbeb Merge pull request #1506 from Security-Onion-Solutions/fix/index_dates
Fix/index dates
2020-10-12 11:45:08 -04:00
Wes Lambert
4fc4913d1e Don't predefine index date for Filebeat ES outputs 2020-10-12 15:44:00 +00:00
Wes Lambert
884cc2d054 Don't predefine index date for Logstash outputs 2020-10-12 15:41:47 +00:00
Doug Burks
553ce3e363 only include extra_hosts if nodestab exists 2020-10-12 10:13:05 -04:00
Mike Reeves
e0fe63d263 Merge pull request #1505 from Security-Onion-Solutions/experimental
Fix Cross Cluster Search Acks
2020-10-12 09:24:16 -04:00
Mike Reeves
f5cfd480a3 Moar encryptions 2020-10-12 09:12:36 -04:00
Jason Ertel
3fff1451d4 Enable high strength cipher for golang compatibility 2020-10-11 22:31:29 -04:00
Mike Reeves
9695e63950 fix template statement 2020-10-11 17:21:57 -04:00
Mike Reeves
96083e1458 update logstash outputs 2020-10-11 17:06:56 -04:00
Mike Reeves
deb0f640d6 add jinja templates 2020-10-11 17:02:07 -04:00
Mike Reeves
b7c4fd94c4 get pipelines to load 2020-10-11 16:57:08 -04:00
Mike Reeves
e4ce17d4de Turn on SSL output 2020-10-11 16:10:55 -04:00
Mike Reeves
a7bd1c2ce5 Turn on SSL output 2020-10-11 15:58:12 -04:00
Josh Patterson
c9c8c5e5f5 Merge pull request #1502 from Security-Onion-Solutions/quickfix/socrestart
watch all the files in the dir
2020-10-11 14:20:34 -04:00
m0duspwnens
c1e6c5688d watch all the files in the dir 2020-10-11 14:19:44 -04:00
Mike Reeves
29c3948f95 Fix soc.json 2020-10-11 14:09:14 -04:00
Mike Reeves
31e0b5c81c Add nodes to soc.json 2020-10-11 11:28:49 -04:00
Mike Reeves
73aade1223 Enable rest access from manager to sn 2020-10-11 11:02:20 -04:00
Mike Reeves
271e40337b Enable jinja for tls 2020-10-11 10:57:04 -04:00
Mike Reeves
f6f9097cd9 Enable tls for 9200 on search capable nodes 2020-10-11 10:53:54 -04:00
Doug Burks
3cfee82b59 Update Hunt fields for firewall #1500 2020-10-10 08:18:00 -04:00
Doug Burks
87574181d5 Add Community ID to pfsense filterlog #1501 2020-10-10 08:11:51 -04:00
Doug Burks
5f15320b9d Update Hunt fields for firewall #1500 2020-10-10 07:54:48 -04:00
Doug Burks
8d1ba1f4db fix pfsense firewall udp parsing 2020-10-10 07:38:47 -04:00
Doug Burks
8cfabf101c Update Hunt query for firewall #1499 2020-10-10 07:17:49 -04:00
Doug Burks
9aa4112de1 Remove extra comma 2020-10-10 06:10:10 -04:00
weslambert
12c3c351d8 Merge pull request #1498 from Security-Onion-Solutions/feature/filterlog
Feature/filterlog
2020-10-09 20:05:21 -04:00
Wes Lambert
28a1f7f88a Remove pfsense tag 2020-10-10 00:03:51 +00:00
Wes Lambert
b55ffa44f8 Fix module,dataset rename 2020-10-10 00:01:37 +00:00
Wes Lambert
69a04dedd3 Filterlog config changes 2020-10-09 23:56:52 +00:00
Josh Patterson
930ec33cb7 Merge pull request #1496 from Security-Onion-Solutions/issue/1489
move salt master config file, copy salt-master service file and enabl…
2020-10-09 13:45:19 -04:00
m0duspwnens
6172268661 move salt master config file, copy salt-master service file and enable service restarts - https://github.com/Security-Onion-Solutions/securityonion/issues/1489 2020-10-09 13:27:46 -04:00
Josh Patterson
336400e642 Merge pull request #1495 from Security-Onion-Solutions/issue/1403
Issue/1403
2020-10-09 12:24:56 -04:00
m0duspwnens
ea1324e498 fix LOSS calc line 2020-10-09 11:54:39 -04:00
m0duspwnens
3f007b6af7 Merge remote-tracking branch 'remotes/origin/dev' into issue/1403 2020-10-09 11:40:01 -04:00
m0duspwnens
f5cacd66b8 correct zeekcaptureloss script to work on zeek standalone 2020-10-09 11:39:44 -04:00
Jason Ertel
40ff628c0b Replace simple pillar lookup with salt equivalent to ensure quoted values are handled properly 2020-10-09 11:10:46 -04:00
William Wernert
97fce74263 [fix] Rename playbook key and add new admin/automation psswds 2020-10-09 09:59:08 -04:00
William Wernert
d7961fdbb8 Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion into dev 2020-10-09 08:51:45 -04:00
William Wernert
5a8d776a62 [ix] Correct sls syntax 2020-10-09 08:51:35 -04:00
Josh Patterson
4af87ffcbe Merge pull request #1492 from Security-Onion-Solutions/issue/1403
change capture loss to every 5 minutes and default grafana dashboard …
2020-10-08 17:52:52 -04:00
m0duspwnens
f38519247b change capture loss to every 5 minutes and default grafana dashboard to 1h 2020-10-08 17:52:02 -04:00
William Wernert
065fe9042d [fix] Make sure Playbook is up before creating user 2020-10-08 17:01:12 -04:00
weslambert
993aabedf2 Merge pull request #1491 from Security-Onion-Solutions/fix/so-elasticsearch-pipeline-stats-dots
Ensure pipelines with dots in names can be referenced
2020-10-08 15:41:44 -04:00
weslambert
06706d29f2 Ensure pipelines with dots in names can be referenced 2020-10-08 15:41:17 -04:00
weslambert
f41987024f Merge pull request #1490 from Security-Onion-Solutions/feature/so-elastic-pipeline-stats
Add pipeline stats script
2020-10-08 15:12:55 -04:00
Wes Lambert
1efb39a71b Add pipeline stats script 2020-10-08 19:11:41 +00:00
m0duspwnens
52e8265511 update is_airgap for soup 2020-10-08 14:16:19 -04:00
Mike Reeves
26317efe79 Update Soup 2020-10-08 14:05:52 -04:00
William Wernert
0795aa39ba Merge pull request #1487 from Security-Onion-Solutions/feature/rotate-logs
Feature/rotate logs
2020-10-08 12:48:01 -04:00
William Wernert
2ad3f9da11 [fix] Wazuh not saving .log files anymore, only check .json files 2020-10-08 12:41:51 -04:00
William Wernert
034750fe5b Merge branch 'dev' into feature/rotate-logs
# Conflicts:
#	setup/so-functions
2020-10-08 12:36:30 -04:00
William Wernert
e1d8f578c2 [feat] Add log dirs for playbook + influxdb 2020-10-08 12:35:14 -04:00
Josh Patterson
2156adcf70 Merge pull request #1486 from Security-Onion-Solutions/fix/estemplates
fix templates not applying to searchnode.
2020-10-08 11:19:14 -04:00
m0duspwnens
e7abbf19af fix templates not applying to searchnode. so-searchnode role doesnt exists searchnodes are so-node role 2020-10-08 11:17:26 -04:00
weslambert
0f5f781024 Merge pull request #1484 from Security-Onion-Solutions/fix/strelka_rule_null_safe_2
More fixes for rule field
2020-10-08 09:37:44 -04:00
Wes Lambert
a6d3dcf398 More fixes for rule field 2020-10-08 13:36:47 +00:00
weslambert
5e4bbcd4ca Merge pull request #1483 from Security-Onion-Solutions/fix/strelka_rule_null_safe
Add null safe check for rule
2020-10-08 09:15:29 -04:00
Wes Lambert
a2e2f23a8d Add null safe check for rule 2020-10-08 13:14:39 +00:00
weslambert
3ec9206b17 Merge pull request #1482 from Security-Onion-Solutions/fix/network_transport_kibana_viz
Fix network transport Kibana viz
2020-10-08 08:18:12 -04:00
Wes Lambert
adf0ef87c9 Fix network transport Kibana viz 2020-10-08 12:17:15 +00:00
weslambert
7767d3897b Merge pull request #1481 from Security-Onion-Solutions/fix/network_transport_lower
Lowercase network.transport
2020-10-08 08:00:22 -04:00
weslambert
5ada85942b Lowercase network.transport 2020-10-08 07:59:57 -04:00
Doug Burks
2489ca608a Improve Hunt FTP queries #1479 2020-10-08 05:30:17 -04:00
Josh Patterson
0a982dec95 Merge pull request #1477 from Security-Onion-Solutions/issue/1403
Issue/1403
2020-10-07 17:47:21 -04:00
m0duspwnens
be7167d99b Merge remote-tracking branch 'remotes/origin/dev' into issue/1403 2020-10-07 17:45:22 -04:00
m0duspwnens
821ce19aad new dashboard for sensors 2020-10-07 17:38:16 -04:00
m0duspwnens
1bdc45ef0e new dashboard for sensors 2020-10-07 17:37:11 -04:00
m0duspwnens
4f8bb9c2f1 updates to standalone and eval dashboards 2020-10-07 16:48:29 -04:00
m0duspwnens
7dd839cfa2 add zeek capture loss graph and resize redis queue for standalone 2020-10-07 15:53:31 -04:00
weslambert
7befff3baa Merge pull request #1474 from Security-Onion-Solutions/fix/common_nids
Don't use regex for determining rule type
2020-10-07 12:16:55 -04:00
Wes Lambert
7543144afe Don't use regex for determining rule type 2020-10-07 16:15:43 +00:00
weslambert
7787f81bdd Merge pull request #1473 from Security-Onion-Solutions/fix/logstash_output_wazuh
Remove dataset name since pipeline no longer in use
2020-10-07 11:49:40 -04:00
weslambert
8e829b47ae Remove dataset name since pipeline no longer in use 2020-10-07 11:48:56 -04:00
m0duspwnens
8540a691dc only send loss if timestamp on data has changed 2020-10-07 11:23:06 -04:00
weslambert
8015676e01 Merge pull request #1472 from Security-Onion-Solutions/fix/rename-signature_info
Change rule.signature_info to rule.reference and ensure common.nids e…
2020-10-07 11:21:18 -04:00
Wes Lambert
015a441e79 Change rule.signature_info to rule.reference and ensure common.nids exists 2020-10-07 15:20:26 +00:00
weslambert
a1866e5229 Merge pull request #1471 from Security-Onion-Solutions/fix/ingest-updates
Fix/ingest updates
2020-10-07 11:15:55 -04:00
m0duspwnens
1106b2bf96 only send loss if timestamp on data has changed 2020-10-07 11:15:10 -04:00
Wes Lambert
f0a1457ffd Update common.nids 2020-10-07 15:14:08 +00:00
m0duspwnens
d09f0f841e only send loss if timestamp on data has changed 2020-10-07 11:13:03 -04:00
m0duspwnens
6f2d47cc40 only send loss if timestamp on data has changed 2020-10-07 11:11:06 -04:00
m0duspwnens
2317e8b348 only send loss if timestamp on data has changed 2020-10-07 11:08:41 -04:00
m0duspwnens
f96d6ae4f4 only send loss if timestamp on data has changed 2020-10-07 11:06:54 -04:00
m0duspwnens
5e534571ff set timestamp with capture loss 2020-10-07 10:20:51 -04:00
m0duspwnens
14dd80b410 handle whitespace 2020-10-06 18:46:32 -04:00
m0duspwnens
af2df2c7d1 just print the loss 2020-10-06 18:44:22 -04:00
m0duspwnens
f95712c502 update log file 2020-10-06 18:38:51 -04:00
m0duspwnens
48ca2cdff1 fix pillars we check 2020-10-06 18:10:41 -04:00
m0duspwnens
4a236b3f75 Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion-saltstack into issue/1403 2020-10-06 18:05:47 -04:00
m0duspwnens
73ce948d42 add zeekcaptureloss to data to influxdb. rename broloss to zeekloss - https://github.com/Security-Onion-Solutions/securityonion/issues/1403 2020-10-06 18:05:41 -04:00
Mike Reeves
fd4bb81f29 Fix ZEEKLOGS pillar 2020-10-06 17:38:05 -04:00
William Wernert
d84f85335e [fix] Add jinja option, missing log dirs, compress option 2020-10-06 17:18:39 -04:00
Wes Lambert
8c07c098f6 Pipeline cleanup 2020-10-06 20:14:15 +00:00
Wes Lambert
350cc41740 Let zeek.common handle common fields for zeek.tunnels 2020-10-06 20:12:23 +00:00
William Wernert
b64a91f13c [refactor] Remove nocompress option 2020-10-06 14:51:43 -04:00
William Wernert
27351fa520 [fix] Correct jinja syntax + indent all lines 2020-10-06 14:51:42 -04:00
Josh Patterson
7d14c68d70 Merge pull request #1468 from Security-Onion-Solutions/issue/163
fix yum db if corrupted -
2020-10-06 14:29:11 -04:00
m0duspwnens
035d215398 fix yum db if corrupted - https://github.com/Security-Onion-Solutions/securityonion/issues/163 2020-10-06 14:28:01 -04:00
Josh Patterson
51d3defe76 Merge pull request #1467 from Security-Onion-Solutions/issue/1460
Issue/1460
2020-10-06 14:06:01 -04:00
m0duspwnens
3d71766b64 Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion-saltstack into issue/1460 2020-10-06 13:58:02 -04:00
m0duspwnens
34dfc809c7 handle thread count for suricata and default max-pending-packets to 5000 - https://github.com/Security-Onion-Solutions/securityonion/issues/1460 2020-10-06 13:57:50 -04:00
Mike Reeves
f809cf5216 Update so-functions 2020-10-06 13:27:23 -04:00
William Wernert
bd4292711e [fix] Redirect missing lines to global pillar 2020-10-06 13:23:26 -04:00
William Wernert
9737b01676 [feat] Move logrotate configuration settings to pillar 2020-10-06 13:22:44 -04:00
William Wernert
94f15c63ce [fix] Correct indent in common init.sls 2020-10-06 13:21:37 -04:00
weslambert
a16419b997 Merge pull request #1466 from Security-Onion-Solutions/fix/so-elasticsearch-templates-load
Rename so-elasticsearch-templates to so-elasticsearch-templates-load
2020-10-06 13:19:54 -04:00
Wes Lambert
a6a69c57d1 Rename so-elasticsearch-templates to so-elasticsearch-templates-load 2020-10-06 17:18:42 +00:00
weslambert
6cdff854f3 Merge pull request #1465 from Security-Onion-Solutions/feature/so-elasticsearch-templates-list
Add so-elasticsearch-templates-list
2020-10-06 13:16:11 -04:00
Wes Lambert
787f1d8732 Add so-elasticsearch-templates-list 2020-10-06 17:15:27 +00:00
weslambert
1a2921c2bc Merge pull request #1463 from Security-Onion-Solutions/feature/so-elasticsearch-pipelines-list
Add so-elasticsearch-pipelines-list and fix common script perms
2020-10-06 13:04:24 -04:00
Wes Lambert
4a5d50cf80 Add so-elasticsearch-pipelines-list and fix common script perms 2020-10-06 17:01:58 +00:00
Josh Patterson
1b3eca80d7 Merge pull request #1462 from Security-Onion-Solutions/issue/1371
handle install locations of files copied
2020-10-06 11:41:37 -04:00
m0duspwnens
5eada1cdd5 handle install locations of files copied 2020-10-06 11:39:34 -04:00
Josh Patterson
4b1a8d7512 Merge pull request #1461 from Security-Onion-Solutions/issue/1371
Issue/1371
2020-10-06 11:22:58 -04:00
m0duspwnens
a5f4c96db0 qol user interaction improvements to analyst install 2020-10-06 11:19:43 -04:00
m0duspwnens
4eea0a464c include remaining log functions from so-functions 2020-10-06 10:57:43 -04:00
m0duspwnens
7840002d18 update log file in title func 2020-10-06 10:51:31 -04:00
m0duspwnens
85168e9318 add title function 2020-10-06 10:49:38 -04:00
m0duspwnens
2420cd5db1 add some system characteristics to log like normal install does 2020-10-06 10:46:11 -04:00
Doug Burks
a686704d37 remove rule.uuid now that underlying issue has been resolved 2020-10-06 09:39:57 -04:00
weslambert
706c81daca Merge pull request #1459 from Security-Onion-Solutions/feature/strelka_yara_alert
Add Strelka YARA matches as alerts
2020-10-06 08:23:16 -04:00
Wes Lambert
019bec992d Add Strelka YARA matches as alerts 2020-10-06 12:19:44 +00:00
Josh Patterson
e2a787095c Merge pull request #1458 from Security-Onion-Solutions/issue/1290
change for network miner 2.6 - https://github.com/Security-Onion-Solu…
2020-10-05 18:38:14 -04:00
m0duspwnens
acabcd27a7 change for network miner 2.6 - https://github.com/Security-Onion-Solutions/securityonion/issues/1290 2020-10-05 18:17:24 -04:00
Josh Patterson
24ff34ee81 Merge pull request #1457 from Security-Onion-Solutions/issue/1371
Issue/1371
2020-10-05 15:51:35 -04:00
Josh Brower
2e012432b4 Merge pull request #1455 from Security-Onion-Solutions/feature/training-req
Write out nested json
2020-10-05 15:34:43 -04:00
Josh Brower
de9ace62d4 Write out nested json 2020-10-05 15:34:02 -04:00
Josh Patterson
faf5e7a643 Merge pull request #1454 from Security-Onion-Solutions/issue/1444
logstash changes per https://github.com/Security-Onion-Solutions/secu…
2020-10-05 14:12:05 -04:00
m0duspwnens
748dc5ba91 logstash changes per https://github.com/Security-Onion-Solutions/securityonion/issues/1444 2020-10-05 14:10:05 -04:00
William Wernert
5dfd11a018 [feat] Add wazuh archive cleanup + fix indentation 2020-10-05 13:58:49 -04:00
William Wernert
e6cb75ce7e [feat] Add common logrotate cron+config 2020-10-05 13:57:36 -04:00
Josh Patterson
f7daa391c7 Merge pull request #1453 from Security-Onion-Solutions/issue/1441
enable suricata threshold-file and point to proper file
2020-10-05 12:56:39 -04:00
Doug Burks
a45aa43f41 Add trailing comma to "thehive" stanza 2020-10-05 12:35:33 -04:00
m0duspwnens
63884b73e1 enable suricata threshold-file and point to proper file - https://github.com/Security-Onion-Solutions/securityonion/issues/1441 2020-10-05 12:10:52 -04:00
weslambert
9f4cb42c4f Merge pull request #1452 from Security-Onion-Solutions/fix/kibana_case_create
Change alert to case
2020-10-05 11:46:14 -04:00
Wes Lambert
575da0f9d3 Change alert to case 2020-10-05 15:45:10 +00:00
weslambert
f4fcc052ca Merge pull request #1451 from Security-Onion-Solutions/fix/wazuh_rule_cat
Put back rule.category for Wazuh alerts
2020-10-05 11:35:20 -04:00
weslambert
bc31e19e37 Put back rule.category for Wazuh alerts 2020-10-05 11:34:29 -04:00
weslambert
6e2319f6da Merge pull request #1449 from Security-Onion-Solutions/fix/wazuh_logging
Adjust Wazuh logging so we don't log alerts to a separate file and so…
2020-10-05 10:04:01 -04:00
weslambert
968dce0aee Adjust Wazuh logging so we don't log alerts to a separate file and so we don't write a separate log file for non-JSON for archives 2020-10-05 10:03:40 -04:00
Jason Ertel
1ebe970876 Disable escalate button if thehive is not enabled 2020-10-05 09:54:18 -04:00
weslambert
6b292ea62b Merge pull request #1448 from Security-Onion-Solutions/fix/so_elastic_clear
Fix/so elastic clear
2020-10-05 09:40:04 -04:00
Wes Lambert
da8957b4f4 Use Elasticsearch pillar vs manager IP for so-elastic-clear 2020-10-05 13:37:06 +00:00
Wes Lambert
1970d95d5f Make Filebeat registry persistent to avoid re-reading old data 2020-10-05 13:30:04 +00:00
Doug Burks
e7cba6ba1d Change SOC Alerts eventFetchLimit from 5000 to 500 #1447 2020-10-05 09:29:01 -04:00
Doug Burks
948e0c4c61 Add rule.name to Hunt Wazuh Alerts query #1442 2020-10-05 09:26:13 -04:00
Jason Ertel
cf5b1245ea Add configurable flags to enable/disable dismiss and escalate buttons 2020-10-05 09:16:17 -04:00
weslambert
771d091d6e Merge pull request #1446 from Security-Onion-Solutions/feature/wazuh_severity
Add event.severity and event.severity_label config for Wazuh alerts
2020-10-05 08:52:20 -04:00
Wes Lambert
77d31cb289 Add event.severity and event.severity_label config for Wazuh alerts 2020-10-05 12:50:29 +00:00
weslambert
203e84d2cf Update comma verbiage for HOME_NET in whiptail menu 2020-10-05 08:08:22 -04:00
Josh Brower
7b05cf4266 Merge pull request #1443 from Security-Onion-Solutions/feature/training-req
Feature/training req
2020-10-04 21:37:03 -04:00
Josh Brower
8a78485906 Config Playbook SOC Alerts 2020-10-04 21:35:42 -04:00
Josh Brower
c80b6ce104 Add so-allow-view and playbook event.sev.label 2020-10-04 20:39:21 -04:00
m0duspwnens
467e5b34cc analyst node changes 2020-10-02 16:40:25 -04:00
m0duspwnens
20307b703e analyst node changes 2020-10-02 16:21:31 -04:00
m0duspwnens
6a0f04d24a analyst node changes 2020-10-02 16:14:15 -04:00
m0duspwnens
5a5007c07d analyst node changes 2020-10-02 15:50:49 -04:00
m0duspwnens
fde6f128ab analyst node changes 2020-10-02 15:26:13 -04:00
m0duspwnens
1be3323265 analyst node changes 2020-10-02 15:25:42 -04:00
m0duspwnens
47762816a7 analyst node changes 2020-10-02 14:57:22 -04:00
m0duspwnens
40647ce54c analyst node changes 2020-10-02 14:40:15 -04:00
William Wernert
8310559273 Merge pull request #1440 from Security-Onion-Solutions/feature/generate-playbook-api-key
Feature/generate playbook api key
2020-10-02 14:37:58 -04:00
William Wernert
2a100c0dcc Add OLD_ prefix + only update rules if playbook enabled 2020-10-02 14:34:30 -04:00
William Wernert
d0c267ca90 Fix sed command to not delete lines after match 2020-10-02 14:31:16 -04:00
William Wernert
54da2b869c Add OLD_ db init files for soup compatibility 2020-10-02 14:12:23 -04:00
William Wernert
ab662e9b81 Merge branch 'dev' into feature/generate-playbook-api-key
# Conflicts:
#	salt/common/tools/sbin/soup
2020-10-02 13:48:52 -04:00
William Wernert
db12b6f3c6 Remove salt call to automation_user_create 2020-10-02 13:17:57 -04:00
William Wernert
96d32fda51 Add old api key to pillar during soup 2020-10-02 13:16:58 -04:00
Mike Reeves
15f0c98281 Fix Formatting 2020-10-02 13:06:03 -04:00
m0duspwnens
d0da7ade6a analyst node changes 2020-10-02 12:15:00 -04:00
m0duspwnens
c4e0fa0939 analyst node changes 2020-10-02 12:12:28 -04:00
m0duspwnens
e11717c4d0 analyst node changes 2020-10-02 11:28:53 -04:00
m0duspwnens
76a13e99da new wallpaper 2020-10-02 10:12:36 -04:00
William Wernert
20fd757847 Run playbook-ruleupdate after soctopus is running 2020-10-02 10:05:10 -04:00
William Wernert
39e14b3910 Merge branch 'dev' into feature/generate-playbook-api-key 2020-10-02 08:39:09 -04:00
Mike Reeves
c7fcdc8084 Merge pull request #1438 from Security-Onion-Solutions/socyaml
Socyaml
2020-10-01 18:08:33 -04:00
Mike Reeves
4991ea8de3 Jason made me rename json 2020-10-01 18:07:06 -04:00
Mike Reeves
36ccece724 commas gone crazy 2020-10-01 18:02:06 -04:00
Mike Reeves
a0432e97b0 Python print ftl 2020-10-01 17:57:56 -04:00
m0duspwnens
733b1376c5 analyst node changes 2020-10-01 17:53:20 -04:00
Mike Reeves
490278a4c3 Add alert events filed 2020-10-01 17:49:17 -04:00
Mike Reeves
bd5efbabd9 Fix Mode 2020-10-01 17:43:43 -04:00
Mike Reeves
8fa426f265 Cleanup sync 2020-10-01 17:41:55 -04:00
Mike Reeves
9d9d3aac53 Switch to JSON from yaml 2020-10-01 17:37:57 -04:00
Mike Reeves
744a8bca73 More json for soc 2020-10-01 17:30:23 -04:00
Mike Reeves
8a41636e7f More json for soc 2020-10-01 17:28:45 -04:00
Mike Reeves
dc79dca7fe More json for soc 2020-10-01 17:25:51 -04:00
Mike Reeves
1c55f738ec More json for soc 2020-10-01 17:23:29 -04:00
William Wernert
e98012ae2c Fix jinja and change state orrder in setup 2020-10-01 17:16:26 -04:00
Mike Reeves
92fa33159e More json for soc 2020-10-01 17:12:08 -04:00
m0duspwnens
72c6fe2184 analyst node changes 2020-10-01 17:05:59 -04:00
Mike Reeves
5730c85988 More json for soc 2020-10-01 17:04:15 -04:00
Mike Reeves
63be0734c9 More json for soc 2020-10-01 17:00:25 -04:00
Mike Reeves
5653828154 More json for soc 2020-10-01 16:57:04 -04:00
weslambert
2d2f4de337 Merge pull request #1437 from Security-Onion-Solutions/fix/kib_scripted_thehive
Update scripted field for TheHive case
2020-10-01 16:54:02 -04:00
Wes Lambert
8a81a5148b Update scripted field for TheHive case 2020-10-01 20:52:57 +00:00
weslambert
98bef8fb9d Merge pull request #1436 from Security-Onion-Solutions/fix/kibana_soc_thehive_case
Add SOC url for api integration
2020-10-01 16:47:11 -04:00
Wes Lambert
eced18c3cc Add SOC url for api integration 2020-10-01 20:29:28 +00:00
Jason Ertel
8e15ed56d6 'Escalated' filter toggle will auto-enable 'acknowledged' filter toggle 2020-10-01 16:23:47 -04:00
m0duspwnens
76c98200f3 analyst node changes 2020-10-01 16:21:51 -04:00
Mike Reeves
cc2f2de5b5 soc.json stuff 2020-10-01 15:23:07 -04:00
Mike Reeves
b423e8d22a soc.json stuff 2020-10-01 15:20:13 -04:00
Mike Reeves
1a561f6b12 soc.json stuff 2020-10-01 15:18:34 -04:00
William Wernert
a5bf4bbb35 Fix test for key in global.sls 2020-10-01 14:47:18 -04:00
m0duspwnens
964bad4657 analyst node changes 2020-10-01 13:53:38 -04:00
Doug Burks
e836f96c65 move rule.uuid after rule.name 2020-10-01 12:09:52 -04:00
Doug Burks
4851069a10 remove rule.gid from Alerts groupby since Wazuh and Playbook may not have that field 2020-10-01 11:51:40 -04:00
William Wernert
040730e8f5 Rename script for consistent naming 2020-10-01 11:22:11 -04:00
William Wernert
afb777fc8f Add automation user creation to soup when resetting playbook db 2020-10-01 11:13:24 -04:00
m0duspwnens
75d49845f2 changes to analyst setup script 2020-10-01 10:43:33 -04:00
Doug Burks
bc19cce4c2 Acknowledging an alert may acknowledge more alerts than intended #1426 2020-10-01 10:00:54 -04:00
Doug Burks
26781de244 Add Strelka query to Hunt #1433 2020-10-01 06:59:36 -04:00
William Wernert
2264b6e51c Add comments to shell code explaining curl statements 2020-09-30 19:54:34 -04:00
William Wernert
03b97cce75 Fix comment in new state + remove useless sleep command 2020-09-30 19:49:13 -04:00
William Wernert
11ae904100 Quiet script output + fix pillar value 2020-09-30 19:46:18 -04:00
weslambert
6818de9e64 Merge pull request #1431 from Security-Onion-Solutions/fix/elastlert_rules
Remove rule sync, since we don't have any rules to sync
2020-09-30 18:36:11 -04:00
weslambert
887937a75d Remove rule sync, since we don't have any rules to sync 2020-09-30 18:35:35 -04:00
William Wernert
596f2d31e4 Automation -> automation 2020-09-30 17:04:24 -04:00
William Wernert
3ec255ecee Remove old api token from sql 2020-09-30 17:03:35 -04:00
William Wernert
6361c790e9 Move automation user create to separate script to run after playbook state 2020-09-30 17:02:02 -04:00
William Wernert
8e80b41ca9 Remove Automation user from sql, gen user + store api key 2020-09-30 16:32:43 -04:00
Jason Ertel
1454201505 Disable thehivealerter 2020-09-30 15:26:29 -04:00
Jason Ertel
3af6e9e1fe Remove mount point for SOCtopus generated playbook rules to avoid them activating and sending alerts to TheHive 2020-09-30 15:14:45 -04:00
Mike Reeves
8b5ff31351 Merge pull request #1430 from Security-Onion-Solutions/redis
Add Redis pillar and fix idstools
2020-09-30 15:09:59 -04:00
Mike Reeves
7314e2dea8 Add Redis pillar and fix idstools 2020-09-30 15:08:44 -04:00
Jason Ertel
ff04bb507a Remove default Elastalert rules to stop automated alerts from being sent to thehive 2020-09-30 15:06:54 -04:00
weslambert
5b16a65422 Merge pull request #1429 from Security-Onion-Solutions/fix/zeek_server_ip
Fix issue with null Zeek server IP
2020-09-30 13:54:50 -04:00
Wes Lambert
02d2e5e2c6 Fix isue with null Zeek server IP 2020-09-30 17:53:30 +00:00
William Wernert
f3b8da1f9d Fix Engrish (can causing -> can cause) 2020-09-30 13:40:57 -04:00
William Wernert
25d4bde33b Merge pull request #1428 from Security-Onion-Solutions/feature/warn-dhcp
Add warning about IP address changing for network/DHCP iso installs
2020-09-30 13:13:40 -04:00
William Wernert
1ff20f7e27 Add warning about IP address changing for network/DHCP iso installs 2020-09-30 13:11:33 -04:00
weslambert
defe832121 Merge pull request #1427 from Security-Onion-Solutions/fix/wazuh_filebeat
Fix Filebeat config for Wazuh
2020-09-30 10:59:01 -04:00
Wes Lambert
d8f70397f7 Fix Filebeat config for Wazuh 2020-09-30 14:57:56 +00:00
weslambert
dac2ad5dbf Merge pull request #1425 from Security-Onion-Solutions/feature/soctopus_pillar
Add initial implementation of SOCtopus pillar
2020-09-30 10:25:26 -04:00
Wes Lambert
c62acf5e4e Add initial implmentation of SOCtopus pillar 2020-09-30 14:24:15 +00:00
Josh Patterson
10f4e09b70 Merge pull request #1424 from Security-Onion-Solutions/issue/1070
Issue/1070
2020-09-30 10:11:37 -04:00
William Wernert
00785c6ba5 Merge pull request #1418 from Security-Onion-Solutions/feature/replace-hardcoded-pass
Feature/replace hardcoded pass
2020-09-30 08:56:35 -04:00
Doug Burks
0a995f4a7a Update README.md 2020-09-30 07:43:20 -04:00
m0duspwnens
85969dc16d add quotes and remove quotes 2020-09-29 16:29:05 -04:00
m0duspwnens
bf99bab6c0 add quotes and remove quotes 2020-09-29 16:26:45 -04:00
weslambert
401764437f Merge pull request #1421 from Security-Onion-Solutions/fix/ip_type
Ensure IPs are typed as IP and ports as integer
2020-09-29 14:21:25 -04:00
Wes Lambert
36019727b3 Ensure IPs are typed as IP and ports as integer 2020-09-29 18:20:15 +00:00
m0duspwnens
547c3ff52c single quote inputs to yaml files 2020-09-29 13:59:16 -04:00
William Wernert
7d43d48aca Remove bad line in playbook_db_init.sh 2020-09-29 11:13:09 -04:00
William Wernert
55058a11aa Generate passwords for Grafana + Playbook default users 2020-09-29 11:12:09 -04:00
William Wernert
ebe00822f8 Merge pull request #1417 from Security-Onion-Solutions/bugfix/local_zeeklogs
Bugfix/local zeeklogs
2020-09-29 08:58:02 -04:00
Doug Burks
60134829d5 Alerts - Drilldown should display rule.uuid #1416 2020-09-29 07:51:45 -04:00
Doug Burks
c7b43ac220 Update soc.json 2020-09-29 07:41:49 -04:00
Doug Burks
a7f24b62e6 Hunt - improve NIDS query and eventFields #1415 2020-09-29 07:34:44 -04:00
Josh Patterson
9ca13ebccd Merge pull request #1414 from Security-Onion-Solutions/issue/1404
change so salt module to /usr/sbin/so-status
2020-09-28 18:31:26 -04:00
Mike Reeves
c828a2ea75 Merge pull request #1413 from Security-Onion-Solutions/experimental
Airgap SOUP!
2020-09-28 17:47:38 -04:00
m0duspwnens
8741520263 change so salt module to /usr/sbin/so-status 2020-09-28 17:31:05 -04:00
Mike Reeves
6b8b0f1b26 Change add registry 2020-09-28 16:48:02 -04:00
William Wernert
f77305e22f Generate zeeklogs sls earlier to avoid error 2020-09-28 16:45:06 -04:00
William Wernert
f782299281 Remove preconfigured zeeklog + create it during setup 2020-09-28 15:12:36 -04:00
Josh Patterson
fa6396b121 Merge pull request #1410 from Security-Onion-Solutions/fix/disable_auto_start
send to dev/null to prevent output
2020-09-28 15:07:40 -04:00
weslambert
3d6c956e02 Merge pull request #1409 from Security-Onion-Solutions/feature/wazuh_wel
Add initial parsing for Wazuh WEL/Sysmon
2020-09-28 15:07:15 -04:00
m0duspwnens
0bb1ba2853 send to dev/null to prevent output 2020-09-28 15:06:43 -04:00
Wes Lambert
869767d9d9 Add initial parsing for Wazuh WEL/Sysmon 2020-09-28 19:04:21 +00:00
Josh Patterson
0944cd1bcd Merge pull request #1408 from Security-Onion-Solutions/issue/1093
Issue/1093
2020-09-28 14:45:18 -04:00
m0duspwnens
3b709e7877 remove cleaning of webpasswd1 2020-09-28 14:44:14 -04:00
Doug Burks
6e9e4dc99c Hunt third magnifying glass should group output by event.module and event.dataset #1407 2020-09-28 14:19:55 -04:00
Mike Reeves
2cdf76473c Add Registry back from cleanup 2020-09-28 14:19:43 -04:00
m0duspwnens
053b19de11 Merge remote-tracking branch 'remotes/origin/dev' into issue/1093 2020-09-28 13:25:42 -04:00
m0duspwnens
bda9078843 check for invalid characters in fleet user password 2020-09-28 13:25:23 -04:00
Doug Burks
0516a9ddd5 Alerts page "Hunt for this field" action should quote field and group output #1406 2020-09-28 12:35:08 -04:00
m0duspwnens
85e53c53af reject passwords with single or double quotes or backslashes 2020-09-28 11:51:19 -04:00
Mike Reeves
6a4d6f7a6d Additional logic 2020-09-28 10:12:52 -04:00
William Wernert
66b7678df8 Merge pull request #1405 from Security-Onion-Solutions/feature/setup-cleanup
Feature/setup cleanup
2020-09-28 09:47:52 -04:00
William Wernert
3b9de2b7ca Disable ipv6 earlier in setup 2020-09-28 09:14:45 -04:00
William Wernert
a60bf11daa Make sure zeek log is only written on whiptail success 2020-09-28 09:11:50 -04:00
William Wernert
05729d216a Don't direct user to check log in so-zeek-log, none exists 2020-09-28 08:45:59 -04:00
Doug Burks
3904295137 Hunt - improve HTTP queries #1401 2020-09-27 08:04:28 -04:00
Doug Burks
aa7f927ffd Hunt - improve x509 queries #1400 2020-09-27 07:17:46 -04:00
Jason Ertel
68f18da832 Add alert query toggle filters for ack'd and escalated alerts 2020-09-25 17:03:42 -04:00
William Wernert
dc330a774e Exit so-zeek-logs if user cancels 2020-09-25 16:30:16 -04:00
William Wernert
9acf610262 Also disable ipv6 for install 2020-09-25 16:10:26 -04:00
William Wernert
d76a4b1359 Show welcome screen on both iso and network installs 2020-09-25 14:59:27 -04:00
Doug Burks
11b200e9c0 Hunt - remove SMTP fields #1397 2020-09-25 14:17:14 -04:00
Doug Burks
20a56d0831 Hunt - add network.community_id column to Events table for more data types #1396 2020-09-25 13:18:28 -04:00
weslambert
6bfef773f2 Merge pull request #1392 from Security-Onion-Solutions/bugfix/config_dev_nullify
dev nullify so-config-backup cron job
2020-09-24 21:00:18 -04:00
weslambert
b3f9ee3b34 dev nullify so-config-backup cron job 2020-09-24 20:59:42 -04:00
Jason Ertel
c0be252f9f SOC config adjustments for alerting 2020-09-24 16:37:27 -04:00
Josh Patterson
04f2595fa1 Merge pull request #1389 from Security-Onion-Solutions/issue/1388
fix common salt package name for salt.master state for ubuntu
2020-09-24 12:36:26 -04:00
Mike Reeves
e30958b9ec Airgap SOUP changes 2020-09-24 11:41:02 -04:00
m0duspwnens
d9005c157d fix common salt package name for salt.master state for ubuntu - https://github.com/Security-Onion-Solutions/securityonion/issues/1388 2020-09-24 11:26:58 -04:00
Doug Burks
62dbe425a6 Hunt - fix x509 eventFields #1387 2020-09-24 07:52:46 -04:00
Doug Burks
2b8b8e2f40 Hunt - fix file eventFields #1386 2020-09-24 07:44:28 -04:00
Doug Burks
60daacd6dc Hunt - fix DHCP eventFields #1385 2020-09-24 07:34:29 -04:00
weslambert
a09002edae Merge pull request #1384 from Security-Onion-Solutions/bugfix/config_backup
Add back missing # sign
2020-09-23 21:34:52 -04:00
weslambert
5b93c40ce4 Add back missing # sign 2020-09-23 21:34:10 -04:00
m0duspwnens
3ba8f47d9c Merge remote-tracking branch 'remotes/origin/dev' into issue/1093 2020-09-23 15:01:48 -04:00
m0duspwnens
6f7dbee36e remove single quotes from secrets pillar 2020-09-23 14:57:26 -04:00
Mike Reeves
fd302c6363 make autocomplete with sudo work 2020-09-23 13:19:37 -04:00
m0duspwnens
70f98e2eea take care single quotes if they are in the WEBPASSWD 2020-09-23 13:00:18 -04:00
m0duspwnens
b32bc8b542 Merge remote-tracking branch 'remotes/origin/dev' into issue/1093 2020-09-23 12:07:12 -04:00
Mike Reeves
aca98e01f3 Set the path 2020-09-23 12:00:25 -04:00
Jason Ertel
2f7c0c34e6 Support backslashes in SOC passwords 2020-09-23 10:09:21 -04:00
weslambert
4f228c1b7c Merge pull request #1379 from Security-Onion-Solutions/feature/config_backup
Feature/config backup
2020-09-23 09:58:05 -04:00
Wes Lambert
71734ddc0a Add cron job to common state for daily config backup 2020-09-23 13:55:32 +00:00
Wes Lambert
57732b360e Add config backup script 2020-09-23 13:47:14 +00:00
Wes Lambert
4d42d04cc3 Fix backup pillar definition 2020-09-23 13:45:42 +00:00
Wes Lambert
d02c440934 Add backup params to global.sls 2020-09-22 21:05:57 +00:00
m0duspwnens
77a9bf2697 test single quotes in secrets pillar 2020-09-22 13:16:20 -04:00
Josh Brower
18a881ccab Merge pull request #1377 from Security-Onion-Solutions/bugfix/docker_cleanup
fix docker_clean syntax
2020-09-21 19:42:11 -04:00
Josh Brower
8bb527b4f1 fix docker_clean syntax 2020-09-21 19:41:39 -04:00
Jason Ertel
694635a38f Add pivot to hunt as a new alerts quick action 2020-09-21 17:10:03 -04:00
Mike Reeves
0f1b92cea9 Update so-rule-update 2020-09-21 15:40:38 -04:00
Mike Reeves
48b17ee51a Merge pull request #1375 from Security-Onion-Solutions/gaupgrade
Upgrade to GA including Docker Cleanup
2020-09-21 13:14:49 -04:00
Mike Reeves
d56a9e1f86 Upgrade to GA including Docker Cleanup 2020-09-21 13:14:06 -04:00
Josh Brower
ffdf7e1db4 Merge pull request #1374 from Security-Onion-Solutions/feature/so-user-list
Add so-user-list
2020-09-21 10:03:02 -04:00
Josh Brower
3cd11807cd Add so-user-list 2020-09-21 10:02:10 -04:00
Jason Ertel
8f4a6df53a Add event.module to default alert query 2020-09-21 09:06:56 -04:00
Jason Ertel
fc51c2aef4 Group by community ID on second alert quick query 2020-09-19 08:39:01 -04:00
Jason Ertel
5b38acb64b Add alerting configuration for soc container 2020-09-18 13:51:23 -04:00
Josh Patterson
2b155b5581 Merge pull request #1368 from Security-Onion-Solutions/issue/1367
add so-fleet so standalone fleet gets the redis pki
2020-09-18 13:41:43 -04:00
m0duspwnens
40f6fed2a5 add so-fleet so standalone fleet gets the redis pki 2020-09-18 13:40:27 -04:00
Jason Ertel
1610445b4e Validate password before creating user 2020-09-18 08:29:30 -04:00
Jason Ertel
0c12025599 Do not restart mysql after setup when running automated tests 2020-09-18 08:22:28 -04:00
Mike Reeves
33e381ad15 Update VERSION 2020-09-17 15:08:36 -04:00
Mike Reeves
bafb13fd6d Merge pull request #1363 from Security-Onion-Solutions/dev
RC3
2020-09-17 15:05:33 -04:00
Mike Reeves
56e9f09c20 Update VERIFY_ISO.md 2020-09-17 11:02:16 -04:00
Mike Reeves
6cd30ce52f Update Sig 2020-09-17 10:56:29 -04:00
Mike Reeves
3fb98bfd4d Update VERIFY_ISO.md 2020-09-17 10:54:18 -04:00
Mike Reeves
4701091f76 Update VERIFY_ISO.md 2020-09-17 10:54:01 -04:00
Doug Burks
57e45308af Fix pivot from TheHive to Kibana #1362 2020-09-17 08:05:55 -04:00
Doug Burks
c9c1245d1e change from 2.1 RC2 to 2.2 RC3 2020-09-17 08:01:10 -04:00
Mike Reeves
7415c7fe81 Fix dashboard script 2020-09-16 14:55:32 -04:00
Mike Reeves
eac58f8f34 Merge pull request #1346 from Security-Onion-Solutions/rc3upgrade
Rc3upgrade
2020-09-16 14:29:53 -04:00
Mike Reeves
52072e0484 Update soup 2020-09-16 14:08:48 -04:00
doug
840b54d73c make so-analyst executable 2020-09-16 13:11:49 -04:00
Mike Reeves
5910fe642c Fix Update XML 2020-09-16 13:08:21 -04:00
Mike Reeves
a0f64440e0 Update changes.json 2020-09-16 13:06:26 -04:00
weslambert
74e4adda11 Merge pull request #1357 from Security-Onion-Solutions/feature/dashboard_updates_2
Add All Logs for Connections dashboard
2020-09-16 11:56:38 -04:00
Wes Lambert
44ef935d65 Add All Logs for Connections dashboard 2020-09-16 15:55:28 +00:00
Mike Reeves
3e0e41be32 Update changes.json 2020-09-16 11:41:21 -04:00
Mike Reeves
1801361cf8 Update changes.json 2020-09-16 11:40:05 -04:00
weslambert
6325b30a21 Merge pull request #1356 from Security-Onion-Solutions/feature/dashboard_updates
Kibana dashboard updates
2020-09-16 11:19:27 -04:00
Wes Lambert
bd8d2fc271 Kibana dashboard updates 2020-09-16 15:17:26 +00:00
Josh Patterson
6e0806a587 Merge pull request #1353 from Security-Onion-Solutions/fix/strelkaconfig
fix sensor mainip logic for strelka yaml files
2020-09-16 10:32:58 -04:00
m0duspwnens
4ee3e1ed01 fix sensor mainip logic for strelka yaml files 2020-09-16 10:29:23 -04:00
Josh Patterson
b7e41b53cb Merge pull request #1352 from Security-Onion-Solutions/fix/es_templates
fix MYIP
2020-09-16 10:12:27 -04:00
m0duspwnens
3fe276dbb5 fix MYIP 2020-09-16 10:11:39 -04:00
Josh Patterson
66f21c4568 Merge pull request #1350 from Security-Onion-Solutions/fix/es_templates
change how we determine the ip. run script on search and import nodes as well
2020-09-16 09:54:16 -04:00
Josh Brower
d5fd15962c Merge pull request #1351 from Security-Onion-Solutions/bugfix/tcpreplay
Fix so-test
2020-09-16 09:52:08 -04:00
Josh Brower
dd2d736bc1 Fix so-test 2020-09-16 09:51:38 -04:00
m0duspwnens
dd56d7d2d1 change how we determine the ip. run script on search and import nodes as well 2020-09-16 09:48:38 -04:00
weslambert
6806bd2461 Merge pull request #1348 from Security-Onion-Solutions/bugfix/es_template_load
Ensure templates are loaded for heavy nodes
2020-09-15 17:15:56 -04:00
weslambert
fbf037f460 Ensure templates are loaded for heavy nodes 2020-09-15 17:14:06 -04:00
Josh Brower
46a1369e81 Merge pull request #1347 from Security-Onion-Solutions/bugfix/tcpreplay
Add so-test
2020-09-15 13:20:56 -04:00
Josh Brower
2516429834 Add so-test 2020-09-15 13:14:00 -04:00
Mike Reeves
fc8ffd2080 Made the version update more reliable 2020-09-15 11:09:01 -04:00
Mike Reeves
ee4b35f2e4 Rename zeekversion.map.jinja to mdengine.map.jinja 2020-09-14 22:30:10 -04:00
Mike Reeves
c31d998061 Disk Space Check Final Final Final 2020-09-14 20:17:28 -04:00
Mike Reeves
62a8e676d9 Disk Space Check Final Final 2020-09-14 20:11:04 -04:00
Mike Reeves
9ef2b93586 Disk Space Check Final Final 2020-09-14 20:09:53 -04:00
Mike Reeves
eafb4e81a5 Disk Space Check Final Final 2020-09-14 20:01:53 -04:00
Mike Reeves
6eb3333af4 Disk Space Check Final 2020-09-14 19:46:16 -04:00
Mike Reeves
07e536df98 Disk Space Check 2020-09-14 19:42:58 -04:00
Mike Reeves
e8d2a6fdc2 Disk Space Check 2020-09-14 19:32:14 -04:00
Mike Reeves
1bc5e33007 Rotate Mysql Container Log 2020-09-14 16:27:32 -04:00
Mike Reeves
e2ecfca4c1 Merge pull request #1343 from Security-Onion-Solutions/rc3upgrade
Upgrade Fun
2020-09-14 14:54:37 -04:00
Mike Reeves
0a0e00866c Upgrade Fun 2020-09-14 14:50:22 -04:00
Mike Reeves
38266f7db8 Merge pull request #1342 from Security-Onion-Solutions/experimental
Fix ruleupdate setting
2020-09-14 14:26:31 -04:00
Mike Reeves
9957fdec0f Fix ruleupdate setting 2020-09-14 14:17:55 -04:00
Josh Patterson
32632864eb Merge pull request #1341 from Security-Onion-Solutions/issue/1066
change how we determine how to run so-status
2020-09-14 12:43:05 -04:00
m0duspwnens
b559e5dd32 change how we determine how to run so-status 2020-09-14 12:40:39 -04:00
Jason Ertel
f86780a0db Open PCAPs in same tab, but open external sites in new tabs 2020-09-14 10:41:39 -04:00
Mike Reeves
1958fef4ad Merge pull request #1338 from Security-Onion-Solutions/experimental
Fix strelka rules
2020-09-14 09:58:34 -04:00
Mike Reeves
ee1317adf1 Merge branch 'experimental' of https://github.com/Security-Onion-Solutions/securityonion into experimental 2020-09-14 09:57:14 -04:00
Mike Reeves
d1836fb3a3 Fix Salt issue with script 2020-09-14 09:57:08 -04:00
Josh Patterson
67c1ece0bb Merge pull request #1337 from Security-Onion-Solutions/issue/1066
Issue/1066
2020-09-14 09:38:15 -04:00
m0duspwnens
b93d149631 fix so-status 2020-09-14 09:36:26 -04:00
m0duspwnens
46cbcfa330 Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion-saltstack into issue/1066 2020-09-14 08:45:54 -04:00
Mike Reeves
841db1b4b9 Merge pull request #1336 from Security-Onion-Solutions/experimental
Get Rules onto the install for airgap
2020-09-13 14:58:36 -04:00
Mike Reeves
112a0b426e Merge branch 'dev' into experimental 2020-09-13 14:54:00 -04:00
Doug Burks
18dc7a915a Hunt: Fix Tunnel query #1335 2020-09-13 08:26:33 -04:00
Jason Ertel
89c38541ee Force all SOC quick actions to open in new tab 2020-09-13 02:52:25 -04:00
Mike Reeves
d6d22fb0e0 Fix Strelka 2020-09-12 23:07:35 -04:00
Mike Reeves
bb936c5bee Fix Strelka 2020-09-12 23:07:15 -04:00
Mike Reeves
259df2ed6b Fix Strelka 2020-09-12 23:06:06 -04:00
Doug Burks
311d67b934 Hunt: fix RFB groupby #1332 2020-09-12 06:14:58 -04:00
Josh Patterson
f03b128924 Merge pull request #1331 from Security-Onion-Solutions/fix/top
add redis to eval if playbook enabled
2020-09-11 18:31:19 -04:00
m0duspwnens
5f567368be add redis to eval if playbook enabled 2020-09-11 18:30:21 -04:00
m0duspwnens
77911acfb4 so-status module 2020-09-11 18:28:53 -04:00
Mike Reeves
48d1d0c168 Strelkas Rules Update 2020-09-11 18:24:56 -04:00
Josh Patterson
2d508d9e57 Merge pull request #1328 from Security-Onion-Solutions/issue/1281
Issue/1281
2020-09-11 15:02:30 -04:00
m0duspwnens
15563f2ee6 add nginx to top for sensor 2020-09-11 12:28:42 -04:00
m0duspwnens
bb0e686444 add elasticsearch to top for nodes missing it 2020-09-11 11:35:17 -04:00
Mike Reeves
46866f40b3 Merge pull request #1325 from Security-Onion-Solutions/experimental
Update Script
2020-09-11 11:02:57 -04:00
Mike Reeves
6e0cdf7be4 Update Script help 2020-09-11 11:01:56 -04:00
m0duspwnens
5f7c270984 only allow strelka to run on nodes that are sensors 2020-09-11 10:22:12 -04:00
Mike Reeves
af9a19b6e8 Merge pull request #1321 from Security-Onion-Solutions/experimental
IDS Tools now with Airgap support
2020-09-10 19:05:16 -04:00
Mike Reeves
53319738c4 Fix Nginx state 2020-09-10 16:56:48 -04:00
Mike Reeves
ef46094b0c Update all nginx configs 2020-09-10 13:55:56 -04:00
Josh Patterson
53ff87b0ee Merge pull request #1312 from Security-Onion-Solutions/issue/1281
add elasticsearch state to top for manager node
2020-09-10 12:47:05 -04:00
m0duspwnens
bc420d4a02 add 2020-09-10 11:57:15 -04:00
Josh Patterson
ca26548b2c Merge pull request #1310 from Security-Onion-Solutions/issue/1281
Issue/1281
2020-09-10 10:08:25 -04:00
m0duspwnens
0ed9c65646 remove logic from fleet state to only run if in top 2020-09-10 10:07:05 -04:00
Doug Burks
8c280221da Hunt: Fix Intel groupby #1131 2020-09-10 07:00:54 -04:00
Doug Burks
24c325e9a1 Fix Elasticsearch parsing for Zeek Intel Indicator #1309 2020-09-10 06:41:19 -04:00
Josh Brower
56587f0df5 Merge pull request #1308 from Security-Onion-Solutions/feature/wel-ingest
Add event.category to WEL
2020-09-10 06:16:56 -04:00
Josh Brower
c3b2d98ffb Add event.category to WEL 2020-09-10 06:15:30 -04:00
Doug Burks
7161a662aa improve Wazuh support in Hunt 2020-09-10 06:03:33 -04:00
Mike Reeves
5d4e8925a3 Add Firewall Logic 2020-09-09 21:16:40 -04:00
Mike Reeves
45b11b2321 Fix Rulecat 2020-09-09 18:38:07 -04:00
Doug Burks
d18c498574 Update so-features-enable 2020-09-09 17:32:42 -04:00
m0duspwnens
09cc8ae1fb fail the state if it isnt in top 2020-09-09 16:48:50 -04:00
m0duspwnens
01c9f7b2ae merge with dev and resolve conflicts 2020-09-09 16:23:36 -04:00
Mike Reeves
7ebf93fcb5 IDSTools Overhaul 2020-09-09 15:53:32 -04:00
Josh Patterson
1e32b32659 Merge pull request #1302 from Security-Onion-Solutions/fix/sostatus
Fix/sostatus
2020-09-09 15:07:12 -04:00
m0duspwnens
39f200f565 fix whitespace 2020-09-09 14:59:21 -04:00
Mike Reeves
a77532c1d8 Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into dev 2020-09-09 14:57:17 -04:00
Mike Reeves
04f4539385 Fix Airgap Repo Name 2020-09-09 14:57:10 -04:00
m0duspwnens
b0c526364f handle strelka 2020-09-09 14:55:54 -04:00
m0duspwnens
921262b9a5 prevent duplicate containers for so-stauts 2020-09-09 14:07:38 -04:00
Jason Ertel
a5b87850df Remove user sync between SOC and Cortex due to the unnecesary complexities involved with this style of integration 2020-09-09 14:07:36 -04:00
m0duspwnens
05d736d2df handle strelka 2020-09-09 14:00:58 -04:00
m0duspwnens
918d9cf00f handle strelka 2020-09-09 13:57:53 -04:00
m0duspwnens
3433b90029 fix so-status for strelka and wazuh 2020-09-09 13:53:10 -04:00
Doug Burks
82b582540e Add period 2020-09-09 12:56:19 -04:00
Doug Burks
90ba1be978 Improve formatting of NIDS selection screen 2020-09-09 12:55:14 -04:00
m0duspwnens
e84507c386 Merge remote-tracking branch 'remotes/origin/dev' into fix/sostatus 2020-09-09 12:51:01 -04:00
m0duspwnens
9ee9a199b1 predefine each component as 0 to fix issues with it being unset 2020-09-09 12:50:22 -04:00
Jason Ertel
fc4ad1d556 Add Google search quick action to Hunt; Change VirusTotal quick action to be applicable to all field values 2020-09-09 12:22:38 -04:00
Jason Ertel
9babc445ce Add Google search quick action to Hunt; Change VirusTotal quick action to be applicable to all field values 2020-09-09 12:07:23 -04:00
Mike Reeves
90feb503ce Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into dev 2020-09-09 10:54:53 -04:00
Mike Reeves
426257443a Final airgap tweaks 2020-09-09 10:54:47 -04:00
Doug Burks
eaf3281ab7 Remove Suricata version numbers from Setup screens #1300
https://github.com/Security-Onion-Solutions/securityonion/issues/1300
2020-09-09 10:43:41 -04:00
Josh Patterson
c2398f966b Merge pull request #1295 from Security-Onion-Solutions/fix/salt-ca-ssl
Fix/salt ca ssl
2020-09-09 10:36:54 -04:00
m0duspwnens
7facff2b7d change from cmd.run to cp.get_file_str 2020-09-09 10:34:53 -04:00
Jason Ertel
ad05e75ce7 Add new quick actions to SOC config template 2020-09-09 00:46:23 -04:00
Mike Reeves
7d524a0723 Add Firewall Rule for yum and airgap 2020-09-08 18:51:14 -04:00
Josh Patterson
d7016b4557 Merge pull request #1298 from Security-Onion-Solutions/issue/1291
Issue/1291
2020-09-08 17:40:33 -04:00
m0duspwnens
da34222931 makedirs 2020-09-08 17:36:27 -04:00
m0duspwnens
eeb6c3128b add salt.master state to manager nodes 2020-09-08 17:27:13 -04:00
m0duspwnens
da3d0948b4 creating engine to watch the health of the salt mine 2020-09-08 16:49:38 -04:00
Jason Ertel
710a2be422 Add new so-user-enable script and change so-user-disable to call 'so-user disable' instead of deleting the SOC user 2020-09-08 16:24:18 -04:00
Mike Reeves
7c41c31359 Fix airgap statement 2020-09-08 14:48:37 -04:00
Mike Reeves
7371f9236e Update top.sls 2020-09-08 14:18:56 -04:00
Mike Reeves
1aea3f4f85 Merge pull request #1297 from Security-Onion-Solutions/experimental
Add Airgap code
2020-09-08 09:26:41 -04:00
Doug Burks
f8ebed43d7 fix spacing 2020-09-07 04:45:26 -04:00
Doug Burks
f5916e26a2 read ca.crt from filesystem when possible 2020-09-07 04:42:11 -04:00
weslambert
b6b52671e2 Merge pull request #1294 from Security-Onion-Solutions/fix/wazuh_agent_name
Fix typo
2020-09-05 08:17:09 -04:00
Wes Lambert
f9884606df Fix typo 2020-09-05 12:15:55 +00:00
Jason Ertel
f27e5164d0 Update to latest kratos; add support for a custom status trait to represent whether a user is locked or not; refactor so-user to use new enable/disable capabilities in SOC; remove 'delete' option from so-user usage to avoid having user lists out of sync across SOC and external apps 2020-09-04 17:01:52 -04:00
Josh Brower
351e7761ef Merge pull request #1292 from Security-Onion-Solutions/bugfix/playbook-rulesets
Update SOCtopus.conf
2020-09-04 14:15:18 -04:00
Josh Brower
39cc7151a5 Update SOCtopus.conf 2020-09-04 14:14:53 -04:00
Doug Burks
f8e68c82e4 downgrade to Mono 4.2.1.102 and NetworkMiner 2.4 2020-09-04 10:12:28 -04:00
Doug Burks
c050003b5a Install file-roller for opening zip files 2020-09-04 07:14:01 -04:00
Doug Burks
a2265fac4f NetworkMiner has a compatibility issue with Mono 6 right now 2020-09-04 06:50:22 -04:00
Doug Burks
1fc64d3eef so-analyst should install gedit 2020-09-03 16:46:14 -04:00
Josh Patterson
c71a154e81 Merge pull request #1288 from Security-Onion-Solutions/quickfix/standalonetop
add elasticsearch to standalone top
2020-09-03 15:55:43 -04:00
m0duspwnens
05b8b71af2 add elasticsearch to standalone top 2020-09-03 15:54:24 -04:00
Mike Reeves
b2ee757db2 Airgap Time 2020-09-03 10:35:12 -04:00
weslambert
b10dd40376 Merge pull request #1287 from Security-Onion-Solutions/fix/suri_home_net
Change HOME_NET and EXTERNAL_NET defaults
2020-09-03 08:15:51 -04:00
weslambert
8db8dcb71a Change HOME_NET and EXTERNAL_NET defaults 2020-09-03 08:15:14 -04:00
m0duspwnens
770cd6eafc add endif 2020-09-02 16:19:58 -04:00
Mike Reeves
9745191f19 Add Airgap State 2020-09-02 16:17:44 -04:00
m0duspwnens
a229ae82ce only allow state to run if it is in top for the node 2020-09-02 16:15:52 -04:00
weslambert
870e042c4c Merge pull request #1285 from Security-Onion-Solutions/fix/so_stop_start_restart
Require at least one arg for start/stop/restart scripts
2020-09-02 14:58:19 -04:00
Wes Lambert
770aaf415c Require at least on arg for start/stop/restart scripts 2020-09-02 18:55:59 +00:00
Jason Ertel
0142f43493 Add so-user-disable script which deletes the SOC user and disables the users in Fleet, TheHive, and Cortex 2020-09-02 13:54:50 -04:00
m0duspwnens
9d85b3223f fix note about localrules 2020-09-02 11:46:48 -04:00
Josh Patterson
066c795e71 Merge pull request #1279 from Security-Onion-Solutions/fix/redhat
move redhat with centos
2020-09-02 09:12:44 -04:00
m0duspwnens
1f8f197066 move redhat with centos 2020-09-02 09:12:05 -04:00
weslambert
d35cca7fc5 Merge pull request #1278 from Security-Onion-Solutions/fix/elastalert_extra_hosts
Add manager to hosts file
2020-09-02 07:44:49 -04:00
weslambert
5d920885e0 Add manager to hosts file 2020-09-02 07:43:55 -04:00
Josh Patterson
7fa083069d Merge pull request #1277 from Security-Onion-Solutions/issue/968
Issue/968
2020-09-01 15:43:22 -04:00
m0duspwnens
08ca2055dc fix telegraf file input for zeek log 2020-09-01 15:34:06 -04:00
m0duspwnens
93f30a2064 fix telegraf config 2020-09-01 15:29:29 -04:00
m0duspwnens
b13b07eddf add newline to end 2020-09-01 15:10:56 -04:00
m0duspwnens
01777c64d9 fix influxtime 2020-09-01 14:58:48 -04:00
m0duspwnens
b6d66bddfc add redis to proper node types. grafana dahsboard changes. change zeek_restart to not use telegraf socket but read from file instead 2020-09-01 14:38:10 -04:00
Josh Brower
6cd0d16b91 Merge pull request #1276 from Security-Onion-Solutions/feature/import-wel
Initial support for evtx import
2020-09-01 13:48:12 -04:00
Josh Brower
a79d0319cd Initial support for evtx import 2020-09-01 13:47:27 -04:00
Mike Reeves
951fe2ac69 Create repo 2020-09-01 11:26:33 -04:00
Mike Reeves
9cff7c1427 Enable airgap functions 2020-09-01 11:24:22 -04:00
Mike Reeves
643dab12d0 Enable airgap 2020-09-01 11:09:33 -04:00
Josh Patterson
67766745a4 Merge pull request #1275 from Security-Onion-Solutions/fix/redhat
resolve issue with salt state if os is redhat
2020-09-01 10:44:59 -04:00
m0duspwnens
2fee151bff resolve issue with salt state if os is redhat 2020-09-01 10:43:21 -04:00
m0duspwnens
ada1c81ab7 manager and standalone dashboard changes 2020-09-01 10:40:20 -04:00
Jason Ertel
ff5d1cd815 Expand nginx body size limit to 2.5GB to handle 2G PCAPs from sensors 2020-09-01 10:07:28 -04:00
Doug Burks
45c0a7ac77 Kernel messages can overwrite whiptail screen #812
Kernel messages can overwrite whiptail screen #812
2020-09-01 08:55:34 -04:00
m0duspwnens
a1a7b36319 merge with dev and resolve conflict 2020-08-31 16:05:34 -04:00
m0duspwnens
31f25eca57 fix grafana related issues. add redis to standalone 2020-08-31 15:56:58 -04:00
weslambert
011958a2f3 Merge pull request #1274 from Security-Onion-Solutions/fix/zeek_syslog
Ensure Zeek syslog log is enabled for Import node
2020-08-31 13:08:44 -04:00
Wes Lambert
ae3fe9e892 Ensure Zeek syslog log is enabled for Import node 2020-08-31 17:07:16 +00:00
weslambert
96f25914db Merge pull request #1273 from Security-Onion-Solutions/fix/zeek_syslog_default
Fix/zeek syslog default
2020-08-31 12:32:52 -04:00
Wes Lambert
5ed5e6603d Fix space 2020-08-31 16:32:12 +00:00
Wes Lambert
26ffc44fd1 Only enable syslog log by default in Eval mode 2020-08-31 16:30:32 +00:00
Jason Ertel
dc3b065a41 Set exec bit on new user-add scripts 2020-08-31 10:57:23 -04:00
weslambert
6350c83e05 Merge pull request #1272 from Security-Onion-Solutions/feature/wazuh_mgmt_wrappers
Add Wazuh mgmt wrappers for manage_agents and upgrade
2020-08-31 10:55:25 -04:00
Wes Lambert
46e7e121e3 Add Wazuh mgmt wrappers for manage_agents and upgrade 2020-08-31 14:54:24 +00:00
weslambert
5db70cbd59 Merge pull request #1271 from Security-Onion-Solutions/fix/remove_minio
Remove minio for now
2020-08-31 10:29:30 -04:00
Wes Lambert
6d14f2af96 Remove minio for now 2020-08-31 14:07:47 +00:00
weslambert
42bd75a1cc Merge pull request #1270 from Security-Onion-Solutions/fix/elastalert_startup
Wait for Elasticsearch indices to be queryable before starting Elasta…
2020-08-31 09:56:18 -04:00
Wes Lambert
9abbda8e04 Wait for Elasticsearch indices to be queryable before starting Elastalert container 2020-08-31 13:54:49 +00:00
Jason Ertel
189c02648d Move container status check to so-common 2020-08-31 09:52:06 -04:00
Jason Ertel
8e06f0453e Only add users to aux systems if those systems are currently running 2020-08-31 09:41:06 -04:00
Doug Burks
9680270b20 Set default monospace font to Liberation 2020-08-30 16:42:44 -04:00
Doug Burks
2f09156a02 quote filename when spawning NetworkMiner 2020-08-30 16:10:47 -04:00
Doug Burks
77b3ebdabe Hunt Events table should show ssl.server_name when searching for ssl
Hunt Events table should show ssl.server_name when searching for ssl #1267
2020-08-30 06:56:15 -04:00
Doug Burks
13ce439678 Update README 2020-08-29 06:52:26 -04:00
Doug Burks
df5ef7c956 Update so-analyst 2020-08-29 06:07:58 -04:00
Doug Burks
1e1212bf41 Update so-analyst 2020-08-29 05:59:21 -04:00
Doug Burks
c20f47ffd6 make chaosreader executable 2020-08-29 04:52:21 -04:00
Doug Burks
c21b347549 Update README 2020-08-29 04:46:00 -04:00
Doug Burks
f6f990ca9f Update README 2020-08-28 16:44:41 -04:00
Doug Burks
8344e38d91 Add files via upload 2020-08-28 16:43:28 -04:00
Josh Brower
764ba4a0e9 Merge pull request #1266 from Security-Onion-Solutions/bugfix/event.code-parsing
Set event.code to string for WEL
2020-08-28 13:49:01 -04:00
Josh Brower
b7dd14b8f0 Set event.code to string for WEL 2020-08-28 13:40:04 -04:00
Jason Ertel
3877706f20 Remove auto-start regardless of how setup was started 2020-08-28 09:10:35 -04:00
Jason Ertel
4e3e83820f Correct pillar key for thehive 2020-08-28 08:17:42 -04:00
Josh Patterson
f4dc67e32a Merge pull request #1264 from Security-Onion-Solutions/issue/1063
fix inbound for monitor traffic on standalone graphana dashboard
2020-08-27 18:25:26 -04:00
m0duspwnens
b1e7ffc173 fix inbound for monitor traffic on standalone graphana dashboard 2020-08-27 18:24:26 -04:00
Jason Ertel
a3e34bfaca Add users to Fleet, TheHive, and Cortex when adding a user to SO via so-user-add command 2020-08-27 16:58:02 -04:00
Josh Patterson
9d30b58247 Merge pull request #1262 from Security-Onion-Solutions/issue/643
remove space
2020-08-27 15:09:05 -04:00
m0duspwnens
aa60ec8e5a remove space 2020-08-27 15:07:45 -04:00
Josh Patterson
2559f740f1 Merge pull request #1260 from Security-Onion-Solutions/issue/643
Issue/643
2020-08-27 14:35:39 -04:00
m0duspwnens
dbb1390c42 move README to / 2020-08-27 14:32:51 -04:00
Mike Reeves
2b0b695ee4 Fix duplicate docker 2020-08-27 10:15:22 -04:00
Mike Reeves
dc6c0cc71c Merge pull request #1259 from Security-Onion-Solutions/issue/286
Issue/286
2020-08-27 10:13:17 -04:00
m0duspwnens
e9b7538ee8 fix a couple things, add another package 2020-08-26 17:58:27 -04:00
m0duspwnens
16c3b9539b fix a couple things, add another package 2020-08-26 17:51:04 -04:00
m0duspwnens
cc88c4c35f adding so-analyst script to create analyst workstatin 2020-08-26 17:39:11 -04:00
weslambert
509985ed07 Merge pull request #1254 from Security-Onion-Solutions/fix/sensor_clean
Cron updates
2020-08-26 11:03:03 -04:00
weslambert
000c2abb33 Update timing for so-yara-update 2020-08-26 11:02:33 -04:00
Mike Reeves
19130b563d Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into issue/286 2020-08-26 11:01:01 -04:00
Mike Reeves
e1a52a4921 Update core counts if heavy node or SA 2020-08-26 11:00:23 -04:00
Mike Reeves
86584d90d7 Merge pull request #1253 from Security-Onion-Solutions/issue/1078
Issue/1078 Update Docker
2020-08-26 10:36:34 -04:00
Mike Reeves
e993397173 Update docker to latest version 2020-08-26 10:35:17 -04:00
Josh Brower
c38f4ad4ae Merge pull request #1251 from Security-Onion-Solutions/feature/fleet3.1
Upgraded to Fleet 3.1
2020-08-26 06:14:34 -04:00
Josh Brower
67e0a219e6 Upgraded to Fleet 3.1 2020-08-26 06:13:45 -04:00
Josh Brower
b6ebcf6551 Merge pull request #1250 from Security-Onion-Solutions/feature/es-security-field
Adds new .security analyzed subfield
2020-08-26 05:12:23 -04:00
Josh Brower
1cf7301db4 Adds new .security analyzed subfield 2020-08-26 05:11:42 -04:00
Jason Ertel
3122280bd5 Update version to 2.2.0-rc.3 2020-08-25 15:16:09 -04:00
weslambert
ce49e050bc Update timing for sensor clean cron 2020-08-25 12:14:43 -04:00
weslambert
61cc5b9712 Merge pull request #1246 from Security-Onion-Solutions/fix/sensor_clean_log
Fix/sensor clean log
2020-08-25 11:36:10 -04:00
Wes Lambert
c03812f7ab Add rotation for sensor_clean log 2020-08-25 15:34:30 +00:00
weslambert
a8f727ad40 Don't write to log if not past CRIT_DISK_USAGE 2020-08-25 11:19:36 -04:00
Mike Reeves
6c5f8f7d53 Merge pull request #1240 from Security-Onion-Solutions/issue/1225
Remove duplicate IDSTools entries
2020-08-24 10:41:18 -04:00
Mike Reeves
52602f527e Merge pull request #1238 from Security-Onion-Solutions/issue/796
Add /usr/sbin to the path
2020-08-24 10:39:29 -04:00
Mike Reeves
02712e7f46 Add /usr/sbin to the path 2020-08-22 11:07:00 -04:00
Mike Reeves
093819b0c7 Remove duplicate IDSTools entries 2020-08-22 10:32:11 -04:00
William Wernert
6f73d62400 Merge branch 'dev' into feature/nginx-update 2020-07-20 13:13:32 -04:00
William Wernert
a5c790c31e [fix] managerr -> manager 2020-07-10 17:50:53 -04:00
William Wernert
8b146aac32 Merge branch 'dev' into feature/nginx-update
# Conflicts:
#	salt/nginx/etc/nginx.conf
#	salt/nginx/etc/nginx.conf.so-eval
#	salt/nginx/etc/nginx.conf.so-manager
#	salt/nginx/etc/nginx.conf.so-managersearch
#	salt/nginx/etc/nginx.conf.so-mastersearch
#	salt/nginx/etc/nginx.conf.so-standalone
2020-07-10 17:49:34 -04:00
William Wernert
81006ebbd0 [fix] Reflect new manager syntax 2020-07-10 17:46:15 -04:00
William Wernert
49e5cb311e [fix][WIP] set ssl cert for redirect 443 server block 2020-07-08 16:05:48 -04:00
William Wernert
533ed395e7 [fix][WIP] Remove ssl and http2 from redirect server block 2020-07-08 15:59:31 -04:00
William Wernert
a0ffe26334 [fix] Only one default_server is allowed per port 2020-07-08 15:56:36 -04:00
William Wernert
0c3e35c55e [fix] correct jinja template syntax 2020-07-08 14:30:27 -04:00
William Wernert
cfd1b82e00 [refactor] Redirect to correct url_base + combine configs 2020-07-08 13:49:33 -04:00
284 changed files with 16080 additions and 11212 deletions

12
.github/ISSUE_TEMPLATE vendored Normal file
View File

@@ -0,0 +1,12 @@
PLEASE STOP AND READ THIS INFORMATION!
If you are creating an issue just to ask a question, you will likely get faster and better responses by posting to our discussions forum instead:
https://securityonion.net/discuss
If you think you have found a possible bug or are observing a behavior that you weren't expecting, use the discussion forum to start a conversation about it instead of creating an issue.
If you are very familiar with the latest version of the product and are confident you have found a bug in Security Onion, you can continue with creating an issue here, but please make sure you have done the following:
- duplicated the issue on a fresh installation of the latest version
- provide information about your system and how you installed Security Onion
- include relevant log files
- include reproduction steps

15
.github/workflows/leaktest.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: leak-test
on: [push,pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Gitleaks
uses: zricethezav/gitleaks-action@master

1
KEYS
View File

@@ -1,4 +1,5 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF7rzwEBEADBg87uJhnC3Ls7s60hbHGaywGrPtbz2WuYA/ev3YS3X7WS75p8
PGlzTWUCujx0pEHbK2vYfExl3zksZ8ZmLyZ9VB3oSLiWBzJgKAeB7YCFEo8te+eE
P2Z+8c+kX4eOV+2waxZyewA2TipSkhWgStSI4Ow8SyVUcUWA3hCw7mo2duNVi7KO

View File

@@ -1,37 +1,35 @@
## Security Onion 2.1.0.rc2
## Security Onion 2.3.10
Security Onion 2.1.0 RC2 is here!
Security Onion 2.3.10 is here!
### Warnings and Disclaimers
## Screenshots
- If this breaks your system, you get to keep both pieces!
- This is a work in progress and is in constant flux.
- This configuration may change drastically over time leading up to the final release.
- Do NOT run this on a system that you care about!
- Do NOT run this on a system that has data that you care about!
- This script should only be run on a TEST box with TEST data!
- Use of this script may result in nausea, vomiting, or a burning sensation.
Alerts
![Alerts](https://raw.githubusercontent.com/security-onion-solutions/securityonion/master/screenshots/alerts-1.png)
Hunt
![Hunt](https://raw.githubusercontent.com/security-onion-solutions/securityonion/master/screenshots/hunt-1.png)
### Release Notes
https://docs.securityonion.net/en/2.1/release-notes.html
https://docs.securityonion.net/en/2.3/release-notes.html
### Requirements
https://docs.securityonion.net/en/2.1/hardware.html
https://docs.securityonion.net/en/2.3/hardware.html
### Download
https://docs.securityonion.net/en/2.1/download.html
https://docs.securityonion.net/en/2.3/download.html
### Installation
https://docs.securityonion.net/en/2.1/installation.html
https://docs.securityonion.net/en/2.3/installation.html
### FAQ
https://docs.securityonion.net/en/2.1/faq.html
https://docs.securityonion.net/en/2.3/faq.html
### Feedback
https://docs.securityonion.net/en/2.1/community-support.html
https://docs.securityonion.net/en/2.3/community-support.html

View File

@@ -1,16 +1,16 @@
### 2.1.0-rc2 ISO image built on 2020/08/23
### 2.3.10 ISO image built on 2020/11/19
### Download and Verify
2.1.0-rc2 ISO image:
https://download.securityonion.net/file/securityonion/securityonion-2.1.0-rc2.iso
2.3.10 ISO image:
https://download.securityonion.net/file/securityonion/securityonion-2.3.10.iso
MD5: 9EAE772B64F5B3934C0DB7913E38D6D4
SHA1: D0D347AE30564871DE81203C0CE53B950F8732CE
SHA256: 888AC7758C975FAA0A7267E5EFCB082164AC7AC8DCB3B370C06BA0B8493DAC44
MD5: 55E10BAE3D90DF47CA4D5DCCDCB67A96
SHA1: 01361123F35CEACE077803BC8074594D57EE653A
SHA256: 772EA4EFFFF12F026593F5D1CC93DB538CC17B9BA5F60308F1976B6ED7032A8D
Signature for ISO image:
https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.1.0-rc2.iso.sig
https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.10.iso.sig
Signing key:
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS
@@ -24,22 +24,22 @@ wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/ma
Download the signature file for the ISO:
```
wget https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.1.0-rc2.iso.sig
wget https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.10.iso.sig
```
Download the ISO image:
```
wget https://download.securityonion.net/file/securityonion/securityonion-2.1.0-rc2.iso
wget https://download.securityonion.net/file/securityonion/securityonion-2.3.10.iso
```
Verify the downloaded ISO image using the signature file:
```
gpg --verify securityonion-2.1.0-rc2.iso.sig securityonion-2.1.0-rc2.iso
gpg --verify securityonion-2.3.10.iso.sig securityonion-2.3.10.iso
```
The output should show "Good signature" and the Primary key fingerprint should match what's shown below:
```
gpg: Signature made Sun 23 Aug 2020 04:37:00 PM EDT using RSA key ID FE507013
gpg: Signature made Thu 19 Nov 2020 03:38:54 PM EST using RSA key ID FE507013
gpg: Good signature from "Security Onion Solutions, LLC <info@securityonionsolutions.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
@@ -47,4 +47,4 @@ Primary key fingerprint: C804 A93D 36BE 0C73 3EA1 9644 7C10 60B7 FE50 7013
```
Once you've verified the ISO image, you're ready to proceed to our Installation guide:
https://docs.securityonion.net/en/2.1/installation.html
https://docs.securityonion.net/en/2.3/installation.html

View File

@@ -1 +1 @@
2.1.0-rc.2
2.3.10

View File

@@ -0,0 +1,14 @@
[Unit]
Description=The Salt Master Server
Documentation=man:salt-master(1) file:///usr/share/doc/salt/html/contents.html https://docs.saltstack.com/en/latest/contents.html
After=network.target
[Service]
LimitNOFILE=100000
Type=notify
NotifyAccess=all
ExecStart=/usr/bin/salt-master
Restart=always
[Install]
WantedBy=multi-user.target

View File

@@ -5,7 +5,7 @@
{% set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') %}
{% set FREQSERVER = salt['pillar.get']('manager:freq', '0') %}
{% set DOMAINSTATS = salt['pillar.get']('manager:domainstats', '0') %}
{% set ZEEKVER = salt['pillar.get']('global:zeekversion', 'COMMUNITY') %}
{% set ZEEKVER = salt['pillar.get']('global:mdengine', 'COMMUNITY') %}
{% set GRAFANA = salt['pillar.get']('manager:grafana', '0') %}
eval:

View File

@@ -0,0 +1,13 @@
elasticsearch:
templates:
- so/so-beats-template.json.jinja
- so/so-common-template.json
- so/so-firewall-template.json.jinja
- so/so-flow-template.json.jinja
- so/so-ids-template.json.jinja
- so/so-import-template.json.jinja
- so/so-osquery-template.json.jinja
- so/so-ossec-template.json.jinja
- so/so-strelka-template.json.jinja
- so/so-syslog-template.json.jinja
- so/so-zeek-template.json.jinja

View File

@@ -26,6 +26,7 @@ firewall:
- 4200
- 5601
- 6379
- 7788
- 8086
- 8090
- 9001

11
pillar/logrotate/init.sls Normal file
View File

@@ -0,0 +1,11 @@
logrotate:
conf: |
daily
rotate 14
missingok
copytruncate
compress
create
extension .log
dateext
dateyesterday

View File

@@ -1,6 +1,7 @@
base:
'*':
- patch.needs_restarting
- logrotate
'*_eval or *_helix or *_heavynode or *_sensor or *_standalone or *_import':
- match: compound
@@ -13,22 +14,23 @@ base:
- logstash.search
- elasticsearch.search
'*_sensor':
- global
- zeeklogs
- healthcheck.sensor
- minions.{{ grains.id }}
'*_manager or *_managersearch':
- match: compound
- global
- data.*
- secrets
- minions.{{ grains.id }}
'*_manager':
- logstash
- logstash.manager
- elasticsearch.manager
'*_manager or *_managersearch':
- match: compound
- data.*
- secrets
- global
- minions.{{ grains.id }}
'*_sensor':
- zeeklogs
- healthcheck.sensor
- global
- minions.{{ grains.id }}
'*_eval':
- data.*
@@ -56,29 +58,29 @@ base:
- minions.{{ grains.id }}
'*_heavynode':
- global
- zeeklogs
- global
- minions.{{ grains.id }}
'*_helix':
- global
- fireeye
- zeeklogs
- logstash
- logstash.helix
- global
- minions.{{ grains.id }}
'*_fleet':
- global
- data.*
- secrets
- global
- minions.{{ grains.id }}
'*_searchnode':
- global
- logstash
- logstash.search
- elasticsearch.search
- global
- minions.{{ grains.id }}
'*_import':

View File

@@ -52,4 +52,5 @@ zeek:
- frameworks/signatures/detect-windows-shells
redef:
- LogAscii::use_json = T;
- LogAscii::json_timestamps = JSON::TS_ISO8601;
- LogAscii::json_timestamps = JSON::TS_ISO8601;
- CaptureLoss::watch_interval = 5 mins;

View File

@@ -1,42 +0,0 @@
zeeklogs:
enabled:
- conn
- dce_rpc
- dhcp
- dhcpv6
- dnp3
- dns
- dpd
- files
- ftp
- http
- intel
- irc
- kerberos
- modbus
- mqtt
- notice
- ntlm
- openvpn
- pe
- radius
- rfb
- rdp
- signatures
- sip
- smb_files
- smb_mapping
- smtp
- snmp
- software
- ssh
- ssl
- syslog
- telnet
- tunnel
- weird
- mysql
- socks
- x509
disabled:

View File

@@ -2,6 +2,8 @@
import logging
import sys
from time import time
from os.path import getsize
allowed_functions = ['is_enabled', 'zeek']
states_to_apply = []
@@ -85,8 +87,21 @@ def zeek():
else:
zeek_restart = 0
__salt__['telegraf.send']('healthcheck zeek_restart=%i' % zeek_restart)
#__salt__['telegraf.send']('healthcheck zeek_restart=%i' % zeek_restart)
# write out to file in /nsm/zeek/logs/ for telegraf to read for zeek restart
try:
if getsize("/nsm/zeek/logs/zeek_restart.log") >= 1000000:
openmethod = "w"
else:
openmethod = "a"
except FileNotFoundError:
openmethod = "a"
influxtime = int(time() * 1000000000)
with open("/nsm/zeek/logs/zeek_restart.log", openmethod) as f:
f.write('healthcheck zeek_restart=%i %i\n' % (zeek_restart, influxtime))
if calling_func == 'execute' and zeek_restart:
apply_states()

51
salt/_modules/so.py Normal file
View File

@@ -0,0 +1,51 @@
#!py
import logging
def status():
return __salt__['cmd.run']('/usr/sbin/so-status')
def mysql_conn(retry):
log = logging.getLogger(__name__)
from time import sleep
try:
from MySQLdb import _mysql
except ImportError as e:
log.error(e)
return False
mainint = __salt__['pillar.get']('sensor:mainint', __salt__['pillar.get']('manager:mainint'))
mainip = __salt__['grains.get']('ip_interfaces').get(mainint)[0]
mysql_up = False
for i in range(0, retry):
log.debug(f'Connection attempt {i+1}')
try:
db = _mysql.connect(
host=mainip,
user='root',
passwd=__salt__['pillar.get']('secrets:mysql')
)
log.debug(f'Connected to MySQL server on {mainip} after {i} attempts.')
db.query("""SELECT 1;""")
log.debug(f'Successfully completed query against MySQL server on {mainip}')
db.close()
mysql_up = True
break
except _mysql.OperationalError as e:
log.debug(e)
except Exception as e:
log.error('Unexpected error occured.')
log.error(e)
break
sleep(1)
if not mysql_up:
log.error(f'Could not connect to MySQL server on {mainip} after {retry} attempts.')
return mysql_up

View File

@@ -0,0 +1,12 @@
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=2
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

60
salt/airgap/init.sls Normal file
View File

@@ -0,0 +1,60 @@
{% set MANAGER = salt['grains.get']('master') %}
airgapyum:
file.managed:
- name: /etc/yum/yum.conf
- source: salt://airgap/files/yum.conf
airgap_repo:
pkgrepo.managed:
- humanname: Airgap Repo
- baseurl: https://{{ MANAGER }}/repo
- gpgcheck: 0
- sslverify: 0
agbase:
file.absent:
- name: /etc/yum.repos.d/CentOS-Base.repo
agcr:
file.absent:
- name: /etc/yum.repos.d/CentOS-CR.repo
agdebug:
file.absent:
- name: /etc/yum.repos.d/CentOS-Debuginfo.repo
agfasttrack:
file.absent:
- name: /etc/yum.repos.d/CentOS-fasttrack.repo
agmedia:
file.absent:
- name: /etc/yum.repos.d/CentOS-Media.repo
agsources:
file.absent:
- name: /etc/yum.repos.d/CentOS-Sources.repo
agvault:
file.absent:
- name: /etc/yum.repos.d/CentOS-Vault.repo
agkernel:
file.absent:
- name: /etc/yum.repos.d/CentOS-x86_64-kernel.repo
agepel:
file.absent:
- name: /etc/yum.repos.d/epel.repo
agtesting:
file.absent:
- name: /etc/yum.repos.d/epel-testing.repo
agssrepo:
file.absent:
- name: /etc/yum.repos.d/saltstack.repo
agwazrepo:
file.absent:
- name: /etc/yum.repos.d/wazuh.repo

View File

@@ -1,3 +1,8 @@
{% set show_top = salt['state.show_top']() %}
{% set top_states = show_top.values() | join(', ') %}
{% if 'ca' in top_states %}
{% set manager = salt['grains.get']('master') %}
/etc/salt/minion.d/signing_policies.conf:
file.managed:
@@ -51,4 +56,12 @@ cakeyperms:
- replace: False
- name: /etc/pki/ca.key
- mode: 640
- group: 939
- group: 939
{% else %}
ca_state_not_allowed:
test.fail_without_changes:
- name: ca_state_not_allowed
{% endif %}

View File

@@ -0,0 +1,2 @@
#!/bin/bash
logrotate -f /opt/so/conf/log-rotate.conf >/dev/null 2>&1

View File

@@ -0,0 +1,2 @@
#!/bin/bash
/usr/sbin/logrotate -f /opt/so/conf/sensor-rotate.conf > /dev/null 2>&1

View File

@@ -0,0 +1,79 @@
The following GUI tools are available on the analyst workstation:
chromium
url: https://www.chromium.org/Home
To run chromium, click Applications > Internet > Chromium Web Browser
Wireshark
url: https://www.wireshark.org/
To run Wireshark, click Applications > Internet > Wireshark Network Analyzer
NetworkMiner
url: https://www.netresec.com
To run NetworkMiner, click Applications > Internet > NetworkMiner
The following CLI tools are available on the analyst workstation:
bit-twist
url: http://bittwist.sourceforge.net
To run bit-twist, open a terminal and type: bittwist -h
chaosreader
url: http://chaosreader.sourceforge.net
To run chaosreader, open a terminal and type: chaosreader -h
dnsiff
url: https://www.monkey.org/~dugsong/dsniff/
To run dsniff, open a terminal and type: dsniff -h
foremost
url: http://foremost.sourceforge.net
To run foremost, open a terminal and type: foremost -h
hping3
url: http://www.hping.org/hping3.html
To run hping3, open a terminal and type: hping3 -h
netsed
url: http://silicone.homelinux.org/projects/netsed/
To run netsed, open a terminal and type: netsed -h
ngrep
url: https://github.com/jpr5/ngrep
To run ngrep, open a terminal and type: ngrep -h
scapy
url: http://www.secdev.org/projects/scapy/
To run scapy, open a terminal and type: scapy
ssldump
url: http://www.rtfm.com/ssldump/
To run ssldump, open a terminal and type: ssldump -h
sslsplit
url: https://github.com/droe/sslsplit
To run sslsplit, open a terminal and type: sslsplit -h
tcpdump
url: http://www.tcpdump.org
To run tcpdump, open a terminal and type: tcpdump -h
tcpflow
url: https://github.com/simsong/tcpflow
To run tcpflow, open a terminal and type: tcpflow -h
tcpstat
url: https://frenchfries.net/paul/tcpstat/
To run tcpstat, open a terminal and type: tcpstat -h
tcptrace
url: http://www.tcptrace.org
To run tcptrace, open a terminal and type: tcptrace -h
tcpxtract
url: http://tcpxtract.sourceforge.net/
To run tcpxtract, open a terminal and type: tcpxtract -h
whois
url: http://www.linux.it/~md/software/
To run whois, open a terminal and type: whois -h

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 87.86 105.22"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#1976d2;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><g id="Onion"><path id="Flesh" class="cls-1" d="M43.37,71.34a1.27,1.27,0,0,0,.44-.51,4.74,4.74,0,0,0,.61-2.39c-.12-6.79-.22-12.88-4-14.46-4.05-1.72-9.38,3.14-10.71,4.35a19.84,19.84,0,0,0-6.17,12.34c-.1,1-.76,9.34,5.46,15.41s15.45,6.06,21.72,3.53A22.25,22.25,0,0,0,61.88,79.16c5.31-10,1.61-20.31.85-22.3C57.78,44,43.35,36.11,29.88,36.78c-2.17.11-15.82,1-24.16,12.42A30.55,30.55,0,0,0,0,67.36c.15,16.14,13.38,29.51,26.23,34.7,12.61,5.1,24,2.76,28.78,1.65s17.12-4,25.53-15.08a34.47,34.47,0,0,0,7.24-18.46,34.79,34.79,0,0,0-3.42-17.32c-1.11-2.3-6.16-12.09-17-17C57,31.21,48.52,34.37,45.65,29.12a8.46,8.46,0,0,1-.41-6.21,1,1,0,0,0-1.05-1.28l-1.6,0a1.07,1.07,0,0,0-1,.8c-.66,2.51-1.12,6,.51,9.17C46,39.08,56.87,35.31,67.56,42.78c8.29,5.79,14.14,16.69,13.21,27.29a28.06,28.06,0,0,1-6,14.65c-7,9-17,11.29-21.82,12.38-4,.9-13.19,2.87-23.54-.93-2.65-1-20.33-8.29-22.38-25C5.72,60.55,13,48.9,24.21,44.93c13-4.6,27.26,2.75,32.09,13.26.58,1.25,4.85,10.93-.59,18.72-4.05,5.79-13.07,9.94-19.77,6A13.48,13.48,0,0,1,30,68.25c1.42-5,6.37-8.72,8.13-7.84s2.94,6.14,3,9.85A1.39,1.39,0,0,0,43.37,71.34Z"/><path id="Stem" class="cls-2" d="M30,27.14l-4.17,1.27a1.16,1.16,0,0,1-1.49-.93l-.11-.72a26.93,26.93,0,0,0-4.53-11.09A1.13,1.13,0,0,1,20.06,14l1.06-.63a1.15,1.15,0,0,1,1.52.32c.41.58.82,1.17,1.23,1.78l1.48,2.2C28.42,7.27,37.14.12,46.21,0,58.09-.16,65.59,10.67,68,17.63a23.37,23.37,0,0,1,.94,3.64.91.91,0,0,1-1.14,1l-2.66-.73a1.47,1.47,0,0,1-1-1.08,19.71,19.71,0,0,0-1.9-4.8c-3-5.44-9.67-11.21-16.55-10.59-7.74.7-15.22,9.46-14.85,20.91A1.14,1.14,0,0,1,30,27.14Z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 87.86 105.22"><defs><style>.cls-1{fill:#1976d2;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><g id="Onion"><path id="Flesh" d="M43.37,71.34a1.27,1.27,0,0,0,.44-.51,4.74,4.74,0,0,0,.61-2.39c-.12-6.79-.22-12.88-4-14.46-4.05-1.72-9.38,3.14-10.71,4.35a19.84,19.84,0,0,0-6.17,12.34c-.1,1-.76,9.34,5.46,15.41s15.45,6.06,21.72,3.53A22.25,22.25,0,0,0,61.88,79.16c5.31-10,1.61-20.31.85-22.3C57.78,44,43.35,36.11,29.88,36.78c-2.17.11-15.82,1-24.16,12.42A30.55,30.55,0,0,0,0,67.36c.15,16.14,13.38,29.51,26.23,34.7,12.61,5.1,24,2.76,28.78,1.65s17.12-4,25.53-15.08a34.47,34.47,0,0,0,7.24-18.46,34.79,34.79,0,0,0-3.42-17.32c-1.11-2.3-6.16-12.09-17-17C57,31.21,48.52,34.37,45.65,29.12a8.46,8.46,0,0,1-.41-6.21,1,1,0,0,0-1.05-1.28l-1.6,0a1.07,1.07,0,0,0-1,.8c-.66,2.51-1.12,6,.51,9.17C46,39.08,56.87,35.31,67.56,42.78c8.29,5.79,14.14,16.69,13.21,27.29a28.06,28.06,0,0,1-6,14.65c-7,9-17,11.29-21.82,12.38-4,.9-13.19,2.87-23.54-.93-2.65-1-20.33-8.29-22.38-25C5.72,60.55,13,48.9,24.21,44.93c13-4.6,27.26,2.75,32.09,13.26.58,1.25,4.85,10.93-.59,18.72-4.05,5.79-13.07,9.94-19.77,6A13.48,13.48,0,0,1,30,68.25c1.42-5,6.37-8.72,8.13-7.84s2.94,6.14,3,9.85A1.39,1.39,0,0,0,43.37,71.34Z"/><path id="Stem" class="cls-1" d="M30,27.14l-4.17,1.27a1.16,1.16,0,0,1-1.49-.93l-.11-.72a26.93,26.93,0,0,0-4.53-11.09A1.13,1.13,0,0,1,20.06,14l1.06-.63a1.15,1.15,0,0,1,1.52.32c.41.58.82,1.17,1.23,1.78l1.48,2.2C28.42,7.27,37.14.12,46.21,0,58.09-.16,65.59,10.67,68,17.63a23.37,23.37,0,0,1,.94,3.64.91.91,0,0,1-1.14,1l-2.66-.73a1.47,1.47,0,0,1-1-1.08,19.71,19.71,0,0,0-1.9-4.8c-3-5.44-9.67-11.21-16.55-10.59-7.74.7-15.22,9.46-14.85,20.91A1.14,1.14,0,0,1,30,27.14Z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

View File

@@ -0,0 +1,24 @@
{%- set logrotate_conf = salt['pillar.get']('logrotate:conf') %}
/opt/so/log/aptcacher-ng/*.log
/opt/so/log/idstools/*.log
/opt/so/log/nginx/*.log
/opt/so/log/soc/*.log
/opt/so/log/kratos/*.log
/opt/so/log/kibana/*.log
/opt/so/log/influxdb/*.log
/opt/so/log/elastalert/*.log
/opt/so/log/soctopus/*.log
/opt/so/log/curator/*.log
/opt/so/log/fleet/*.log
/opt/so/log/suricata/*.log
/opt/so/log/mysql/*.log
/opt/so/log/playbook/*.log
/opt/so/log/logstash/*.log
/opt/so/log/filebeat/*.log
/opt/so/log/telegraf/*.log
/opt/so/log/redis/*.log
/opt/so/log/salt/so-salt-minion-check
{
{{ logrotate_conf | indent(width=4) }}
}

View File

@@ -0,0 +1,10 @@
/opt/so/log/sensor_clean.log
{
daily
rotate 2
missingok
nocompress
create
sharedscripts
endscript
}

View File

@@ -1,3 +1,8 @@
{% set show_top = salt['state.show_top']() %}
{% set top_states = show_top.values() | join(', ') %}
{% if 'common' in top_states %}
{% set role = grains.id.split('_') | last %}
# Remove variables.txt from /tmp - This is temp
@@ -27,6 +32,18 @@ soconfperms:
- gid: 939
- dir_mode: 770
sostatusconf:
file.directory:
- name: /opt/so/conf/so-status
- uid: 939
- gid: 939
- dir_mode: 770
so-status.conf:
file.touch:
- name: /opt/so/conf/so-status/so-status.conf
- unless: ls /opt/so/conf/so-status/so-status.conf
sosaltstackperms:
file.directory:
- name: /opt/so/saltstack
@@ -51,6 +68,12 @@ salttmp:
# Install epel
{% if grains['os'] == 'CentOS' %}
repair_yumdb:
cmd.run:
- name: 'mv -f /var/lib/rpm/__db* /tmp && yum clean all'
- onlyif:
- 'yum check-update 2>&1 | grep "Error: rpmdb open failed"'
epel:
pkg.installed:
- skip_suggestions: True
@@ -88,7 +111,7 @@ heldpackages:
pkg.installed:
- pkgs:
- containerd.io: 1.2.13-2
- docker-ce: 5:19.03.9~3-0~ubuntu-bionic
- docker-ce: 5:19.03.12~3-0~ubuntu-bionic
- hold: True
- update_holds: True
@@ -124,7 +147,7 @@ heldpackages:
pkg.installed:
- pkgs:
- containerd.io: 1.2.13-3.2.el7
- docker-ce: 3:19.03.11-3.el7
- docker-ce: 3:19.03.12-3.el7
- hold: True
- update_holds: True
{% endif %}
@@ -147,8 +170,8 @@ Etc/UTC:
utilsyncscripts:
file.recurse:
- name: /usr/sbin
- user: 0
- group: 0
- user: root
- group: root
- file_mode: 755
- template: jinja
- source: salt://common/tools/sbin
@@ -163,4 +186,73 @@ utilsyncscripts:
- daymonth: '*'
- month: '*'
- dayweek: '*'
sensorrotatescript:
file.managed:
- name: /usr/local/bin/sensor-rotate
- source: salt://common/cron/sensor-rotate
- mode: 755
sensorrotateconf:
file.managed:
- name: /opt/so/conf/sensor-rotate.conf
- source: salt://common/files/sensor-rotate.conf
- mode: 644
/usr/local/bin/sensor-rotate:
cron.present:
- user: root
- minute: '1'
- hour: '0'
- daymonth: '*'
- month: '*'
- dayweek: '*'
{% endif %}
commonlogrotatescript:
file.managed:
- name: /usr/local/bin/common-rotate
- source: salt://common/cron/common-rotate
- mode: 755
commonlogrotateconf:
file.managed:
- name: /opt/so/conf/log-rotate.conf
- source: salt://common/files/log-rotate.conf
- template: jinja
- mode: 644
/usr/local/bin/common-rotate:
cron.present:
- user: root
- minute: '1'
- hour: '0'
- daymonth: '*'
- month: '*'
- dayweek: '*'
{% if role in ['eval', 'manager', 'managersearch', 'standalone'] %}
# Add config backup
/usr/sbin/so-config-backup > /dev/null 2>&1:
cron.present:
- user: root
- minute: '1'
- hour: '0'
- daymonth: '*'
- month: '*'
- dayweek: '*'
{% endif %}
# Make sure Docker is always running
docker:
service.running:
- enable: True
{% else %}
common_state_not_allowed:
test.fail_without_changes:
- name: common_state_not_allowed
{% endif %}

View File

@@ -1,5 +0,0 @@
{% set docker = {
'containers': [
'so-domainstats'
]
} %}

View File

@@ -1,20 +0,0 @@
{% set docker = {
'containers': [
'so-filebeat',
'so-nginx',
'so-telegraf',
'so-dockerregistry',
'so-soc',
'so-kratos',
'so-idstools',
'so-elasticsearch',
'so-kibana',
'so-steno',
'so-suricata',
'so-zeek',
'so-curator',
'so-elastalert',
'so-soctopus',
'so-sensoroni'
]
} %}

View File

@@ -1,10 +0,0 @@
{% set docker = {
'containers': [
'so-mysql',
'so-fleet',
'so-redis',
'so-filebeat',
'so-nginx',
'so-telegraf'
]
} %}

View File

@@ -1,7 +0,0 @@
{% set docker = {
'containers': [
'so-mysql',
'so-fleet',
'so-redis'
]
} %}

View File

@@ -1,5 +0,0 @@
{% set docker = {
'containers': [
'so-freqserver'
]
} %}

View File

@@ -1,6 +0,0 @@
{% set docker = {
'containers': [
'so-influxdb',
'so-grafana'
]
} %}

View File

@@ -1,15 +0,0 @@
{% set docker = {
'containers': [
'so-nginx',
'so-telegraf',
'so-redis',
'so-logstash',
'so-elasticsearch',
'so-curator',
'so-steno',
'so-suricata',
'so-wazuh',
'so-filebeat',
'so-sensoroni'
]
} %}

View File

@@ -1,12 +0,0 @@
{% set docker = {
'containers': [
'so-nginx',
'so-telegraf',
'so-idstools',
'so-steno',
'so-zeek',
'so-redis',
'so-logstash',
'so-filebeat
]
} %}

View File

@@ -1,9 +0,0 @@
{% set docker = {
'containers': [
'so-nginx',
'so-telegraf',
'so-logstash',
'so-elasticsearch',
'so-curator',
]
} %}

View File

@@ -1,10 +0,0 @@
{% set docker = {
'containers': [
'so-filebeat',
'so-nginx',
'so-soc',
'so-kratos',
'so-elasticsearch',
'so-kibana'
]
} %}

View File

@@ -1,18 +0,0 @@
{% set docker = {
'containers': [
'so-dockerregistry',
'so-nginx',
'so-telegraf',
'so-soc',
'so-kratos',
'so-aptcacherng',
'so-idstools',
'so-redis',
'so-elasticsearch',
'so-logstash',
'so-kibana',
'so-elastalert',
'so-filebeat',
'so-soctopus'
]
} %}

View File

@@ -1,18 +0,0 @@
{% set docker = {
'containers': [
'so-nginx',
'so-telegraf',
'so-soc',
'so-kratos',
'so-aptcacherng',
'so-idstools',
'so-redis',
'so-logstash',
'so-elasticsearch',
'so-curator',
'so-kibana',
'so-elastalert',
'so-filebeat',
'so-soctopus'
]
} %}

View File

@@ -1,5 +0,0 @@
{% set docker = {
'containers': [
'so-playbook'
]
} %}

View File

@@ -1,10 +0,0 @@
{% set docker = {
'containers': [
'so-nginx',
'so-telegraf',
'so-logstash',
'so-elasticsearch',
'so-curator',
'so-filebeat'
]
} %}

View File

@@ -1,9 +0,0 @@
{% set docker = {
'containers': [
'so-telegraf',
'so-steno',
'so-suricata',
'so-filebeat',
'so-sensoroni'
]
} %}

View File

@@ -1,45 +0,0 @@
{% set role = grains.id.split('_') | last %}
{% from 'common/maps/'~ role ~'.map.jinja' import docker with context %}
# Check if the service is enabled and append it's required containers
# to the list predefined by the role / minion id affix
{% macro append_containers(pillar_name, k, compare )%}
{% if salt['pillar.get'](pillar_name~':'~k, {}) != compare %}
{% from 'common/maps/'~k~'.map.jinja' import docker as d with context %}
{% for li in d['containers'] %}
{{ docker['containers'].append(li) }}
{% endfor %}
{% endif %}
{% endmacro %}
{% set docker = salt['grains.filter_by']({
'*_'~role: {
'containers': docker['containers']
}
},grain='id', merge=salt['pillar.get']('docker')) %}
{% if role in ['eval', 'managersearch', 'manager', 'standalone'] %}
{{ append_containers('manager', 'grafana', 0) }}
{{ append_containers('global', 'fleet_manager', 0) }}
{{ append_containers('manager', 'wazuh', 0) }}
{{ append_containers('manager', 'thehive', 0) }}
{{ append_containers('manager', 'playbook', 0) }}
{{ append_containers('manager', 'freq', 0) }}
{{ append_containers('manager', 'domainstats', 0) }}
{% endif %}
{% if role in ['eval', 'heavynode', 'sensor', 'standalone'] %}
{{ append_containers('global', 'strelka', 0) }}
{% endif %}
{% if role in ['heavynode', 'standalone'] %}
{{ append_containers('global', 'zeekversion', 'SURICATA') }}
{% endif %}
{% if role == 'searchnode' %}
{{ append_containers('manager', 'wazuh', 0) }}
{% endif %}
{% if role == 'sensor' %}
{{ append_containers('global', 'zeekversion', 'SURICATA') }}
{% endif %}

View File

@@ -1,22 +0,0 @@
{% set docker = {
'containers': [
'so-nginx',
'so-telegraf',
'so-soc',
'so-kratos',
'so-aptcacherng',
'so-idstools',
'so-redis',
'so-logstash',
'so-elasticsearch',
'so-curator',
'so-kibana',
'so-elastalert',
'so-filebeat',
'so-suricata',
'so-steno',
'so-dockerregistry',
'so-soctopus',
'so-sensoroni'
]
} %}

View File

@@ -1,9 +0,0 @@
{% set docker = {
'containers': [
'so-strelka-coordinator',
'so-strelka-gatekeeper',
'so-strelka-manager',
'so-strelka-frontend',
'so-strelka-filestream'
]
} %}

View File

@@ -1,7 +0,0 @@
{% set docker = {
'containers': [
'so-thehive',
'so-thehive-es',
'so-cortex'
]
} %}

View File

@@ -1,7 +0,0 @@
{% set docker = {
'containers': [
'so-nginx',
'so-telegraf',
'so-elasticsearch'
]
} %}

View File

@@ -1,5 +0,0 @@
{% set docker = {
'containers': [
'so-wazuh'
]
} %}

View File

@@ -1,5 +0,0 @@
{% set docker = {
'containers': [
'so-zeek'
]
} %}

View File

@@ -1,8 +0,0 @@
#!/bin/bash
if [ ! -f /opt/so/state/dockernet.state ]; then
docker network create -d bridge so-elastic-net
touch /opt/so/state/dockernet.state
else
exit
fi

View File

@@ -0,0 +1,23 @@
#!/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/>.
. /usr/sbin/so-common
echo ""
echo "Hosts/Networks that have access to login to the Security Onion Console:"
so-firewall includedhosts analyst

View File

@@ -0,0 +1,309 @@
#!/bin/bash
# Copyright 2014-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/>.
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run using sudo!"
exit 1
fi
INSTALL_LOG=/root/so-analyst-install.log
exec &> >(tee -a "$INSTALL_LOG")
log() {
msg=$1
level=${2:-I}
now=$(TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ")
echo -e "$now | $level | $msg" >> "$INSTALL_LOG" 2>&1
}
error() {
log "$1" "E"
}
info() {
log "$1" "I"
}
title() {
echo -e "\n-----------------------------\n $1\n-----------------------------\n" >> "$INSTALL_LOG" 2>&1
}
logCmd() {
cmd=$1
info "Executing command: $cmd"
$cmd >> "$INSTALL_LOG" 2>&1
}
analyze_system() {
title "System Characteristics"
logCmd "uptime"
logCmd "uname -a"
logCmd "free -h"
logCmd "lscpu"
logCmd "df -h"
logCmd "ip a"
}
analyze_system
OS=$(grep PRETTY_NAME /etc/os-release | grep 'CentOS Linux 7')
if [ $? -ne 0 ]; then
echo "This is an unsupported OS. Please use CentOS 7 to install the analyst node."
exit 1
fi
if [[ "$manufacturer" == "Security Onion Solutions" && "$family" == "Automated" ]]; then
INSTALL=yes
CURLCONTINUE=no
else
INSTALL=''
CURLCONTINUE=''
fi
FIRSTPASS=yes
while [[ $INSTALL != "yes" ]] && [[ $INSTALL != "no" ]]; do
if [[ "$FIRSTPASS" == "yes" ]]; then
clear
echo "###########################################"
echo "## ** W A R N I N G ** ##"
echo "## _______________________________ ##"
echo "## ##"
echo "## Installing the Security Onion ##"
echo "## analyst node on this device will ##"
echo "## make permanenet changes to ##"
echo "## the system. ##"
echo "## ##"
echo "###########################################"
echo "Do you wish to continue? (Type the entire word 'yes' to proceed or 'no' to exit)"
FIRSTPASS=no
else
echo "Please type 'yes' to continue or 'no' to exit."
fi
read INSTALL
done
if [[ $INSTALL == "no" ]]; then
echo "Exiting analyst node installation."
exit 0
fi
echo "Testing for internet connection with curl https://securityonionsolutions.com/"
CANCURL=$(curl -sI https://securityonionsolutions.com/ | grep "200 OK")
if [ $? -ne 0 ]; then
FIRSTPASS=yes
while [[ $CURLCONTINUE != "yes" ]] && [[ $CURLCONTINUE != "no" ]]; do
if [[ "$FIRSTPASS" == "yes" ]]; then
echo "We could not access https://securityonionsolutions.com/."
echo "Since packages are downloaded from the internet, internet acceess is required."
echo "If you would like to ignore this warning and continue anyway, please type 'yes'."
echo "Otherwise, type 'no' to exit."
FIRSTPASS=no
else
echo "Please type 'yes' to continue or 'no' to exit."
fi
read CURLCONTINUE
done
if [[ "$CURLCONTINUE" == "no" ]]; then
echo "Exiting analyst node installation."
exit 0
fi
else
echo "We were able to curl https://securityonionsolutions.com/."
sleep 3
fi
# Install a GUI text editor
yum -y install gedit
# Install misc utils
yum -y install wget curl unzip epel-release yum-plugin-versionlock;
# Install xWindows
yum -y groupinstall "X Window System";
yum -y install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts;
unlink /etc/systemd/system/default.target;
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target;
yum -y install file-roller
# Install Mono - prereq for NetworkMiner
yum -y install mono-core mono-basic mono-winforms expect
# Install NetworkMiner
yum -y install libcanberra-gtk2;
wget https://www.netresec.com/?download=NetworkMiner -O /tmp/nm.zip;
mkdir -p /opt/networkminer/
unzip /tmp/nm.zip -d /opt/networkminer/;
rm /tmp/nm.zip;
mv /opt/networkminer/NetworkMiner_*/* /opt/networkminer/
chmod +x /opt/networkminer/NetworkMiner.exe;
chmod -R go+w /opt/networkminer/AssembledFiles/;
chmod -R go+w /opt/networkminer/Captures/;
# Create networkminer shim
cat << EOF >> /bin/networkminer
#!/bin/bash
/bin/mono /opt/networkminer/NetworkMiner.exe --noupdatecheck "\$@"
EOF
chmod +x /bin/networkminer
# Convert networkminer ico file to png format
yum -y install ImageMagick
convert /opt/networkminer/networkminericon.ico /opt/networkminer/networkminericon.png
# Create menu entry
cat << EOF >> /usr/share/applications/networkminer.desktop
[Desktop Entry]
Name=NetworkMiner
Comment=NetworkMiner
Encoding=UTF-8
Exec=/bin/networkminer %f
Icon=/opt/networkminer/networkminericon-4.png
StartupNotify=true
Terminal=false
X-MultipleArgs=false
Type=Application
MimeType=application/x-pcap;
Categories=Network;
EOF
# Set default monospace font to Liberation
cat << EOF >> /etc/fonts/local.conf
<match target="pattern">
<test name="family" qual="any">
<string>monospace</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>Liberation Mono</string>
</edit>
</match>
EOF
# Install Wireshark for Gnome
yum -y install wireshark-gnome;
# Install dnsiff
yum -y install dsniff;
# Install hping3
yum -y install hping3;
# Install netsed
yum -y install netsed;
# Install ngrep
yum -y install ngrep;
# Install scapy
yum -y install python36-scapy;
# Install ssldump
yum -y install ssldump;
# Install tcpdump
yum -y install tcpdump;
# Install tcpflow
yum -y install tcpflow;
# Install tcpxtract
yum -y install tcpxtract;
# Install whois
yum -y install whois;
# Install foremost
yum -y install https://forensics.cert.org/centos/cert/7/x86_64//foremost-1.5.7-13.1.el7.x86_64.rpm;
# Install chromium
yum -y install chromium;
# Install tcpstat
yum -y install https://github.com/Security-Onion-Solutions/securityonion-docker-rpm/releases/download/securityonion-tcpstat-1.5.0/securityonion-tcpstat-1.5.0.rpm;
# Install tcptrace
yum -y install https://github.com/Security-Onion-Solutions/securityonion-docker-rpm/releases/download/securityonion-tcptrace-6.6.7/securityonion-tcptrace-6.6.7.rpm;
# Install sslsplit
yum -y install libevent;
yum -y install sslsplit;
# Install Bit-Twist
yum -y install https://github.com/Security-Onion-Solutions/securityonion-docker-rpm/releases/download/securityonion-bittwist-2.0.0/securityonion-bittwist-2.0.0.rpm;
# Install chaosreader
yum -y install perl-IO-Compress perl-Net-DNS;
yum -y install https://github.com/Security-Onion-Solutions/securityonion-docker-rpm/releases/download/securityonion-chaosreader-0.95.10/securityonion-chaosreader-0.95.10.rpm;
chmod +x /bin/chaosreader;
if [ -f ../../files/analyst/README ]; then
cp ../../files/analyst/README /;
cp ../../files/analyst/so-wallpaper.jpg /usr/share/backgrounds/;
cp ../../files/analyst/so-lockscreen.jpg /usr/share/backgrounds/;
cp ../../files/analyst/so-login-logo-dark.svg /usr/share/pixmaps/;
else
cp /opt/so/saltstack/default/salt/common/files/analyst/README /;
cp /opt/so/saltstack/default/salt/common/files/analyst/so-wallpaper.jpg /usr/share/backgrounds/;
cp /opt/so/saltstack/default/salt/common/files/analyst/so-lockscreen.jpg /usr/share/backgrounds/;
cp /opt/so/saltstack/default/salt/common/files/analyst/so-login-logo-dark.svg /usr/share/pixmaps/;
fi
# Set background wallpaper
cat << EOF >> /etc/dconf/db/local.d/00-background
# Specify the dconf path
[org/gnome/desktop/background]
# Specify the path to the desktop background image file
picture-uri='file:///usr/share/backgrounds/so-wallpaper.jpg'
# Specify one of the rendering options for the background image:
# 'none', 'wallpaper', 'centered', 'scaled', 'stretched', 'zoom', 'spanned'
picture-options='zoom'
# Specify the left or top color when drawing gradients or the solid color
primary-color='000000'
# Specify the right or bottom color when drawing gradients
secondary-color='FFFFFF'
EOF
# Set lock screen
cat << EOF >> /etc/dconf/db/local.d/00-screensaver
[org/gnome/desktop/session]
idle-delay=uint32 180
[org/gnome/desktop/screensaver]
lock-enabled=true
lock-delay=uint32 120
picture-options='zoom'
picture-uri='file:///usr/share/backgrounds/so-lockscreen.jpg'
EOF
cat << EOF >> /etc/dconf/db/local.d/locks/screensaver
/org/gnome/desktop/session/idle-delay
/org/gnome/desktop/screensaver/lock-enabled
/org/gnome/desktop/screensaver/lock-delay
EOF
# Do not show the user list at login screen
cat << EOF >> /etc/dconf/db/local.d/00-login-screen
[org/gnome/login-screen]
logo='/usr/share/pixmaps/so-login-logo-dark.svg'
disable-user-list=true
EOF
dconf update;
echo
echo "Analyst workstation has been installed!"
echo "Press ENTER to reboot or Ctrl-C to cancel."
read pause
reboot;

View File

@@ -15,18 +15,123 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
IMAGEREPO=securityonion
# Check for prerequisites
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run using sudo!"
exit 1
echo "This script must be run using sudo!"
exit 1
fi
# Define a banner to separate sections
banner="========================================================================="
header() {
echo
printf '%s\n' "$banner" "$*" "$banner"
echo
printf '%s\n' "$banner" "$*" "$banner"
}
lookup_salt_value() {
key=$1
group=$2
kind=$3
if [ -z "$kind" ]; then
kind=pillar
fi
if [ -n "$group" ]; then
group=${group}:
fi
salt-call --no-color ${kind}.get ${group}${key} --out=newline_values_only
}
lookup_pillar() {
key=$1
pillar=$2
if [ -z "$pillar" ]; then
pillar=global
fi
lookup_salt_value "$key" "$pillar" "pillar"
}
lookup_pillar_secret() {
lookup_pillar "$1" "secrets"
}
lookup_grain() {
lookup_salt_value "$1" "" "grains"
}
lookup_role() {
id=$(lookup_grain id)
pieces=($(echo $id | tr '_' ' '))
echo ${pieces[1]}
}
check_container() {
docker ps | grep "$1:" > /dev/null 2>&1
return $?
}
check_password() {
local password=$1
echo "$password" | egrep -v "'|\"|\\$|\\\\" > /dev/null 2>&1
return $?
}
set_os() {
if [ -f /etc/redhat-release ]; then
OS=centos
else
OS=ubuntu
fi
}
set_minionid() {
MINIONID=$(lookup_grain id)
}
set_version() {
CURRENTVERSION=0.0.0
if [ -f /etc/soversion ]; then
CURRENTVERSION=$(cat /etc/soversion)
fi
if [ -z "$VERSION" ]; then
if [ -z "$NEWVERSION" ]; then
if [ "$CURRENTVERSION" == "0.0.0" ]; then
echo "ERROR: Unable to detect Security Onion version; terminating script."
exit 1
else
VERSION=$CURRENTVERSION
fi
else
VERSION="$NEWVERSION"
fi
fi
}
require_manager() {
# Check to see if this is a manager
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."
else
echo "Please run this command on the manager; the manager controls the grid."
exit 1
fi
}
is_single_node_grid() {
role=$(lookup_role)
if [ "$role" != "eval" ] && [ "$role" != "standalone" ] && [ "$role" != "import" ]; then
return 1
fi
return 0
}
fail() {
msg=$1
echo "ERROR: $msg"
echo "Exiting."
exit 1
}

View File

@@ -0,0 +1,44 @@
#!/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/>.. /usr/sbin/so-common
{% set BACKUPLOCATIONS = salt['pillar.get']('backup:locations', {}) %}
TODAY=$(date '+%Y_%m_%d')
BACKUPFILE="/nsm/backup/so-config-backup-$TODAY.tar"
MAXBACKUPS=7
# Create backup dir if it does not exist
mkdir -p /nsm/backup
# If we haven't already written a backup file for today, let's do so
if [ ! -f $BACKUPFILE ]; then
# Create empty backup file
tar -cf $BACKUPFILE -T /dev/null
# Loop through all paths defined in global.sls, and append them to backup file
{%- for LOCATION in BACKUPLOCATIONS %}
tar -rf $BACKUPFILE {{ LOCATION }}
{%- endfor %}
fi
# Find oldest backup file and remove it
NUMBACKUPS=$(find /nsm/backup/ -type f -name "so-config-backup*" | wc -l)
OLDESTBACKUP=$(find /nsm/backup/ -type f -name "so-config-backup*" | ls -1t | tail -1)
if [ "$NUMBACKUPS" -gt "$MAXBACKUPS" ]; then
rm -f /nsm/backup/$OLDESTBACKUP
fi

View File

@@ -0,0 +1,54 @@
#!/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/>.
. /usr/sbin/so-common
usage() {
echo "Usage: $0 <new-user-name>"
echo ""
echo "Adds a new user to Cortex. The new password will be read from STDIN."
exit 1
}
if [ $# -ne 1 ]; then
usage
fi
USER=$1
CORTEX_KEY=$(lookup_pillar cortexkey)
CORTEX_API_URL="$(lookup_pillar url_base)/cortex/api"
CORTEX_ORG_NAME=$(lookup_pillar cortexorgname)
CORTEX_USER=$USER
# Read password for new user from stdin
test -t 0
if [[ $? == 0 ]]; then
echo "Enter new password:"
fi
read -rs CORTEX_PASS
# Create new user in Cortex
resp=$(curl -sk -XPOST -H "Authorization: Bearer $CORTEX_KEY" -H "Content-Type: application/json" -L "https://$CORTEX_API_URL/user" -d "{\"name\": \"$CORTEX_USER\",\"roles\": [\"read\",\"analyze\",\"orgadmin\"],\"organization\": \"$CORTEX_ORG_NAME\",\"login\": \"$CORTEX_USER\",\"password\" : \"$CORTEX_PASS\" }")
if [[ "$resp" =~ \"status\":\"Ok\" ]]; then
echo "Successfully added user to Cortex."
else
echo "Unable to add user to Cortex; user might already exist."
echo $resp
exit 2
fi

View File

@@ -0,0 +1,57 @@
#!/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/>.
. /usr/sbin/so-common
usage() {
echo "Usage: $0 <user-name> <true|false>"
echo ""
echo "Enables or disables a user in Cortex."
exit 1
}
if [ $# -ne 2 ]; then
usage
fi
USER=$1
CORTEX_KEY=$(lookup_pillar cortexkey)
CORTEX_API_URL="$(lookup_pillar url_base)/cortex/api"
CORTEX_USER=$USER
case "${2^^}" in
FALSE | NO | 0)
CORTEX_STATUS=Locked
;;
TRUE | YES | 1)
CORTEX_STATUS=Ok
;;
*)
usage
;;
esac
resp=$(curl -sk -XPATCH -H "Authorization: Bearer $CORTEX_KEY" -H "Content-Type: application/json" -L "https://$CORTEX_API_URL/user/${CORTEX_USER}" -d "{\"status\":\"${CORTEX_STATUS}\" }")
if [[ "$resp" =~ \"status\":\"Locked\" || "$resp" =~ \"status\":\"Ok\" ]]; then
echo "Successfully updated user in Cortex."
else
echo "Failed to update user in Cortex."
echo $resp
exit 2
fi

View File

@@ -16,96 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. /usr/sbin/so-common
. /usr/sbin/so-image-common
manager_check() {
# Check to see if this is a manager
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' ]; then
echo "This is a manager. We can proceed"
else
echo "Please run soup on the manager. The manager controls all updates."
exit 1
fi
}
update_docker_containers() {
# Download the containers from the interwebs
for i in "${TRUSTED_CONTAINERS[@]}"
do
# Pull down the trusted docker image
echo "Downloading $i"
docker pull --disable-content-trust=false docker.io/$IMAGEREPO/$i
# Tag it with the new registry destination
docker tag $IMAGEREPO/$i $HOSTNAME:5000/$IMAGEREPO/$i
docker push $HOSTNAME:5000/$IMAGEREPO/$i
done
}
version_check() {
if [ -f /etc/soversion ]; then
VERSION=$(cat /etc/soversion)
else
echo "Unable to detect version. I will now terminate."
exit 1
fi
}
manager_check
version_check
# Use the hostname
HOSTNAME=$(hostname)
# List all the containers
if [ $MANAGERCHECK != 'so-helix' ]; then
TRUSTED_CONTAINERS=( \
"so-acng:$VERSION" \
"so-thehive-cortex:$VERSION" \
"so-curator:$VERSION" \
"so-domainstats:$VERSION" \
"so-elastalert:$VERSION" \
"so-elasticsearch:$VERSION" \
"so-filebeat:$VERSION" \
"so-fleet:$VERSION" \
"so-fleet-launcher:$VERSION" \
"so-freqserver:$VERSION" \
"so-grafana:$VERSION" \
"so-idstools:$VERSION" \
"so-influxdb:$VERSION" \
"so-kibana:$VERSION" \
"so-kratos:$VERSION" \
"so-logstash:$VERSION" \
"so-minio:$VERSION" \
"so-mysql:$VERSION" \
"so-nginx:$VERSION" \
"so-pcaptools:$VERSION" \
"so-playbook:$VERSION" \
"so-redis:$VERSION" \
"so-soc:$VERSION" \
"so-soctopus:$VERSION" \
"so-steno:$VERSION" \
"so-strelka-frontend:$VERSION" \
"so-strelka-manager:$VERSION" \
"so-strelka-backend:$VERSION" \
"so-strelka-filestream:$VERSION" \
"so-suricata:$VERSION" \
"so-telegraf:$VERSION" \
"so-thehive:$VERSION" \
"so-thehive-es:$VERSION" \
"so-wazuh:$VERSION" \
"so-zeek:$VERSION" )
else
TRUSTED_CONTAINERS=( \
"so-filebeat:$VERSION" \
"so-idstools:$VERSION" \
"so-logstash:$VERSION" \
"so-nginx:$VERSION" \
"so-redis:$VERSION" \
"so-steno:$VERSION" \
"so-suricata:$VERSION" \
"so-telegraf:$VERSION" \
"so-zeek:$VERSION" )
fi
update_docker_containers
require_manager
update_docker_containers "refresh"

View File

@@ -136,7 +136,4 @@ else
echo "Something went wrong..."
fi
echo
echo

View File

@@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{%- set MANAGERIP = salt['pillar.get']('global:managerip', '') -%}
{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
. /usr/sbin/so-common
SKIP=0
@@ -50,7 +50,11 @@ done
if [ $SKIP -ne 1 ]; then
# List indices
echo
curl {{ MANAGERIP }}:9200/_cat/indices?v
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -k -L https://{{ NODEIP }}:9200/_cat/indices?v
{% else %}
curl -L {{ NODEIP }}:9200/_cat/indices?v
{% endif %}
echo
# Inform user we are about to delete all data
echo
@@ -89,10 +93,18 @@ fi
# Delete data
echo "Deleting data..."
INDXS=$(curl -s -XGET {{ MANAGERIP }}:9200/_cat/indices?v | egrep 'logstash|elastalert|so-' | awk '{ print $3 }')
{% if grains['role'] in ['so-node','so-heavynode'] %}
INDXS=$(curl -s -XGET -k -L https://{{ NODEIP }}:9200/_cat/indices?v | egrep 'logstash|elastalert|so-' | awk '{ print $3 }')
{% else %}
INDXS=$(curl -s -XGET -L {{ NODEIP }}:9200/_cat/indices?v | egrep 'logstash|elastalert|so-' | awk '{ print $3 }')
{% endif %}
for INDX in ${INDXS}
do
curl -XDELETE "{{ MANAGERIP }}:9200/${INDX}" > /dev/null 2>&1
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -XDELETE -k -L https://"{{ NODEIP }}:9200/${INDX}" > /dev/null 2>&1
{% else %}
curl -XDELETE -L "{{ NODEIP }}:9200/${INDX}" > /dev/null 2>&1
{% endif %}
done
#Start Logstash/Filebeat

View File

@@ -22,5 +22,5 @@ THEHIVEESPORT=9400
echo "Removing read only attributes for indices..."
echo
for p in $ESPORT $THEHIVEESPORT; do
curl -XPUT -H "Content-Type: application/json" http://$IP:$p/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}' 2>&1 | if grep -q ack; then echo "Index settings updated..."; else echo "There was any issue updating the read-only attribute. Please ensure Elasticsearch is running.";fi;
curl -XPUT -H "Content-Type: application/json" -L http://$IP:$p/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}' 2>&1 | if grep -q ack; then echo "Index settings updated..."; else echo "There was any issue updating the read-only attribute. Please ensure Elasticsearch is running.";fi;
done

View File

@@ -0,0 +1,33 @@
#!/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/>
{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
. /usr/sbin/so-common
if [ "$1" == "" ]; then
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -s -k -L https://{{ NODEIP }}:9200/_nodes/stats | jq .nodes | jq ".[] | .ingest.pipelines"
{% else %}
curl -s -L {{ NODEIP }}:9200/_nodes/stats | jq .nodes | jq ".[] | .ingest.pipelines"
{% endif %}
else
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -s -k -L https://{{ NODEIP }}:9200/_nodes/stats | jq .nodes | jq ".[] | .ingest.pipelines.\"$1\""
{% else %}
curl -s -L {{ NODEIP }}:9200/_nodes/stats | jq .nodes | jq ".[] | .ingest.pipelines.\"$1\""
{% endif %}
fi

View File

@@ -0,0 +1,31 @@
#!/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/>.
{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
. /usr/sbin/so-common
if [ "$1" == "" ]; then
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -s -k -L https://{{ NODEIP }}:9200/_ingest/pipeline/* | jq 'keys'
{% else %}
curl -s -L {{ NODEIP }}:9200/_ingest/pipeline/* | jq 'keys'
{% endif %}
else
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -s -k -L https://{{ NODEIP }}:9200/_ingest/pipeline/$1 | jq
{% else %}
curl -s -L {{ NODEIP }}:9200/_ingest/pipeline/$1 | jq
{% endif %}
fi

View File

@@ -0,0 +1,31 @@
#!/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/>.
{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
. /usr/sbin/so-common
if [ "$1" == "" ]; then
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -s -k -L https://{{ NODEIP }}:9200/_template/* | jq 'keys'
{% else %}
curl -s -L {{ NODEIP }}:9200/_template/* | jq 'keys'
{% endif %}
else
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -s -k -L https://{{ NODEIP }}:9200/_template/$1 | jq
{% else %}
curl -s -L {{ NODEIP }}:9200/_template/$1 | jq
{% endif %}
fi

View File

@@ -1,4 +1,6 @@
{% set MANAGERIP = salt['pillar.get']('manager:mainip', '') %}
{%- set mainint = salt['pillar.get']('host:mainint') %}
{%- set MYIP = salt['grains.get']('ip_interfaces:' ~ mainint)[0] %}
#!/bin/bash
# Copyright 2014,2015,2016,2017,2018,2019 Security Onion Solutions, LLC
#
@@ -16,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
default_conf_dir=/opt/so/conf
ELASTICSEARCH_HOST="{{ MANAGERIP}}"
ELASTICSEARCH_HOST="{{ MYIP }}"
ELASTICSEARCH_PORT=9200
#ELASTICSEARCH_AUTH=""
@@ -28,7 +30,11 @@ echo -n "Waiting for ElasticSearch..."
COUNT=0
ELASTICSEARCH_CONNECTED="no"
while [[ "$COUNT" -le 240 ]]; do
curl --output /dev/null --silent --head --fail http://"$ELASTICSEARCH_HOST":"$ELASTICSEARCH_PORT"
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -k --output /dev/null --silent --head --fail -L https://"$ELASTICSEARCH_HOST":"$ELASTICSEARCH_PORT"
{% else %}
curl --output /dev/null --silent --head --fail -L http://"$ELASTICSEARCH_HOST":"$ELASTICSEARCH_PORT"
{% endif %}
if [ $? -eq 0 ]; then
ELASTICSEARCH_CONNECTED="yes"
echo "connected!"
@@ -49,7 +55,11 @@ cd ${ELASTICSEARCH_TEMPLATES}
echo "Loading templates..."
for i in *; do TEMPLATE=$(echo $i | cut -d '-' -f2); echo "so-$TEMPLATE"; curl ${ELASTICSEARCH_AUTH} -s -XPUT http://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_template/so-$TEMPLATE -H 'Content-Type: application/json' -d@$i 2>/dev/null; echo; done
{% if grains['role'] in ['so-node','so-heavynode'] %}
for i in *; do TEMPLATE=$(echo $i | cut -d '-' -f2); echo "so-$TEMPLATE"; curl -k ${ELASTICSEARCH_AUTH} -s -XPUT -L https://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_template/so-$TEMPLATE -H 'Content-Type: application/json' -d@$i 2>/dev/null; echo; done
{% else %}
for i in *; do TEMPLATE=$(echo $i | cut -d '-' -f2); echo "so-$TEMPLATE"; curl ${ELASTICSEARCH_AUTH} -s -XPUT -L http://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_template/so-$TEMPLATE -H 'Content-Type: application/json' -d@$i 2>/dev/null; echo; done
{% endif %}
echo
cd - >/dev/null

View File

@@ -15,36 +15,39 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. /usr/sbin/so-common
. /usr/sbin/so-image-common
local_salt_dir=/opt/so/saltstack/local
manager_check() {
# Check to see if this is a manager
MANAGERCHECK=$(cat /etc/salt/grains | grep role | awk '{print $2}')
if [[ "$MANAGERCHECK" =~ ^('so-eval'|'so-manager'|'so-standalone'|'so-managersearch')$ ]]; then
echo "This is a manager. We can proceed"
else
echo "Please run so-features-enable on the manager."
exit 0
fi
}
cat << EOF
This program will switch from the open source version of the Elastic Stack to the Features version licensed under the Elastic license.
If you proceed, then we will download new Docker images and restart services.
Please review the Elastic license:
https://raw.githubusercontent.com/elastic/elasticsearch/master/licenses/ELASTIC-LICENSE.txt
Please also note that, if you have a distributed deployment and continue with this change, Elastic traffic between nodes will change from encrypted to cleartext!
(We expect to support Elastic Features Security at some point in the future.)
Do you agree to the terms of the Elastic license and understand the note about encryption?
If so, type AGREE to accept the Elastic license and continue. Otherwise, just press Enter to exit this program without making any changes.
EOF
read INPUT
if [ "$INPUT" != "AGREE" ]; then
exit
fi
echo "Please wait while switching to Elastic Features."
require_manager
TRUSTED_CONTAINERS=( \
"so-elasticsearch" \
"so-filebeat" \
"so-kibana" \
"so-logstash" )
update_docker_containers "features" "-features"
manager_check
VERSION=$(grep soversion $local_salt_dir/pillar/global.sls | cut -d':' -f2|sed 's/ //g')
# Modify global.sls to enable Features
sed -i 's/features: False/features: True/' $local_salt_dir/pillar/global.sls
SUFFIX="-features"
TRUSTED_CONTAINERS=( \
"so-elasticsearch:$VERSION$SUFFIX" \
"so-filebeat:$VERSION$SUFFIX" \
"so-kibana:$VERSION$SUFFIX" \
"so-logstash:$VERSION$SUFFIX" )
for i in "${TRUSTED_CONTAINERS[@]}"
do
# Pull down the trusted docker image
echo "Downloading $i"
docker pull --disable-content-trust=false docker.io/$IMAGEREPO/$i
# Tag it with the new registry destination
docker tag $IMAGEREPO/$i $HOSTNAME:5000/$IMAGEREPO/$i
docker push $HOSTNAME:5000/$IMAGEREPO/$i
done

View File

@@ -116,7 +116,7 @@ def addhostgroup(args):
print('Missing host group name argument', file=sys.stderr)
showUsage(args)
name = args[1]
name = args[0]
content = loadYaml(hostgroupsFilename)
if name in content['firewall']['hostgroups']:
print('Already exists', file=sys.stderr)

View File

@@ -0,0 +1,64 @@
#!/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/>.
. /usr/sbin/so-common
usage() {
echo "Usage: $0 <new-user-name>"
echo ""
echo "Adds a new user to Fleet. The new password will be read from STDIN."
exit 1
}
if [ $# -ne 1 ]; then
usage
fi
USER=$1
MYSQL_PASS=$(lookup_pillar_secret mysql)
FLEET_IP=$(lookup_pillar fleet_ip)
FLEET_USER=$USER
# Read password for new user from stdin
test -t 0
if [[ $? == 0 ]]; then
echo "Enter new password:"
fi
read -rs FLEET_PASS
if ! check_password "$FLEET_PASS"; then
echo "Password is invalid. Please exclude single quotes, double quotes and backslashes from the password."
exit 2
fi
FLEET_HASH=$(docker exec so-soctopus python -c "import bcrypt; print(bcrypt.hashpw('$FLEET_PASS'.encode('utf-8'), bcrypt.gensalt()).decode('utf-8'));" 2>&1)
if [[ $? -ne 0 ]]; then
echo "Failed to generate Fleet password hash"
exit 2
fi
MYSQL_OUTPUT=$(docker exec so-mysql mysql -u root --password=$MYSQL_PASS fleet -e \
"INSERT INTO users (password,salt,username,email,admin,enabled) VALUES ('$FLEET_HASH','','$FLEET_USER','$FLEET_USER',1,1)" 2>&1)
if [[ $? -eq 0 ]]; then
echo "Successfully added user to Fleet"
else
echo "Unable to add user to Fleet; user might already exist"
echo "$MYSQL_OUTPUT"
exit 2
fi

View File

@@ -0,0 +1,58 @@
#!/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/>.
. /usr/sbin/so-common
usage() {
echo "Usage: $0 <user-name>"
echo ""
echo "Enables or disables a user in Fleet"
exit 1
}
if [ $# -ne 2 ]; then
usage
fi
USER=$1
MYSQL_PASS=$(lookup_pillar_secret mysql)
FLEET_IP=$(lookup_pillar fleet_ip)
FLEET_USER=$USER
case "${2^^}" in
FALSE | NO | 0)
FLEET_STATUS=0
;;
TRUE | YES | 1)
FLEET_STATUS=1
;;
*)
usage
;;
esac
MYSQL_OUTPUT=$(docker exec so-mysql mysql -u root --password=$MYSQL_PASS fleet -e \
"UPDATE users SET enabled=$FLEET_STATUS WHERE username='$FLEET_USER'" 2>&1)
if [[ $? -eq 0 ]]; then
echo "Successfully updated user in Fleet"
else
echo "Failed to update user in Fleet"
echo $resp
exit 2
fi

View File

@@ -0,0 +1,175 @@
#!/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/>.
# NOTE: This script depends on so-common
IMAGEREPO=securityonion
container_list() {
MANAGERCHECK=$1
if [ -z "$MANAGERCHECK" ]; then
MANAGERCHECK=so-unknown
if [ -f /etc/salt/grains ]; then
MANAGERCHECK=$(cat /etc/salt/grains | grep role | awk '{print $2}')
fi
fi
if [ $MANAGERCHECK == 'so-import' ]; then
TRUSTED_CONTAINERS=( \
"so-elasticsearch" \
"so-filebeat" \
"so-idstools" \
"so-kibana" \
"so-kratos" \
"so-nginx" \
"so-pcaptools" \
"so-soc" \
"so-steno" \
"so-suricata" \
"so-zeek" )
elif [ $MANAGERCHECK != 'so-helix' ]; then
TRUSTED_CONTAINERS=( \
"so-acng" \
"so-curator" \
"so-domainstats" \
"so-elastalert" \
"so-elasticsearch" \
"so-filebeat" \
"so-fleet" \
"so-fleet-launcher" \
"so-freqserver" \
"so-grafana" \
"so-idstools" \
"so-influxdb" \
"so-kibana" \
"so-kratos" \
"so-logstash" \
"so-minio" \
"so-mysql" \
"so-nginx" \
"so-pcaptools" \
"so-playbook" \
"so-redis" \
"so-soc" \
"so-soctopus" \
"so-steno" \
"so-strelka-backend" \
"so-strelka-filestream" \
"so-strelka-frontend" \
"so-strelka-manager" \
"so-suricata" \
"so-telegraf" \
"so-thehive" \
"so-thehive-cortex" \
"so-thehive-es" \
"so-wazuh" \
"so-zeek" )
else
TRUSTED_CONTAINERS=( \
"so-filebeat" \
"so-idstools" \
"so-logstash" \
"so-nginx" \
"so-redis" \
"so-steno" \
"so-suricata" \
"so-telegraf" \
"so-zeek" )
fi
}
update_docker_containers() {
local CURLTYPE=$1
local IMAGE_TAG_SUFFIX=$2
local PROGRESS_CALLBACK=$3
local LOG_FILE=$4
local CONTAINER_REGISTRY=quay.io
local SIGNPATH=/root/sosigs
if [ -z "$CURLTYPE" ]; then
CURLTYPE=unknown
fi
if [ -z "$LOG_FILE" ]; then
if [ -c /dev/tty ]; then
LOG_FILE=/dev/tty
else
LOG_FILE=/dev/null
fi
fi
# Recheck the version for scenarios were the VERSION wasn't known before this script was imported
set_version
set_os
if [ -z "$TRUSTED_CONTAINERS" ]; then
container_list
fi
# Let's make sure we have the public key
curl -sSL https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS | gpg --import - >> "$LOG_FILE" 2>&1
rm -rf $SIGNPATH >> "$LOG_FILE" 2>&1
mkdir -p $SIGNPATH >> "$LOG_FILE" 2>&1
# Download the containers from the interwebs
for i in "${TRUSTED_CONTAINERS[@]}"
do
if [ -z "$PROGRESS_CALLBACK" ]; then
echo "Downloading $i" >> "$LOG_FILE" 2>&1
else
$PROGRESS_CALLBACK $i
fi
# Pull down the trusted docker image
local image=$i:$VERSION$IMAGE_TAG_SUFFIX
docker pull $CONTAINER_REGISTRY/$IMAGEREPO/$image >> "$LOG_FILE" 2>&1
# Get signature
curl -A "$CURLTYPE/$CURRENTVERSION/$OS/$(uname -r)" https://sigs.securityonion.net/$VERSION/$i:$VERSION$IMAGE_TAG_SUFFIX.sig --output $SIGNPATH/$image.sig >> "$LOG_FILE" 2>&1
if [[ $? -ne 0 ]]; then
echo "Unable to pull signature file for $image" >> "$LOG_FILE" 2>&1
exit 1
fi
# Dump our hash values
DOCKERINSPECT=$(docker inspect $CONTAINER_REGISTRY/$IMAGEREPO/$image)
echo "$DOCKERINSPECT" | jq ".[0].RepoDigests[] | select(. | contains(\"$CONTAINER_REGISTRY\"))" > $SIGNPATH/$image.txt
echo "$DOCKERINSPECT" | jq ".[0].Created, .[0].RootFS.Layers" >> $SIGNPATH/$image.txt
if [[ $? -ne 0 ]]; then
echo "Unable to inspect $image" >> "$LOG_FILE" 2>&1
exit 1
fi
GPGTEST=$(gpg --verify $SIGNPATH/$image.sig $SIGNPATH/$image.txt 2>&1)
if [[ $? -eq 0 ]]; then
if [[ -z "$SKIP_TAGPUSH" ]]; then
# Tag it with the new registry destination
if [ -z "$HOSTNAME" ]; then
HOSTNAME=$(hostname)
fi
docker tag $CONTAINER_REGISTRY/$IMAGEREPO/$image $HOSTNAME:5000/$IMAGEREPO/$image >> "$LOG_FILE" 2>&1
docker push $HOSTNAME:5000/$IMAGEREPO/$image >> "$LOG_FILE" 2>&1
fi
else
echo "There is a problem downloading the $image image. Details: " >> "$LOG_FILE" 2>&1
echo "" >> "$LOG_FILE" 2>&1
echo $GPGTEST >> "$LOG_FILE" 2>&1
exit 1
fi
done
}

View File

@@ -15,4 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
curl -X GET "localhost:9200/_cat/indices?v"
{% if grains['role'] in ['so-node','so-heavynode'] %}
curl -X GET -k -L https://localhost:9200/_cat/indices?v
{% else %}
curl -X GET -L localhost:9200/_cat/indices?v
{% endif %}

View File

@@ -0,0 +1,59 @@
#!/bin/bash
. $(dirname $0)/so-common
if [ "$FORCE_IP_UPDATE" != "1" ]; then
is_single_node_grid || fail "Cannot update the IP on a distributed grid"
fi
echo "This tool will update a manager's IP address to the new IP assigned to the management network interface."
echo
echo "WARNING: This tool is still undergoing testing, use at your own risk!"
echo
if [ -z "$OLD_IP" ]; then
OLD_IP=$(lookup_pillar "managerip")
if [ -z "$OLD_IP" ]; then
fail "Unable to find old IP; possible salt system failure"
fi
echo "Found old IP $OLD_IP."
fi
if [ -z "$NEW_IP" ]; then
iface=$(lookup_pillar "mainint" "host")
NEW_IP=$(ip -4 addr list $iface | grep inet | cut -d' ' -f6 | cut -d/ -f1)
if [ -z "$NEW_IP" ]; then
fail "Unable to detect new IP on interface $iface. "
fi
echo "Detected new IP $NEW_IP on interface $iface."
fi
if [ "$OLD_IP" == "$NEW_IP" ]; then
fail "IP address has not changed"
fi
echo "About to change old IP $OLD_IP to new IP $NEW_IP."
read -n 1 -p "Would you like to continue? (y/N) " CONTINUE
echo
if [ "$CONTINUE" == "y" ]; then
for file in $(grep -rlI $OLD_IP /opt/so/saltstack /etc); do
echo "Updating file: $file"
sed -i "s|$OLD_IP|$NEW_IP|g" $file
done
echo "The IP has been changed from $OLD_IP to $NEW_IP."
if [ -z "$SKIP_STATE_APPLY" ]; then
echo "Re-applying salt states."
salt-call state.highstate queue=True
fi
else
echo "Exiting without changes."
fi

View File

@@ -23,7 +23,7 @@
KIBANA_HOST={{ MANAGER }}
KSO_PORT=5601
OUTFILE="saved_objects.ndjson"
curl -s -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -XPOST $KIBANA_HOST:$KSO_PORT/api/saved_objects/_export -d '{ "type": [ "index-pattern", "config", "visualization", "dashboard", "search" ], "excludeExportDetails": false }' > $OUTFILE
curl -s -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -XPOST -L $KIBANA_HOST:$KSO_PORT/api/saved_objects/_export -d '{ "type": [ "index-pattern", "config", "visualization", "dashboard", "search" ], "excludeExportDetails": false }' > $OUTFILE
# Clean up using PLACEHOLDER
sed -i "s/$KIBANA_HOST/PLACEHOLDER/g" $OUTFILE

View File

@@ -0,0 +1,26 @@
#!/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/>.
. /usr/sbin/so-common
salt-call state.apply playbook.db_init,playbook,playbook.automation_user_create
/usr/sbin/so-soctopus-restart
echo "Importing Plays - this will take some time...."
wait 5
/usr/sbin/so-playbook-ruleupdate

View File

@@ -19,18 +19,22 @@
. /usr/sbin/so-common
echo $banner
printf "Restarting $1...\n\nThis could take a while if another Salt job is running. \nRun this command with --force to stop all Salt jobs before proceeding.\n"
echo $banner
if [ $# -ge 1 ]; then
if [ "$2" = "--force" ]
then
printf "\nForce-stopping all Salt jobs before proceeding\n\n"
salt-call saltutil.kill_all_jobs
echo $banner
printf "Restarting $1...\n\nThis could take a while if another Salt job is running. \nRun this command with --force to stop all Salt jobs before proceeding.\n"
echo $banner
if [ "$2" = "--force" ]; then
printf "\nForce-stopping all Salt jobs before proceeding\n\n"
salt-call saltutil.kill_all_jobs
fi
case $1 in
"cortex") docker stop so-thehive-cortex so-thehive && docker rm so-thehive-cortex so-thehive && salt-call state.apply hive queue=True;;
"steno") docker stop so-steno && docker rm so-steno && salt-call state.apply pcap queue=True;;
*) docker stop so-$1 ; docker rm so-$1 ; salt-call state.apply $1 queue=True;;
esac
else
echo -e "\nPlease provide an argument by running like so-restart $component, or by using the component-specific script.\nEx. so-restart filebeat, or so-filebeat-restart\n"
fi
case $1 in
"cortex") docker stop so-thehive-cortex so-thehive && docker rm so-thehive-cortex so-thehive && salt-call state.apply hive queue=True;;
"steno") docker stop so-steno && docker rm so-steno && salt-call state.apply pcap queue=True;;
*) docker stop so-$1 ; docker rm so-$1 ; salt-call state.apply $1 queue=True;;
esac

View File

@@ -10,4 +10,4 @@ got_root() {
}
got_root
docker exec -d so-idstools /bin/bash -c 'cd /opt/so/idstools/etc && idstools-rulecat'
docker exec so-idstools /bin/bash -c 'cd /opt/so/idstools/etc && idstools-rulecat'

View File

@@ -0,0 +1,104 @@
{% import_yaml 'salt/minion.defaults.yaml' as SALT_MINION_DEFAULTS -%}
#!/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/>.
# this script checks the time the file /opt/so/log/salt/state-apply-test was last modified and restarts the salt-minion service if it is outside a threshold date/time
# the file is modified via file.touch using a scheduled job healthcheck.salt-minion.state-apply-test that runs a state.apply.
# by default the file should be updated every 5-8 minutes.
# this allows us to test that the minion is able apply states and communicate with the master
# if the file is unable to be touched via the state.apply, then we assume there is a possibilty that the minion is hung (though it could be possible the master is down as well)
# we then stop the service, pkill salt-minion, the start the salt-minion service back up
. /usr/sbin/so-common
QUIET=false
UPTIME_REQ=1800 #in seconds, how long the box has to be up before considering restarting salt-minion due to /opt/so/log/salt/state-apply-test not being touched
CURRENT_TIME=$(date +%s)
SYSTEM_START_TIME=$(date -d "$(</proc/uptime awk '{print $1}') seconds ago" +%s)
LAST_HIGHSTATE_END=$([ -e "/opt/so/log/salt/lasthighstate" ] && date -r /opt/so/log/salt/lasthighstate +%s || echo 0)
LAST_HEALTHCHECK_STATE_APPLY=$([ -e "/opt/so/log/salt/state-apply-test" ] && date -r /opt/so/log/salt/state-apply-test +%s || echo 0)
# SETTING THRESHOLD TO ANYTHING UNDER 600 seconds may cause a lot of salt-minion restarts since the job to touch the file occurs every 5-8 minutes by default
THRESHOLD={{SALT_MINION_DEFAULTS.salt.minion.check_threshold}} #within how many seconds the file /opt/so/log/salt/state-apply-test must have been touched/modified before the salt minion is restarted
THRESHOLD_DATE=$((LAST_HEALTHCHECK_STATE_APPLY+THRESHOLD))
logCmd() {
cmd=$1
info "Executing command: $cmd"
$cmd >> "/opt/so/log/salt/so-salt-minion-check"
}
log() {
msg=$1
level=${2:-I}
now=$(TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ")
if ! $QUIET; then
echo $msg
fi
echo -e "$now | $level | $msg" >> "/opt/so/log/salt/so-salt-minion-check" 2>&1
}
error() {
log "$1" "E"
}
info() {
log "$1" "I"
}
usage()
{
cat <<EOF
Check health of salt-minion and restart it if needed
Options:
-h This message
-q Don't output to terminal
EOF
}
while getopts ":q" opt; do
case "$opt" in
q )
QUIET=true
;;
* ) usage
exit 0
;;
esac
done
log "running so-salt-minion-check"
if [ $CURRENT_TIME -ge $((SYSTEM_START_TIME+$UPTIME_REQ)) ]; then
if [ $THRESHOLD_DATE -le $CURRENT_TIME ]; then
log "salt-minion is unable to apply states" E
log "/opt/so/log/salt/healthcheck-state-apply not touched by required date: `date -d @$THRESHOLD_DATE`, last touched: `date -d @$LAST_HEALTHCHECK_STATE_APPLY`" I
log "last highstate completed at `date -d @$LAST_HIGHSTATE_END`" I
log "checking if any jobs are running" I
logCmd "salt-call --local saltutil.running" I
log "killing all salt-minion processes" I
logCmd "pkill -9 -ef /usr/bin/salt-minion" I
log "starting salt-minion service" I
logCmd "systemctl start salt-minion" I
else
log "/opt/so/log/salt/healthcheck-state-apply last touched: `date -d @$LAST_HEALTHCHECK_STATE_APPLY` must be touched by `date -d @$THRESHOLD_DATE` to avoid salt-minion restart" I
fi
else
log "system uptime only $((CURRENT_TIME-SYSTEM_START_TIME)) seconds does not meet $UPTIME_REQ second requirement." I
fi

View File

@@ -23,99 +23,104 @@ CUR_USAGE=$(df -P $SENSOR_DIR | tail -1 | awk '{print $5}' | tr -d %)
LOG="/opt/so/log/sensor_clean.log"
TODAY=$(date -u "+%Y-%m-%d")
clean () {
## find the oldest Zeek logs directory
OLDEST_DIR=$(ls /nsm/zeek/logs/ | grep -v "current" | grep -v "stats" | grep -v "packetloss" | grep -v "zeek_clean" | sort | head -n 1)
if [ -z "$OLDEST_DIR" -o "$OLDEST_DIR" == ".." -o "$OLDEST_DIR" == "." ]
then
echo "$(date) - No old Zeek logs available to clean up in /nsm/zeek/logs/" >> $LOG
#exit 0
else
echo "$(date) - Removing directory: /nsm/zeek/logs/$OLDEST_DIR" >> $LOG
rm -rf /nsm/zeek/logs/"$OLDEST_DIR"
fi
clean() {
## find the oldest Zeek logs directory
OLDEST_DIR=$(ls /nsm/zeek/logs/ | grep -v "current" | grep -v "stats" | grep -v "packetloss" | grep -v "zeek_clean" | sort | head -n 1)
if [ -z "$OLDEST_DIR" -o "$OLDEST_DIR" == ".." -o "$OLDEST_DIR" == "." ]; then
echo "$(date) - No old Zeek logs available to clean up in /nsm/zeek/logs/" >>$LOG
#exit 0
else
echo "$(date) - Removing directory: /nsm/zeek/logs/$OLDEST_DIR" >>$LOG
rm -rf /nsm/zeek/logs/"$OLDEST_DIR"
fi
## Remarking for now, as we are moving extracted files to /nsm/strelka/processed
## find oldest files in extracted directory and exclude today
#OLDEST_EXTRACT=$(find /nsm/zeek/extracted/complete -type f -printf '%T+ %p\n' 2>/dev/null | sort | grep -v $TODAY | head -n 1)
#if [ -z "$OLDEST_EXTRACT" -o "$OLDEST_EXTRACT" == ".." -o "$OLDEST_EXTRACT" == "." ]
#then
# echo "$(date) - No old extracted files available to clean up in /nsm/zeek/extracted/complete" >> $LOG
#else
# OLDEST_EXTRACT_DATE=`echo $OLDEST_EXTRACT | awk '{print $1}' | cut -d+ -f1`
# OLDEST_EXTRACT_FILE=`echo $OLDEST_EXTRACT | awk '{print $2}'`
# echo "$(date) - Removing extracted files for $OLDEST_EXTRACT_DATE" >> $LOG
# find /nsm/zeek/extracted/complete -type f -printf '%T+ %p\n' | grep $OLDEST_EXTRACT_DATE | awk '{print $2}' |while read FILE
# do
# echo "$(date) - Removing extracted file: $FILE" >> $LOG
# rm -f "$FILE"
# done
#fi
## Remarking for now, as we are moving extracted files to /nsm/strelka/processed
## find oldest files in extracted directory and exclude today
#OLDEST_EXTRACT=$(find /nsm/zeek/extracted/complete -type f -printf '%T+ %p\n' 2>/dev/null | sort | grep -v $TODAY | head -n 1)
#if [ -z "$OLDEST_EXTRACT" -o "$OLDEST_EXTRACT" == ".." -o "$OLDEST_EXTRACT" == "." ]
#then
# echo "$(date) - No old extracted files available to clean up in /nsm/zeek/extracted/complete" >> $LOG
#else
# OLDEST_EXTRACT_DATE=`echo $OLDEST_EXTRACT | awk '{print $1}' | cut -d+ -f1`
# OLDEST_EXTRACT_FILE=`echo $OLDEST_EXTRACT | awk '{print $2}'`
# echo "$(date) - Removing extracted files for $OLDEST_EXTRACT_DATE" >> $LOG
# find /nsm/zeek/extracted/complete -type f -printf '%T+ %p\n' | grep $OLDEST_EXTRACT_DATE | awk '{print $2}' |while read FILE
# do
# echo "$(date) - Removing extracted file: $FILE" >> $LOG
# rm -f "$FILE"
# done
#fi
## Clean up Zeek extracted files processed by Strelka
STRELKA_FILES='/nsm/strelka/processed'
OLDEST_STRELKA=$(find $STRELKA_FILES -type f -printf '%T+ %p\n' | sort -n | head -n 1 )
if [ -z "$OLDEST_STRELKA" -o "$OLDEST_STRELKA" == ".." -o "$OLDEST_STRELKA" == "." ]
then
echo "$(date) - No old files available to clean up in $STRELKA_FILES" >> $LOG
else
OLDEST_STRELKA_DATE=`echo $OLDEST_STRELKA | awk '{print $1}' | cut -d+ -f1`
OLDEST_STRELKA_FILE=`echo $OLDEST_STRELKA | awk '{print $2}'`
echo "$(date) - Removing extracted files for $OLDEST_STRELKA_DATE" >> $LOG
find $STRELKA_FILES -type f -printf '%T+ %p\n' | grep $OLDEST_STRELKA_DATE | awk '{print $2}' |while read FILE
do
echo "$(date) - Removing file: $FILE" >> $LOG
rm -f "$FILE"
done
fi
## Clean up Zeek extracted files processed by Strelka
STRELKA_FILES='/nsm/strelka/processed'
OLDEST_STRELKA=$(find $STRELKA_FILES -type f -printf '%T+ %p\n' | sort -n | head -n 1)
if [ -z "$OLDEST_STRELKA" -o "$OLDEST_STRELKA" == ".." -o "$OLDEST_STRELKA" == "." ]; then
echo "$(date) - No old files available to clean up in $STRELKA_FILES" >>$LOG
else
OLDEST_STRELKA_DATE=$(echo $OLDEST_STRELKA | awk '{print $1}' | cut -d+ -f1)
OLDEST_STRELKA_FILE=$(echo $OLDEST_STRELKA | awk '{print $2}')
echo "$(date) - Removing extracted files for $OLDEST_STRELKA_DATE" >>$LOG
find $STRELKA_FILES -type f -printf '%T+ %p\n' | grep $OLDEST_STRELKA_DATE | awk '{print $2}' | while read FILE; do
echo "$(date) - Removing file: $FILE" >>$LOG
rm -f "$FILE"
done
fi
## Clean up Suricata log files
SURICATA_LOGS='/nsm/suricata'
OLDEST_SURICATA=$(find $STRELKA_FILES -type f -printf '%T+ %p\n' | sort -n | head -n 1)
if [ -z "$OLDEST_SURICATA" -o "$OLDEST_SURICATA" == ".." -o "$OLDEST_SURICATA" == "." ]
then
echo "$(date) - No old files available to clean up in $SURICATA_LOGS" >> $LOG
else
OLDEST_SURICATA_DATE=`echo $OLDEST_SURICATA | awk '{print $1}' | cut -d+ -f1`
OLDEST_SURICATA_FILE=`echo $OLDEST_SURICATA | awk '{print $2}'`
echo "$(date) - Removing logs for $OLDEST_SURICATA_DATE" >> $LOG
find $SURICATA_LOGS -type f -printf '%T+ %p\n' | grep $OLDEST_SURICATA_DATE | awk '{print $2}' |while read FILE
do
echo "$(date) - Removing file: $FILE" >> $LOG
rm -f "$FILE"
done
fi
## Clean up Suricata log files
SURICATA_LOGS='/nsm/suricata'
OLDEST_SURICATA=$(find $SURICATA_LOGS -type f -printf '%T+ %p\n' | sort -n | head -n 1)
if [[ -z "$OLDEST_SURICATA" ]] || [[ "$OLDEST_SURICATA" == ".." ]] || [[ "$OLDEST_SURICATA" == "." ]]; then
echo "$(date) - No old files available to clean up in $SURICATA_LOGS" >>$LOG
else
OLDEST_SURICATA_DATE=$(echo $OLDEST_SURICATA | awk '{print $1}' | cut -d+ -f1)
OLDEST_SURICATA_FILE=$(echo $OLDEST_SURICATA | awk '{print $2}')
echo "$(date) - Removing logs for $OLDEST_SURICATA_DATE" >>$LOG
find $SURICATA_LOGS -type f -printf '%T+ %p\n' | grep $OLDEST_SURICATA_DATE | awk '{print $2}' | while read FILE; do
echo "$(date) - Removing file: $FILE" >>$LOG
rm -f "$FILE"
done
fi
## Clean up extracted pcaps from Steno
PCAPS='/nsm/pcapout'
OLDEST_PCAP=$(find $PCAPS -type f -printf '%T+ %p\n' | sort -n | head -n 1 )
if [ -z "$OLDEST_PCAP" -o "$OLDEST_PCAP" == ".." -o "$OLDEST_PCAP" == "." ]
then
echo "$(date) - No old files available to clean up in $PCAPS" >> $LOG
else
OLDEST_PCAP_DATE=`echo $OLDEST_PCAP | awk '{print $1}' | cut -d+ -f1`
OLDEST_PCAP_FILE=`echo $OLDEST_PCAP | awk '{print $2}'`
echo "$(date) - Removing extracted files for $OLDEST_PCAP_DATE" >> $LOG
find $PCAPS -type f -printf '%T+ %p\n' | grep $OLDEST_PCAP_DATE | awk '{print $2}' |while read FILE
do
echo "$(date) - Removing file: $FILE" >> $LOG
rm -f "$FILE"
done
fi
# Clean Wazuh archives
# Slightly different code since we have 2 files to remove (.json and .log)
WAZUH_ARCHIVE='/nsm/wazuh/logs/archives'
OLDEST_WAZUH=$(find $WAZUH_ARCHIVE -type f ! -name "archives.json" -printf "%T+\t%p\n" | sort -n | awk '{print $1}' | head -n 1)
# Make sure we don't delete the current files
find $WAZUH_ARCHIVE -type f ! -name "archives.json" -printf "%T+\t%p\n" | sort -n | awk '{print $2}' | head -n 1 >/tmp/files$$
if [[ $(wc -l </tmp/files$$) -ge 1 ]]; then
echo "$(date) - Removing logs for $OLDEST_WAZUH" >>$LOG
while read -r line; do
echo "$(date) - Removing file: $line" >>$LOG
rm "$line"
done </tmp/files$$
else
echo "$(date) - No old files available to clean up in $WAZUH_ARCHIVE" >>$LOG
fi
rm /tmp/files$$
## Clean up extracted pcaps from Steno
PCAPS='/nsm/pcapout'
OLDEST_PCAP=$(find $PCAPS -type f -printf '%T+ %p\n' | sort -n | head -n 1)
if [ -z "$OLDEST_PCAP" -o "$OLDEST_PCAP" == ".." -o "$OLDEST_PCAP" == "." ]; then
echo "$(date) - No old files available to clean up in $PCAPS" >>$LOG
else
OLDEST_PCAP_DATE=$(echo $OLDEST_PCAP | awk '{print $1}' | cut -d+ -f1)
OLDEST_PCAP_FILE=$(echo $OLDEST_PCAP | awk '{print $2}')
echo "$(date) - Removing extracted files for $OLDEST_PCAP_DATE" >>$LOG
find $PCAPS -type f -printf '%T+ %p\n' | grep $OLDEST_PCAP_DATE | awk '{print $2}' | while read FILE; do
echo "$(date) - Removing file: $FILE" >>$LOG
rm -f "$FILE"
done
fi
}
# Check to see if we are already running
IS_RUNNING=$(ps aux | grep "sensor_clean" | grep -v grep | wc -l)
[ "$IS_RUNNING" -gt 2 ] && echo "$(date) - $IS_RUNNING sensor clean script processes running...exiting." >> $LOG && exit 0
[ "$IS_RUNNING" -gt 2 ] && echo "$(date) - $IS_RUNNING sensor clean script processes running...exiting." >>$LOG && exit 0
if [ "$CUR_USAGE" -gt "$CRIT_DISK_USAGE" ]; then
while [ "$CUR_USAGE" -gt "$CRIT_DISK_USAGE" ];
do
clean
CUR_USAGE=$(df -P $SENSOR_DIR | tail -1 | awk '{print $5}' | tr -d %)
done
else
echo "$(date) - Current usage value of $CUR_USAGE not greater than CRIT_DISK_USAGE value of $CRIT_DISK_USAGE..." >> $LOG
while [ "$CUR_USAGE" -gt "$CRIT_DISK_USAGE" ]; do
clean
CUR_USAGE=$(df -P $SENSOR_DIR | tail -1 | awk '{print $5}' | tr -d %)
done
fi

View File

@@ -0,0 +1,49 @@
#!/bin/bash
. /usr/sbin/so-common
if [[ $1 =~ ^(q|--quiet) ]]; then
quiet=true
fi
print_sshd_t() {
local string=$1
local state=$2
echo "${state}:"
sshd -T | grep "^${string}"
}
if ! [[ $quiet ]]; then print_sshd_t "ciphers" "Before"; fi
sshd -T | grep "^ciphers" | sed -e "s/\(3des-cbc\|aes128-cbc\|aes192-cbc\|aes256-cbc\|arcfour\|arcfour128\|arcfour256\|blowfish-cbc\|cast128-cbc\|rijndael-cbc@lysator.liu.se\)\,\?//g" >> /etc/ssh/sshd_config
if ! [[ $quiet ]]; then
print_sshd_t "ciphers" "After"
echo ""
fi
if ! [[ $quiet ]]; then print_sshd_t "kexalgorithms" "Before"; fi
sshd -T | grep "^kexalgorithms" | sed -e "s/\(diffie-hellman-group14-sha1\|ecdh-sha2-nistp256\|diffie-hellman-group-exchange-sha256\|diffie-hellman-group1-sha1\|diffie-hellman-group-exchange-sha1\|ecdh-sha2-nistp521\|ecdh-sha2-nistp384\)\,\?//g" >> /etc/ssh/sshd_config
if ! [[ $quiet ]]; then
print_sshd_t "kexalgorithms" "After"
echo ""
fi
if ! [[ $quiet ]]; then print_sshd_t "macs" "Before"; fi
sshd -T | grep "^macs" | sed -e "s/\(hmac-sha2-512,\|umac-128@openssh.com,\|hmac-sha2-256,\|umac-64@openssh.com,\|hmac-sha1,\|hmac-sha1-etm@openssh.com,\|umac-64-etm@openssh.com,\|hmac-sha1\)//g" >> /etc/ssh/sshd_config
if ! [[ $quiet ]]; then
print_sshd_t "macs" "After"
echo ""
fi
if ! [[ $quiet ]]; then print_sshd_t "hostkeyalgorithms" "Before"; fi
sshd -T | grep "^hostkeyalgorithms" | sed "s|ecdsa-sha2-nistp256,||g" | sed "s|ssh-rsa,||g" >> /etc/ssh/sshd_config
if ! [[ $quiet ]]; then
print_sshd_t "hostkeyalgorithms" "After"
echo ""
fi
{% if grains['os'] != 'CentOS' %}
echo "----"
echo "[ WARNING ] Any new ssh sessions will need to remove and reaccept the ECDSA key for this server before reconnecting."
echo "----"
{% endif %}

View File

@@ -19,18 +19,21 @@
. /usr/sbin/so-common
echo $banner
printf "Starting $1...\n\nThis could take a while if another Salt job is running. \nRun this command with --force to stop all Salt jobs before proceeding.\n"
echo $banner
if [ $# -ge 1 ]; then
echo $banner
printf "Starting $1...\n\nThis could take a while if another Salt job is running. \nRun this command with --force to stop all Salt jobs before proceeding.\n"
echo $banner
if [ "$2" = "--force" ]
then
printf "\nForce-stopping all Salt jobs before proceeding\n\n"
salt-call saltutil.kill_all_jobs
if [ "$2" = "--force" ]; then
printf "\nForce-stopping all Salt jobs before proceeding\n\n"
salt-call saltutil.kill_all_jobs
fi
case $1 in
"all") salt-call state.highstate queue=True;;
"steno") if docker ps | grep -q so-$1; then printf "\n$1 is already running!\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply pcap queue=True; fi ;;
*) if docker ps | grep -E -q '^so-$1$'; then printf "\n$1 is already running\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply $1 queue=True; fi ;;
esac
else
echo -e "\nPlease provide an argument by running like so-start $component, or by using the component-specific script.\nEx. so-start filebeat, or so-filebeat-start\n"
fi
case $1 in
"all") salt-call state.highstate queue=True;;
"steno") if docker ps | grep -q so-$1; then printf "\n$1 is already running!\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply pcap queue=True; fi ;;
*) if docker ps | grep -E -q '^so-$1$'; then printf "\n$1 is already running\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply $1 queue=True; fi ;;
esac

View File

@@ -14,8 +14,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{%- from 'common/maps/so-status.map.jinja' import docker with context %}
{%- set container_list = docker['containers'] | sort %}
if ! [ "$(id -u)" = 0 ]; then
echo "This command must be run as root"
@@ -23,13 +21,24 @@ if ! [ "$(id -u)" = 0 ]; then
fi
# Constants
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
LAST_HIGHSTATE_END=$([ -e "/opt/so/log/salt/lasthighstate" ] && date -r /opt/so/log/salt/lasthighstate +%s || echo 0)
HIGHSTATE_RUNNING=$(salt-call --local saltutil.running --out=json | jq -r '.local[].fun' | grep -q 'state.highstate' && echo $?)
ERROR_STRING="ERROR"
SUCCESS_STRING="OK"
PENDING_STRING="PENDING"
MISSING_STRING='MISSING'
DISABLED_STRING='DISABLED'
WAIT_START_STRING='WAIT_START'
STARTING_STRING='STARTING'
CALLER=$(ps -o comm= $PPID)
declare -a BAD_STATUSES=("removing" "paused" "exited" "dead")
declare -a PENDING_STATUSES=("paused" "created" "restarting")
declare -a GOOD_STATUSES=("running")
declare -a DISABLED_CONTAINERS=()
mapfile -t DISABLED_CONTAINERS < <(sort -u /opt/so/conf/so-status/so-status.conf | grep "^\s*#" | tr -d "#")
declare -a temp_container_name_list=()
declare -a temp_container_state_list=()
@@ -71,9 +80,9 @@ compare_lists() {
# {% endraw %}
create_expected_container_list() {
{% for item in container_list%}
expected_container_list+=("{{ item }}")
{% endfor %}
mapfile -t expected_container_list < <(sort -u /opt/so/conf/so-status/so-status.conf | tr -d "#")
}
populate_container_lists() {
@@ -93,7 +102,7 @@ populate_container_lists() {
for line in "${docker_raw_list[@]}"; do
container_name="$( echo $line | sed -e 's/Name:\(.*\),State:\(.*\)/\1/' )" # Get value in the first search group (container names)
container_state="$( echo $line | sed -e 's/Name:\(.*\),State:\(.*\)/\2/' )" # Get value in the second search group (container states)
temp_container_name_list+=( "${container_name}" )
temp_container_state_list+=( "${container_state}" )
done
@@ -103,79 +112,143 @@ populate_container_lists() {
parse_status() {
local container_state=${1}
[[ $container_state = "missing" ]] && printf $MISSING_STRING && return 1
local service_name=${2}
for state in "${GOOD_STATUSES[@]}"; do
[[ $container_state = "$state" ]] && printf $SUCCESS_STRING && return 0
done
for state in "${PENDING_STATUSES[@]}"; do
[[ $container_state = "$state" ]] && printf $PENDING_STRING && return 0
done
# This is technically not needed since the default is error state
for state in "${BAD_STATUSES[@]}"; do
[[ $container_state = "$state" ]] && printf $ERROR_STRING && return 1
[[ " ${DISABLED_CONTAINERS[@]} " =~ " ${service_name} " ]] && printf $DISABLED_STRING && return 0
done
printf $ERROR_STRING && return 1
# if a highstate has finished running since the system has started
# then the containers should be running so let's check the status
if [ $LAST_HIGHSTATE_END -ge $SYSTEM_START_TIME ]; then
[[ $container_state = "missing" ]] && printf $MISSING_STRING && return 1
for state in "${PENDING_STATUSES[@]}"; do
[[ $container_state = "$state" ]] && printf $PENDING_STRING && return 0
done
# This is technically not needed since the default is error state
for state in "${BAD_STATUSES[@]}"; do
[[ $container_state = "$state" ]] && printf $ERROR_STRING && return 1
done
printf $ERROR_STRING && return 1
# if a highstate has not run since system start time, but a highstate is currently running
# then show that the containers are STARTING
elif [[ "$HIGHSTATE_RUNNING" == 0 ]]; then
printf $STARTING_STRING && return 0
# 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
else
printf $WAIT_START_STRING && return 1
fi
}
# {% raw %}
print_line() {
local service_name=${1}
local service_state="$( parse_status ${2} )"
local service_state="$( parse_status ${2} ${1} )"
local columns=$(tput cols)
local state_color="\e[0m"
local PADDING_CONSTANT=14
local PADDING_CONSTANT=15
if [[ $service_state = "$ERROR_STRING" ]] || [[ $service_state = "$MISSING_STRING" ]]; then
if [[ $service_state = "$ERROR_STRING" ]] || [[ $service_state = "$MISSING_STRING" ]] || [[ $service_state = "$WAIT_START_STRING" ]]; then
state_color="\e[1;31m"
elif [[ $service_state = "$SUCCESS_STRING" ]]; then
state_color="\e[1;32m"
elif [[ $service_state = "$PENDING_STRING" ]]; then
elif [[ $service_state = "$PENDING_STRING" ]] || [[ $service_state = "$DISABLED_STRING" ]] || [[ $service_state = "$STARTING_STRING" ]]; then
state_color="\e[1;33m"
fi
printf " $service_name "
for i in $(seq 0 $(( $columns - $PADDING_CONSTANT - ${#service_name} - ${#service_state} ))); do
printf "-"
printf "${state_color}%b\e[0m" "-"
done
printf " [ "
printf "${state_color}%b\e[0m" "$service_state"
printf "%s \n" " ]"
}
main() {
local focus_color="\e[1;34m"
printf "\n"
printf "${focus_color}%b\e[0m" "Checking Docker status\n\n"
non_term_print_line() {
local service_name=${1}
local service_state="$( parse_status ${2} ${1} )"
systemctl is-active --quiet docker
if [[ $? = 0 ]]; then
print_line "Docker" "running"
else
print_line "Docker" "exited"
fi
populate_container_lists
printf "\n"
printf "${focus_color}%b\e[0m" "Checking container statuses\n\n"
local num_containers=${#container_name_list[@]}
for i in $(seq 0 $(($num_containers - 1 ))); do
print_line ${container_name_list[$i]} ${container_state_list[$i]}
printf " $service_name "
for i in $(seq 0 $(( 35 - ${#service_name} - ${#service_state} ))); do
printf "-"
done
printf " [ "
printf "$service_state"
printf "%s \n" " ]"
}
printf "\n"
main() {
# if running from salt
if [ "$CALLER" == 'salt-call' ] || [ "$CALLER" == 'salt-minion' ]; then
printf "\n"
printf "Checking Docker status\n\n"
systemctl is-active --quiet docker
if [[ $? = 0 ]]; then
non_term_print_line "Docker" "running"
else
non_term_print_line "Docker" "exited"
fi
populate_container_lists
printf "\n"
printf "Checking container statuses\n\n"
local num_containers=${#container_name_list[@]}
for i in $(seq 0 $(($num_containers - 1 ))); do
non_term_print_line ${container_name_list[$i]} ${container_state_list[$i]}
done
printf "\n"
# else if running from a terminal
else
local focus_color="\e[1;34m"
printf "\n"
printf "${focus_color}%b\e[0m" "Checking Docker status\n\n"
systemctl is-active --quiet docker
if [[ $? = 0 ]]; then
print_line "Docker" "running"
else
print_line "Docker" "exited"
fi
populate_container_lists
printf "\n"
printf "${focus_color}%b\e[0m" "Checking container statuses\n\n"
local num_containers=${#container_name_list[@]}
for i in $(seq 0 $(($num_containers - 1 ))); do
print_line ${container_name_list[$i]} ${container_state_list[$i]}
done
printf "\n"
fi
}
# {% endraw %}
main
main

View File

@@ -19,11 +19,15 @@
. /usr/sbin/so-common
echo $banner
printf "Stopping $1...\n"
echo $banner
if [ $# -ge 1 ]; then
echo $banner
printf "Stopping $1...\n"
echo $banner
case $1 in
*) docker stop so-$1 ; docker rm so-$1 ;;
esac
case $1 in
*) docker stop so-$1 ; docker rm so-$1 ;;
esac
else
echo -e "\nPlease provide an argument by running like so-stop $component, or by using the component-specific script.\nEx. so-stop filebeat, or so-filebeat-stop\n"
fi

View File

@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Usage: so-tcpreplay "/opt/so/samples/*"
# Usage: so-tcpreplay "/opt/samples/*"
REPLAY_ENABLED=$(docker images | grep so-tcpreplay)
REPLAY_RUNNING=$(docker ps | grep so-tcpreplay)

45
salt/common/tools/sbin/so-test Executable file
View File

@@ -0,0 +1,45 @@
#!/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/>.
# Usage: so-test
. /usr/sbin/so-common
REPLAY_ENABLED=$(docker images | grep so-tcpreplay)
REPLAY_RUNNING=$(docker ps | grep so-tcpreplay)
if [ "$REPLAY_ENABLED" != "" ] && [ "$REPLAY_RUNNING" != "" ]; then
echo
echo "Preparing to replay PCAPs..."
docker cp so-tcpreplay:/opt/samples /opt/samples
docker exec -it so-tcpreplay /usr/local/bin/tcpreplay -i bond0 -M10 /opt/samples/*
echo
echo "PCAP's have been replayed - it is normal to see some warnings."
echo
else
echo "Replay functionality not enabled! Enabling Now...."
echo
echo "Note that you will need internet access to download the appropriate components"
/usr/sbin/so-start tcpreplay
echo "Replay functionality enabled. Replaying PCAPs Now...."
docker cp so-tcpreplay:/opt/samples /opt/samples
docker exec -it so-tcpreplay /usr/local/bin/tcpreplay -i bond0 -M10 /opt/samples/*
echo
echo "PCAP's have been replayed - it is normal to see some warnings."
echo
fi

View File

@@ -0,0 +1,57 @@
#!/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/>.
. /usr/sbin/so-common
usage() {
echo "Usage: $0 <new-user-name>"
echo ""
echo "Adds a new user to TheHive. The new password will be read from STDIN."
exit 1
}
if [ $# -ne 1 ]; then
usage
fi
USER=$1
THEHIVE_KEY=$(lookup_pillar hivekey)
THEHVIE_API_URL="$(lookup_pillar url_base)/thehive/api"
THEHIVE_USER=$USER
# Read password for new user from stdin
test -t 0
if [[ $? == 0 ]]; then
echo "Enter new password:"
fi
read -rs THEHIVE_PASS
if ! check_password "$THEHIVE_PASS"; then
echo "Password is invalid. Please exclude single quotes, double quotes and backslashes from the password."
exit 2
fi
# Create new user in TheHive
resp=$(curl -sk -XPOST -H "Authorization: Bearer $THEHIVE_KEY" -H "Content-Type: application/json" -L "https://$THEHVIE_API_URL/user" -d "{\"login\" : \"$THEHIVE_USER\",\"name\" : \"$THEHIVE_USER\",\"roles\" : [\"read\",\"alert\",\"write\",\"admin\"],\"preferences\" : \"{}\",\"password\" : \"$THEHIVE_PASS\"}")
if [[ "$resp" =~ \"status\":\"Ok\" ]]; then
echo "Successfully added user to TheHive"
else
echo "Unable to add user to TheHive; user might already exist"
echo $resp
exit 2
fi

View File

@@ -0,0 +1,57 @@
#!/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/>.
. /usr/sbin/so-common
usage() {
echo "Usage: $0 <user-name> <true|false>"
echo ""
echo "Enables or disables a user in TheHive."
exit 1
}
if [ $# -ne 2 ]; then
usage
fi
USER=$1
THEHIVE_KEY=$(lookup_pillar hivekey)
THEHVIE_API_URL="$(lookup_pillar url_base)/thehive/api"
THEHIVE_USER=$USER
case "${2^^}" in
FALSE | NO | 0)
THEHIVE_STATUS=Locked
;;
TRUE | YES | 1)
THEHIVE_STATUS=Ok
;;
*)
usage
;;
esac
resp=$(curl -sk -XPATCH -H "Authorization: Bearer $THEHIVE_KEY" -H "Content-Type: application/json" -L "https://$THEHVIE_API_URL/user/${THEHIVE_USER}" -d "{\"status\":\"${THEHIVE_STATUS}\" }")
if [[ "$resp" =~ \"status\":\"Locked\" || "$resp" =~ \"status\":\"Ok\" ]]; then
echo "Successfully updated user in TheHive"
else
echo "Failed to update user in TheHive"
echo "$resp"
exit 2
fi

View File

@@ -8,31 +8,21 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
got_root() {
source $(dirname $0)/so-common
# Make sure you are root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run using sudo!"
exit 1
fi
}
# Make sure the user is root
got_root
if [[ $# < 1 || $# > 2 ]]; then
echo "Usage: $0 <list|add|update|delete|validate|valemail|valpass> [email]"
if [[ $# -lt 1 || $# -gt 2 ]]; then
echo "Usage: $0 <list|add|update|enable|disable|validate|valemail|valpass> [email]"
echo ""
echo " list: Lists all user email addresses currently defined in the identity system"
echo " add: Adds a new user to the identity system; requires 'email' parameter"
echo " update: Updates a user's password; requires 'email' parameter"
echo " delete: Deletes an existing user; requires 'email' parameter"
echo " enable: Enables a user; requires 'email' parameter"
echo " disable: Disables a user; requires 'email' parameter"
echo " validate: Validates that the given email address and password are acceptable for defining a new user; requires 'email' parameter"
echo " valemail: Validates that the given email address is acceptable for defining a new user; requires 'email' parameter"
echo " valpass: Validates that a password is acceptable for defining a new user"
echo ""
echo " Note that the password can be piped into stdin to avoid prompting for it."
echo " Note that the password can be piped into STDIN to avoid prompting for it"
exit 1
fi
@@ -66,15 +56,15 @@ function verifyEnvironment() {
require "openssl"
require "sqlite3"
[[ ! -f $databasePath ]] && fail "Unable to find database file; specify path via KRATOS_DB_PATH environment variable"
response=$(curl -Ss ${kratosUrl}/)
response=$(curl -Ss -L ${kratosUrl}/)
[[ "$response" != "404 page not found" ]] && fail "Unable to communicate with Kratos; specify URL via KRATOS_URL environment variable"
}
function findIdByEmail() {
email=$1
response=$(curl -Ss ${kratosUrl}/identities)
identityId=$(echo "${response}" | jq ".[] | select(.addresses[0].value == \"$email\") | .id")
response=$(curl -Ss -L ${kratosUrl}/identities)
identityId=$(echo "${response}" | jq ".[] | select(.verifiable_addresses[0].value == \"$email\") | .id")
echo $identityId
}
@@ -100,14 +90,16 @@ function validateEmail() {
function updatePassword() {
identityId=$1
# Read password from stdin (show prompt only if no stdin was piped in)
test -t 0
if [[ $? == 0 ]]; then
echo "Enter new password:"
fi
read -s password
if [ -z "$password" ]; then
# Read password from stdin (show prompt only if no stdin was piped in)
test -t 0
if [[ $? == 0 ]]; then
echo "Enter new password:"
fi
read -rs password
validatePassword "$password"
validatePassword "$password"
fi
if [[ -n $identityId ]]; then
# Generate password hash
@@ -121,10 +113,10 @@ function updatePassword() {
}
function listUsers() {
response=$(curl -Ss ${kratosUrl}/identities)
response=$(curl -Ss -L ${kratosUrl}/identities)
[[ $? != 0 ]] && fail "Unable to communicate with Kratos"
echo "${response}" | jq -r ".[] | .addresses[0].value" | sort
echo "${response}" | jq -r ".[] | .verifiable_addresses[0].value" | sort
}
function createUser() {
@@ -133,22 +125,13 @@ function createUser() {
now=$(date -u +%FT%TZ)
addUserJson=$(cat <<EOF
{
"addresses": [
{
"expires_at": "2099-01-31T12:00:00Z",
"value": "${email}",
"verified": true,
"verified_at": "${now}",
"via": "so-add-user"
}
],
"traits": {"email":"${email}"},
"traits_schema_id": "default"
"schema_id": "default"
}
EOF
)
response=$(curl -Ss ${kratosUrl}/identities -d "$addUserJson")
response=$(curl -Ss -L ${kratosUrl}/identities -d "$addUserJson")
[[ $? != 0 ]] && fail "Unable to communicate with Kratos"
identityId=$(echo "${response}" | jq ".id")
@@ -163,6 +146,36 @@ EOF
updatePassword $identityId
}
function updateStatus() {
email=$1
status=$2
identityId=$(findIdByEmail "$email")
[[ ${identityId} == "" ]] && fail "User not found"
response=$(curl -Ss -L "${kratosUrl}/identities/$identityId")
[[ $? != 0 ]] && fail "Unable to communicate with Kratos"
oldConfig=$(echo "select config from identity_credentials where identity_id=${identityId};" | sqlite3 "$databasePath")
if [[ "$status" == "locked" ]]; then
config=$(echo $oldConfig | sed -e 's/hashed/locked/')
echo "update identity_credentials set config=CAST('${config}' as BLOB) where identity_id=${identityId};" | sqlite3 "$databasePath"
[[ $? != 0 ]] && fail "Unable to lock credential record"
echo "delete from sessions where identity_id=${identityId};" | sqlite3 "$databasePath"
[[ $? != 0 ]] && fail "Unable to invalidate sessions"
else
config=$(echo $oldConfig | sed -e 's/locked/hashed/')
echo "update identity_credentials set config=CAST('${config}' as BLOB) where identity_id=${identityId};" | sqlite3 "$databasePath"
[[ $? != 0 ]] && fail "Unable to unlock credential record"
fi
updatedJson=$(echo "$response" | jq ".traits.status = \"$status\" | del(.verifiable_addresses) | del(.id) | del(.schema_url)")
response=$(curl -Ss -XPUT -L ${kratosUrl}/identities/$identityId -d "$updatedJson")
[[ $? != 0 ]] && fail "Unable to mark user as locked"
}
function updateUser() {
email=$1
@@ -178,7 +191,7 @@ function deleteUser() {
identityId=$(findIdByEmail "$email")
[[ ${identityId} == "" ]] && fail "User not found"
response=$(curl -Ss -XDELETE "${kratosUrl}/identities/$identityId")
response=$(curl -Ss -XDELETE -L "${kratosUrl}/identities/$identityId")
[[ $? != 0 ]] && fail "Unable to communicate with Kratos"
}
@@ -188,8 +201,11 @@ case "${operation}" in
[[ "$email" == "" ]] && fail "Email address must be provided"
validateEmail "$email"
updatePassword
createUser "$email"
echo "Successfully added new user"
echo "Successfully added new user to SOC"
check_container thehive && echo $password | so-thehive-user-add "$email"
check_container fleet && echo $password | so-fleet-user-add "$email"
;;
"list")
@@ -205,12 +221,34 @@ case "${operation}" in
echo "Successfully updated user"
;;
"enable")
verifyEnvironment
[[ "$email" == "" ]] && fail "Email address must be provided"
updateStatus "$email" 'active'
echo "Successfully enabled user"
check_container thehive && so-thehive-user-enable "$email" true
check_container fleet && so-fleet-user-enable "$email" true
;;
"disable")
verifyEnvironment
[[ "$email" == "" ]] && fail "Email address must be provided"
updateStatus "$email" 'locked'
echo "Successfully disabled user"
check_container thehive && so-thehive-user-enable "$email" false
check_container fleet && so-fleet-user-enable "$email" false
;;
"delete")
verifyEnvironment
[[ "$email" == "" ]] && fail "Email address must be provided"
deleteUser "$email"
echo "Successfully deleted user"
echo "Successfully deleted user"
check_container thehive && so-thehive-user-enable "$email" false
check_container fleet && so-fleet-user-enable "$email" false
;;
"validate")

View File

@@ -0,0 +1,2 @@
#!/bin/bash
so-user disable $*

View File

@@ -0,0 +1,2 @@
#!/bin/bash
so-user enable $*

View File

@@ -0,0 +1,2 @@
#!/bin/bash
so-user list

View File

@@ -0,0 +1,22 @@
#!/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/>.
if docker ps |grep so-wazuh >/dev/null 2>&1; then
docker exec -it so-wazuh /var/ossec/bin/manage_agents "$@"
else
echo "Wazuh manager is not running. Please start it with so-wazuh-start."
fi

View File

@@ -0,0 +1,22 @@
#!/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/>.
if docker ps |grep so-wazuh >/dev/null 2>&1; then
docker exec -it so-wazuh /var/ossec/bin/agent_upgrade "$@"
else
echo "Wazuh manager is not running. Please start it with so-wazuh-start."
fi

View File

@@ -0,0 +1,17 @@
#!/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/>.
docker exec -it so-wazuh /usr/bin/node /var/ossec/api/configuration/auth/htpasswd /var/ossec/api/configuration/auth/user $1

View File

@@ -0,0 +1,17 @@
#!/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/>.
docker exec -it so-wazuh /usr/bin/node /var/ossec/api/configuration/auth/htpasswd /var/ossec/api/configuration/auth/user $1

View File

@@ -0,0 +1,17 @@
#!/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/>.
docker exec -it so-wazuh /usr/bin/node /var/ossec/api/configuration/auth/htpasswd -D /var/ossec/api/configuration/auth/user $1

View File

@@ -14,10 +14,10 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{%- set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') %}
clone_dir="/tmp"
output_dir="/opt/so/saltstack/default/salt/strelka/rules"
#mkdir -p $output_dir
mkdir -p $output_dir
repos="$output_dir/repos.txt"
ignorefile="$output_dir/ignore.txt"
@@ -25,8 +25,70 @@ deletecounter=0
newcounter=0
updatecounter=0
gh_status=$(curl -s -o /dev/null -w "%{http_code}" http://github.com)
{% if ISAIRGAP is sameas true %}
clone_dir="/nsm/repo/rules/strelka"
repo_name="signature-base"
mkdir -p /opt/so/saltstack/default/salt/strelka/rules/signature-base
[ -f $clone_dir/LICENSE ] && cp $clone_dir/$repo_name/LICENSE $output_dir/$repo_name
# Copy over rules
for i in $(find $clone_dir/yara -name "*.yar*"); do
rule_name=$(echo $i | awk -F '/' '{print $NF}')
repo_sum=$(sha256sum $i | awk '{print $1}')
# Check rules against those in ignore list -- don't copy if ignored.
if ! grep -iq $rule_name $ignorefile; then
existing_rules=$(find $output_dir/$repo_name/ -name $rule_name | wc -l)
# For existing rules, check to see if they need to be updated, by comparing checksums
if [ $existing_rules -gt 0 ];then
local_sum=$(sha256sum $output_dir/$repo_name/$rule_name | awk '{print $1}')
if [ "$repo_sum" != "$local_sum" ]; then
echo "Checksums do not match!"
echo "Updating $rule_name..."
cp $i $output_dir/$repo_name;
((updatecounter++))
fi
else
# If rule doesn't exist already, we'll add it
echo "Adding new rule: $rule_name..."
cp $i $output_dir/$repo_name
((newcounter++))
fi
fi;
done
# Check to see if we have any old rules that need to be removed
for i in $(find $output_dir/$repo_name -name "*.yar*" | awk -F '/' '{print $NF}'); do
is_repo_rule=$(find $clone_dir -name "$i" | wc -l)
if [ $is_repo_rule -eq 0 ]; then
echo "Could not find $i in source $repo_name repo...removing from $output_dir/$repo_name..."
rm $output_dir/$repo_name/$i
((deletecounter++))
fi
done
echo "Done!"
if [ "$newcounter" -gt 0 ];then
echo "$newcounter new rules added."
fi
if [ "$updatecounter" -gt 0 ];then
echo "$updatecounter rules updated."
fi
if [ "$deletecounter" -gt 0 ];then
echo "$deletecounter rules removed because they were deprecated or don't exist in the source repo."
fi
{% else %}
gh_status=$(curl -s -o /dev/null -w "%{http_code}" http://github.com)
clone_dir="/tmp"
if [ "$gh_status" == "200" ] || [ "$gh_status" == "301" ]; then
while IFS= read -r repo; do
@@ -68,7 +130,7 @@ if [ "$gh_status" == "200" ] || [ "$gh_status" == "301" ]; then
fi
fi;
done
# Check to see if we have any old rules that need to be removed
for i in $(find $output_dir/$repo_name -name "*.yar*" | awk -F '/' '{print $NF}'); do
is_repo_rule=$(find $clone_dir/$repo_name -name "$i" | wc -l)
@@ -100,3 +162,4 @@ else
echo "No connectivity to Github...exiting..."
exit 1
fi
{%- endif -%}

View File

@@ -2,17 +2,14 @@
local_salt_dir=/opt/so/saltstack/local
zeek_logs_enabled() {
echo "zeeklogs:" > $local_salt_dir/pillar/zeeklogs.sls
echo " enabled:" >> $local_salt_dir/pillar/zeeklogs.sls
for BLOG in ${BLOGS[@]}; do
for BLOG in "${BLOGS[@]}"; do
echo " - $BLOG" | tr -d '"' >> $local_salt_dir/pillar/zeeklogs.sls
done
}
whiptail_manager_adv_service_zeeklogs() {
BLOGS=$(whiptail --title "Security Onion Setup" --checklist "Please Select Logs to Send:" 24 78 12 \
"conn" "Connection Logging" ON \
"dce_rpc" "RPC Logs" ON \
@@ -52,7 +49,25 @@ whiptail_manager_adv_service_zeeklogs() {
"mysql" "MySQL Logs" ON \
"socks" "SOCKS Logs" ON \
"x509" "x.509 Logs" ON 3>&1 1>&2 2>&3 )
local exitstatus=$?
IFS=' ' read -ra BLOGS <<< "$BLOGS"
return $exitstatus
}
whiptail_manager_adv_service_zeeklogs
zeek_logs_enabled
return_code=$?
case $return_code in
1)
whiptail --title "Security Onion Setup" --msgbox "Cancelling. No changes have been made." 8 75
;;
255)
whiptail --title "Security Onion Setup" --msgbox "Whiptail error occured, exiting." 8 75
;;
*)
zeek_logs_enabled
;;
esac

View File

@@ -16,33 +16,118 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. /usr/sbin/so-common
UPDATE_DIR=/tmp/sogh/securityonion
INSTALLEDVERSION=$(cat /etc/soversion)
INSTALLEDSALTVERSION=$(salt --versions-report | grep Salt: | awk {'print $2'})
DEFAULT_SALT_DIR=/opt/so/saltstack/default
BATCHSIZE=5
SOUP_LOG=/root/soup.log
exec 3>&1 1>${SOUP_LOG} 2>&1
manager_check() {
# Check to see if this is a manager
MANAGERCHECK=$(cat /etc/salt/grains | grep role | awk '{print $2}')
if [[ "$MANAGERCHECK" =~ ^('so-eval'|'so-manager'|'so-standalone'|'so-managersearch'|'so-import')$ ]]; then
echo "This is a manager. We can proceed."
MINIONID=$(salt-call grains.get id --out=txt|awk -F: {'print $2'}|tr -d ' ')
add_common() {
cp $UPDATE_DIR/salt/common/tools/sbin/so-common $DEFAULT_SALT_DIR/salt/common/tools/sbin/
cp $UPDATE_DIR/salt/common/tools/sbin/so-image-common $DEFAULT_SALT_DIR/salt/common/tools/sbin/
salt-call state.apply common queue=True
echo "Run soup one more time"
exit 0
}
airgap_mounted() {
# Let's see if the ISO is already mounted.
if [ -f /tmp/soagupdate/SecurityOnion/VERSION ]; then
echo "The ISO is already mounted"
else
echo "Please run soup on the manager. The manager controls all updates."
exit 0
echo ""
echo "Looks like we need access to the upgrade content"
echo ""
echo "If you just copied the .iso file over you can specify the path."
echo "If you burned the ISO to a disk the standard way you can specify the device."
echo "Example: /home/user/securityonion-2.X.0.iso"
echo "Example: /dev/sdx1"
echo ""
read -p 'Enter the location of the iso: ' ISOLOC
if [ -f $ISOLOC ]; then
# Mounting the ISO image
mkdir -p /tmp/soagupdate
mount -t iso9660 -o loop $ISOLOC /tmp/soagupdate
# Make sure mounting was successful
if [ ! -f /tmp/soagupdate/SecurityOnion/VERSION ]; then
echo "Something went wrong trying to mount the ISO."
echo "Ensure you verify the ISO that you downloaded."
exit 0
else
echo "ISO has been mounted!"
fi
elif [ -f $ISOLOC/SecurityOnion/VERSION ]; then
ln -s $ISOLOC /tmp/soagupdate
echo "Found the update content"
else
mkdir -p /tmp/soagupdate
mount $ISOLOC /tmp/soagupdate
if [ ! -f /tmp/soagupdate/SecurityOnion/VERSION ]; then
echo "Something went wrong trying to mount the device."
echo "Ensure you verify the ISO that you downloaded."
exit 0
else
echo "Device has been mounted!"
fi
fi
fi
}
airgap_update_dockers() {
if [ $is_airgap -eq 0 ]; then
# Let's copy the tarball
if [ ! -f $AGDOCKER/registry.tar ]; then
echo "Unable to locate registry. Exiting"
exit 1
else
echo "Stopping the registry docker"
docker stop so-dockerregistry
docker rm so-dockerregistry
echo "Copying the new dockers over"
tar xvf $AGDOCKER/registry.tar -C /nsm/docker-registry/docker
echo "Add Registry back"
docker load -i $AGDOCKER/registry_image.tar
fi
fi
}
update_registry() {
docker stop so-dockerregistry
docker rm so-dockerregistry
salt-call state.apply registry queue=True
}
check_airgap() {
# See if this is an airgap install
AIRGAP=$(cat /opt/so/saltstack/local/pillar/global.sls | grep airgap | awk '{print $2}')
if [[ "$AIRGAP" == "True" ]]; then
is_airgap=0
UPDATE_DIR=/tmp/soagupdate/SecurityOnion
AGDOCKER=/tmp/soagupdate/docker
AGREPO=/tmp/soagupdate/Packages
else
is_airgap=1
fi
}
check_sudoers() {
if grep -q "so-setup" /etc/sudoers; then
echo "There is an entry for so-setup in the sudoers file, this can be safely deleted using \"visudo\"."
fi
}
clean_dockers() {
# Place Holder for cleaning up old docker images
echo ""
echo "Trying to clean up old dockers."
docker system prune -a -f
}
clone_to_tmp() {
# TODO Need to add a air gap option
# Clean old files
rm -rf /tmp/sogh
# Make a temp location for the files
@@ -62,7 +147,7 @@ clone_to_tmp() {
copy_new_files() {
# Copy new files over to the salt dir
cd /tmp/sogh/securityonion
cd $UPDATE_DIR
rsync -a salt $DEFAULT_SALT_DIR/
rsync -a pillar $DEFAULT_SALT_DIR/
chown -R socore:socore $DEFAULT_SALT_DIR/
@@ -70,21 +155,9 @@ copy_new_files() {
cd /tmp
}
detect_os() {
# Detect Base OS
echo "Determining Base OS." >> "$SOUP_LOG" 2>&1
if [ -f /etc/redhat-release ]; then
OS="centos"
elif [ -f /etc/os-release ]; then
OS="ubuntu"
fi
echo "Found OS: $OS" >> "$SOUP_LOG" 2>&1
}
highstate() {
# Run a highstate but first cancel a running one.
salt-call saltutil.kill_all_jobs
salt-call state.highstate -l info
# Run a highstate.
salt-call state.highstate -l info queue=True
}
masterlock() {
@@ -111,7 +184,7 @@ masterunlock() {
playbook() {
echo "Applying playbook settings"
if [[ "$INSTALLEDVERSION" =~ rc.1 ]]; then
salt-call state.apply playbook.db_init
salt-call state.apply playbook.OLD_db_init
rm -f /opt/so/rules/elastalert/playbook/*.yaml
so-playbook-ruleupdate >> /root/soup_playbook_rule_update.log 2>&1 &
fi
@@ -121,131 +194,123 @@ pillar_changes() {
# This function is to add any new pillar items if needed.
echo "Checking to see if pillar changes are needed."
# Move baseurl in global.sls
if [[ "$INSTALLEDVERSION" =~ rc.1 ]]; then
# Move the static file to global.sls
echo "Migrating static.sls to global.sls"
mv -v /opt/so/saltstack/local/pillar/static.sls /opt/so/saltstack/local/pillar/global.sls >> "$SOUP_LOG" 2>&1
sed -i '1c\global:' /opt/so/saltstack/local/pillar/global.sls >> "$SOUP_LOG" 2>&1
# Moving baseurl from minion sls file to inside global.sls
local line=$(grep '^ url_base:' /opt/so/saltstack/local/pillar/minions/$MINIONID.sls)
sed -i '/^ url_base:/d' /opt/so/saltstack/local/pillar/minions/$MINIONID.sls;
sed -i "/^global:/a \\$line" /opt/so/saltstack/local/pillar/global.sls;
# Adding play values to the global.sls
local HIVEPLAYSECRET=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)
local CORTEXPLAYSECRET=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)
sed -i "/^global:/a \\ hiveplaysecret: $HIVEPLAYSECRET" /opt/so/saltstack/local/pillar/global.sls;
sed -i "/^global:/a \\ cortexplaysecret: $CORTEXPLAYSECRET" /opt/so/saltstack/local/pillar/global.sls;
# Move storage nodes to hostname for SSL
# Get a list we can use:
grep -A1 searchnode /opt/so/saltstack/local/pillar/data/nodestab.sls | grep -v '\-\-' | sed '$!N;s/\n/ /' | awk '{print $1,$3}' | awk '/_searchnode:/{gsub(/\_searchnode:/, "_searchnode"); print}' >/tmp/nodes.txt
# Remove the nodes from cluster settings
while read p; do
local NAME=$(echo $p | awk '{print $1}')
local IP=$(echo $p | awk '{print $2}')
echo "Removing the old cross cluster config for $NAME"
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_cluster/settings -d '{"persistent":{"cluster":{"remote":{"'$NAME'":{"skip_unavailable":null,"seeds":null}}}}}'
done </tmp/nodes.txt
# Add the nodes back using hostname
while read p; do
local NAME=$(echo $p | awk '{print $1}')
local EHOSTNAME=$(echo $p | awk -F"_" '{print $1}')
local IP=$(echo $p | awk '{print $2}')
echo "Adding the new cross cluster config for $NAME"
curl -XPUT http://localhost:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"'$NAME'": {"skip_unavailable": "true", "seeds": ["'$EHOSTNAME':9300"]}}}}}'
done </tmp/nodes.txt
fi
[[ "$INSTALLEDVERSION" =~ rc.1 ]] && rc1_to_rc2
[[ "$INSTALLEDVERSION" =~ rc.2 ]] && rc2_to_rc3
[[ "$INSTALLEDVERSION" =~ rc.3 ]] && rc3_to_2.3.0
}
update_dockers() {
# List all the containers
if [ $MANAGERCHECK == 'so-import' ]; then
TRUSTED_CONTAINERS=( \
"so-idstools" \
"so-nginx" \
"so-filebeat" \
"so-suricata" \
"so-soc" \
"so-elasticsearch" \
"so-kibana" \
"so-kratos" \
"so-suricata" \
"so-registry" \
"so-pcaptools" \
"so-zeek" )
elif [ $MANAGERCHECK != 'so-helix' ]; then
TRUSTED_CONTAINERS=( \
"so-acng" \
"so-thehive-cortex" \
"so-curator" \
"so-domainstats" \
"so-elastalert" \
"so-elasticsearch" \
"so-filebeat" \
"so-fleet" \
"so-fleet-launcher" \
"so-freqserver" \
"so-grafana" \
"so-idstools" \
"so-influxdb" \
"so-kibana" \
"so-kratos" \
"so-logstash" \
"so-minio" \
"so-mysql" \
"so-nginx" \
"so-pcaptools" \
"so-playbook" \
"so-redis" \
"so-soc" \
"so-soctopus" \
"so-steno" \
"so-strelka-frontend" \
"so-strelka-manager" \
"so-strelka-backend" \
"so-strelka-filestream" \
"so-suricata" \
"so-telegraf" \
"so-thehive" \
"so-thehive-es" \
"so-wazuh" \
"so-zeek" )
else
TRUSTED_CONTAINERS=( \
"so-filebeat" \
"so-idstools" \
"so-logstash" \
"so-nginx" \
"so-redis" \
"so-steno" \
"so-suricata" \
"so-telegraf" \
"so-zeek" )
fi
rc1_to_rc2() {
# Download the containers from the interwebs
for i in "${TRUSTED_CONTAINERS[@]}"
do
# Pull down the trusted docker image
echo "Downloading $i:$NEWVERSION"
docker pull --disable-content-trust=false docker.io/$IMAGEREPO/$i:$NEWVERSION
# Tag it with the new registry destination
docker tag $IMAGEREPO/$i:$NEWVERSION $HOSTNAME:5000/$IMAGEREPO/$i:$NEWVERSION
docker push $HOSTNAME:5000/$IMAGEREPO/$i:$NEWVERSION
done
# Move the static file to global.sls
echo "Migrating static.sls to global.sls"
mv -v /opt/so/saltstack/local/pillar/static.sls /opt/so/saltstack/local/pillar/global.sls >> "$SOUP_LOG" 2>&1
sed -i '1c\global:' /opt/so/saltstack/local/pillar/global.sls >> "$SOUP_LOG" 2>&1
# Moving baseurl from minion sls file to inside global.sls
local line=$(grep '^ url_base:' /opt/so/saltstack/local/pillar/minions/$MINIONID.sls)
sed -i '/^ url_base:/d' /opt/so/saltstack/local/pillar/minions/$MINIONID.sls;
sed -i "/^global:/a \\$line" /opt/so/saltstack/local/pillar/global.sls;
# Adding play values to the global.sls
local HIVEPLAYSECRET=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)
local CORTEXPLAYSECRET=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)
sed -i "/^global:/a \\ hiveplaysecret: $HIVEPLAYSECRET" /opt/so/saltstack/local/pillar/global.sls;
sed -i "/^global:/a \\ cortexplaysecret: $CORTEXPLAYSECRET" /opt/so/saltstack/local/pillar/global.sls;
# Move storage nodes to hostname for SSL
# Get a list we can use:
grep -A1 searchnode /opt/so/saltstack/local/pillar/data/nodestab.sls | grep -v '\-\-' | sed '$!N;s/\n/ /' | awk '{print $1,$3}' | awk '/_searchnode:/{gsub(/\_searchnode:/, "_searchnode"); print}' >/tmp/nodes.txt
# Remove the nodes from cluster settings
while read p; do
local NAME=$(echo $p | awk '{print $1}')
local IP=$(echo $p | awk '{print $2}')
echo "Removing the old cross cluster config for $NAME"
curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_cluster/settings -d '{"persistent":{"cluster":{"remote":{"'$NAME'":{"skip_unavailable":null,"seeds":null}}}}}'
done </tmp/nodes.txt
# Add the nodes back using hostname
while read p; do
local NAME=$(echo $p | awk '{print $1}')
local EHOSTNAME=$(echo $p | awk -F"_" '{print $1}')
local IP=$(echo $p | awk '{print $2}')
echo "Adding the new cross cluster config for $NAME"
curl -XPUT http://localhost:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"'$NAME'": {"skip_unavailable": "true", "seeds": ["'$EHOSTNAME':9300"]}}}}}'
done </tmp/nodes.txt
INSTALLEDVERSION=rc.2
}
rc2_to_rc3() {
# move location of local.rules
cp /opt/so/saltstack/default/salt/idstools/localrules/local.rules /opt/so/saltstack/local/salt/idstools/local.rules
if [ -f /opt/so/saltstack/local/salt/idstools/localrules/local.rules ]; then
cat /opt/so/saltstack/local/salt/idstools/localrules/local.rules >> /opt/so/saltstack/local/salt/idstools/local.rules
fi
rm -rf /opt/so/saltstack/local/salt/idstools/localrules
rm -rf /opt/so/saltstack/default/salt/idstools/localrules
# Rename mdengine to MDENGINE
sed -i "s/ zeekversion/ mdengine/g" /opt/so/saltstack/local/pillar/global.sls
# Enable Strelka Rules
sed -i "/ rules:/c\ rules: 1" /opt/so/saltstack/local/pillar/global.sls
INSTALLEDVERSION=rc.3
}
rc3_to_2.3.0() {
# Fix Tab Complete
if [ ! -f /etc/profile.d/securityonion.sh ]; then
echo "complete -cf sudo" > /etc/profile.d/securityonion.sh
fi
{
echo "redis_settings:"
echo " redis_maxmemory: 827"
echo "playbook:"
echo " api_key: de6639318502476f2fa5aa06f43f51fb389a3d7f"
} >> /opt/so/saltstack/local/pillar/global.sls
sed -i 's/playbook:/playbook_db:/' /opt/so/saltstack/local/pillar/secrets.sls
{
echo "playbook_admin: $(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)"
echo "playbook_automation: $(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)"
} >> /opt/so/saltstack/local/pillar/secrets.sls
}
space_check() {
# Check to see if there is enough space
CURRENTSPACE=$(df -BG / | grep -v Avail | awk '{print $4}' | sed 's/.$//')
if [ "$CURRENTSPACE" -lt "10" ]; then
echo "You are low on disk space. Upgrade will try and clean up space.";
clean_dockers
else
echo "Plenty of space for upgrading"
fi
}
unmount_update() {
cd /tmp
umount /tmp/soagupdate
}
update_centos_repo() {
# Update the files in the repo
echo "Syncing new updates to /nsm/repo"
rsync -av $AGREPO/* /nsm/repo/
echo "Creating repo"
createrepo /nsm/repo
}
update_version() {
# Update the version to the latest
echo "Updating the Security Onion version file."
echo $NEWVERSION > /etc/soversion
sed -i "s/$INSTALLEDVERSION/$NEWVERSION/g" /opt/so/saltstack/local/pillar/global.sls
sed -i "/ soversion:/c\ soversion: $NEWVERSION" /opt/so/saltstack/local/pillar/global.sls
}
upgrade_check() {
@@ -262,6 +327,10 @@ upgrade_check_salt() {
if [ "$INSTALLEDSALTVERSION" == "$NEWSALTVERSION" ]; then
echo "You are already running the correct version of Salt for Security Onion."
else
UPGRADESALT=1
fi
}
upgrade_salt() {
SALTUPGRADED=True
echo "Performing upgrade of Salt from $INSTALLEDSALTVERSION to $NEWSALTVERSION."
echo ""
@@ -272,7 +341,11 @@ upgrade_check_salt() {
yum versionlock delete "salt-*"
echo "Updating Salt packages and restarting services."
echo ""
sh $UPDATE_DIR/salt/salt/scripts/bootstrap-salt.sh -F -M -x python3 stable "$NEWSALTVERSION"
if [ $is_airgap -eq 0 ]; then
sh $UPDATE_DIR/salt/salt/scripts/bootstrap-salt.sh -r -F -M -x python3 stable "$NEWSALTVERSION"
else
sh $UPDATE_DIR/salt/salt/scripts/bootstrap-salt.sh -F -M -x python3 stable "$NEWSALTVERSION"
fi
echo "Applying yum versionlock for Salt."
echo ""
yum versionlock add "salt-*"
@@ -292,13 +365,12 @@ upgrade_check_salt() {
apt-mark hold "salt-master"
apt-mark hold "salt-minion"
fi
fi
}
verify_latest_update_script() {
# Check to see if the update scripts match. If not run the new one.
CURRENTSOUP=$(md5sum /opt/so/saltstack/default/salt/common/tools/sbin/soup | awk '{print $1}')
GITSOUP=$(md5sum /tmp/sogh/securityonion/salt/common/tools/sbin/soup | awk '{print $1}')
GITSOUP=$(md5sum $UPDATE_DIR/salt/common/tools/sbin/soup | awk '{print $1}')
if [[ "$CURRENTSOUP" == "$GITSOUP" ]]; then
echo "This version of the soup script is up to date. Proceeding."
else
@@ -329,13 +401,28 @@ done
echo "Checking to see if this is a manager."
echo ""
manager_check
require_manager
set_minionid
echo "Checking to see if this is an airgap install"
echo ""
check_airgap
echo "Found that Security Onion $INSTALLEDVERSION is currently installed."
echo ""
detect_os
set_os
echo ""
echo "Cloning Security Onion github repo into $UPDATE_DIR."
clone_to_tmp
if [ $is_airgap -eq 0 ]; then
# Let's mount the ISO since this is airgap
airgap_mounted
else
echo "Cloning Security Onion github repo into $UPDATE_DIR."
clone_to_tmp
fi
if [ -f /usr/sbin/so-image-common ]; then
. /usr/sbin/so-image-common
else
add_common
fi
echo ""
echo "Verifying we have the latest soup script."
verify_latest_update_script
@@ -343,30 +430,64 @@ echo ""
echo "Let's see if we need to update Security Onion."
upgrade_check
space_check
echo "Checking for Salt Master and Minion updates."
upgrade_check_salt
echo ""
echo "Performing upgrade from Security Onion $INSTALLEDVERSION to Security Onion $NEWVERSION."
echo ""
echo "Updating dockers to $NEWVERSION."
if [ $is_airgap -eq 0 ]; then
airgap_update_dockers
else
update_registry
update_docker_containers "soup"
fi
echo ""
echo "Stopping Salt Minion service."
systemctl stop salt-minion
echo "Killing any remaining Salt Minion processes."
pkill -9 -ef /usr/bin/salt-minion
echo ""
echo "Stopping Salt Master service."
systemctl stop salt-master
echo ""
echo "Checking for Salt Master and Minion updates."
upgrade_check_salt
# Does salt need upgraded. If so update it.
if [ "$UPGRADESALT" == "1" ]; then
echo "Upgrading Salt"
# Update the repo files so it can actually upgrade
if [ $is_airgap -eq 0 ]; then
update_centos_repo
yum clean all
fi
upgrade_salt
fi
echo "Checking if Salt was upgraded."
echo ""
# Check that Salt was upgraded
if [[ $(salt --versions-report | grep Salt: | awk {'print $2'}) != "$NEWSALTVERSION" ]]; then
echo "Salt upgrade failed. Check of indicators of failure in $SOUP_LOG."
echo "Once the issue is resolved, run soup again."
echo "Exiting."
echo ""
exit 1
else
echo "Salt upgrade success."
echo ""
fi
echo "Making pillar changes."
pillar_changes
echo ""
echo "Cleaning up old dockers."
clean_dockers
echo ""
echo "Updating dockers to $NEWVERSION."
update_dockers
# Only update the repo if its airgap
if [[ $is_airgap -eq 0 ]] && [[ "$UPGRADESALT" != "1" ]]; then
update_centos_repo
fi
echo ""
echo "Copying new Security Onion code from $UPDATE_DIR to $DEFAULT_SALT_DIR."
@@ -382,9 +503,19 @@ echo ""
echo "Starting Salt Master service."
systemctl start salt-master
# Only regenerate osquery packages if Fleet is enabled
FLEET_MANAGER=$(lookup_pillar fleet_manager)
FLEET_NODE=$(lookup_pillar fleet_node)
if [[ "$FLEET_MANAGER" == "True" || "$FLEET_NODE" == "True" ]]; then
echo ""
echo "Regenerating Osquery Packages.... This will take several minutes."
salt-call state.apply fleet.event_gen-packages -l info queue=True
echo ""
fi
echo ""
echo "Running a highstate to complete the Security Onion upgrade on this manager. This could take several minutes."
highstate
salt-call state.highstate -l info queue=True
echo ""
echo "Upgrade from $INSTALLEDVERSION to $NEWVERSION complete."
@@ -397,17 +528,23 @@ masterunlock
echo ""
echo "Starting Salt Master service."
systemctl start salt-master
highstate
echo "Running a highstate. This could take several minutes."
salt-call state.highstate -l info queue=True
playbook
unmount_update
SALTUPGRADED="True"
if [[ "$SALTUPGRADED" == "True" ]]; then
if [ "$UPGRADESALT" == "1" ]; then
echo ""
echo "Upgrading Salt on the remaining Security Onion nodes from $INSTALLEDSALTVERSION to $NEWSALTVERSION."
salt -C 'not *_eval and not *_helix and not *_manager and not *_managersearch and not *_standalone' -b $BATCHSIZE state.apply salt.minion
if [ $is_airgap -eq 0 ]; then
salt -C 'not *_eval and not *_helix and not *_manager and not *_managersearch and not *_standalone' cmd.run "yum clean all"
fi
salt -C 'not *_eval and not *_helix and not *_manager and not *_managersearch and not *_standalone' -b $BATCHSIZE state.apply salt.minion queue=True
echo ""
fi
check_sudoers
}
main "$@" | tee /dev/fd/3

Some files were not shown because too many files have changed in this diff Show More