Compare commits

..

469 Commits

Author SHA1 Message Date
Mike Reeves
d66f424e5e Merge pull request #1072 from Security-Onion-Solutions/fix/2.0.1-pcap-interval
Fix/2.0.1 Update Readme and changes.json
2020-07-23 12:12:13 -04:00
Mike Reeves
4b127010ee Update changes.json 2020-07-23 11:59:20 -04:00
Mike Reeves
75477fe9bf Update changes.json 2020-07-23 11:56:14 -04:00
Mike Reeves
30fa9872f9 Update README.md 2020-07-23 10:38:26 -04:00
Mike Reeves
42390eb8a2 Merge pull request #1069 from Security-Onion-Solutions/fix/2.0.1-pcap-interval
Fix/2.0.1 pcap interval and security fixes
2020-07-23 09:53:56 -04:00
Mike Reeves
ff77abfdc8 Update soup
Remove strelka that isn't an image. Fix formatting
2020-07-23 09:51:52 -04:00
Mike Reeves
74faab92ab Remove variables.txt 2020-07-23 09:21:05 -04:00
Mike Reeves
201efd285a Fix passwords from conflicting with yaml 2020-07-22 16:34:50 -04:00
Mike Reeves
6d6ba04dcd Fix version replace 2020-07-22 16:15:32 -04:00
Mike Reeves
b24c82d49c Fix Docker List 2020-07-22 16:09:28 -04:00
Mike Reeves
b9e6ddf7df Clean up static.sls passwords 2020-07-22 15:50:56 -04:00
Jason Ertel
46e7d29f12 Add support for custom branches in soup 2020-07-22 14:35:50 -04:00
Jason Ertel
cb46ca4832 Ensure distributed installations have the check-in interval correctly set 2020-07-22 14:26:55 -04:00
Mike Reeves
f5665ad700 Merge pull request #1045 from Security-Onion-Solutions/TOoSmOotH-patch-1
Update VERIFY_ISO.md
2020-07-21 08:49:53 -04:00
Mike Reeves
3141e2eca1 Update VERIFY_ISO.md 2020-07-21 08:46:38 -04:00
Mike Reeves
6c49addbec Merge pull request #1040 from Security-Onion-Solutions/dev
Update ISO Signature
2020-07-20 17:01:02 -04:00
Mike Reeves
a891fed1be Create VERIFY_ISO.md 2020-07-20 16:58:32 -04:00
Mike Reeves
bbd1e9ba74 Create KEYS 2020-07-20 16:36:23 -04:00
Doug Burks
da3b055428 Update README.md 2020-07-20 16:33:39 -04:00
Doug Burks
a7fdd21284 Update README.md 2020-07-20 16:30:25 -04:00
Mike Reeves
1b02ad0d46 Upload ISO sig 2020-07-20 16:13:07 -04:00
Josh Brower
6d1ad3f2e0 Merge pull request #1038 from Security-Onion-Solutions/dev
Fix for telegraf
2020-07-20 14:38:12 -04:00
Josh Patterson
666464c7f2 Merge pull request #1037 from Security-Onion-Solutions/quickfix/grafana
ensure telegraf hostname is lowercase
2020-07-20 14:36:49 -04:00
m0duspwnens
fc14f4d8d8 ensure telegraf hostname is lowercase 2020-07-20 14:35:47 -04:00
Doug Burks
095e637dfa Merge pull request #1036 from Security-Onion-Solutions/dev
2.0.0.rc.1
2020-07-20 14:35:16 -04:00
William Wernert
edcf834635 Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev
# Conflicts:
#	salt/common/tools/sbin/so-elastic-clear
2020-07-20 14:23:23 -04:00
William Wernert
9be4756a90 [fix] Resolve merge commits 2020-07-20 14:22:55 -04:00
bryant-treacle
9ff3ffc401 Issue #885: so-elastic-clear not removing so-* indices 2020-07-20 14:21:17 -04:00
Mike Reeves
a642ea0e98 Merge branch 'master' into dev 2020-07-20 13:27:44 -04:00
Mike Reeves
0b0543045b Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into dev 2020-07-20 10:15:53 -04:00
Mike Reeves
9565050b82 Fix Features script 2020-07-20 10:15:47 -04:00
Jason Ertel
beda859207 Update changes.json sub-bullets to improve communication of the content 2020-07-20 08:47:39 -04:00
Jason Ertel
bd70fdbb33 Corrected JSON syntax to avoid a blank Overview screen in SOC; Applied HTML formatting of changes.json summaries for better markup handling. 2020-07-19 08:11:57 -04:00
Jason Ertel
053f27eb35 Run setterm, to blank terminal, only for non-automated installations 2020-07-19 06:58:28 -04:00
Mike Reeves
514df1211e Soup Update 2020-07-18 23:34:45 -04:00
Mike Reeves
28a954db82 Soup Update 2020-07-18 23:24:22 -04:00
Mike Reeves
0302d2b6ac Soup Update 2020-07-18 23:19:52 -04:00
Mike Reeves
74e6846e84 Soup Update 2020-07-18 23:19:14 -04:00
Mike Reeves
954c12acfb Soup Update 2020-07-18 23:16:39 -04:00
Mike Reeves
872f849204 Soup Update 2020-07-18 23:12:53 -04:00
Mike Reeves
5bab5ae7d1 Soup Update 2020-07-18 23:10:37 -04:00
Mike Reeves
27568f0047 Soup Update 2020-07-18 23:09:18 -04:00
Mike Reeves
095a87dc46 Soup Update 2020-07-18 23:06:31 -04:00
Mike Reeves
847a9d76e0 Soup Update 2020-07-18 23:02:28 -04:00
Mike Reeves
fbc8a90083 Soup Update 2020-07-18 22:58:15 -04:00
Mike Reeves
7b1ca5f361 Fix common tools permissions 2020-07-18 22:50:08 -04:00
Mike Reeves
1bcbcb1f98 Fix idstools jinja 2020-07-18 22:46:57 -04:00
Mike Reeves
517edf1938 Update Release Notes 2020-07-18 17:55:35 -04:00
Mike Reeves
64bd70bb48 Update Release Notes 2020-07-18 17:50:25 -04:00
Mike Reeves
f4c23fcc2e Merge pull request #1033 from Security-Onion-Solutions/fix/idstools
Fix/idstools
2020-07-18 17:33:54 -04:00
Mike Reeves
16906b8361 Merge branch 'dev' into fix/idstools 2020-07-18 17:32:54 -04:00
Mike Reeves
3de2afe618 Fix final bugs 2020-07-18 17:29:11 -04:00
Jason Ertel
23420ace56 Prevent nmcli, setterm, and echo output from leaking to console and crontab output 2020-07-18 08:38:09 -04:00
Mike Reeves
1d24d7bc7f Misc pillars 2020-07-17 17:38:10 -04:00
Mike Reeves
b75487dc74 Update so-functions 2020-07-17 17:36:13 -04:00
Mike Reeves
aaca5c7ff2 Update rulecat.conf 2020-07-17 17:35:16 -04:00
Mike Reeves
2e2bcfb3b7 Fix functions so pillars are correct 2020-07-17 17:33:36 -04:00
Mike Reeves
e78a14e2c7 Merge pull request #1032 from Security-Onion-Solutions/fix/idstools
IDSTOOLS Pillar Items
2020-07-17 16:00:59 -04:00
Mike Reeves
693a101d34 IDSTOOLS Pillar Items 2020-07-17 15:59:58 -04:00
William Wernert
3c855ed793 [fix] Set $percentage since it only exists in previous subshell 2020-07-17 15:38:14 -04:00
Mike Reeves
d3529686cc Merge pull request #1031 from Security-Onion-Solutions/quickfix/bro2zeeklogs
change reference from bro to zeek
2020-07-17 14:53:47 -04:00
m0duspwnens
7176fdf7a1 rename from bro to zeek 2020-07-17 14:53:01 -04:00
m0duspwnens
e3efaee864 change reference from bro to zeek 2020-07-17 14:41:44 -04:00
Mike Reeves
74f6f2abee Update soup 2020-07-17 13:38:55 -04:00
Josh Patterson
0d737b8f41 Merge pull request #1030 from Security-Onion-Solutions/quickfix/schedulesetup
remove quotes
2020-07-17 13:30:43 -04:00
William Wernert
5570c778ad [feat] Add hostname formatting check for manager hostname 2020-07-17 13:30:08 -04:00
m0duspwnens
6ba342c084 remove quotes 2020-07-17 13:30:05 -04:00
William Wernert
1309e0c7ad Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev 2020-07-17 13:09:21 -04:00
William Wernert
446817353d [refactor] | tee ... >> to > ... 2>> to show errors in log 2020-07-17 13:09:18 -04:00
Josh Brower
3c6ae08d4d Merge pull request #1029 from Security-Onion-Solutions/bugfix/fleet-eval
Kibana Fleet Pivot Fix
2020-07-17 13:01:08 -04:00
Josh Brower
da155b5dea Kibana Fleet Pivot Fix 2020-07-17 13:00:03 -04:00
William Wernert
1abf324654 [fix] Set py_ver_url_path for all install types 2020-07-17 12:59:17 -04:00
William Wernert
d88e15ecb4 [fix] Use | tee instead of redirect when already redirecting to setup log 2020-07-17 12:33:25 -04:00
William Wernert
9cbc7ad8f5 [fix] guage -> gauge 2020-07-17 12:08:16 -04:00
William Wernert
1bd154760d Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev 2020-07-17 11:09:11 -04:00
William Wernert
ede250d9e4 [feat] Merge access method dialogs together 2020-07-17 11:09:08 -04:00
William Wernert
d97271cca3 [fix] Don't drop to shell while running so-allow 2020-07-17 11:08:31 -04:00
Mike Reeves
17e3bde2f8 Create home dir for adduser function 2020-07-17 10:55:30 -04:00
Josh Brower
083e43b26b Merge pull request #1028 from Security-Onion-Solutions/bugfix/fleet-eval
Eval Ubuntu Fleet fix
2020-07-17 10:27:51 -04:00
Josh Brower
6e4eb76393 Eval Ubuntu Fleet fix 2020-07-17 10:25:48 -04:00
Josh Patterson
5633eed6a4 Merge pull request #1027 from Security-Onion-Solutions/quickfix/schedulesetup
dont try to copy schedules if the directory is empty
2020-07-17 10:24:50 -04:00
m0duspwnens
2541f4d8e8 dont try to copy schedules if the directory is empty 2020-07-17 10:23:51 -04:00
Josh Patterson
e6b795e8b3 Merge pull request #1026 from Security-Onion-Solutions/quickfix/schedulesetup
dont try to copy schedules if the directory is empty
2020-07-17 10:07:17 -04:00
m0duspwnens
6f077e66e6 dont try to copy schedules if the directory is empty 2020-07-17 10:05:54 -04:00
weslambert
2341d9592e Merge pull request #1025 from Security-Onion-Solutions/fix/wazuh_cleanup
Change verbiage
2020-07-17 09:39:21 -04:00
weslambert
e91aa751a7 Change verbiage 2020-07-17 09:38:43 -04:00
William Wernert
958d614bef [fix] Only show motd ip message on manager node 2020-07-17 09:21:47 -04:00
Josh Brower
442e870c16 Merge pull request #1024 from Security-Onion-Solutions/bugfix/kibana-dashboard-updates
Kibana dashboard updates
2020-07-17 08:15:33 -04:00
Josh Brower
32a6f825c2 Kibana dashboard updates 2020-07-17 08:14:37 -04:00
Josh Patterson
06c4924b70 Merge pull request #1023 from Security-Onion-Solutions/quickfix/yum
change from manager to master for salt config.get
2020-07-16 21:06:35 -04:00
m0duspwnens
cc77a50d8d change from manager to master for salt config.get 2020-07-16 21:05:44 -04:00
Mike Reeves
2d68d5419b fix adtotab perms 2020-07-16 19:47:15 -04:00
Mike Reeves
258d9d3bfc change salt perms 2020-07-16 17:07:04 -04:00
Mike Reeves
03ff592aa4 Merge pull request #1022 from Security-Onion-Solutions/fix/telegrafperms
Fix salt refresh script
2020-07-16 16:38:40 -04:00
Mike Reeves
21f09a9cd5 Fix salt refresh script 2020-07-16 16:37:48 -04:00
Josh Brower
4fd1daeca1 Merge pull request #1021 from Security-Onion-Solutions/bugfix/fleet-packages-urlbase
Osquery packages hostname fix
2020-07-16 16:36:30 -04:00
Josh Brower
51beb52bb8 Osquery packages hostname fix 2020-07-16 16:35:51 -04:00
Mike Reeves
20446ed3aa Merge pull request #1020 from Security-Onion-Solutions/fix/telegrafperms
Fix/telegrafperms
2020-07-16 16:34:04 -04:00
Mike Reeves
d31ce4aa48 Fix soup issues 2020-07-16 16:32:38 -04:00
Mike Reeves
07626905c5 Fix telegraf script perms 2020-07-16 15:20:11 -04:00
Josh Patterson
5634446fcb Merge pull request #1019 from Security-Onion-Solutions/quickfix/lstoes
fix the container watch for logstash container state
2020-07-16 15:06:29 -04:00
m0duspwnens
c61a52cc5e fix the container watch for logstash container state 2020-07-16 15:05:54 -04:00
William Wernert
25dbcfaebe [refactor] Add check for "Result: False" in setup 2020-07-16 14:08:56 -04:00
Josh Patterson
f1d8548913 Merge pull request #1017 from Security-Onion-Solutions/quickfix/lstoes
dont run templates script if there arent templates
2020-07-16 13:37:15 -04:00
m0duspwnens
9606d86e84 dont run templates script if there arent templates 2020-07-16 13:36:44 -04:00
William Wernert
8f62cd8f82 Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev 2020-07-16 11:33:20 -04:00
William Wernert
a041be5c21 [fix] Don't force YARA Strelka rules during setup 2020-07-16 11:33:11 -04:00
phil1090
5d2c6d330f Update README.md 2020-07-16 10:15:40 -04:00
Josh Patterson
582edd7aac Merge pull request #1016 from Security-Onion-Solutions/quickfix/lstoes
including elasticsearch in logstash state
2020-07-16 10:13:18 -04:00
m0duspwnens
f10f47ad4e including elasticsearch in logstash state 2020-07-16 10:12:10 -04:00
weslambert
f8bb094546 Merge pull request #1014 from Security-Onion-Solutions/fix/strelka_standalone
Fix module eval
2020-07-16 09:32:06 -04:00
Wes Lambert
8275f458a1 Fix module eval 2020-07-16 13:30:38 +00:00
William Wernert
5190e5d434 Update README.md 2020-07-16 09:20:20 -04:00
weslambert
7fecfdab32 Update README.md 2020-07-16 08:14:47 -04:00
weslambert
f7d527bb90 Update README.md 2020-07-16 08:14:23 -04:00
Josh Brower
350d2fbeda Update README.md 2020-07-15 19:07:25 -04:00
Josh Brower
29c28fcb5e Update README.md 2020-07-15 19:06:36 -04:00
Josh Brower
48c9244a81 Update README.md 2020-07-15 19:05:49 -04:00
Mike Reeves
a4672dedee Update README.md 2020-07-15 18:17:05 -04:00
Mike Reeves
473606371a Fix Features Download 2020-07-15 17:49:13 -04:00
Mike Reeves
d71dc89b13 New SOUP 2020-07-15 17:46:33 -04:00
Jason Ertel
9781d8d0e7 Ensure permissions are consistently applied to all imported PCAP files 2020-07-15 13:53:28 -04:00
Jason Ertel
0a976861f3 Dynamically set sensor checkin interval; allow overrides if var is preset 2020-07-15 13:22:14 -04:00
Josh Brower
80e081e828 Merge pull request #1010 from Security-Onion-Solutions/bugfix/playbook-anonymous-perms
Playbook anonymous perms fix
2020-07-15 12:40:47 -04:00
Josh Brower
d11ef08961 Playbook anonymous perms fix 2020-07-15 12:37:04 -04:00
Jason Ertel
3c42f50e99 Ensure whiptail success/summary screen is final step before reboot 2020-07-15 11:12:48 -04:00
Josh Patterson
83428d4785 Merge pull request #1009 from Security-Onion-Solutions/quickfix/lstoes
load templates for es for eval
2020-07-15 08:32:50 -04:00
m0duspwnens
e4fff05dbc load templates for es for eval 2020-07-15 08:30:43 -04:00
Jason Ertel
9dc1151347 Imported logs are sent to so-import index on eval installations 2020-07-14 22:59:42 -04:00
Jason Ertel
b53ce392ef Improve grammer of summary screen in whiptail 2020-07-14 22:45:38 -04:00
Jason Ertel
c0960e58e8 Improve grammer of so-allow input prompt 2020-07-14 19:42:53 -04:00
Josh Patterson
549916306c Merge pull request #1008 from Security-Onion-Solutions/quickfix/lstoes
Quickfix/lstoes
2020-07-14 17:37:19 -04:00
m0duspwnens
5cf71596b2 add curlys 2020-07-14 17:36:52 -04:00
Jason Ertel
acb800d1c9 Using static UID for Grafana overview dashboard to allow SOC to directly link to those dashboards 2020-07-14 17:36:30 -04:00
Jason Ertel
9bbbaa485c Switch PM to AM since we want to span midnight to midnight 2020-07-14 17:36:30 -04:00
m0duspwnens
acaec6c125 remove recurse causing issues 2020-07-14 17:12:29 -04:00
Josh Brower
e7e1982862 Merge pull request #1007 from Security-Onion-Solutions/bugfix/ingest-parsing
Parsing & Hunt query updates
2020-07-14 17:00:04 -04:00
Josh Brower
8647944ae6 Parsing & Hunt query updates 2020-07-14 16:59:06 -04:00
Mike Reeves
55056f3193 Merge pull request #1006 from Security-Onion-Solutions/fix/perms
Change opt/so perms
2020-07-14 16:19:02 -04:00
m0duspwnens
57bf23d83c move templates from logstash to elasticsearch 2020-07-14 16:07:46 -04:00
Doug Burks
a1e6a85a68 explicitly set Suricata timestamp timezone to UTC 2020-07-14 15:49:46 -04:00
weslambert
7a36803e2c Merge pull request #1002 from Security-Onion-Solutions/fix/strelka_observer
Add observer name for Strelka events
2020-07-14 13:39:52 -04:00
Wes Lambert
f9df39977b Add observer name for Strelka events 2020-07-14 17:38:43 +00:00
weslambert
7ed902c0ae Merge pull request #1001 from Security-Onion-Solutions/fix/suricata_timestamp
Convert message timestamp to @timestamp
2020-07-14 13:34:58 -04:00
Josh Brower
47388fa98d Merge pull request #998 from Security-Onion-Solutions/bugfix/fleet-soimage-fix
Fleet reactor fix
2020-07-14 13:06:52 -04:00
Josh Brower
ba8395fc11 Fleet reactor fix 2020-07-14 13:04:29 -04:00
William Wernert
3df5904269 Merge pull request #979 from Security-Onion-Solutions/feature/setup
Feature/setup
2020-07-14 11:17:03 -04:00
William Wernert
caf9e3f75a [fix] Redirect hive_init output to log 2020-07-14 11:13:50 -04:00
William Wernert
ad3c4c4950 [fix] master -> manager 2020-07-14 11:09:12 -04:00
Mike Reeves
57cd2cdbeb Change opt/so perms 2020-07-14 10:37:49 -04:00
William Wernert
4ab90a9a30 [fix] Move redirect var to function after $MAINIP has been set 2020-07-14 10:12:51 -04:00
Mike Reeves
f2d9abf1a5 Merge pull request #996 from Security-Onion-Solutions/fix/curator
Add all actions to cron
2020-07-14 10:05:27 -04:00
Mike Reeves
e404a41d8a Add all actions to cron 2020-07-14 10:04:15 -04:00
Mike Reeves
15be31af6d Merge pull request #995 from Security-Onion-Solutions/fix/curator
Fix spelling error in actions
2020-07-14 09:43:41 -04:00
Jason Ertel
67f2edce28 Resolve merge conflict that reverted import URL back to Kibana 2020-07-14 09:40:16 -04:00
Mike Reeves
d4e6189f6e Fix spelling error in actions 2020-07-14 09:39:56 -04:00
Wes Lambert
d6afde90b0 Convert message timestamp to @timestamp 2020-07-14 13:37:00 +00:00
Josh Brower
0c9c66f6e1 Merge pull request #993 from Security-Onion-Solutions/bugfix/playbook-init
Bugfix/playbook init
2020-07-14 09:14:56 -04:00
Josh Brower
2c72940010 Playbook db init fix 2020-07-14 09:09:55 -04:00
Josh Brower
b884e09e7a Playbook db init fix 2020-07-14 09:09:47 -04:00
William Wernert
178ac79da8 [refactor] Set $REDIRECTIT outside of subshell 2020-07-14 09:05:09 -04:00
Jason Ertel
09c460dbe9 Switch to final image repository prefix 'securityonion' for RC1 2020-07-14 00:45:20 -04:00
Jason Ertel
d75d64c8ed Mount imported pcap dirs into sensoroni container for imported PCAP pivots 2020-07-13 21:03:47 -04:00
Jason Ertel
8f66a27f07 Refactor image repository to a single variable 2020-07-13 18:26:43 -04:00
Jason Ertel
f67f0679ae Add new so-pcaptools image to docker list for network install 2020-07-13 16:02:22 -04:00
William Wernert
aa4d435020 [fix] Don't run so-allow before setup complete menu 2020-07-13 15:21:05 -04:00
William Wernert
81c8185cb5 [refactor] Delete check for network install since we check /nsm now 2020-07-13 14:53:47 -04:00
William Wernert
1cf0732991 Merge branch 'dev' into feature/setup
# Conflicts:
#	setup/so-setup
2020-07-13 14:35:24 -04:00
William Wernert
00f178197c [fix] Evaluate $success early to avoid checking against other output 2020-07-13 14:34:11 -04:00
Mike Reeves
98811c147d Merge pull request #989 from Security-Onion-Solutions/feature/isosetup
Fix username so install works properly from ISO
2020-07-13 14:27:20 -04:00
Mike Reeves
55869c4f81 Fix username so install works properly from ISO 2020-07-13 14:25:10 -04:00
William Wernert
c585713122 [style] Change SO_ERROR check to non-empty check 2020-07-13 13:28:54 -04:00
Josh Patterson
8dc63a1f52 Merge pull request #987 from Security-Onion-Solutions/quickfix/patchschedule
Quickfix/patchschedule
2020-07-13 11:35:00 -04:00
m0duspwnens
59c00057b1 fix patch pillar, select patch hours on 1 screen 2020-07-13 11:34:30 -04:00
m0duspwnens
ef3c5d1fe0 fix patch pillar, select patch hours on 1 screen 2020-07-13 11:31:37 -04:00
William Wernert
06aa63dd14 Merge branch 'dev' into feature/setup 2020-07-13 11:24:04 -04:00
Mike Reeves
3bc492ebde Merge pull request #986 from Security-Onion-Solutions/feature/isosetup
Removes create admin user from setup
2020-07-13 11:13:10 -04:00
Mike Reeves
dc0aa270d9 Fix ISO rsync 2020-07-13 11:12:11 -04:00
Mike Reeves
14faa3b898 Clean up bash profile 2020-07-13 11:08:04 -04:00
Mike Reeves
a6cceef986 Removes create admin user from setup 2020-07-13 10:55:55 -04:00
Josh Patterson
db80675609 Merge pull request #985 from Security-Onion-Solutions/quickfix/elasticpillar
prevent elasticsearch pillar being added twice for managers and helix
2020-07-13 09:48:44 -04:00
m0duspwnens
242e17b329 prevent elasticsearch pillar being added twice for managers and helix 2020-07-13 09:45:11 -04:00
William Wernert
c31c24ccd8 [fix] Check /nsm instead of / for free space 2020-07-13 09:12:24 -04:00
Josh Brower
e62381e998 Merge pull request #982 from Security-Onion-Solutions/bugfix/alerting
Misc fixes
2020-07-10 19:50:27 -04:00
Josh Brower
65062d93f4 Misc fixes 2020-07-10 19:43:43 -04:00
William Wernert
99dc16d644 Merge pull request #981 from Security-Onion-Solutions/bugfix/disk-space-network-only
[fix] Only check for disk space on a network install
2020-07-10 18:52:48 -04:00
William Wernert
605daaf66b [fix] Only check for disk space on a network install 2020-07-10 18:45:34 -04:00
William Wernert
056b3a0629 Merge branch 'dev' into feature/setup
# Conflicts:
#	setup/so-setup
2020-07-10 18:41:24 -04:00
William Wernert
f9c8f8cdca [fix] Set SKIP_REBOOT on any failure during setup 2020-07-10 18:40:39 -04:00
William Wernert
aee304e5d5 [fix] master -> manager 2020-07-10 18:13:20 -04:00
William Wernert
4cfecae3b2 [ix] Remove grafanapassword pillar key 2020-07-10 17:59:51 -04:00
William Wernert
ce7373501b [fix] Add fallback for hive + cortex users 2020-07-10 17:58:47 -04:00
William Wernert
571e97cdf7 Merge branch 'dev' into feature/setup
# Conflicts:
#	salt/thehive/scripts/cortex_init
#	salt/thehive/scripts/hive_init
#	setup/so-functions
#	setup/so-whiptail
2020-07-10 17:42:56 -04:00
William Wernert
547298fce0 [refactor] Hide output for cortex and thehive init scripts 2020-07-10 17:34:33 -04:00
weslambert
ef64048fc6 Merge pull request #978 from Security-Onion-Solutions/fix/sensor-clean
Fix value
2020-07-10 17:17:57 -04:00
weslambert
eb2dc0be4c Fix value 2020-07-10 17:17:33 -04:00
Josh Patterson
69023cdb31 Merge pull request #976 from Security-Onion-Solutions/issue/404
Issue/404
2020-07-10 16:28:28 -04:00
m0duspwnens
13af4cacb0 merge with dev and resolve conflicts 2020-07-10 16:27:10 -04:00
Mike Reeves
755f47da2d Merge pull request #975 from Security-Onion-Solutions/fix/lstemplate
Fix/lstemplate
2020-07-10 15:55:50 -04:00
Mike Reeves
46d572fa8c Fix Filebeat spacing 2020-07-10 15:51:12 -04:00
weslambert
9b079df9f5 Merge pull request #974 from Security-Onion-Solutions/fix/sensor_clean
Fix/sensor clean
2020-07-10 15:35:57 -04:00
Wes Lambert
d7f7fb801c Set role 2020-07-10 19:35:27 +00:00
Wes Lambert
37ab252e01 Add sensor proc eval 2020-07-10 19:30:08 +00:00
William Wernert
f56811e745 [feat] Use setup user+pass for TheHive, Cortex, and Fleet as well 2020-07-10 14:40:04 -04:00
William Wernert
67c8836cd6 [fix] Use 100GB min space for standalone also 2020-07-10 14:39:02 -04:00
William Wernert
72aa91b763 [feat] Add message in setup and motd on where to access SOC 2020-07-10 14:38:21 -04:00
m0duspwnens
9730c4561d add elasticsearch pillar to manager 2020-07-10 14:08:39 -04:00
Jason Ertel
358ef78cd9 Do not stop curator since imported data will now be placed into a longer term so-import index 2020-07-10 13:58:52 -04:00
Jason Ertel
811bbb4cb0 Require sudo to run an import 2020-07-10 13:58:52 -04:00
weslambert
33375a0809 Merge pull request #973 from Security-Onion-Solutions/fix/curator_logsizelimit
Move zeek_clean to so-sensor-clean
2020-07-10 13:57:58 -04:00
Wes Lambert
6e99ca600f Move zeek_clean to so-sensor-clean 2020-07-10 17:56:40 +00:00
Mike Reeves
5eb33d5ac7 Logstash Import and Template Assignment 2020-07-10 13:53:55 -04:00
m0duspwnens
24b8f81e38 merge with dev and resolve conflicts 2020-07-10 12:20:14 -04:00
Mike Reeves
bbef7955b2 Update eval.sls 2020-07-10 11:36:46 -04:00
Mike Reeves
9da4dd0ac9 Merge pull request #971 from Security-Onion-Solutions/feature/espillarz
Feature/espillarz
2020-07-10 11:35:24 -04:00
Mike Reeves
c656bec9c0 Merge branch 'dev' into feature/espillarz 2020-07-10 11:35:12 -04:00
m0duspwnens
0a1b5f29eb merge with dev and resolv conflicts 2020-07-10 10:48:49 -04:00
m0duspwnens
1f48dc765e merge with dev and resolv conflicts 2020-07-10 10:36:48 -04:00
Mike Reeves
3706aa76d8 Add jinja extension 2020-07-10 10:35:31 -04:00
Doug Burks
2ce254dfb0 add new DPD query to Hunt 2020-07-10 06:00:36 -04:00
Doug Burks
f5114c034d change Log Type query in Hunt to include event.dataset in the groupby 2020-07-10 05:52:10 -04:00
Mike Reeves
1a6c4c12b4 Fix elasticsearch yaml 2020-07-09 21:56:32 -04:00
Jason Ertel
6bfd777d25 Enabled elastalert log 2020-07-09 21:34:35 -04:00
Mike Reeves
8ef18f9044 Fiz pillar 2020-07-09 18:51:59 -04:00
m0duspwnens
b2e7a4221c master to manager for ssl signing policy 2020-07-09 17:19:17 -04:00
Mike Reeves
9a7035326d Update Logstash pillar 2020-07-09 17:09:20 -04:00
m0duspwnens
9c2dcd2318 fix reference to master grain 2020-07-09 17:06:44 -04:00
Mike Reeves
ad6c9e7fe9 recurse actions for curator 2020-07-09 16:58:35 -04:00
Mike Reeves
6094d19b0b Make hot default 2020-07-09 16:54:31 -04:00
Mike Reeves
3c6465bb7f ES Jinja the config 2020-07-09 16:42:39 -04:00
Jason Ertel
33179141a1 Enable PCAP pivots from imports 2020-07-09 16:11:38 -04:00
m0duspwnens
5ca3ecf4bd fix reference to master grain 2020-07-09 15:42:39 -04:00
Josh Brower
7b91704894 Merge pull request #970 from Security-Onion-Solutions/defensivedepth-patch-2-host-pillar
Update so-setup
2020-07-09 15:32:38 -04:00
Josh Brower
58d290aa57 Update so-setup 2020-07-09 15:32:19 -04:00
William Wernert
c5eff1d89e [feat][WIP] Add option to run so-allow -a <ip/cidr> during setup 2020-07-09 14:47:55 -04:00
Josh Brower
206bdc60f3 Merge pull request #967 from Security-Onion-Solutions/feature/low-level-alerts
Feature - low level alerts
2020-07-09 13:56:31 -04:00
m0duspwnens
bdd0f64462 add period 2020-07-09 13:54:48 -04:00
Josh Brower
52f7111e1d Feature - low level alerts 2020-07-09 13:53:55 -04:00
m0duspwnens
aea3099df6 change wording 2020-07-09 13:52:31 -04:00
m0duspwnens
823ee42120 https://github.com/Security-Onion-Solutions/securityonion/issues/404 2020-07-09 13:45:24 -04:00
Mike Reeves
7c6677916a Curator actions 2020-07-09 12:56:29 -04:00
Mike Reeves
357efac873 Add index specific curator settings 2020-07-09 12:10:53 -04:00
Mike Reeves
ca20279a09 Add curator to static pillar 2020-07-09 12:00:07 -04:00
Mike Reeves
96bcf9d9f3 Add temaplte files per index 2020-07-09 11:51:55 -04:00
m0duspwnens
3cf31e2460 https://github.com/Security-Onion-Solutions/securityonion/issues/404 2020-07-09 11:27:06 -04:00
Mike Reeves
9c2f7d574d Add ES settings to pillar 2020-07-09 11:19:02 -04:00
Mike Reeves
2c32c24bf0 Fix logstash logic 2020-07-09 09:16:48 -04:00
Josh Patterson
2bfdb09674 Merge pull request #966 from Security-Onion-Solutions/issue/959
fix typo
2020-07-09 08:52:30 -04:00
m0duspwnens
d539f1ddf8 fix typo 2020-07-09 08:51:53 -04:00
Doug Burks
8dfafffef0 remove duplicate line for message2.conn_uids 2020-07-09 06:44:08 -04:00
weslambert
818f7f56b2 Merge pull request #965 from Security-Onion-Solutions/feature/add_gcp_check
Add GCP and make cloud check more generic
2020-07-08 23:31:37 -04:00
weslambert
c01047fad2 Add /dev/null 2020-07-08 23:30:50 -04:00
weslambert
889ba67d85 Move EC2 to more generic cloud verbiage 2020-07-08 23:27:46 -04:00
weslambert
ce00d829e1 Move EC2 to more generic cloud verbiage and check for GCP 2020-07-08 23:26:48 -04:00
weslambert
67fb46f519 Merge pull request #963 from Security-Onion-Solutions/fix/curator_logsizelimit
Add standalone evaluation for log_size_limit
2020-07-08 15:40:54 -04:00
Josh Patterson
99ce77e9bd Merge pull request #962 from Security-Onion-Solutions/issue/959
pillarize yum.conf installonly_limit and proxy
2020-07-08 15:39:22 -04:00
Wes Lambert
f2cea273b6 Add standalone evaluation for log_size_limit 2020-07-08 19:39:14 +00:00
m0duspwnens
59061926f0 pillarize yum.conf installonly_limit and proxy 2020-07-08 15:37:20 -04:00
weslambert
beda67d2a9 Merge pull request #955 from Security-Onion-Solutions/fix/strelka_message_drop
Drop message field and original exiftool keys
2020-07-08 10:56:06 -04:00
weslambert
4cf31e1ee7 Drop message field and original exiftool keys 2020-07-08 10:55:40 -04:00
Doug Burks
fef803a86c Add ignore_failure to geoip processor calls #942 2020-07-08 10:41:14 -04:00
Josh Patterson
3352eb77e9 Merge pull request #954 from Security-Onion-Solutions/issue/825
add pillar example for filebeat inputs/output
2020-07-08 09:53:18 -04:00
m0duspwnens
5f68542241 add pillar example for filebeat inputs/output 2020-07-08 09:52:25 -04:00
weslambert
9c11de5455 Merge pull request #953 from Security-Onion-Solutions/fix/zeek_files_uid
Rename uids to uid
2020-07-08 09:40:04 -04:00
weslambert
b25a3b6986 Rename uids to uid 2020-07-08 09:39:37 -04:00
weslambert
88b7a31195 Merge pull request #952 from Security-Onion-Solutions/fix/wazuh_authdport
Add Wazuh Authd Port
2020-07-08 09:26:28 -04:00
weslambert
987acaeb7b Add Wazuh Authd Port 2020-07-08 09:26:04 -04:00
Josh Brower
10cbc96f48 Merge pull request #948 from Security-Onion-Solutions/fix/fleet
Fleet setup bugfix
2020-07-07 20:56:43 -04:00
Josh Brower
b4b122dbd9 Fleet setup bugfix 2020-07-07 20:55:47 -04:00
William Wernert
4231fb1d1a Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev 2020-07-07 17:38:30 -04:00
William Wernert
72a98b33a7 [fix] Change test to check value of $SO_ERROR 2020-07-07 17:38:23 -04:00
Mike Reeves
cdce804c9f Update 9700_output_strelka.conf.jinja 2020-07-07 17:36:49 -04:00
weslambert
2992938596 Merge pull request #947 from Security-Onion-Solutions/fix/strelka_exiftool
Add fields for exiftool keys
2020-07-07 17:13:57 -04:00
Mike Reeves
fc377cd3c1 Merge pull request #945 from Security-Onion-Solutions/issue/929
SSL Lockdown
2020-07-07 16:31:33 -04:00
Mike Reeves
1954a389b0 Update so-functions 2020-07-07 16:12:07 -04:00
Mike Reeves
9576151993 Merge pull request #944 from Security-Onion-Solutions/issue/937
Issue/937
2020-07-07 16:07:47 -04:00
Wes Lambert
3b50ce032a Add fields for exiftool keys 2020-07-07 20:02:09 +00:00
Josh Patterson
07cc89e4d6 Merge pull request #943 from Security-Onion-Solutions/issue/825
Pillarize filebeat inputs and output
2020-07-07 15:51:08 -04:00
m0duspwnens
fff713db85 changes for https://github.com/Security-Onion-Solutions/securityonion/issues/825 2020-07-07 15:48:47 -04:00
Mike Reeves
eccfaf94fb Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion into issue/937 2020-07-07 15:10:12 -04:00
Jason Ertel
f4f189cc50 correct capitalization of true 2020-07-07 14:28:11 -04:00
William Wernert
640cfee3e1 Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev 2020-07-07 13:13:28 -04:00
William Wernert
3815f7e58e [refactor] Edit logic around setup failure/completion
* Always run `install_cleanup` and `so-allow`
* Change if statement to check whether `$success != 0` or if `$SO_ERROR` was set
* Set `$IP` only for `so-allow` instead of exporting it
2020-07-07 13:12:46 -04:00
William Wernert
1d47cec928 [refactor] Move install_cleanup outside of whiptail functions 2020-07-07 13:02:58 -04:00
William Wernert
0b995533ea [refactor] Only notify user of error found during setup 2020-07-07 13:01:29 -04:00
Mike Reeves
ec89ab39ac Update 9999_output_redis.conf.jinja 2020-07-07 11:56:45 -04:00
weslambert
34e06ecde1 Merge pull request #940 from Security-Onion-Solutions/feature/strelka_fuid
Add Zeek FUID for Strelka records
2020-07-07 11:01:09 -04:00
Wes Lambert
e0570e1db7 Add Zeek FUID for Strelka records 2020-07-07 15:00:01 +00:00
Mike Reeves
c59096d9bd rename node pillar to elasticsearch 2020-07-07 10:42:12 -04:00
Jason Ertel
62cc02301e Do not attempt to install a plugin or bc command if already exists 2020-07-07 10:28:15 -04:00
weslambert
d334d5ab83 Merge pull request #938 from Security-Onion-Solutions/fix/strelka_filebeat
Fix pillar reference for Strelka/FB
2020-07-07 09:48:19 -04:00
Wes Lambert
2fdd5fd77b Fix pillar reference for Strelka/FB 2020-07-07 13:46:57 +00:00
William Wernert
e2c9184b29 [fix][refactor] Don't use relative path in so-setup-network 2020-07-07 08:45:28 -04:00
Mike Reeves
291ac3c597 Fix SSL Perms 2020-07-06 17:24:04 -04:00
Mike Reeves
be5f4b04c6 Fix SSL Perms 2020-07-06 17:21:23 -04:00
Mike Reeves
cc6d0c1cb5 Merge pull request #935 from Security-Onion-Solutions/issue/929
Change grafana to use anon auth
2020-07-06 16:45:19 -04:00
Mike Reeves
3b452ab597 Change grafana to use anon auth 2020-07-06 16:39:43 -04:00
Mike Reeves
cc2f023840 Merge pull request #934 from Security-Onion-Solutions/issue/142
Issue/142
2020-07-06 16:12:48 -04:00
Mike Reeves
f05e366d49 Fix salt upgrade script 2020-07-06 15:56:55 -04:00
Mike Reeves
be3390a796 Fix Logstash state 2020-07-06 15:53:21 -04:00
Josh Patterson
da0a0ae6ae Merge pull request #933 from Security-Onion-Solutions/quickfix/firewall
add elasticsearch_rest to assigned hostgroups where missing
2020-07-06 15:20:00 -04:00
m0duspwnens
b4e556496b add elasticsearch_rest to assigned hostgroups where missing 2020-07-06 15:18:47 -04:00
Mike Reeves
623c37f1f5 Merge remote-tracking branch 'remotes/origin/dev' into issue/142 2020-07-06 14:35:46 -04:00
Mike Reeves
1016315196 Change Logic for logstash 2020-07-06 13:58:38 -04:00
Mike Reeves
087080d583 Add logix for logstash_settings 2020-07-06 13:16:40 -04:00
William Wernert
57bbb02c65 [refactor][fix] Move nmcli status list gen to a function
nmcli is only assured to be installed after detect_os is run so move this command to a function so it can run after detect_os
2020-07-02 17:18:56 -04:00
William Wernert
99d490bc06 [fix][refactor] Move detect_ec2 and add echo statement 2020-07-02 17:15:46 -04:00
bryant-treacle
cfeb95a718 Merge pull request #924 from Security-Onion-Solutions/feature/so-container-scripts
Additional so-container scripts Issue # 701
2020-07-02 14:42:49 -04:00
William Wernert
b9a176201f Merge pull request #913 from Security-Onion-Solutions/feature/setup-changes
Feature/setup changes
2020-07-02 14:01:46 -04:00
William Wernert
d2ba25e784 Merge branch 'dev' into feature/setup-changes
# Conflicts:
#	setup/so-setup
2020-07-02 14:00:10 -04:00
weslambert
0bfa3d486e Merge pull request #923 from Security-Onion-Solutions/fix/es-allow
Fix my typo
2020-07-02 13:32:45 -04:00
weslambert
bbc752b6d9 Fix my typo 2020-07-02 13:32:19 -04:00
Josh Brower
518c8db3de Merge pull request #922 from Security-Onion-Solutions/feature/low-level-alerts
Initial commit - Low Level Alerts
2020-07-02 12:18:03 -04:00
Josh Brower
69ace6fbfa Initial commit - Low Level Alerts 2020-07-02 12:16:56 -04:00
Jason Ertel
cf6a229f51 Import now requires execution on a sensor node due to the need for zeek and suricata; Automatically stop curator if curator is installed 2020-07-02 12:07:30 -04:00
Mike Reeves
541de278c9 Merge pull request #918 from Security-Onion-Solutions/versionfix
Versionfix
2020-07-02 10:39:15 -04:00
Mike Reeves
5df88f6f2d Update so-functions 2020-07-02 10:36:28 -04:00
Mike Reeves
86a2650fbf Update VERSION 2020-07-02 10:34:50 -04:00
Mike Reeves
c895503fe6 Merge pull request #917 from Security-Onion-Solutions/updateversion
Update VERSION
2020-07-02 10:06:23 -04:00
Mike Reeves
63ef3a1e07 Update VERSION 2020-07-02 10:05:12 -04:00
William Wernert
c7a3cc9c17 [fix][revert] Change source in so-allow to correct path 2020-07-02 08:58:14 -04:00
Jason Ertel
4cedacf8fd Improve curator verbiage in so-import-pcap 2020-07-02 06:01:17 -04:00
Josh Brower
07d13b7ad0 Merge pull request #916 from Security-Onion-Solutions/defensivedepth-patch-1
Delete playbook_db_init.sql.backup
2020-07-02 05:32:45 -04:00
Josh Brower
7811ea5d4c Delete playbook_db_init.sql.backup 2020-07-02 05:32:35 -04:00
Josh Brower
0f915ec85e Merge pull request #915 from Security-Onion-Solutions/feature/playbook-updates
Feature/playbook updates
2020-07-02 05:31:30 -04:00
Josh Brower
3c93f9fd45 Playbook setup fix 2020-07-02 05:30:30 -04:00
bryant-treacle
0b10b775c5 Additional so-container scripts 2020-07-02 07:02:35 +00:00
Jason Ertel
ac01b8de4b Stop curator when directed on PCAP imports 2020-07-01 22:04:07 -04:00
Doug Burks
98cfba18e9 fix zeek.ftp description 2020-07-01 20:27:40 -04:00
Doug Burks
f6adf4ed56 fix zeek.smb_mapping description 2020-07-01 20:26:51 -04:00
Doug Burks
2cbd5ffe61 fix zeek.ssh description 2020-07-01 20:26:06 -04:00
Jason Ertel
e3126064e8 Improve usage instructions for so-import-pcap 2020-07-01 17:58:02 -04:00
William Wernert
aeda3fde74 [revert] Remove regex from setup log grep 2020-07-01 17:39:04 -04:00
William Wernert
408b5ee32d [ix] Fix if conditions 2020-07-01 17:25:26 -04:00
Jason Ertel
96e93b012d Adjust imports for filebeat configuration to ensure import data is placed into ES 2020-07-01 17:18:01 -04:00
Josh Brower
d893aa0032 Playbook Updates 2020-07-01 16:48:07 -04:00
William Wernert
b671f28562 [fix] Rename function whiptail_bond_nics to whiptail_sensor_nics 2020-07-01 16:32:33 -04:00
William Wernert
85a3f3c277 Merge branch 'dev' into feature/setup-changes 2020-07-01 16:24:55 -04:00
William Wernert
b4f9fe5f54 [fix] Remove quotes 2020-07-01 16:24:41 -04:00
William Wernert
b75cb36058 Merge branch 'feature/ec2_setup' into feature/setup-changes 2020-07-01 16:23:48 -04:00
William Wernert
54c3327240 [refactor] Simplify ec2 detection + handling 2020-07-01 16:23:38 -04:00
Jason Ertel
d6feafb12a Correct indentation in filebeat.yaml 2020-07-01 15:39:23 -04:00
Mike Reeves
ab42126d8e Add logstash_settings pillar 2020-07-01 15:25:35 -04:00
Mike Reeves
5580f05daf Add logstash pillar 2020-07-01 15:07:00 -04:00
Mike Reeves
f580da5d56 Update 9999_output_redis.conf.jinja 2020-07-01 14:45:54 -04:00
Mike Reeves
70e4ce3e98 Add batch to output 2020-07-01 14:38:51 -04:00
William Wernert
4b5571a8d6 [refactor][fix] Remove unnecessary variable 2020-07-01 13:56:15 -04:00
William Wernert
44890edc79 [refactor] Use regex in error check for setup log 2020-07-01 13:51:54 -04:00
Josh Patterson
549fd93cba Merge pull request #912 from Security-Onion-Solutions/issue/642
Issue/642
2020-07-01 13:44:49 -04:00
m0duspwnens
f98c497d79 change setup and whiptail back to bro 2020-07-01 13:43:37 -04:00
Wes Lambert
26b0daf2da Add other setup-related items for EC2 interface 2020-07-01 17:42:51 +00:00
m0duspwnens
fd939a06b9 whitespace cleanup 2020-07-01 13:40:40 -04:00
Wes Lambert
3cf79995a2 Modify Whiptail menu for EC2 NIC 2020-07-01 17:32:43 +00:00
m0duspwnens
38db512eda fix spacing 2020-07-01 13:29:19 -04:00
m0duspwnens
4e7e19af54 pillarize zeek node.cfg. change reference from bro to zeek. 2020-07-01 13:26:27 -04:00
William Wernert
db764902c7 [fix] Change if condition when checking nmcli status 2020-07-01 13:05:11 -04:00
William Wernert
19b997ece0 Merge branch 'dev' into feature/setup-changes 2020-07-01 12:56:57 -04:00
William Wernert
7bb97f2b2d [fix] Remove "Panel Title" from Kibana CPU graph
Resolves #874
2020-07-01 11:12:21 -04:00
William Wernert
90f4b8e043 [feat] Add welcome/instruction wording to initial menu 2020-07-01 11:03:18 -04:00
William Wernert
c97798b57d [feat] Add check to see if bond nics are managed by Network Manager 2020-07-01 09:43:39 -04:00
William Wernert
3a9d252af3 [fix] Correct indent in create_local_directories() 2020-07-01 09:42:07 -04:00
William Wernert
de620c88a1 Merge pull request #910 from Security-Onion-Solutions/version-correction
Remove HH prefix to ensure compatibility with updated build system
2020-06-30 15:57:30 -04:00
Jason Ertel
a49532d15c Remove HH prefix to ensure compatibility with updated build system 2020-06-30 15:54:56 -04:00
Jason Ertel
a3deb868ad Improve filebeat config indentation 2020-06-30 14:57:34 -04:00
Jason Ertel
930f15eea5 Introduce so-import-pcap tool - WIP 2020-06-30 14:56:08 -04:00
William Wernert
8dedd60da8 Merge branch 'feature/fast-fail' into feature/setup-changes 2020-06-30 14:27:04 -04:00
William Wernert
ce8a59243c [feat] Add grep for "Error" to fail if nmcli fails 2020-06-30 14:26:48 -04:00
William Wernert
8d624e6ade [fix] Move navigatordefaultlayer file.managed state to nginx sls 2020-06-30 10:53:10 -04:00
William Wernert
cab232ae9f [feat] Add check for disk space during setup 2020-06-30 10:11:02 -04:00
William Wernert
9f39875192 [fix] Apply regex filter to hostname input 2020-06-30 09:01:19 -04:00
Josh Brower
376a6e5fd5 Merge pull request #907 from Security-Onion-Solutions/feature/spacing-so-allow
so-allow spacing fix
2020-06-30 08:13:38 -04:00
Josh Brower
1c0443458c so-allow spacing fix 2020-06-30 08:13:00 -04:00
weslambert
0b7026a11e Merge pull request #906 from Security-Onion-Solutions/fix/ingest_parsing
Fix/ingest parsing
2020-06-29 23:07:22 -04:00
Wes Lambert
84e2965fef Addl krb fix 2020-06-30 03:06:01 +00:00
Wes Lambert
bf8798f1d1 Fix krb client/server cert subject parsing 2020-06-30 03:04:01 +00:00
Wes Lambert
8f5da66335 Add null safe operator for query name 2020-06-30 03:02:38 +00:00
Josh Patterson
46d58acdd9 Merge pull request #905 from Security-Onion-Solutions/issue/878
add sensoroni to so-status output for sensors
2020-06-29 16:24:41 -04:00
m0duspwnens
0f9d8024f8 add sensoroni to so-status output for sensors - https://github.com/Security-Onion-Solutions/securityonion/issues/878 2020-06-29 16:23:04 -04:00
Josh Patterson
c73071c95e Merge pull request #904 from Security-Onion-Solutions/issue/583
Issue/583
2020-06-29 16:17:22 -04:00
m0duspwnens
efaf41107c update description in localrules/local.rules for idstools 2020-06-29 16:14:36 -04:00
m0duspwnens
67f2eedad1 cleanup whitespace in idstools enable/disable.conf 2020-06-29 16:11:30 -04:00
m0duspwnens
fe8df22063 cleanup whitespace in idstools enable/disable.conf 2020-06-29 16:03:14 -04:00
William Wernert
fdaab8da9f Merge branch 'dev' into feature/setup-changes 2020-06-29 15:54:36 -04:00
William Wernert
23c0363899 [fix] Reference correct directory in nginx sls and remove navigator sls 2020-06-29 15:54:17 -04:00
William Wernert
b97ecd2d7a Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev 2020-06-29 15:53:29 -04:00
William Wernert
0a97328acc [fix] Apply regex filter to hostname input 2020-06-29 15:53:21 -04:00
Josh Patterson
6bc7f023ff Merge pull request #903 from Security-Onion-Solutions/quickfix/suricata
fix suricata state if suripins or suri procs arent set
2020-06-29 15:39:40 -04:00
m0duspwnens
d7580fe6a0 fix suricata state if suripins or suri procs arent set 2020-06-29 15:38:05 -04:00
William Wernert
53c3b1579b [feat] Reformat install type menu 2020-06-29 15:20:17 -04:00
William Wernert
8e15f858dd Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev
# Conflicts:
#	salt/common/tools/sbin/so-allow
2020-06-29 15:14:12 -04:00
Mike Reeves
abe063602b Update whiptail snort
Update the user to let them know Snort 3.x won't work.
2020-06-29 14:57:42 -04:00
weslambert
b398d58dc9 Merge pull request #902 from Security-Onion-Solutions/feature/es_allow
Add ES REST API option for so-allow
2020-06-29 14:51:09 -04:00
Wes Lambert
ed60d48c81 Add ES REST API option for so-allow 2020-06-29 18:49:16 +00:00
William Wernert
8cbccb656d [fix] Apply shellcheck fixes 2020-06-29 11:32:25 -04:00
William Wernert
b01bdf35f9 [fix] Remove port binding from telegraf docker state 2020-06-29 11:31:44 -04:00
m0duspwnens
8ee2142de4 pillarize idstools - https://github.com/Security-Onion-Solutions/securityonion/issues/583 2020-06-29 11:21:47 -04:00
Mike Reeves
378ad97e7b Disabled socket listener 2020-06-29 11:16:19 -04:00
weslambert
b99b19ce58 Merge pull request #898 from Security-Onion-Solutions/feature/strelka_scripts
Add Strelka mgmt scripts
2020-06-29 09:11:16 -04:00
Wes Lambert
9ac85cf674 Add Stelka mgmt scripts 2020-06-29 13:09:14 +00:00
weslambert
6f6e8a8853 Merge pull request #897 from Security-Onion-Solutions/fix/strelka_rules
Fix/strelka rules
2020-06-26 16:43:21 -04:00
weslambert
c421bd464a Remove Strelka function (in favor of direct script execution in so-setup) 2020-06-26 16:42:44 -04:00
William Wernert
22eb81128a Merge pull request #891 from Security-Onion-Solutions/feature/navigator-to-nginx
Feature/navigator to nginx
2020-06-26 15:48:46 -04:00
weslambert
8c47723bc9 Run YARA update script after applying state 2020-06-26 15:45:52 -04:00
Josh Patterson
9c388cd6aa Merge pull request #896 from Security-Onion-Solutions/feature/suripillar
Feature/suripillar
2020-06-26 14:44:36 -04:00
m0duspwnens
0b1a258a4b change sensor homenet map 2020-06-26 14:43:27 -04:00
weslambert
813c243d3d Update so-yara-update 2020-06-26 13:26:08 -04:00
m0duspwnens
2079eba0ad Merge remote-tracking branch 'remotes/origin/dev' into feature/suripillar 2020-06-26 13:09:15 -04:00
m0duspwnens
052c65c05e add the things to pillarize suricata - https://github.com/Security-Onion-Solutions/securityonion/issues/584 2020-06-26 13:07:41 -04:00
William Wernert
cf7e5f1b6f [fix] Change permissions on so-yara-update + fix indents 2020-06-26 09:59:44 -04:00
Josh Brower
b895d6fa4f Merge pull request #894 from Security-Onion-Solutions/feature/playbook-unit-testing
Playbook - Initial Support for Unit Testing
2020-06-26 06:33:05 -04:00
Josh Brower
7f0eacd342 Playbook - Initial Support for Unit Testing 2020-06-26 06:24:09 -04:00
Mike Reeves
1e4c967afc Fix math for suri loss calulcations 2020-06-25 14:02:02 -04:00
Mike Reeves
1e6fab4e6e Fix math for suri loss calulcations 2020-06-25 13:54:01 -04:00
Mike Reeves
65687fd28e Update saltstack update to point to correct github 2020-06-25 13:02:17 -04:00
Mike Reeves
57d0603e4c Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion-saltstack into dev 2020-06-25 12:56:38 -04:00
Mike Reeves
30ac5f9764 ADding Suricata log compression 2020-06-25 12:56:26 -04:00
weslambert
5e41bba6db Merge pull request #892 from Security-Onion-Solutions/feature/more_strelka_rules
Feature/more strelka rules
2020-06-25 12:33:36 -04:00
Wes Lambert
a24402de99 More Strelka rule config 2020-06-25 16:31:04 +00:00
Wes Lambert
63c45be388 Update Strelka init for rules 2020-06-25 15:49:58 +00:00
Wes Lambert
6487fdf5e6 Add Strelka YARA function 2020-06-25 15:46:37 +00:00
William Wernert
a45fbb6f5c Revert "[fix] discovery.zen.minimum_master_nodes is deprecated, update the key"
This reverts commit 8bd6c067aa.
2020-06-25 10:53:26 -04:00
bryant-treacle
00713312c6 Merge pull request #890 from Security-Onion-Solutions/fix/so-elastic-clear
updated so-elastic-clear with new so-* indices - #885
2020-06-24 15:09:37 -04:00
bryant-treacle
443332d584 Update so-elastic-clear 2020-06-24 15:03:25 -04:00
bryant-treacle
ffc9567278 Delete test.test 2020-06-24 15:01:30 -04:00
bryant-treacle
08220e3330 Issue #885: so-elastic-clear not removing so-* indices 2020-06-24 18:40:11 +00:00
weslambert
83ed21314a Merge pull request #888 from Security-Onion-Solutions/feature/strelka_rules
Feature/strelka rules
2020-06-24 13:28:52 -04:00
Wes Lambert
f5bb831edf Fix comment 2020-06-24 17:27:59 +00:00
Wes Lambert
a01339039a Update Setup for Strelka rules 2020-06-24 17:22:55 +00:00
bryant-treacle
0849014b24 Issue #885: so-elastic-clear not removing so-* indices 2020-06-24 17:21:58 +00:00
Wes Lambert
8bfbd77367 Update whiptail for Strelka 2020-06-24 17:18:05 +00:00
William Wernert
8bd6c067aa [fix] discovery.zen.minimum_master_nodes is deprecated, update the key 2020-06-24 13:10:18 -04:00
Wes Lambert
52a0ace1b8 Use Strelka rules if enabled 2020-06-24 17:08:58 +00:00
William Wernert
bd36749959 [feat] Remove navigator container references 2020-06-24 12:38:32 -04:00
William Wernert
4404a4f312 Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev 2020-06-23 17:57:19 -04:00
William Wernert
0a0fe5914a [fix][feat] Move navigator entries to static files + fix indent 2020-06-23 17:57:14 -04:00
weslambert
c3651f1b45 Merge pull request #884 from Security-Onion-Solutions/feature/strelka_client
Add FW config for Strelka frontend
2020-06-23 14:57:06 -04:00
Wes Lambert
f7eacc2b05 Add FW config for Strelka frontend 2020-06-23 18:47:23 +00:00
weslambert
685e3048ac Merge pull request #883 from Security-Onion-Solutions/fix/hunt_files_rename
Update file dataset name for hunt queries
2020-06-23 13:49:52 -04:00
Wes Lambert
c0428ce79d Update file dataset name for hunt queries 2020-06-23 17:48:12 +00:00
weslambert
13df2e6312 Merge pull request #882 from Security-Onion-Solutions/fix/files_rename
Move dataset from files to file
2020-06-23 13:44:26 -04:00
Wes Lambert
af451573eb Move dataset from files to file 2020-06-23 17:43:28 +00:00
m0duspwnens
36a329214a merge eve-log in outputs for suricata meta data generation or zeek/default - https://github.com/Security-Onion-Solutions/securityonion/issues/584 2020-06-22 16:56:03 -04:00
m0duspwnens
f1bcd35734 Merge remote-tracking branch 'remotes/origin/dev' into feature/suripillar 2020-06-22 09:13:29 -04:00
Jason Ertel
d7693f9b55 Expose pcap dir to sensoroni for epoch discovery 2020-06-22 08:27:43 -04:00
Jason Ertel
1ee3625f61 Ensure certs dir is group readable by socore since Sensoroni process will need to read the client key 2020-06-21 15:46:36 -04:00
Jason Ertel
81ed656ba0 Bind both steno and sensoroni processes to host network 2020-06-21 10:50:10 -04:00
Jason Ertel
76e3118bd3 Split Sensoroni and Stenographer executables into separate images 2020-06-21 08:33:09 -04:00
m0duspwnens
57fa2c5abe Merge remote-tracking branch 'remotes/origin/dev' into feature/suripillar 2020-06-18 13:49:07 -04:00
Mike Reeves
6dbe83a77f Update so-docker-refresh 2020-06-18 12:38:07 -04:00
Jason Ertel
2f3a99cfb0 fix: indentation is incorrect 2020-06-17 17:46:49 -04:00
weslambert
fb9ac58ed6 Merge pull request #869 from Security-Onion-Solutions/feature/elastic_indices_rw
Basic index read-only attr removal script
2020-06-17 15:00:23 -04:00
Wes Lambert
6d25151ab8 Basic index read-only attr removal script 2020-06-17 18:59:13 +00:00
Josh Brower
6794cabf9c Merge pull request #868 from Security-Onion-Solutions/bugfix/fleet-custom-hostname
Fleet custom hostname regex fix
2020-06-17 14:46:07 -04:00
weslambert
569fc4ac4d Merge pull request #867 from Security-Onion-Solutions/feature/zeek_custom_policy
Feature/zeek custom policy
2020-06-17 13:12:38 -04:00
Wes Lambert
90c278096c Add custom Zeek script dir 2020-06-17 17:11:27 +00:00
Josh Brower
3418f5748c Fleet custom hostname regex fix 2020-06-17 13:08:47 -04:00
Jason Ertel
6bf8f0af08 Eliminate multiple version definitions in this repo 2020-06-17 10:46:07 -04:00
Jason Ertel
3451f74b63 Update version to 2.0.0-rc.1 2020-06-17 10:32:39 -04:00
weslambert
b489420002 Merge pull request #865 from Security-Onion-Solutions/feature/cortex_custom
Feature/cortex custom
2020-06-17 09:22:42 -04:00
Wes Lambert
1beff65cc9 fix typo 2020-06-17 13:20:32 +00:00
Wes Lambert
cbfe375407 Custom analyzer and responder dirs 2020-06-17 13:16:52 +00:00
William Wernert
ce86dbfac0 [feat] Add message about root mail spool growing 2020-06-11 09:24:23 -04:00
William Wernert
07b2f2885c [fix] Always exit on early failure 2020-06-10 15:32:46 -04:00
William Wernert
7de02752e5 [fix] Reboot on early failure too, better if statements 2020-06-10 15:29:54 -04:00
William Wernert
379a5445e8 [feat] Also exit with non-zero status for automated installs 2020-06-10 14:27:18 -04:00
William Wernert
9695b9326b Merge branch 'dev' into feature/fast-fail 2020-06-10 14:19:44 -04:00
William Wernert
03dfece9af [feat] Fail setup early if "ERROR" is found in setup log 2020-06-10 14:18:25 -04:00
m0duspwnens
f8193cb914 beginning to pillarize suricata 2020-06-04 09:40:38 -04:00
Mike Reeves
45d17c5148 Pillarize Suricata Round 1 2020-06-01 14:53:04 -04:00
281 changed files with 6775 additions and 13220 deletions

51
KEYS Normal file
View File

@@ -0,0 +1,51 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF7rzwEBEADBg87uJhnC3Ls7s60hbHGaywGrPtbz2WuYA/ev3YS3X7WS75p8
PGlzTWUCujx0pEHbK2vYfExl3zksZ8ZmLyZ9VB3oSLiWBzJgKAeB7YCFEo8te+eE
P2Z+8c+kX4eOV+2waxZyewA2TipSkhWgStSI4Ow8SyVUcUWA3hCw7mo2duNVi7KO
C3vvI3wzirH+8/XIGo+lWTg6yYlSxdf+0xWzYvV2QCMpwzJfARw6GGXtfCZw/zoO
o4+YPsiyztQdyI1y+g3Fbesl65E36DelbyP+lYd2VecX8ELEv0wlKCgHYlk6lc+n
qnOotVjWbsyXuFfo06PHUd6O9n3nmo0drC6kmXGw1e8hu0t8VcGfMTKS/hszwVUY
bHS6kbfsOoAb6LXPWKfqxk/BdreLXmcHHz88DimS3OS0JufkcmkjxEzSFRL0kb2h
QVb1SATrbx+v2RWQXvi9sLCjT2fdOiwi1Tgc84orc7A1C3Jwu353YaX9cV+n5uyG
OZ2AULZ5z2h13sVuiZAwfyyFs/O0CJ783hFA2TNPnyNGAgw/kaIo7nNRnggtndBo
oQzVS+BHiFx98IF4zDqmF2r2+jOCjxSrw8KnZBe4bgXFtl89DmjoejGvWDnu2MVM
pZDEs1DcOxHBQmTCWMIYLyNKG0xW6diyWBxEIaa7YgrP6kA+RaDfZ/xXPwARAQAB
tD9TZWN1cml0eSBPbmlvbiBTb2x1dGlvbnMsIExMQyA8aW5mb0BzZWN1cml0eW9u
aW9uc29sdXRpb25zLmNvbT6JAlQEEwEKAD4WIQTIBKk9Nr4Mcz6hlkR8EGC3/lBw
EwUCXuvPAQIbAwUJEswDAAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRB8EGC3
/lBwExB1D/42xIDGU2XFNFyTU+ZqzDA8qNC9hEKjLeizbeM8RIm3xO+3p7SdqbuJ
7pA8gk0RiHuILb+Ba1xiSh/w/W2bOxQhsXuWHih2z3W1tI+hu6RQhIm4e6CIHHf7
Vzj4RSvHOVS0AzITUwkHjv0x0Z8zVBPJfEHKkK2x03BqP1o12rd7n2ZMrSfN6sED
fUwOJLDjthShtyLSPBVG8j7T5cfSCPSLhfVOKPQVcI1sSir7RLeyxt1v1kzjQdaA
+znxO8EgfZJN93wzfBrAGcVT8KmpmgwR6p46m20wJXyZC9DZxJ0o1y3toVWTC+kP
Qj1ROPivySVn10rBoOJk8HteyhW07gTcydq+noKHV7SqJ1899xRAYP7rDCfI9iMW
Nn22ZDLnAkIcbNR7JLJCHwsZH/Umo9KO/dIccIqVQel3UCCYZcWTZW0VkcjqVKRa
eK+JQGaJPrBAoxIG5/sMlbk2sINSubNWlcbH6kM0V8NVwdPiOO9xLmp2hI4ICxE3
M+O2HCNX4QYzVizzTFxEvW3ieLa4nePQ8J6lvMI2oLkFP7xHoFluvZnuwfNvoEy0
RnlHExN1UQTUvcbCxIbzjaJ4HJXilWHjgmGaVQO1S7AYskWnNWQ7uJvxnuZBNNwm
pIvwYEZp23fYaWl/xKqnmPMy2ADjROBKlCm7L+Ntq1r7ELGW5ZCTobkCDQRe688B
ARAA22GzdkSAo+mwJ2S1RbJ1G20tFnLsG/NC8iMN3lEh/PSmyPdB7mBtjZ+HPDzF
VSznXZdr3LItBBQOli2hVIj1lZBY7+s2ZufV3TFFwselUwT3b1g1KMkopD95Ckf8
WhLbSz2yqgrvcEvbB0HFX/ZEsHGqIz2kLacixjwXXLWOMQ2LNbeW1f5zQkBnaNNQ
/4njzTj68OxnvfplNYNJqi2pZGb2UqarYX04FqKNuocN8E7AC9FQdBXylmVctw9T
pQVwfCI76bTe6vPWb+keb6UNN1jyXVnhIQ3Fv5sFBsmgXf/hO8tqCotrKjEiK2/i
RkvFeqsGMXreCgYg9zW4k+DcJtVa+Q8juGOjElrubY3Ua9mCusx3vY4QYSWxQ5Ih
k1lXiUcM5Rt38lfpKHRJ5Pd4Y5xlWSQfZ7nmzbf/GzJQz+rWrA0X6Oc6cDOPLNXK
w1dAygre4f2bsp5kHQt6NMefxeNTDmi+4R62K0tb40f5q0Vxz8qdyD48bBsbULNx
kb6mjOAD+FNkfNXcGeuTq9oRnjx8i93mhYsIP5LFNDXS/zSP1nv0ZUFeIlGQGjV9
1wOvT454qkI9sKiVFtd4FrNKZJbKszxxDm+DPfB5j+hRC4oeEJ7w+sVyh3EawtfM
V7Mwj8i+7c3YUCravXBhSwG7SCTggFUgA8lMr8oWVgCATYsAEQEAAYkCPAQYAQoA
JhYhBMgEqT02vgxzPqGWRHwQYLf+UHATBQJe688BAhsMBQkSzAMAAAoJEHwQYLf+
UHATTtwQAJiztPW68ykifpFdwYFp1VC7c+uGLhWBqjDY9NSUKNC9caR7bV0cnNu8
07UG6j18gCB2GSkukXjOR/oTj6rNcW/WouPYfQOrw7+M2Ya8M8iq+E/HOXaXB3b4
FeCcB0UuwfcHHd2KbXrRHA+9GNpmuOcfTCdsPpIr41Xg4QltATDEt/FrzuKspXg4
vUKDXgfnbj7y0JcJM2FfcwWGlnAG5MMRyjJQAleGdiidX/9WxgJ4Mweq4qJM0jr3
Qsrc9VuzxsLr85no3Hn5UYVgT7bBZ59HUbQoi775m78MxN3mWUSdcyLQKovI+YXr
tshTxWIf/2Ovdzt6Wq1WWXOGGuK1qgdPJTFWrlh3amFdb70zR1p6A/Lthd7Zty+n
QjRZRQo5jBSnYtjhMrZP6rxM3QqnQ0frEKK9HfDYONk1Bw18CUtdwFGb9OMregLR
IjvNLp9coSh5yYAepZyUGEPRET0GsmVw2trQF0uyMSkQfiq2zjPto6WWbsmrrbLr
cfZ/wnBw1FoNEd51U54euo9yvOgOVtJGvqLgHNwB8574FhQhoWAMhyizqdgeEt26
m3FXecUNKL/AK71/l04vor+/WsXe8uhDg3O84qeYa9wgd8LZZVmGZJDosSwqYjtb
LdNNm+v60Zo6rFWSREegqi/nRTTDdxdW99ybjlh+mpbq3xavyFXF
=bhkm
-----END PGP PUBLIC KEY BLOCK-----

124
README.md
View File

@@ -1,129 +1,37 @@
## Hybrid Hunter Beta 1.4.1 - Beta 3
## Security Onion 2.0.1.rc1
- Fix install script to handle hostnames properly.
## Hybrid Hunter Beta 1.4.0 - Beta 3
- Complete overhaul of the way we handle custom and default settings and data. You will now see a default and local directory under the saltstack directory. All customizations are stored in local.
- The way firewall rules are handled has been completely revamped. This will allow the user to customize firewall rules much easier.
- Users can now change their own password in SOC.
- Hunt now allows users to enable auto-hunt. This is a toggle which, when enabled, automatically submits a new hunt when filtering, grouping, etc.
- Title bar now reflects current Hunt query. This will assist users in locating a previous query from their browser history.
- Zeek 3.0.7
- Elastic 7.7.1
- Suricata can now be used for meta data generation.
- Suricata eve.json has been moved to `/nsm` to align with storage of other data.
- Suricata will now properly rotate its logs.
- Grafana dashboards now work properly in standalone mode.
- Kibana Dashboard updates including osquery, community_id.
- New Elasticsearch Ingest processor to generate community_id from any log that includes the required fields.
- Community_id generated for additional logs: Zeek HTTP/SMTP/ , Sysmon shipped with Osquery or Winlogbeat.
- Major streamlining of Fleet setup & configuration - no need to run a secondary setup script anymore.
- Fleet Standalone node now includes the ability to set a FQDN to point osquery endpoints to.
- Distributed installs now support ingesting Windows Eventlogs via Winlogbeat - includes full parsing support for Sysmon.
- SOC Downloads section now includes a link to the supported version of Winlogbeat.
- Basic syslog ingestion capability now included.
- Elasticsearch index name transition fixes for various components.
- Updated URLs for pivot fields in Kibana.
- Instances of `hive` renamed to `thehive`.
### Known Issues:
- The Hunt feature is currently considered "Preview" and although very useful in its current state, not everything works. We wanted to get this out as soon as possible to get the feedback from you! Let us know what you want to see! Let us know what you think we should call it!
- You cannot pivot to PCAP from Suricata alerts in Kibana or Hunt.
- Navigator is currently not working when using hostname to access SOC. IP mode works correctly.
- Due to the move to ECS, the current Playbook plays may not alert correctly at this time.
- The osquery MacOS package does not install correctly.
## Hybrid Hunter Beta 1.3.0 - Beta 2
### Changes:
- New Feature: Codename: "Onion Hunt". Select Hunt from the menu and start hunting down your adversaries!
- Improved ECS support.
- Complete refactor of the setup to make it easier to follow.
- Improved setup script logging to better assist on any issues.
- Setup now checks for minimal requirements during install.
- Updated Cyberchef to version 9.20.3.
- Updated Elastalert to version 0.2.4 and switched to alpine to reduce container size.
- Updated Redis to 5.0.9 and switched to alpine to reduce container size.
- Updated Salt to 2019.2.5
- Updated Grafana to 6.7.3.
- Zeek 3.0.6
- Suricata 4.1.8
- Fixes so-status to now display correct containers and status.
- local.zeek is now controlled by a pillar instead of modifying the file directly.
- Renamed so-core to so-nginx and switched to alpine to reduce container size.
- Playbook now uses MySQL instead of SQLite.
- Sigma rules have all been updated.
- Kibana dashboard improvements for ECS.
- Fixed an issue where geoip was not properly parsed.
- ATT&CK Navigator is now it's own state.
- Standlone mode is now supported.
- Mastersearch previously used the same Grafana dashboard as a Search node. It now has its own dashboard that incorporates panels from the Master node and Search node dashboards.
### Known Issues:
- The Hunt feature is currently considered "Preview" and although very useful in its current state, not everything works. We wanted to get this out as soon as possible to get the feedback from you! Let us know what you want to see! Let us know what you think we should call it!
- You cannot pivot to PCAP from Suricata alerts in Kibana or Hunt.
- Updating users via the SOC ui is known to fail. To change a user, delete the user and re-add them.
- Due to the move to ECS, the current Playbook plays may not alert correctly at this time.
- The osquery MacOS package does not install correctly.
Security Onion 2.0.1 RC1 is here! This version requires a fresh install, but there is good news - we have brought back soup! From now on, you should be able to run soup on the manager to upgrade your environment to RC2 and beyond!
### Warnings and Disclaimers
- This BETA release is BLEEDING EDGE and TOTALLY UNSUPPORTED!
- If this breaks your system, you get to keep both pieces!
- This script is a work in progress and is in constant flux.
- This script is intended to build a quick prototype proof of concept so you can see what our new platform might look like. This configuration will change drastically over time leading up to the final release.
- 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.
### Release Notes
https://docs.securityonion.net/en/2.0/release-notes.html
### Requirements
Evaluation Mode:
https://docs.securityonion.net/en/2.0/hardware.html
- ISO or a Single VM running Ubuntu 18.04 or CentOS 7
- Minimum 12GB of RAM
- Minimum 4 CPU cores
- Minimum 2 NICs
### Download
Distributed:
- 3 VMs running the ISO or Ubuntu 18.04 or CentOS 7 (You can mix and match)
- Minimum 8GB of RAM per VM
- Minimum 4 CPU cores per VM
- Minimum 2 NICs for forward nodes
https://docs.securityonion.net/en/2.0/download.html
### Installation
For most users, we recommend installing using [our ISO image](https://github.com/Security-Onion-Solutions/securityonion-saltstack/wiki/ISO).
If instead you would like to try a manual installation (not using our ISO), you can build from CentOS 7 or Ubuntu 18.04.
If using CentOS 7 Minimal, you will need to install git:
```sudo yum -y install git```
Once you have git, then do the following:
```
git clone https://github.com/Security-Onion-Solutions/securityonion-saltstack
cd securityonion-saltstack
sudo bash so-setup-network
```
Follow the prompts and reboot if asked to do so.
Then proceed to the [Hybrid Hunter Quick Start Guide](https://github.com/Security-Onion-Solutions/securityonion-saltstack/wiki/Hybrid-Hunter-Quick-Start-Guide).
https://docs.securityonion.net/en/2.0/installation.html
### FAQ
See the [FAQ](https://github.com/Security-Onion-Solutions/securityonion-saltstack/wiki/FAQ) on the Hybrid Hunter wiki.
https://docs.securityonion.net/en/2.0/faq.html
### Feedback
If you have questions, problems, or other feedback regarding Hybrid Hunter, please post to our subreddit and prefix the title with **[Hybrid Hunter]**:<br>
https://www.reddit.com/r/securityonion/
https://docs.securityonion.net/en/2.0/community-support.html

50
VERIFY_ISO.md Normal file
View File

@@ -0,0 +1,50 @@
### 2.0.0-rc1 ISO image built on 2020/07/20
### Download and Verify
2.0.0-rc1 ISO image:
https://download.securityonion.net/file/securityonion/securityonion-2.0.0-rc1.iso
MD5: 788570E839439C23956581C6145B8689
SHA1: A87CAF016C989D4DB4D4ED619DF072B708BA28FE
SHA256: C5AC6419AF40CB98E93C53CE4101E7DE5F51AEE76DB46734191D783503649210
Signature for ISO image:
https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.0.0-rc1.iso.sig
Signing key:
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS
For example, here are the steps you can use on most Linux distributions to download and verify our Security Onion ISO image.
Download and import the signing key:
```
wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS -O - | gpg --import -
```
Download the signature file for the ISO:
```
wget https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.0.0-rc1.iso.sig
```
Download the ISO image:
```
wget https://download.securityonion.net/file/securityonion/securityonion-2.0.0-rc1.iso
```
Verify the downloaded ISO image using the signature file:
```
gpg --verify securityonion-2.0.0-rc1.iso.sig securityonion-2.0.0-rc1.iso
```
The output should show "Good signature" and the Primary key fingerprint should match what's shown below:
```
gpg: Signature made Mon 20 Jul 2020 03:01:19 PM EDT 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.
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.0/installation.html

View File

@@ -1 +1 @@
1.4.1
2.0.1-rc.1

View File

View File

@@ -13,8 +13,8 @@ role:
fleet:
heavynode:
helixsensor:
master:
mastersearch:
manager:
managersearch:
standalone:
searchnode:
sensor:

View File

@@ -12,6 +12,10 @@ firewall:
ips:
delete:
insert:
elasticsearch_rest:
ips:
delete:
insert:
fleet:
ips:
delete:
@@ -20,7 +24,7 @@ firewall:
ips:
delete:
insert:
master:
manager:
ips:
delete:
insert:
@@ -44,6 +48,10 @@ firewall:
ips:
delete:
insert:
strelka_frontend:
ips:
delete:
insert:
syslog:
ips:
delete:
@@ -59,4 +67,4 @@ firewall:
wazuh_authd:
ips:
delete:
insert:
insert:

View File

@@ -1,12 +1,12 @@
{%- set FLEETMASTER = salt['pillar.get']('static:fleet_master', False) -%}
{%- set FLEETMANAGER = salt['pillar.get']('static:fleet_manager', False) -%}
{%- set FLEETNODE = salt['pillar.get']('static:fleet_node', False) -%}
{% set WAZUH = salt['pillar.get']('master:wazuh', '0') %}
{% set THEHIVE = salt['pillar.get']('master:thehive', '0') %}
{% set PLAYBOOK = salt['pillar.get']('master:playbook', '0') %}
{% set FREQSERVER = salt['pillar.get']('master:freq', '0') %}
{% set DOMAINSTATS = salt['pillar.get']('master:domainstats', '0') %}
{% set BROVER = salt['pillar.get']('static:broversion', 'COMMUNITY') %}
{% set GRAFANA = salt['pillar.get']('master:grafana', '0') %}
{% set WAZUH = salt['pillar.get']('manager:wazuh', '0') %}
{% set THEHIVE = salt['pillar.get']('manager:thehive', '0') %}
{% 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']('static:zeekversion', 'COMMUNITY') %}
{% set GRAFANA = salt['pillar.get']('manager:grafana', '0') %}
eval:
containers:
@@ -20,7 +20,7 @@ eval:
- so-soc
- so-kratos
- so-idstools
{% if FLEETMASTER %}
{% if FLEETMANAGER %}
- so-mysql
- so-fleet
- so-redis
@@ -44,7 +44,6 @@ eval:
{% endif %}
{% if PLAYBOOK != '0' %}
- so-playbook
- so-navigator
{% endif %}
{% if FREQSERVER != '0' %}
- so-freqserver
@@ -64,7 +63,7 @@ heavy_node:
- so-suricata
- so-wazuh
- so-filebeat
{% if BROVER != 'SURICATA' %}
{% if ZEEKVER != 'SURICATA' %}
- so-zeek
{% endif %}
helix:
@@ -84,7 +83,7 @@ hot_node:
- so-logstash
- so-elasticsearch
- so-curator
master_search:
manager_search:
containers:
- so-nginx
- so-telegraf
@@ -100,7 +99,7 @@ master_search:
- so-elastalert
- so-filebeat
- so-soctopus
{% if FLEETMASTER %}
{% if FLEETMANAGER %}
- so-mysql
- so-fleet
- so-redis
@@ -116,7 +115,6 @@ master_search:
{% endif %}
{% if PLAYBOOK != '0' %}
- so-playbook
- so-navigator
{% endif %}
{% if FREQSERVER != '0' %}
- so-freqserver
@@ -124,7 +122,7 @@ master_search:
{% if DOMAINSTATS != '0' %}
- so-domainstats
{% endif %}
master:
manager:
containers:
- so-dockerregistry
- so-nginx
@@ -143,7 +141,7 @@ master:
- so-kibana
- so-elastalert
- so-filebeat
{% if FLEETMASTER %}
{% if FLEETMANAGER %}
- so-mysql
- so-fleet
- so-redis
@@ -159,7 +157,6 @@ master:
{% endif %}
{% if PLAYBOOK != '0' %}
- so-playbook
- so-navigator
{% endif %}
{% if FREQSERVER != '0' %}
- so-freqserver
@@ -189,7 +186,7 @@ sensor:
- so-telegraf
- so-steno
- so-suricata
{% if BROVER != 'SURICATA' %}
{% if ZEEKVER != 'SURICATA' %}
- so-zeek
{% endif %}
- so-wazuh

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

@@ -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

@@ -17,7 +17,7 @@ firewall:
- 5644
- 9822
udp:
master:
manager:
ports:
tcp:
- 1514

View File

@@ -1,21 +0,0 @@
logstash:
pipelines:
eval:
config:
- so/0800_input_eval.conf
- so/1002_preprocess_json.conf
- so/1033_preprocess_snort.conf
- so/7100_osquery_wel.conf
- so/8999_postprocess_rename_type.conf
- so/9000_output_bro.conf.jinja
- so/9002_output_import.conf.jinja
- so/9033_output_snort.conf.jinja
- so/9100_output_osquery.conf.jinja
- so/9400_output_suricata.conf.jinja
- so/9500_output_beats.conf.jinja
- so/9600_output_ossec.conf.jinja
- so/9700_output_strelka.conf.jinja
templates:
- so/so-beats-template.json
- so/so-common-template.json
- so/so-zeek-template.json

View File

@@ -1,6 +1,6 @@
logstash:
pipelines:
master:
manager:
config:
- so/0009_input_beats.conf
- so/0010_input_hhbeats.conf

View File

@@ -11,6 +11,3 @@ logstash:
- so/9500_output_beats.conf.jinja
- so/9600_output_ossec.conf.jinja
- so/9700_output_strelka.conf.jinja
templates:
- so/so-common-template.json
- so/so-zeek-template.json

View File

@@ -6,43 +6,46 @@ base:
- match: compound
- zeek
'*_mastersearch or *_heavynode':
'*_managersearch or *_heavynode':
- match: compound
- logstash
- logstash.master
- logstash.manager
- logstash.search
- elasticsearch.search
'*_sensor':
- static
- brologs
- zeeklogs
- healthcheck.sensor
- minions.{{ grains.id }}
'*_master or *_mastersearch':
'*_manager or *_managersearch':
- match: compound
- static
- data.*
- secrets
- minions.{{ grains.id }}
'*_master':
'*_manager':
- logstash
- logstash.master
- logstash.manager
'*_eval':
- static
- data.*
- brologs
- zeeklogs
- secrets
- healthcheck.eval
- elasticsearch.eval
- static
- minions.{{ grains.id }}
'*_standalone':
- logstash
- logstash.master
- logstash.manager
- logstash.search
- elasticsearch.search
- data.*
- brologs
- zeeklogs
- secrets
- healthcheck.standalone
- static
@@ -54,13 +57,13 @@ base:
'*_heavynode':
- static
- brologs
- zeeklogs
- minions.{{ grains.id }}
'*_helix':
- static
- fireeye
- brologs
- zeeklogs
- logstash
- logstash.helix
- minions.{{ grains.id }}
@@ -75,4 +78,5 @@ base:
- static
- logstash
- logstash.search
- elasticsearch.search
- minions.{{ grains.id }}

View File

@@ -1,4 +1,4 @@
brologs:
zeeklogs:
enabled:
- conn
- dce_rpc

View File

@@ -6,7 +6,7 @@ import socket
def send(data):
mainint = __salt__['pillar.get']('sensor:mainint', __salt__['pillar.get']('master:mainint'))
mainint = __salt__['pillar.get']('sensor:mainint', __salt__['pillar.get']('manager:mainint'))
mainip = __salt__['grains.get']('ip_interfaces').get(mainint)[0]
dstport = 8094

View File

@@ -26,7 +26,7 @@ x509_signing_policies:
- extendedKeyUsage: serverAuth
- days_valid: 820
- copypath: /etc/pki/issued_certs/
masterssl:
managerssl:
- minions: '*'
- signing_private_key: /etc/pki/ca.key
- signing_cert: /etc/pki/ca.crt

View File

@@ -1,4 +1,4 @@
{% set master = salt['grains.get']('master') %}
{% set manager = salt['grains.get']('master') %}
/etc/salt/minion.d/signing_policies.conf:
file.managed:
- source: salt://ca/files/signing_policies.conf
@@ -20,7 +20,7 @@ pki_private_key:
/etc/pki/ca.crt:
x509.certificate_managed:
- signing_private_key: /etc/pki/ca.key
- CN: {{ master }}
- CN: {{ manager }}
- C: US
- ST: Utah
- L: Salt Lake City
@@ -44,3 +44,10 @@ send_x509_pem_entries_to_mine:
- mine.send:
- func: x509.get_pem_entries
- glob_path: /etc/pki/ca.crt
cakeyperms:
file.managed:
- replace: False
- name: /etc/pki/ca.key
- mode: 640
- group: 939

View File

@@ -1,3 +1,10 @@
{% set role = grains.id.split('_') | last %}
# Remove variables.txt from /tmp - This is temp
rmvariablesfile:
file.absent:
- name: /tmp/variables.txt
# Add socore Group
socoregroup:
group.present:
@@ -13,6 +20,20 @@ socore:
- createhome: True
- shell: /bin/bash
soconfperms:
file.directory:
- name: /opt/so/conf
- uid: 939
- gid: 939
- dir_mode: 770
sosaltstackperms:
file.directory:
- name: /opt/so/saltstack
- uid: 939
- gid: 939
- dir_mode: 770
# Create a state directory
statedir:
file.directory:
@@ -131,3 +152,15 @@ utilsyncscripts:
- file_mode: 755
- template: jinja
- source: salt://common/tools/sbin
{% if role in ['eval', 'standalone', 'sensor', 'heavynode'] %}
# Add sensor cleanup
/usr/sbin/so-sensor-clean:
cron.present:
- user: root
- minute: '*'
- hour: '*'
- daymonth: '*'
- month: '*'
- dayweek: '*'
{% endif %}

View File

@@ -14,6 +14,7 @@
'so-zeek',
'so-curator',
'so-elastalert',
'so-soctopus'
'so-soctopus',
'so-sensoroni'
]
} %}

View File

@@ -9,6 +9,7 @@
'so-steno',
'so-suricata',
'so-wazuh',
'so-filebeat
'so-filebeat',
'so-sensoroni'
]
} %}

View File

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

View File

@@ -3,6 +3,7 @@
'so-telegraf',
'so-steno',
'so-suricata',
'so-filebeat'
'so-filebeat',
'so-sensoroni'
]
} %}

View File

@@ -18,14 +18,14 @@
}
},grain='id', merge=salt['pillar.get']('docker')) %}
{% if role in ['eval', 'mastersearch', 'master', 'standalone'] %}
{{ append_containers('master', 'grafana', 0) }}
{{ append_containers('static', 'fleet_master', 0) }}
{{ append_containers('master', 'wazuh', 0) }}
{{ append_containers('master', 'thehive', 0) }}
{{ append_containers('master', 'playbook', 0) }}
{{ append_containers('master', 'freq', 0) }}
{{ append_containers('master', 'domainstats', 0) }}
{% if role in ['eval', 'managersearch', 'manager', 'standalone'] %}
{{ append_containers('manager', 'grafana', 0) }}
{{ append_containers('static', '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'] %}
@@ -33,13 +33,13 @@
{% endif %}
{% if role in ['heavynode', 'standalone'] %}
{{ append_containers('static', 'broversion', 'SURICATA') }}
{{ append_containers('static', 'zeekversion', 'SURICATA') }}
{% endif %}
{% if role == 'searchnode' %}
{{ append_containers('master', 'wazuh', 0) }}
{{ append_containers('manager', 'wazuh', 0) }}
{% endif %}
{% if role == 'sensor' %}
{{ append_containers('static', 'broversion', 'SURICATA') }}
{{ append_containers('static', 'zeekversion', 'SURICATA') }}
{% endif %}

View File

@@ -16,6 +16,7 @@
'so-suricata',
'so-steno',
'so-dockerregistry',
'so-soctopus'
'so-soctopus',
'so-sensoroni'
]
} %}

View File

@@ -17,15 +17,13 @@
. /usr/sbin/so-common
default_salt_dir=/opt/so/saltstack/default
local_salt_dir=/opt/so/saltstack/local
SKIP=0
while getopts "abowi:" OPTION
while getopts "ahfesprbowi:" OPTION
do
case $OPTION in
h)
usage
exit 0
@@ -38,6 +36,14 @@ do
FULLROLE="beats_endpoint"
SKIP=1
;;
e)
FULLROLE="elasticsearch_rest"
SKIP=1
;;
f)
FULLROLE="strelka_frontend"
SKIP=1
;;
i) IP=$OPTARG
;;
o)
@@ -60,7 +66,10 @@ do
FULLROLE="wazuh_authd"
SKIP=1
;;
*)
usage
exit 0
;;
esac
done
@@ -72,20 +81,27 @@ if [ "$SKIP" -eq 0 ]; then
echo ""
echo "[a] - Analyst - ports 80/tcp and 443/tcp"
echo "[b] - Logstash Beat - port 5044/tcp"
echo "[e] - Elasticsearch REST API - port 9200/tcp"
echo "[f] - Strelka frontend - port 57314/tcp"
echo "[o] - Osquery endpoint - port 8090/tcp"
echo "[s] - Syslog device - 514/tcp/udp"
echo "[w] - Wazuh agent - port 1514/tcp/udp"
echo "[p] - Wazuh API - port 55000/tcp"
echo "[r] - Wazuh registration service - 1515/tcp"
echo "Please enter your selection (a - analyst, b - beats, o - osquery, w - wazuh):"
read ROLE
echo ""
echo "Please enter your selection:"
read -r ROLE
echo "Enter a single ip address or range to allow (example: 10.10.10.10 or 10.10.0.0/16):"
read IP
read -r IP
if [ "$ROLE" == "a" ]; then
FULLROLE=analyst
elif [ "$ROLE" == "b" ]; then
FULLROLE=beats_endpoint
elif [ "$ROLE" == "e" ]; then
FULLROLE=elasticsearch_rest
elif [ "$ROLE" == "f" ]; then
FULLROLE=strelka_frontend
elif [ "$ROLE" == "o" ]; then
FULLROLE=osquery_endpoint
elif [ "$ROLE" == "w" ]; then
@@ -111,16 +127,16 @@ salt-call state.apply firewall queue=True
if grep -q -R "wazuh: 1" $local_salt_dir/pillar/*; then
# If analyst, add to Wazuh AR whitelist
if [ "$FULLROLE" == "analyst" ]; then
WAZUH_MGR_CFG="/opt/so/wazuh/etc/ossec.conf"
if ! grep -q "<white_list>$IP</white_list>" $WAZUH_MGR_CFG ; then
DATE=`date`
sed -i 's/<\/ossec_config>//' $WAZUH_MGR_CFG
sed -i '/^$/N;/^\n$/D' $WAZUH_MGR_CFG
echo -e "<!--Address $IP added by /usr/sbin/so-allow on "$DATE"-->\n <global>\n <white_list>$IP</white_list>\n </global>\n</ossec_config>" >> $WAZUH_MGR_CFG
echo "Added whitelist entry for $IP in $WAZUH_MGR_CFG."
echo
echo "Restarting OSSEC Server..."
/usr/sbin/so-wazuh-restart
fi
fi
WAZUH_MGR_CFG="/opt/so/wazuh/etc/ossec.conf"
if ! grep -q "<white_list>$IP</white_list>" $WAZUH_MGR_CFG ; then
DATE=$(date)
sed -i 's/<\/ossec_config>//' $WAZUH_MGR_CFG
sed -i '/^$/N;/^\n$/D' $WAZUH_MGR_CFG
echo -e "<!--Address $IP added by /usr/sbin/so-allow on \"$DATE\"-->\n <global>\n <white_list>$IP</white_list>\n </global>\n</ossec_config>" >> $WAZUH_MGR_CFG
echo "Added whitelist entry for $IP in $WAZUH_MGR_CFG."
echo
echo "Restarting OSSEC Server..."
/usr/sbin/so-wazuh-restart
fi
fi
fi

View File

@@ -15,6 +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/>.
IMAGEREPO=securityonion
# Check for prerequisites
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run using sudo!"

118
salt/common/tools/sbin/so-docker-refresh Normal file → Executable file
View File

@@ -14,20 +14,16 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
got_root(){
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run using sudo!"
exit 1
fi
}
master_check() {
# Check to see if this is a master
MASTERCHECK=$(cat /etc/salt/grains | grep role | awk '{print $2}')
if [ $MASTERCHECK == 'so-eval' ] || [ $MASTERCHECK == 'so-master' ] || [ $MASTERCHECK == 'so-mastersearch' ] || [ $MASTERCHECK == 'so-standalone' ] || [ $MASTERCHECK == 'so-helix' ]; then
echo "This is a master. We can proceed"
. /usr/sbin/so-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 master. The master controls all updates."
echo "Please run soup on the manager. The manager controls all updates."
exit 1
fi
}
@@ -39,10 +35,10 @@ update_docker_containers() {
do
# Pull down the trusted docker image
echo "Downloading $i"
docker pull --disable-content-trust=false docker.io/soshybridhunter/$i
docker pull --disable-content-trust=false docker.io/$IMAGEREPO/$i
# Tag it with the new registry destination
docker tag soshybridhunter/$i $HOSTNAME:5000/soshybridhunter/$i
docker push $HOSTNAME:5000/soshybridhunter/$i
docker tag $IMAGEREPO/$i $HOSTNAME:5000/$IMAGEREPO/$i
docker push $HOSTNAME:5000/$IMAGEREPO/$i
done
}
@@ -55,58 +51,60 @@ version_check() {
exit 1
fi
}
got_root
master_check
manager_check
version_check
# Use the hostname
HOSTNAME=$(hostname)
BUILD=HH
# List all the containers
if [ $MASTERCHECK != 'so-helix' ]; then
if [ $MANAGERCHECK != 'so-helix' ]; then
TRUSTED_CONTAINERS=( \
"so-acng:$BUILD$VERSION" \
"so-thehive-cortex:$BUILD$VERSION" \
"so-curator:$BUILD$VERSION" \
"so-domainstats:$BUILD$VERSION" \
"so-elastalert:$BUILD$VERSION" \
"so-elasticsearch:$BUILD$VERSION" \
"so-filebeat:$BUILD$VERSION" \
"so-fleet:$BUILD$VERSION" \
"so-fleet-launcher:$BUILD$VERSION" \
"so-freqserver:$BUILD$VERSION" \
"so-grafana:$BUILD$VERSION" \
"so-idstools:$BUILD$VERSION" \
"so-influxdb:$BUILD$VERSION" \
"so-kibana:$BUILD$VERSION" \
"so-kratos:$BUILD$VERSION" \
"so-logstash:$BUILD$VERSION" \
"so-mysql:$BUILD$VERSION" \
"so-navigator:$BUILD$VERSION" \
"so-nginx:$BUILD$VERSION" \
"so-playbook:$BUILD$VERSION" \
"so-redis:$BUILD$VERSION" \
"so-soc:$BUILD$VERSION" \
"so-soctopus:$BUILD$VERSION" \
"so-steno:$BUILD$VERSION" \
"so-strelka:$BUILD$VERSION" \
"so-suricata:$BUILD$VERSION" \
"so-telegraf:$BUILD$VERSION" \
"so-thehive:$BUILD$VERSION" \
"so-thehive-es:$BUILD$VERSION" \
"so-wazuh:$BUILD$VERSION" \
"so-zeek:$BUILD$VERSION" )
"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-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:$BUILD$VERSION" \
"so-idstools:$BUILD$VERSION" \
"so-logstash:$BUILD$VERSION" \
"so-nginx:$BUILD$VERSION" \
"so-redis:$BUILD$VERSION" \
"so-steno:$BUILD$VERSION" \
"so-suricata:$BUILD$VERSION" \
"so-telegraf:$BUILD$VERSION" \
"so-zeek:$BUILD$VERSION" )
"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
update_docker_containers

View File

@@ -198,7 +198,7 @@ EOF
read alertoption
if [ $alertoption = "1" ] ; then
echo "Please enter the email address you want to send the alerts to. Note: Ensure the Master Server is configured for SMTP."
echo "Please enter the email address you want to send the alerts to. Note: Ensure the Manager Server is configured for SMTP."
read emailaddress
cat << EOF >> "$rulename.yaml"
# (Required)

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 MASTERIP = salt['pillar.get']('static:masterip', '') -%}
{%- set MANAGERIP = salt['pillar.get']('static:managerip', '') -%}
. /usr/sbin/so-common
SKIP=0
@@ -50,7 +50,7 @@ done
if [ $SKIP -ne 1 ]; then
# List indices
echo
curl {{ MASTERIP }}:9200/_cat/indices?v&pretty
curl {{ MANAGERIP }}:9200/_cat/indices?v
echo
# Inform user we are about to delete all data
echo
@@ -63,18 +63,54 @@ if [ $SKIP -ne 1 ]; then
if [ "$INPUT" != "AGREE" ] ; then exit 0; fi
fi
/usr/sbin/so-filebeat-stop
/usr/sbin/so-logstash-stop
# Check to see if Logstash/Filebeat are running
LS_ENABLED=$(so-status | grep logstash)
FB_ENABLED=$(so-status | grep filebeat)
EA_ENABLED=$(so-status | grep elastalert)
if [ ! -z "$FB_ENABLED" ]; then
/usr/sbin/so-filebeat-stop
fi
if [ ! -z "$LS_ENABLED" ]; then
/usr/sbin/so-logstash-stop
fi
if [ ! -z "$EA_ENABLED" ]; then
/usr/sbin/so-elastalert-stop
fi
# Delete data
echo "Deleting data..."
INDXS=$(curl -s -XGET {{ MASTERIP }}:9200/_cat/indices?v | egrep 'logstash|elastalert' | awk '{ print $3 }')
INDXS=$(curl -s -XGET {{ MANAGERIP }}:9200/_cat/indices?v | egrep 'logstash|elastalert|so-' | awk '{ print $3 }')
for INDX in ${INDXS}
do
curl -XDELETE "{{ MASTERIP }}:9200/${INDX}" > /dev/null 2>&1
curl -XDELETE "{{ MANAGERIP }}:9200/${INDX}" > /dev/null 2>&1
done
/usr/sbin/so-logstash-start
/usr/sbin/so-filebeat-start
#Start Logstash/Filebeat
if [ ! -z "$FB_ENABLED" ]; then
/usr/sbin/so-filebeat-start
fi
if [ ! -z "$LS_ENABLED" ]; then
/usr/sbin/so-logstash-start
fi
if [ ! -z "$EA_ENABLED" ]; then
/usr/sbin/so-elastalert-start
fi

View File

@@ -1,44 +0,0 @@
#!/bin/bash
MASTER=MASTER
VERSION="HH1.1.4"
TRUSTED_CONTAINERS=( \
"so-nginx:$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-logstash:$VERSION" \
"so-mysql:$VERSION" \
"so-navigator:$VERSION" \
"so-playbook:$VERSION" \
"so-redis:$VERSION" \
"so-sensoroni:$VERSION" \
"so-soctopus:$VERSION" \
"so-steno:$VERSION" \
#"so-strelka:$VERSION" \
"so-suricata:$VERSION" \
"so-telegraf:$VERSION" \
"so-thehive:$VERSION" \
"so-thehive-es:$VERSION" \
"so-wazuh:$VERSION" \
"so-zeek:$VERSION" )
for i in "${TRUSTED_CONTAINERS[@]}"
do
# Pull down the trusted docker image
echo "Downloading $i"
docker pull --disable-content-trust=false docker.io/soshybridhunter/$i
# Tag it with the new registry destination
docker tag soshybridhunter/$i $MASTER:5000/soshybridhunter/$i
docker push $MASTER:5000/soshybridhunter/$i
docker rmi soshybridhunter/$i
done

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/>.
IP={{ salt['grains.get']('ip_interfaces').get(salt['pillar.get']('sensor:mainint', salt['pillar.get']('manager:mainint', salt['pillar.get']('elasticsearch:mainint', salt['pillar.get']('host:mainint')))))[0] }}
ESPORT=9200
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;
done

View File

@@ -1,4 +1,4 @@
{% set MASTERIP = salt['pillar.get']('master:mainip', '') %}
{% set MANAGERIP = salt['pillar.get']('manager:mainip', '') %}
#!/bin/bash
# Copyright 2014,2015,2016,2017,2018,2019 Security Onion Solutions, LLC
#
@@ -15,13 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
default_salt_dir=/opt/so/saltstack/default
ELASTICSEARCH_HOST="{{ MASTERIP}}"
default_conf_dir=/opt/so/conf
ELASTICSEARCH_HOST="{{ MANAGERIP}}"
ELASTICSEARCH_PORT=9200
#ELASTICSEARCH_AUTH=""
# Define a default directory to load pipelines from
ELASTICSEARCH_TEMPLATES="$default_salt_dir/salt/logstash/pipelines/templates/so/"
ELASTICSEARCH_TEMPLATES="$default_conf_dir/elasticsearch/templates/"
# Wait for ElasticSearch to initialize
echo -n "Waiting for ElasticSearch..."

View File

@@ -17,6 +17,18 @@
. /usr/sbin/so-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
}
manager_check
VERSION=$(grep soversion $local_salt_dir/pillar/static.sls | cut -d':' -f2|sed 's/ //g')
# Modify static.sls to enable Features
sed -i 's/features: False/features: True/' $local_salt_dir/pillar/static.sls
@@ -31,13 +43,8 @@ for i in "${TRUSTED_CONTAINERS[@]}"
do
# Pull down the trusted docker image
echo "Downloading $i"
docker pull --disable-content-trust=false docker.io/soshybridhunter/$i
docker pull --disable-content-trust=false docker.io/$IMAGEREPO/$i
# Tag it with the new registry destination
docker tag soshybridhunter/$i $HOSTNAME:5000/soshybridhunter/$i
docker push $HOSTNAME:5000/soshybridhunter/$i
done
for i in "${TRUSTED_CONTAINERS[@]}"
do
echo "Removing $i locally"
docker rmi soshybridhunter/$i
docker tag $IMAGEREPO/$i $HOSTNAME:5000/$IMAGEREPO/$i
docker push $HOSTNAME:5000/$IMAGEREPO/$i
done

1
salt/common/tools/sbin/so-fleet-setup Normal file → Executable file
View File

@@ -16,6 +16,7 @@ if [ ! "$(docker ps -q -f name=so-fleet)" ]; then
fi
docker exec so-fleet fleetctl config set --address https://localhost:8080 --tls-skip-verify --url-prefix /fleet
docker exec -it so-fleet bash -c 'while [[ "$(curl -s -o /dev/null --insecure -w ''%{http_code}'' https://localhost:8080/fleet)" != "301" ]]; do sleep 5; done'
docker exec so-fleet fleetctl setup --email $1 --password $2
docker exec so-fleet fleetctl apply -f /packs/palantir/Fleet/Endpoints/MacOS/osquery.yaml

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-restart idstools $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-start idstools $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-stop idstools $1

View File

@@ -0,0 +1,220 @@
#!/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 MANAGER = salt['grains.get']('master') %}
{% set VERSION = salt['pillar.get']('static:soversion') %}
{% set IMAGEREPO = salt['pillar.get']('static:imagerepo') %}
{%- set MANAGERIP = salt['pillar.get']('static:managerip') -%}
function usage {
cat << EOF
Usage: $0 <pcap-file-1> [pcap-file-2] [pcap-file-N]
Imports one or more PCAP files onto a sensor node. The PCAP traffic will be analyzed and
made available for review in the Security Onion toolset.
EOF
}
function pcapinfo() {
PCAP=$1
ARGS=$2
docker run --rm -v $PCAP:/input.pcap --entrypoint capinfos {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-pcaptools:{{ VERSION }} /input.pcap $ARGS
}
function pcapfix() {
PCAP=$1
PCAP_OUT=$2
docker run --rm -v $PCAP:/input.pcap -v $PCAP_OUT:$PCAP_OUT --entrypoint pcapfix {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-pcaptools:{{ VERSION }} /input.pcap -o $PCAP_OUT > /dev/null 2>&1
}
function suricata() {
PCAP=$1
HASH=$2
NSM_PATH=/nsm/import/${HASH}/suricata
mkdir -p $NSM_PATH
chown suricata:socore $NSM_PATH
LOG_PATH=/opt/so/log/suricata/import/${HASH}
mkdir -p $LOG_PATH
chown suricata:suricata $LOG_PATH
docker run --rm \
-v /opt/so/conf/suricata/suricata.yaml:/etc/suricata/suricata.yaml:ro \
-v /opt/so/conf/suricata/threshold.conf:/etc/suricata/threshold.conf:ro \
-v /opt/so/conf/suricata/rules:/etc/suricata/rules:ro \
-v ${LOG_PATH}:/var/log/suricata/:rw \
-v ${NSM_PATH}/:/nsm/:rw \
-v $PCAP:/input.pcap:ro \
-v /opt/so/conf/suricata/bpf:/etc/suricata/bpf:ro \
{{ MANAGER }}:5000/{{ IMAGEREPO }}/so-suricata:{{ VERSION }} \
--runmode single -k none -r /input.pcap > $LOG_PATH/console.log 2>&1
}
function zeek() {
PCAP=$1
HASH=$2
NSM_PATH=/nsm/import/${HASH}/zeek
mkdir -p $NSM_PATH/logs
mkdir -p $NSM_PATH/extracted
mkdir -p $NSM_PATH/spool
chown -R zeek:socore $NSM_PATH
docker run --rm \
-v $NSM_PATH/logs:/nsm/zeek/logs:rw \
-v $NSM_PATH/spool:/nsm/zeek/spool:rw \
-v $NSM_PATH/extracted:/nsm/zeek/extracted:rw \
-v $PCAP:/input.pcap:ro \
-v /opt/so/conf/zeek/local.zeek:/opt/zeek/share/zeek/site/local.zeek:ro \
-v /opt/so/conf/zeek/node.cfg:/opt/zeek/etc/node.cfg:ro \
-v /opt/so/conf/zeek/zeekctl.cfg:/opt/zeek/etc/zeekctl.cfg:ro \
-v /opt/so/conf/zeek/policy/securityonion:/opt/zeek/share/zeek/policy/securityonion:ro \
-v /opt/so/conf/zeek/policy/custom:/opt/zeek/share/zeek/policy/custom:ro \
-v /opt/so/conf/zeek/policy/cve-2020-0601:/opt/zeek/share/zeek/policy/cve-2020-0601:ro \
-v /opt/so/conf/zeek/policy/intel:/opt/zeek/share/zeek/policy/intel:rw \
-v /opt/so/conf/zeek/bpf:/opt/zeek/etc/bpf:ro \
--entrypoint /opt/zeek/bin/zeek \
-w /nsm/zeek/logs \
{{ MANAGER }}:5000/{{ IMAGEREPO }}/so-zeek:{{ VERSION }} \
-C -r /input.pcap local > $NSM_PATH/logs/console.log 2>&1
}
# if no parameters supplied, display usage
if [ $# -eq 0 ]; then
usage
exit 1
fi
# ensure this is a sensor node
if [ ! -d /opt/so/conf/suricata ]; then
echo "This command must be run on a sensor node."
exit 3
fi
# verify that all parameters are files
for i in "$@"; do
if ! [ -f "$i" ]; then
usage
echo "\"$i\" is not a valid file!"
exit 2
fi
done
# track if we have any valid or invalid pcaps
INVALID_PCAPS="no"
VALID_PCAPS="no"
# track oldest start and newest end so that we can generate the Kibana search hyperlink at the end
START_OLDEST="2050-12-31"
END_NEWEST="1971-01-01"
# paths must be quoted in case they include spaces
for PCAP in "$@"; do
PCAP=$(/usr/bin/realpath "$PCAP")
echo "Processing Import: ${PCAP}"
echo "- verifying file"
if ! pcapinfo "${PCAP}" > /dev/null 2>&1; then
# try to fix pcap and then process the fixed pcap directly
PCAP_FIXED=`mktemp /tmp/so-import-pcap-XXXXXXXXXX.pcap`
echo "- attempting to recover corrupted PCAP file"
pcapfix "${PCAP}" "${PCAP_FIXED}"
PCAP="${PCAP_FIXED}"
TEMP_PCAPS+=(${PCAP_FIXED})
fi
# generate a unique hash to assist with dedupe checks
HASH=$(md5sum "${PCAP}" | awk '{ print $1 }')
HASH_DIR=/nsm/import/${HASH}
echo "- assigning unique identifier to import: $HASH"
if [ -d $HASH_DIR ]; then
echo "- this PCAP has already been imported; skipping"
INVALID_PCAPS="yes"
elif pcapinfo "${PCAP}" |egrep -q "Last packet time: 1970-01-01|Last packet time: n/a"; then
echo "- this PCAP file is invalid; skipping"
INVALID_PCAPS="yes"
else
VALID_PCAPS="yes"
PCAP_DIR=$HASH_DIR/pcap
mkdir -p $PCAP_DIR
# generate IDS alerts and write them to standard pipeline
echo "- analyzing traffic with Suricata"
suricata "${PCAP}" $HASH
# generate Zeek logs and write them to a unique subdirectory in /nsm/import/bro/
# since each run writes to a unique subdirectory, there is no need for a lock file
echo "- analyzing traffic with Zeek"
zeek "${PCAP}" $HASH
START=$(pcapinfo "${PCAP}" -a |grep "First packet time:" | awk '{print $4}')
END=$(pcapinfo "${PCAP}" -e |grep "Last packet time:" | awk '{print $4}')
echo "- saving PCAP data spanning dates $START through $END"
# compare $START to $START_OLDEST
START_COMPARE=$(date -d $START +%s)
START_OLDEST_COMPARE=$(date -d $START_OLDEST +%s)
if [ $START_COMPARE -lt $START_OLDEST_COMPARE ]; then
START_OLDEST=$START
fi
# compare $ENDNEXT to $END_NEWEST
ENDNEXT=`date +%Y-%m-%d --date="$END 1 day"`
ENDNEXT_COMPARE=$(date -d $ENDNEXT +%s)
END_NEWEST_COMPARE=$(date -d $END_NEWEST +%s)
if [ $ENDNEXT_COMPARE -gt $END_NEWEST_COMPARE ]; then
END_NEWEST=$ENDNEXT
fi
cp -f "${PCAP}" "${PCAP_DIR}"/data.pcap
chmod 644 "${PCAP_DIR}"/data.pcap
fi # end of valid pcap
echo
done # end of for-loop processing pcap files
# remove temp files
echo "Cleaning up:"
for TEMP_PCAP in ${TEMP_PCAPS[@]}; do
echo "- removing temporary pcap $TEMP_PCAP"
rm -f $TEMP_PCAP
done
# output final messages
if [ "$INVALID_PCAPS" = "yes" ]; then
echo
echo "Please note! One or more pcaps was invalid! You can scroll up to see which ones were invalid."
fi
START_OLDEST_SLASH=$(echo $START_OLDEST | sed -e 's/-/%2F/g')
END_NEWEST_SLASH=$(echo $END_NEWEST | sed -e 's/-/%2F/g')
if [ "$VALID_PCAPS" = "yes" ]; then
cat << EOF
Import complete!
You can use the following hyperlink to view data in the time range of your import. You can triple-click to quickly highlight the entire hyperlink and you can then copy it into your browser:
https://{{ MANAGERIP }}/#/hunt?q=%2a%20%7C%20groupby%20event.module%20event.dataset&t=${START_OLDEST_SLASH}%2000%3A00%3A00%20AM%20-%20${END_NEWEST_SLASH}%2000%3A00%3A00%20AM
or you can manually set your Time Range to be:
From: $START_OLDEST To: $END_NEWEST
Please note that it may take 30 seconds or more for events to appear in Onion Hunt.
EOF
fi

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-restart influxdb $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-start influxdb $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-stop influxdb $1

View File

@@ -1,9 +1,9 @@
#!/bin/bash
#
# {%- set FLEET_MASTER = salt['pillar.get']('static:fleet_master', False) -%}
# {%- set FLEET_MANAGER = salt['pillar.get']('static:fleet_manager', False) -%}
# {%- set FLEET_NODE = salt['pillar.get']('static:fleet_node', False) -%}
# {%- set FLEET_IP = salt['pillar.get']('static:fleet_ip', '') %}
# {%- set MASTER = salt['pillar.get']('master:url_base', '') %}
# {%- set MANAGER = salt['pillar.get']('manager:url_base', '') %}
#
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
#
@@ -20,7 +20,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/>.
KIBANA_HOST={{ MASTER }}
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
@@ -29,7 +29,7 @@ curl -s -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -XPOST $KIBANA_H
sed -i "s/$KIBANA_HOST/PLACEHOLDER/g" $OUTFILE
# Clean up for Fleet, if applicable
# {% if FLEET_NODE or FLEET_MASTER %}
# {% if FLEET_NODE or FLEET_MANAGER %}
# Fleet IP
sed -i "s/{{ MASTER }}/FLEETPLACEHOLDER/g" $OUTFILE
sed -i "s/{{ MANAGER }}/FLEETPLACEHOLDER/g" $OUTFILE
# {% endif %}

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-restart nginx $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-start nginx $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-stop nginx $1

10
salt/common/tools/sbin/so-saltstack-update Normal file → Executable file
View File

@@ -21,8 +21,8 @@ clone_to_tmp() {
# Make a temp location for the files
mkdir /tmp/sogh
cd /tmp/sogh
#git clone -b dev https://github.com/Security-Onion-Solutions/securityonion-saltstack.git
git clone https://github.com/Security-Onion-Solutions/securityonion-saltstack.git
#git clone -b dev https://github.com/Security-Onion-Solutions/securityonion.git
git clone https://github.com/Security-Onion-Solutions/securityonion.git
cd /tmp
}
@@ -30,10 +30,10 @@ clone_to_tmp() {
copy_new_files() {
# Copy new files over to the salt dir
cd /tmp/sogh/securityonion-saltstack
cd /tmp/sogh/securityonion
git checkout $BRANCH
rsync -a --exclude-from 'exclude-list.txt' salt $default_salt_dir/
rsync -a --exclude-from 'exclude-list.txt' pillar $default_salt_dir/
rsync -a salt $default_salt_dir/
rsync -a pillar $default_salt_dir/
chown -R socore:socore $default_salt_dir/salt
chown -R socore:socore $default_salt_dir/pillar
chmod 755 $default_salt_dir/pillar/firewall/addfirewall.sh

View File

@@ -0,0 +1,121 @@
#!/bin/bash
# Delete Zeek Logs based on defined CRIT_DISK_USAGE value
# Copyright 2014,2015,2016,2017,2018, 2019 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/>.
SENSOR_DIR='/nsm'
CRIT_DISK_USAGE=90
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
## 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 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 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
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
fi

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-restart soc $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-start soc $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-stop soc $1

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
/usr/sbin/so-stop strelka-filestream $1
/usr/sbin/so-stop strelka-manager $1
/usr/sbin/so-stop strelka-frontend $1
/usr/sbin/so-stop strelka-backend $1
/usr/sbin/so-stop strelka-gatekeeper $1
/usr/sbin/so-stop strelka-coordinator $1
/usr/sbin/so-start strelka $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-start strelka $1

View File

@@ -0,0 +1,25 @@
#!/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
/usr/sbin/so-stop strelka-filestream $1
/usr/sbin/so-stop strelka-manager $1
/usr/sbin/so-stop strelka-frontend $1
/usr/sbin/so-stop strelka-backend $1
/usr/sbin/so-stop strelka-gatekeeper $1
/usr/sbin/so-stop strelka-coordinator $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-restart telegraf $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-start telegraf $1

View File

@@ -0,0 +1,20 @@
#!/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
/usr/sbin/so-stop telegraf $1

View File

@@ -0,0 +1,102 @@
#!/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/>.
clone_dir="/tmp"
output_dir="/opt/so/saltstack/default/salt/strelka/rules"
#mkdir -p $output_dir
repos="$output_dir/repos.txt"
ignorefile="$output_dir/ignore.txt"
deletecounter=0
newcounter=0
updatecounter=0
gh_status=$(curl -s -o /dev/null -w "%{http_code}" http://github.com)
if [ "$gh_status" == "200" ] || [ "$gh_status" == "301" ]; then
while IFS= read -r repo; do
# Remove old repo if existing bc of previous error condition or unexpected disruption
repo_name=`echo $repo | awk -F '/' '{print $NF}'`
[ -d $repo_name ] && rm -rf $repo_name
# Clone repo and make appropriate directories for rules
git clone $repo $clone_dir/$repo_name
echo "Analyzing rules from $clone_dir/$repo_name..."
mkdir -p $output_dir/$repo_name
[ -f $clone_dir/$repo_name/LICENSE ] && cp $clone_dir/$repo_name/LICENSE $output_dir/$repo_name
# Copy over rules
for i in $(find $clone_dir/$repo_name -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/$repo_name -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
rm -rf $clone_dir/$repo_name
done < $repos
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
echo "Server returned $gh_status status code."
echo "No connectivity to Github...exiting..."
exit 1
fi

View File

@@ -1,17 +1,17 @@
#!/bin/bash
local_salt_dir=/opt/so/saltstack/local
bro_logs_enabled() {
zeek_logs_enabled() {
echo "brologs:" > $local_salt_dir/pillar/brologs.sls
echo " enabled:" >> $local_salt_dir/pillar/brologs.sls
echo "zeeklogs:" > $local_salt_dir/pillar/zeeklogs.sls
echo " enabled:" >> $local_salt_dir/pillar/zeeklogs.sls
for BLOG in ${BLOGS[@]}; do
echo " - $BLOG" | tr -d '"' >> $local_salt_dir/pillar/brologs.sls
echo " - $BLOG" | tr -d '"' >> $local_salt_dir/pillar/zeeklogs.sls
done
}
whiptail_master_adv_service_brologs() {
whiptail_manager_adv_service_zeeklogs() {
BLOGS=$(whiptail --title "Security Onion Setup" --checklist "Please Select Logs to Send:" 24 78 12 \
"conn" "Connection Logging" ON \
@@ -54,5 +54,5 @@ whiptail_master_adv_service_brologs() {
"x509" "x.509 Logs" ON 3>&1 1>&2 2>&3 )
}
whiptail_master_adv_service_brologs
bro_logs_enabled
whiptail_manager_adv_service_zeeklogs
zeek_logs_enabled

0
salt/common/tools/sbin/so-zeek-stats Normal file → Executable file
View File

194
salt/common/tools/sbin/soup Normal file → Executable file
View File

@@ -15,23 +15,193 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
clone_to_tmp() {
. /usr/sbin/so-common
UPDATE_DIR=/tmp/sogh/securityonion
INSTALLEDVERSION=$(cat /etc/soversion)
default_salt_dir=/opt/so/saltstack/default
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 soup on the manager. The manager controls all updates."
exit 0
fi
}
clean_dockers() {
# Place Holder for cleaning up old docker images
echo ""
}
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
rm -rf /tmp/soup
mkdir -p /tmp/soup
cd /tmp/soup
#git clone -b dev https://github.com/Security-Onion-Solutions/securityonion-saltstack.git
git clone https://github.com/Security-Onion-Solutions/securityonion-saltstack.git
mkdir -p /tmp/sogh
cd /tmp/sogh
SOUP_BRANCH=""
if [ -n "$BRANCH" ]; then
SOUP_BRANCH="-b $BRANCH"
fi
git clone $SOUP_BRANCH https://github.com/Security-Onion-Solutions/securityonion.git
cd /tmp
if [ ! -f $UPDATE_DIR/VERSION ]; then
echo "Update was unable to pull from github. Please check your internet."
exit 0
fi
}
copy_new_files() {
# Copy new files over to the salt dir
cd /tmp/sogh/securityonion
rsync -a salt $default_salt_dir/
rsync -a pillar $default_salt_dir/
chown -R socore:socore $default_salt_dir/
chmod 755 $default_salt_dir/pillar/firewall/addfirewall.sh
cd /tmp
}
highstate() {
# Run a highstate but first cancel a running one.
salt-call saltutil.kill_all_jobs
salt-call state.highstate
}
pillar_changes() {
# This function is to add any new pillar items if needed.
echo "Checking to see if pillar changes are needed"
}
# Prompt the user that this requires internets
update_dockers() {
# List all the containers
if [ $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-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
# 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
}
update_version() {
# Update the version to the latest
echo "Updating the version file."
echo $NEWVERSION > /etc/soversion
sed -i "s/$INSTALLEDVERSION/$NEWVERSION/g" /opt/so/saltstack/local/pillar/static.sls
}
upgrade_check() {
# Let's make sure we actually need to update.
NEWVERSION=$(cat $UPDATE_DIR/VERSION)
if [ "$INSTALLEDVERSION" == "$NEWVERSION" ]; then
echo "You are already running the latest version of Security Onion."
exit 0
else
echo "Performing Upgrade from $INSTALLEDVERSION to $NEWVERSION"
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}')
if [[ "$CURRENTSOUP" == "$GITSOUP" ]]; then
echo "This version of the soup script is up to date. Proceeding."
else
echo "You are not running the latest soup version. Updating soup."
cp $UPDATE_DIR/salt/common/tools/sbin/soup $default_salt_dir/salt/common/tools/sbin/
salt-call state.apply common queue=True
echo ""
echo "soup has been updated. Please run soup again"
exit 0
fi
}
echo "Checking to see if this is a manager"
manager_check
echo "Cloning latest code to a temporary location"
clone_to_tmp
cd /tmp/soup/securityonion-saltstack/update
chmod +x soup
./soup
echo ""
echo "Verifying we have the latest script"
verify_latest_update_script
echo ""
echo "Let's see if we need to update"
upgrade_check
echo ""
echo "Making pillar changes"
pillar_changes
echo ""
echo "Cleaning up old dockers"
clean_dockers
echo ""
echo "Updating docker to $NEWVERSION"
update_dockers
echo ""
echo "Copying new code"
copy_new_files
echo ""
echo "Updating version"
update_version
echo ""
echo "Running a highstate to complete upgrade"
highstate
echo ""
echo "Upgrade from $INSTALLEDVERSION to $NEWVERSION complete."

View File

@@ -1,8 +1,4 @@
{%- if grains['role'] in ['so-node', 'so-searchnode', 'so-heavynode'] %}
{%- set log_size_limit = salt['pillar.get']('node:log_size_limit', '') -%}
{%- elif grains['role'] in ['so-eval', 'so-mastersearch', 'so-standalone'] %}
{%- set log_size_limit = salt['pillar.get']('master:log_size_limit', '') -%}
{%- endif %}
{%- set log_size_limit = salt['pillar.get']('elasticsearch:log_size_limit', '') -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"

View File

@@ -0,0 +1,29 @@
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-beats:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: close
description: >-
Close Beats indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-beats.*|so-beats.*)$'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{cur_close_days}}
exclude:

View File

@@ -1,9 +1,4 @@
{%- if grains['role'] in ['so-node', 'so-searchnode', 'so-heavynode'] %}
{%- set cur_close_days = salt['pillar.get']('node:cur_close_days', '') -%}
{%- elif grains['role'] in ['so-eval', 'so-mastersearch', 'so-standalone'] %}
{%- set cur_close_days = salt['pillar.get']('master:cur_close_days', '') -%}
{%- endif -%}
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-firewall:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
@@ -15,8 +10,7 @@ actions:
1:
action: close
description: >-
Close indices older than {{cur_close_days}} days (based on index name), for logstash-
prefixed indices.
Close Firewall indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
@@ -25,7 +19,7 @@ actions:
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-.*|so-.*)$'
value: '^(logstash-firewall.*|so-firewall.*)$'
- filtertype: age
source: name
direction: older

View File

@@ -0,0 +1,29 @@
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-ids:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: close
description: >-
Close IDS indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-ids.*|so-ids.*)$'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{cur_close_days}}
exclude:

View File

@@ -0,0 +1,29 @@
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-import:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: close
description: >-
Close Import indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-import.*|so-import.*)$'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{cur_close_days}}
exclude:

View File

@@ -0,0 +1,29 @@
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-osquery:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: close
description: >-
Close osquery indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-osquery.*|so-osquery.*)$'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{cur_close_days}}
exclude:

View File

@@ -0,0 +1,29 @@
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-ossec:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: close
description: >-
Close ossec indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-ossec.*|so-ossec.*)$'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{cur_close_days}}
exclude:

View File

@@ -0,0 +1,29 @@
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-strelka:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: close
description: >-
Close Strelka indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-strelka.*|so-strelka.*)$'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{cur_close_days}}
exclude:

View File

@@ -0,0 +1,29 @@
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-syslog:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: close
description: >-
Close syslog indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-syslog.*|so-syslog.*)$'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{cur_close_days}}
exclude:

View File

@@ -0,0 +1,29 @@
{%- set cur_close_days = salt['pillar.get']('elasticsearch:index_settings:so-zeek:close', 30) -%}
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: close
description: >-
Close Zeek indices older than {{cur_close_days}} days.
options:
delete_aliases: False
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: regex
value: '^(logstash-zeek.*|so-zeek.*)$'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: {{cur_close_days}}
exclude:

View File

@@ -1,2 +1,2 @@
#!/bin/bash
/usr/sbin/so-curator-closed-delete > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/close.yml > /dev/null 2>&1
/usr/sbin/so-curator-closed-delete > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-zeek-close.yml > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-beats-close.yml > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-firewall-close.yml > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-ids-close.yml > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-import-close.yml > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-osquery-close.yml > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-ossec-close.yml > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-strelka-close.yml > /dev/null 2>&1; docker exec so-curator curator --config /etc/curator/config/curator.yml /etc/curator/action/so-syslog-close.yml > /dev/null 2>&1

View File

@@ -1,16 +1,16 @@
{%- if grains['role'] in ['so-node', 'so-searchnode', 'so-heavynode'] %}
{%- set ELASTICSEARCH_HOST = salt['pillar.get']('node:mainip', '') -%}
{%- set ELASTICSEARCH_PORT = salt['pillar.get']('node:es_port', '') -%}
{%- set LOG_SIZE_LIMIT = salt['pillar.get']('node:log_size_limit', '') -%}
{%- elif grains['role'] in ['so-eval', 'so-mastersearch', 'so-standalone'] %}
{%- set ELASTICSEARCH_HOST = salt['pillar.get']('master:mainip', '') -%}
{%- set ELASTICSEARCH_PORT = salt['pillar.get']('master:es_port', '') -%}
{%- set LOG_SIZE_LIMIT = salt['pillar.get']('master:log_size_limit', '') -%}
{%- endif -%}
#!/bin/bash
#
{%- if grains['role'] in ['so-node', 'so-searchnode', 'so-heavynode'] %}
{%- set ELASTICSEARCH_HOST = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- set ELASTICSEARCH_PORT = salt['pillar.get']('elasticsearch:es_port', '') -%}
{%- set LOG_SIZE_LIMIT = salt['pillar.get']('elasticsearch:log_size_limit', '') -%}
{%- elif grains['role'] in ['so-eval', 'so-managersearch', 'so-standalone'] %}
{%- set ELASTICSEARCH_HOST = salt['pillar.get']('manager:mainip', '') -%}
{%- set ELASTICSEARCH_PORT = salt['pillar.get']('manager:es_port', '') -%}
{%- set LOG_SIZE_LIMIT = salt['pillar.get']('manager:log_size_limit', '') -%}
{%- endif -%}
# Copyright 2014,2015,2016,2017,2018 Security Onion Solutions, LLC
#
# This program is free software: you can redistribute it and/or modify

View File

@@ -1,7 +1,7 @@
{% if grains['role'] in ['so-node', 'so-heavynode'] %}
{%- set elasticsearch = salt['pillar.get']('node:mainip', '') -%}
{% elif grains['role'] in ['so-eval', 'so-mastersearch', 'so-standalone'] %}
{%- set elasticsearch = salt['pillar.get']('master:mainip', '') -%}
{%- set elasticsearch = salt['pillar.get']('elasticsearch:mainip', '') -%}
{% elif grains['role'] in ['so-eval', 'so-managersearch', 'so-standalone'] %}
{%- set elasticsearch = salt['pillar.get']('manager:mainip', '') -%}
{%- endif %}
---

View File

@@ -1,6 +1,7 @@
{% set VERSION = salt['pillar.get']('static:soversion', 'HH1.2.2') %}
{% set MASTER = salt['grains.get']('master') %}
{% if grains['role'] in ['so-eval', 'so-node', 'so-mastersearch', 'so-heavynode', 'so-standalone'] %}
{% set IMAGEREPO = salt['pillar.get']('static:imagerepo') %}
{% set MANAGER = salt['grains.get']('master') %}
{% if grains['role'] in ['so-eval', 'so-node', 'so-managersearch', 'so-heavynode', 'so-standalone'] %}
# Curator
# Create the group
curatorgroup:
@@ -30,18 +31,10 @@ curlogdir:
- user: 934
- group: 939
curcloseconf:
file.managed:
- name: /opt/so/conf/curator/action/close.yml
- source: salt://curator/files/action/close.yml
- user: 934
- group: 939
- template: jinja
curdelconf:
file.managed:
- name: /opt/so/conf/curator/action/delete.yml
- source: salt://curator/files/action/delete.yml
actionconfs:
file.recurse:
- name: /opt/so/conf/curator/action
- source: salt://curator/files/action
- user: 934
- group: 939
- template: jinja
@@ -119,7 +112,7 @@ so-curatordeletecron:
so-curator:
docker_container.running:
- image: {{ MASTER }}:5000/soshybridhunter/so-curator:{{ VERSION }}
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-curator:{{ VERSION }}
- hostname: curator
- name: so-curator
- user: curator

View File

@@ -1,2 +0,0 @@
#!/bin/bash
/usr/bin/docker exec so-bro /opt/bro/bin/broctl netstats | awk '{print $(NF-2),$(NF-1),$NF}' | awk -F '[ =]' '{RCVD += $2;DRP += $4;TTL += $6} END { print "rcvd: " RCVD, "dropped: " DRP, "total: " TTL}' >> /nsm/bro/logs/packetloss.log

View File

@@ -1,64 +0,0 @@
#!/bin/bash
# Delete Zeek Logs based on defined CRIT_DISK_USAGE value
# Copyright 2014,2015,2016,2017,2018, 2019 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/>.
clean () {
SENSOR_DIR='/nsm'
CRIT_DISK_USAGE=90
CUR_USAGE=$(df -P $SENSOR_DIR | tail -1 | awk '{print $5}' | tr -d %)
LOG="/nsm/bro/logs/zeek_clean.log"
if [ "$CUR_USAGE" -gt "$CRIT_DISK_USAGE" ]; then
while [ "$CUR_USAGE" -gt "$CRIT_DISK_USAGE" ];
do
TODAY=$(date -u "+%Y-%m-%d")
# find the oldest Zeek logs directory and exclude today
OLDEST_DIR=$(ls /nsm/bro/logs/ | grep -v "current" | grep -v "stats" | grep -v "packetloss" | grep -v "zeek_clean" | sort | grep -v $TODAY | 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/bro/logs/" >> $LOG
exit 0
else
echo "$(date) - Removing directory: /nsm/bro/logs/$OLDEST_DIR" >> $LOG
rm -rf /nsm/bro/logs/"$OLDEST_DIR"
fi
# find oldest files in extracted directory and exclude today
OLDEST_EXTRACT=$(find /nsm/bro/extracted -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/bro/extracted/" >> $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/bro/extracted -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
done
else
echo "$(date) - CRIT_DISK_USAGE value of $CRIT_DISK_USAGE not greater than current usage of $CUR_USAGE..." >> $LOG
fi
}
clean

View File

@@ -1,139 +0,0 @@
##! Local site policy. Customize as appropriate.
##!
##! This file will not be overwritten when upgrading or reinstalling!
# This script logs which scripts were loaded during each run.
@load misc/loaded-scripts
# Apply the default tuning scripts for common tuning settings.
@load tuning/defaults
# Estimate and log capture loss.
@load misc/capture-loss
# Enable logging of memory, packet and lag statistics.
@load misc/stats
# Load the scan detection script.
@load misc/scan
# Detect traceroute being run on the network. This could possibly cause
# performance trouble when there are a lot of traceroutes on your network.
# Enable cautiously.
#@load misc/detect-traceroute
# Generate notices when vulnerable versions of software are discovered.
# The default is to only monitor software found in the address space defined
# as "local". Refer to the software framework's documentation for more
# information.
@load frameworks/software/vulnerable
# Detect software changing (e.g. attacker installing hacked SSHD).
@load frameworks/software/version-changes
# This adds signatures to detect cleartext forward and reverse windows shells.
@load-sigs frameworks/signatures/detect-windows-shells
# Load all of the scripts that detect software in various protocols.
@load protocols/ftp/software
@load protocols/smtp/software
@load protocols/ssh/software
@load protocols/http/software
# The detect-webapps script could possibly cause performance trouble when
# running on live traffic. Enable it cautiously.
#@load protocols/http/detect-webapps
# This script detects DNS results pointing toward your Site::local_nets
# where the name is not part of your local DNS zone and is being hosted
# externally. Requires that the Site::local_zones variable is defined.
@load protocols/dns/detect-external-names
# Script to detect various activity in FTP sessions.
@load protocols/ftp/detect
# Scripts that do asset tracking.
@load protocols/conn/known-hosts
@load protocols/conn/known-services
@load protocols/ssl/known-certs
# This script enables SSL/TLS certificate validation.
@load protocols/ssl/validate-certs
# This script prevents the logging of SSL CA certificates in x509.log
@load protocols/ssl/log-hostcerts-only
# Uncomment the following line to check each SSL certificate hash against the ICSI
# certificate notary service; see http://notary.icsi.berkeley.edu .
# @load protocols/ssl/notary
# If you have libGeoIP support built in, do some geographic detections and
# logging for SSH traffic.
@load protocols/ssh/geo-data
# Detect hosts doing SSH bruteforce attacks.
@load protocols/ssh/detect-bruteforcing
# Detect logins using "interesting" hostnames.
@load protocols/ssh/interesting-hostnames
# Detect SQL injection attacks.
@load protocols/http/detect-sqli
#### Network File Handling ####
# Enable MD5 and SHA1 hashing for all files.
@load frameworks/files/hash-all-files
# Detect SHA1 sums in Team Cymru's Malware Hash Registry.
@load frameworks/files/detect-MHR
# Uncomment the following line to enable detection of the heartbleed attack. Enabling
# this might impact performance a bit.
# @load policy/protocols/ssl/heartbleed
# Uncomment the following line to enable logging of connection VLANs. Enabling
# this adds two VLAN fields to the conn.log file. This may not work properly
# since we use AF_PACKET and it strips VLAN tags.
# @load policy/protocols/conn/vlan-logging
# Uncomment the following line to enable logging of link-layer addresses. Enabling
# this adds the link-layer address for each connection endpoint to the conn.log file.
# @load policy/protocols/conn/mac-logging
# Uncomment the following line to enable the SMB analyzer. The analyzer
# is currently considered a preview and therefore not loaded by default.
@load base/protocols/smb
# BPF Configuration
@load securityonion/bpfconf
# Add the interface to the log event
#@load securityonion/add-interface-to-logs.bro
# Add Sensor Name to the conn.log
#@load securityonion/conn-add-sensorname.bro
# File Extraction
#@load securityonion/file-extraction
# Intel from Mandiant APT1 Report
#@load securityonion/apt1
# ShellShock - detects successful exploitation of Bash vulnerability CVE-2014-6271
#@load securityonion/shellshock
# JA3 - SSL Detection Goodness
@load policy/ja3
# HASSH
@load policy/hassh
# You can load your own intel into:
# /opt/so/saltstack/bro/policy/intel/ on the master
@load intel
# Load a custom Bro policy
# /opt/so/saltstack/bro/policy/custom/ on the master
#@load custom/somebropolicy.bro
# Write logs in JSON
redef LogAscii::use_json = T;
redef LogAscii::json_timestamps = JSON::TS_ISO8601;

View File

@@ -1,133 +0,0 @@
##! Local site policy. Customize as appropriate.
##!
##! This file will not be overwritten when upgrading or reinstalling!
# This script logs which scripts were loaded during each run.
@load misc/loaded-scripts
# Apply the default tuning scripts for common tuning settings.
@load tuning/defaults
# Estimate and log capture loss.
@load misc/capture-loss
# Enable logging of memory, packet and lag statistics.
@load misc/stats
# Load the scan detection script.
@load misc/scan
# Detect traceroute being run on the network. This could possibly cause
# performance trouble when there are a lot of traceroutes on your network.
# Enable cautiously.
#@load misc/detect-traceroute
# Generate notices when vulnerable versions of software are discovered.
# The default is to only monitor software found in the address space defined
# as "local". Refer to the software framework's documentation for more
# information.
@load frameworks/software/vulnerable
# Detect software changing (e.g. attacker installing hacked SSHD).
@load frameworks/software/version-changes
# This adds signatures to detect cleartext forward and reverse windows shells.
@load-sigs frameworks/signatures/detect-windows-shells
# Load all of the scripts that detect software in various protocols.
@load protocols/ftp/software
@load protocols/smtp/software
@load protocols/ssh/software
@load protocols/http/software
# The detect-webapps script could possibly cause performance trouble when
# running on live traffic. Enable it cautiously.
#@load protocols/http/detect-webapps
# This script detects DNS results pointing toward your Site::local_nets
# where the name is not part of your local DNS zone and is being hosted
# externally. Requires that the Site::local_zones variable is defined.
@load protocols/dns/detect-external-names
# Script to detect various activity in FTP sessions.
@load protocols/ftp/detect
# Scripts that do asset tracking.
@load protocols/conn/known-hosts
@load protocols/conn/known-services
@load protocols/ssl/known-certs
# This script enables SSL/TLS certificate validation.
@load protocols/ssl/validate-certs
# This script prevents the logging of SSL CA certificates in x509.log
@load protocols/ssl/log-hostcerts-only
# Uncomment the following line to check each SSL certificate hash against the ICSI
# certificate notary service; see http://notary.icsi.berkeley.edu .
# @load protocols/ssl/notary
# If you have libGeoIP support built in, do some geographic detections and
# logging for SSH traffic.
@load protocols/ssh/geo-data
# Detect hosts doing SSH bruteforce attacks.
@load protocols/ssh/detect-bruteforcing
# Detect logins using "interesting" hostnames.
@load protocols/ssh/interesting-hostnames
# Detect SQL injection attacks.
@load protocols/http/detect-sqli
#### Network File Handling ####
# Enable MD5 and SHA1 hashing for all files.
@load frameworks/files/hash-all-files
# Detect SHA1 sums in Team Cymru's Malware Hash Registry.
@load frameworks/files/detect-MHR
# Uncomment the following line to enable detection of the heartbleed attack. Enabling
# this might impact performance a bit.
# @load policy/protocols/ssl/heartbleed
# Uncomment the following line to enable logging of connection VLANs. Enabling
# this adds two VLAN fields to the conn.log file. This may not work properly
# since we use AF_PACKET and it strips VLAN tags.
# @load policy/protocols/conn/vlan-logging
# Uncomment the following line to enable logging of link-layer addresses. Enabling
# this adds the link-layer address for each connection endpoint to the conn.log file.
# @load policy/protocols/conn/mac-logging
# Uncomment the following line to enable the SMB analyzer. The analyzer
# is currently considered a preview and therefore not loaded by default.
# @load policy/protocols/smb
# Add the interface to the log event
#@load securityonion/add-interface-to-logs.bro
# Add Sensor Name to the conn.log
#@load securityonion/conn-add-sensorname.bro
# File Extraction
#@load securityonion/file-extraction
# Intel from Mandiant APT1 Report
#@load securityonion/apt1
# ShellShock - detects successful exploitation of Bash vulnerability CVE-2014-6271
#@load securityonion/shellshock
# JA3 - SSL Detection Goodness
@load policy/ja3
# You can load your own intel into:
# /opt/so/saltstack/bro/policy/intel/ on the master
@load intel
# Load a custom Bro policy
# /opt/so/saltstack/bro/policy/custom/ on the master
#@load custom/somebropolicy.bro
# Use JSON
redef LogAscii::use_json = T;
redef LogAscii::json_timestamps = JSON::TS_ISO8601;

View File

@@ -1,47 +0,0 @@
{%- set interface = salt['pillar.get']('sensor:interface', 'bond0') %}
{%- if salt['pillar.get']('sensor:bro_pins') or salt['pillar.get']('sensor:bro_lbprocs') %}
{%- if salt['pillar.get']('sensor:bro_proxies') %}
{%- set proxies = salt['pillar.get']('sensor:bro_proxies', '1') %}
{%- else %}
{%- if salt['pillar.get']('sensor:bro_pins') %}
{%- set proxies = (salt['pillar.get']('sensor:bro_pins')|length/10)|round(0, 'ceil')|int %}
{%- else %}
{%- set proxies = (salt['pillar.get']('sensor:bro_lbprocs')/10)|round(0, 'ceil')|int %}
{%- endif %}
{%- endif %}
[manager]
type=manager
host=localhost
[logger]
type=logger
host=localhost
[proxy]
type=proxy
host=localhost
[worker-1]
type=worker
host=localhost
interface=af_packet::{{ interface }}
lb_method=custom
{%- if salt['pillar.get']('sensor:bro_lbprocs') %}
lb_procs={{ salt['pillar.get']('sensor:bro_lbprocs', '1') }}
{%- else %}
lb_procs={{ salt['pillar.get']('sensor:bro_pins')|length }}
{%- endif %}
{%- if salt['pillar.get']('sensor:bro_pins') %}
pin_cpus={{ salt['pillar.get']('sensor:bro_pins')|join(", ") }}
{%- endif %}
af_packet_fanout_id=23
af_packet_fanout_mode=AF_Packet::FANOUT_HASH
af_packet_buffer_size=128*1024*1024
{%- else %}
[brosa]
type=standalone
host=localhost
interface={{ interface }}
{%- endif %}

View File

@@ -1,206 +0,0 @@
{% set interface = salt['pillar.get']('sensor:interface', 'bond0') %}
{% set BPF_ZEEK = salt['pillar.get']('zeek:bpf') %}
{% set BPF_STATUS = 0 %}
# Bro Salt State
# Add Bro group
brogroup:
group.present:
- name: bro
- gid: 937
# Add Bro User
bro:
user.present:
- uid: 937
- gid: 937
- home: /home/bro
# Create some directories
bropolicydir:
file.directory:
- name: /opt/so/conf/bro/policy
- user: 937
- group: 939
- makedirs: True
# Bro Log Directory
brologdir:
file.directory:
- name: /nsm/bro/logs
- user: 937
- group: 939
- makedirs: True
# Bro Spool Directory
brospooldir:
file.directory:
- name: /nsm/bro/spool/manager
- user: 937
- makedirs: true
# Bro extracted directory
broextractdir:
file.directory:
- name: /nsm/bro/extracted
- user: 937
- group: 939
- makedirs: True
brosfafincompletedir:
file.directory:
- name: /nsm/faf/files/incomplete
- user: 937
- makedirs: true
brosfafcompletedir:
file.directory:
- name: /nsm/faf/files/complete
- user: 937
- makedirs: true
# Sync the policies
bropolicysync:
file.recurse:
- name: /opt/so/conf/bro/policy
- source: salt://bro/policy
- user: 937
- group: 939
- template: jinja
# Sync node.cfg
nodecfgsync:
file.managed:
- name: /opt/so/conf/bro/node.cfg
- source: salt://bro/files/node.cfg
- user: 937
- group: 939
- template: jinja
plcronscript:
file.managed:
- name: /usr/local/bin/packetloss.sh
- source: salt://bro/cron/packetloss.sh
- mode: 755
zeekcleanscript:
file.managed:
- name: /usr/local/bin/zeek_clean
- source: salt://bro/cron/zeek_clean
- mode: 755
/usr/local/bin/zeek_clean:
cron.present:
- user: root
- minute: '*'
- hour: '*'
- daymonth: '*'
- month: '*'
- dayweek: '*'
/usr/local/bin/packetloss.sh:
cron.present:
- user: root
- minute: '*/10'
- hour: '*'
- daymonth: '*'
- month: '*'
- dayweek: '*'
# BPF compilation and configuration
{% if BPF_ZEEK %}
{% set BPF_CALC = salt['cmd.script']('/usr/sbin/so-bpf-compile', interface + ' ' + BPF_ZEEK|join(" ") ) %}
{% if BPF_CALC['stderr'] == "" %}
{% set BPF_STATUS = 1 %}
{% else %}
zeekbpfcompilationfailure:
test.configurable_test_state:
- changes: False
- result: False
- comment: "BPF Syntax Error - Discarding Specified BPF"
{% endif %}
{% endif %}
zeekbpf:
file.managed:
- name: /opt/so/conf/bro/bpf
- user: 940
- group: 940
{% if BPF_STATUS %}
- contents_pillar: zeek:bpf
{% else %}
- contents:
- "ip or not ip"
{% endif %}
# Sync local.bro
{% if salt['pillar.get']('static:broversion', '') == 'COMMUNITY' %}
localbrosync:
file.managed:
- name: /opt/so/conf/bro/local.bro
- source: salt://bro/files/local.bro.community
- user: 937
- group: 939
- template: jinja
so-communitybroimage:
cmd.run:
- name: docker pull --disable-content-trust=false docker.io/soshybridhunter/so-communitybro:HH1.0.3
so-bro:
docker_container.running:
- require:
- so-communitybroimage
- image: docker.io/soshybridhunter/so-communitybro:HH1.0.3
- privileged: True
- binds:
- /nsm/bro/logs:/nsm/bro/logs:rw
- /nsm/bro/spool:/nsm/bro/spool:rw
- /nsm/bro/extracted:/nsm/bro/extracted:rw
- /opt/so/conf/bro/local.bro:/opt/bro/share/bro/site/local.bro:ro
- /opt/so/conf/bro/node.cfg:/opt/bro/etc/node.cfg:ro
- /opt/so/conf/bro/policy/securityonion:/opt/bro/share/bro/policy/securityonion:ro
- /opt/so/conf/bro/policy/custom:/opt/bro/share/bro/policy/custom:ro
- /opt/so/conf/bro/policy/intel:/opt/bro/share/bro/policy/intel:rw
- network_mode: host
- watch:
- file: /opt/so/conf/bro/local.bro
- file: /opt/so/conf/bro/node.cfg
- file: /opt/so/conf/bro/policy
{% else %}
localbrosync:
file.managed:
- name: /opt/so/conf/bro/local.bro
- source: salt://bro/files/local.bro
- user: 937
- group: 939
- template: jinja
so-broimage:
cmd.run:
- name: docker pull --disable-content-trust=false docker.io/soshybridhunter/so-bro:HH1.1.1
so-bro:
docker_container.running:
- require:
- so-broimage
- image: docker.io/soshybridhunter/so-bro:HH1.1.1
- privileged: True
- binds:
- /nsm/bro/logs:/nsm/bro/logs:rw
- /nsm/bro/spool:/nsm/bro/spool:rw
- /nsm/bro/extracted:/nsm/bro/extracted:rw
- /opt/so/conf/bro/local.bro:/opt/bro/share/bro/site/local.bro:ro
- /opt/so/conf/bro/node.cfg:/opt/bro/etc/node.cfg:ro
- /opt/so/conf/bro/bpf:/opt/bro/share/bro/site/bpf:ro
- /opt/so/conf/bro/policy/securityonion:/opt/bro/share/bro/policy/securityonion:ro
- /opt/so/conf/bro/policy/custom:/opt/bro/share/bro/policy/custom:ro
- /opt/so/conf/bro/policy/intel:/opt/bro/share/bro/policy/intel:rw
- network_mode: host
- watch:
- file: /opt/so/conf/bro/local.bro
- file: /opt/so/conf/bro/node.cfg
- file: /opt/so/conf/bro/policy
- file: /opt/so/conf/bro/bpf
{% endif %}

View File

@@ -1 +0,0 @@
#Intel

View File

@@ -1,20 +0,0 @@
{%- set interface = salt['pillar.get']('sensor:interface', '0') %}
global interface = "{{ interface }}";
event bro_init()
{
if ( ! reading_live_traffic() )
return;
Log::remove_default_filter(HTTP::LOG);
Log::add_filter(HTTP::LOG, [$name = "http-interfaces",
$path_func(id: Log::ID, path: string, rec: HTTP::Info) =
{
local peer = get_event_peer()$descr;
if ( peer in Cluster::nodes && Cluster::nodes[peer]?$interface )
return cat("http_", Cluster::nodes[peer]$interface);
else
return "http";
}
]);
}

View File

@@ -1,9 +0,0 @@
@load frameworks/intel/seen
@load frameworks/intel/do_notice
@load frameworks/files/hash-all-files
redef Intel::read_files += {
fmt("%s/apt1-fqdn.dat", @DIR),
fmt("%s/apt1-md5.dat", @DIR),
fmt("%s/apt1-certs.dat", @DIR)
};

View File

@@ -1,26 +0,0 @@
#fields indicator indicator_type meta.source meta.desc meta.do_notice
b054e26ef827fbbf5829f84a9bdbb697a5b042fc Intel::CERT_HASH Mandiant APT1 Report ALPHA T
7bc0cc2cf7c3a996c32dbe7e938993f7087105b4 Intel::CERT_HASH Mandiant APT1 Report AOL T
7855c132af1390413d4e4ff4ead321f8802d8243 Intel::CERT_HASH Mandiant APT1 Report AOL T
f3e3c590d7126bd227733e9d8313d2575c421243 Intel::CERT_HASH Mandiant APT1 Report AOL T
d4d4e896ce7d73b573f0a0006080a246aec61fe7 Intel::CERT_HASH Mandiant APT1 Report AOL T
bcdf4809c1886ac95478bbafde246d0603934298 Intel::CERT_HASH Mandiant APT1 Report AOL T
6b4855df8afc8d57a671fe5ed628f6d88852a922 Intel::CERT_HASH Mandiant APT1 Report AOL T
d50fdc82c328319ac60f256d3119b8708cd5717b Intel::CERT_HASH Mandiant APT1 Report AOL T
70b48d5177eebe9c762e9a37ecabebfd10e1b7e9 Intel::CERT_HASH Mandiant APT1 Report AOL T
3a6a299b764500ce1b6e58a32a257139d61a3543 Intel::CERT_HASH Mandiant APT1 Report AOL T
bf4f90e0029b2263af1141963ddf2a0c71a6b5fb Intel::CERT_HASH Mandiant APT1 Report AOL T
b21139583dec0dae344cca530690ec1f344acc79 Intel::CERT_HASH Mandiant APT1 Report AOL T
21971ffef58baf6f638df2f7e2cceb4c58b173c8 Intel::CERT_HASH Mandiant APT1 Report EMAIL T
04ecff66973c92a1c348666d5a4738557cce0cfc Intel::CERT_HASH Mandiant APT1 Report IBM T
f97d1a703aec44d0f53a3a294e33acda43a49de1 Intel::CERT_HASH Mandiant APT1 Report IBM T
c0d32301a7c96ecb0bc8e381ec19e6b4eaf5d2fe Intel::CERT_HASH Mandiant APT1 Report IBM T
1b27a897cda019da2c3a6dc838761871e8bf5b5d Intel::CERT_HASH Mandiant APT1 Report LAME T
d515996e8696612dc78fc6db39006466fc6550df Intel::CERT_HASH Mandiant APT1 Report MOON-NIGHT T
8f79315659e59c79f1301ef4aee67b18ae2d9f1c Intel::CERT_HASH Mandiant APT1 Report NONAME T
a57a84975e31e376e3512da7b05ad06ef6441f53 Intel::CERT_HASH Mandiant APT1 Report NS T
b3db37a0edde97b3c3c15da5f2d81d27af82f583 Intel::CERT_HASH Mandiant APT1 Report SERVER (PEM) T
6d8f1454f6392361fb2464b744d4fc09eee5fcfd Intel::CERT_HASH Mandiant APT1 Report SUR T
b66e230f404b2cc1c033ccacda5d0a14b74a2752 Intel::CERT_HASH Mandiant APT1 Report VIRTUALLYTHERE T
4acbadb86a91834493dde276736cdf8f7ef5d497 Intel::CERT_HASH Mandiant APT1 Report WEBMAIL T
86a48093d9b577955c4c9bd19e30536aae5543d4 Intel::CERT_HASH Mandiant APT1 Report YAHOO T

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,106 +0,0 @@
##! This script is to support the bpf.conf file like other network monitoring tools use.
##! Please don't try to learn from this script right now, there are a large number of
##! hacks in it to work around bugs discovered in Bro.
@load base/frameworks/notice
module BPFConf;
export {
## The file that is watched on disk for BPF filter changes.
## Two templated variables are available; "sensorname" and "interface".
## They can be used by surrounding the term by doubled curly braces.
const filename = "/opt/bro/share/bro/site/bpf" &redef;
redef enum Notice::Type += {
## Invalid filter notice.
InvalidFilter
};
}
global filter_parts: vector of string = vector();
global current_filter_filename = "";
type FilterLine: record {
s: string;
};
redef enum PcapFilterID += {
BPFConfPcapFilter,
};
event BPFConf::line(description: Input::EventDescription, tpe: Input::Event, s: string)
{
local part = sub(s, /[[:blank:]]*#.*$/, "");
# We don't want any blank parts.
if ( part != "" )
filter_parts[|filter_parts|] = part;
}
event Input::end_of_data(name: string, source:string)
{
if ( name == "bpfconf" )
{
local filter = join_string_vec(filter_parts, " ");
capture_filters["bpf.conf"] = filter;
if ( Pcap::precompile_pcap_filter(BPFConfPcapFilter, filter) )
{
PacketFilter::install();
}
else
{
NOTICE([$note=InvalidFilter,
$msg=fmt("Compiling packet filter from %s failed", filename),
$sub=filter]);
}
filter_parts=vector();
}
}
function add_filter_file()
{
local real_filter_filename = BPFConf::filename;
# Support the interface template value.
#if ( SecurityOnion::sensorname != "" )
# real_filter_filename = gsub(real_filter_filename, /\{\{sensorname\}\}/, SecurityOnion::sensorname);
# Support the interface template value.
#if ( SecurityOnion::interface != "" )
# real_filter_filename = gsub(real_filter_filename, /\{\{interface\}\}/, SecurityOnion::interface);
#if ( /\{\{/ in real_filter_filename )
# {
# return;
# }
#else
# Reporter::info(fmt("BPFConf filename set: %s (%s)", real_filter_filename, Cluster::node));
if ( real_filter_filename != current_filter_filename )
{
current_filter_filename = real_filter_filename;
Input::add_event([$source=real_filter_filename,
$name="bpfconf",
$reader=Input::READER_RAW,
$mode=Input::REREAD,
$want_record=F,
$fields=FilterLine,
$ev=BPFConf::line]);
}
}
#event SecurityOnion::found_sensorname(name: string)
# {
# add_filter_file();
# }
event bro_init() &priority=5
{
if ( BPFConf::filename != "" )
add_filter_file();
}

View File

@@ -1,10 +0,0 @@
global sensorname = "{{ grains.host }}";
redef record Conn::Info += {
sensorname: string &log &optional;
};
event connection_state_remove(c: connection)
{
c$conn$sensorname = sensorname;
}

View File

@@ -1,21 +0,0 @@
global ext_map: table[string] of string = {
["application/x-dosexec"] = "exe",
["text/plain"] = "txt",
["image/jpeg"] = "jpg",
["image/png"] = "png",
["text/html"] = "html",
} &default ="";
event file_sniff(f: fa_file, meta: fa_metadata)
{
if ( ! meta?$mime_type || meta$mime_type != "application/x-dosexec" )
return;
local ext = "";
if ( meta?$mime_type )
ext = ext_map[meta$mime_type];
local fname = fmt("/nsm/bro/extracted/%s-%s.%s", f$source, f$id, ext);
Files::add_analyzer(f, Files::ANALYZER_EXTRACT, [$extract_filename=fname]);
}

View File

@@ -1,3 +0,0 @@
@load tuning/json-logs
redef LogAscii::json_timestamps = JSON::TS_ISO8601;
redef LogAscii::use_json = T;

View File

@@ -13,6 +13,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/>.
{% set IMAGEREPO = salt['pillar.get']('static:imagerepo') %}
# Create the group
dstatsgroup:
group.present:
@@ -37,13 +39,13 @@ dstatslogdir:
so-domainstatsimage:
cmd.run:
- name: docker pull --disable-content-trust=false docker.io/soshybridhunter/so-domainstats:HH1.0.3
- name: docker pull --disable-content-trust=false docker.io/{{ IMAGEREPO }}/so-domainstats:HH1.0.3
so-domainstats:
docker_container.running:
- require:
- so-domainstatsimage
- image: docker.io/soshybridhunter/so-domainstats:HH1.0.3
- image: docker.io/{{ IMAGEREPO }}/so-domainstats:HH1.0.3
- hostname: domainstats
- name: so-domainstats
- user: domainstats

View File

@@ -1,5 +1,5 @@
{% set esip = salt['pillar.get']('master:mainip', '') %}
{% set esport = salt['pillar.get']('master:es_port', '') %}
{% set esip = salt['pillar.get']('manager:mainip', '') %}
{% set esport = salt['pillar.get']('manager:es_port', '') %}
# This is the folder that contains the rule yaml files
# Any .yaml file will be loaded as a rule
rules_folder: /opt/elastalert/rules/
@@ -86,3 +86,25 @@ alert_time_limit:
index_settings:
shards: 1
replicas: 0
logging:
version: 1
incremental: false
disable_existing_loggers: false
formatters:
logline:
format: '%(asctime)s %(levelname)+8s %(name)+20s %(message)s'
handlers:
file:
class : logging.FileHandler
formatter: logline
level: INFO
filename: /var/log/elastalert/elastalert.log
loggers:
'':
level: INFO
handlers:
- file
propagate: false

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from datetime import date
from time import gmtime, strftime
import requests,json
from elastalert.alerts import Alerter
@@ -13,11 +13,12 @@ class PlaybookESAlerter(Alerter):
def alert(self, matches):
for match in matches:
today = strftime("%Y.%m.%d", gmtime())
timestamp = strftime("%Y-%m-%d"'T'"%H:%M:%S", gmtime())
headers = {"Content-Type": "application/json"}
payload = {"play_title": self.rule['play_title'],"play_url": self.rule['play_url'],"sigma_level": self.rule['sigma_level'],"data": match}
today = str(date.today())
url = f"http://{self.rule['elasticsearch_host']}/playbook-alerts-{today}/_doc/"
payload = {"rule.name": self.rule['play_title'],"event.severity": self.rule['event.severity'],"kibana_pivot": self.rule['kibana_pivot'],"soc_pivot": self.rule['soc_pivot'],"event.module": self.rule['event.module'],"event.dataset": self.rule['event.dataset'],"play_url": self.rule['play_url'],"sigma_level": self.rule['sigma_level'],"rule.category": self.rule['rule.category'],"data": match, "@timestamp": timestamp}
url = f"http://{self.rule['elasticsearch_host']}/so-playbook-alerts-{today}/_doc/"
requests.post(url, data=json.dumps(payload), headers=headers, verify=False)
def get_info(self):
return {'type': 'PlaybookESAlerter'}
return {'type': 'PlaybookESAlerter'}

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