Compare commits

...

460 Commits

Author SHA1 Message Date
Mike Reeves
58dc073678 Merge pull request #10481 from Security-Onion-Solutions/2.4/dev
2.4.2
2023-06-01 09:37:38 -04:00
Mike Reeves
8c9186d8dd Merge pull request #10489 from Security-Onion-Solutions/2.4.2
2.4.2
2023-06-01 09:27:56 -04:00
Mike Reeves
aee842b912 2.4.2 2023-06-01 09:26:24 -04:00
weslambert
3a5a59af59 Merge pull request #10485 from Security-Onion-Solutions/fix/elastic_fleet_dedicated
Add so-fleet role logic
2023-05-31 16:04:40 -04:00
Josh Patterson
8f3a874e61 Merge pull request #10483 from Security-Onion-Solutions/dedfleetES
exclude elasticsearch.ca state from fleet and receiver nodes
2023-05-31 16:02:57 -04:00
m0duspwnens
66dc6274e6 exclude elasticsearch.ca state from fleet and receiver nodes 2023-05-31 15:59:36 -04:00
Wes
302e580d8f Add so-fleet role logic 2023-05-31 19:56:17 +00:00
Mike Reeves
4cf60a6054 Merge pull request #10480 from Security-Onion-Solutions/mreeves/mergefrommain
Mreeves/mergefrommain
2023-05-31 15:32:30 -04:00
Mike Reeves
8f6d82af97 Merge branch '2.4/main' into mreeves/mergefrommain 2023-05-31 15:28:07 -04:00
Mike Reeves
8ab54dcead Merge pull request #10477 from Security-Onion-Solutions/2.4.2
2.4.2
2023-05-31 14:49:34 -04:00
Mike Reeves
9704c8917e 2.4.2 2023-05-31 14:47:34 -04:00
weslambert
540ee156db Merge pull request #10469 from Security-Onion-Solutions/fix/elastic_fleet_dynamic_configuration
Use Fleet pillar instead of Zeek
2023-05-31 12:36:39 -04:00
Wes
344e2bf1d0 Update defaults file 2023-05-31 15:30:03 +00:00
Wes
3441c0684e Create elasticfleet pillar dir 2023-05-31 15:10:35 +00:00
Wes
ed560f19d3 Remove where not applicable 2023-05-31 14:28:43 +00:00
Wes
b3f6012856 Change ordering 2023-05-31 14:22:47 +00:00
Wes
9ae26ec866 Add Fleet to top file 2023-05-31 14:21:39 +00:00
Wes
20aaa79476 Add pillar files for Fleet 2023-05-31 13:45:19 +00:00
Wes
2bb77251b0 Move Elastic Fleet logging exclusions to the Fleet pillar 2023-05-31 13:38:58 +00:00
weslambert
36791665f3 Merge pull request #10462 from Security-Onion-Solutions/feature/elastic_agent_zeek_logging
Dynamic integration configuration and Zeek log exclusions for Elastic Agent
2023-05-30 19:27:13 -04:00
Josh Patterson
4d4744a89b Merge pull request #10465 from Security-Onion-Solutions/suricataimport
dont apply suricata.enabled on import nodes
2023-05-30 16:51:17 -04:00
Wes
f3be63051b Remove Fleet configuration 2023-05-30 20:48:43 +00:00
m0duspwnens
743ed316f8 dont apply suricata.enabled on import nodes 2023-05-30 16:10:41 -04:00
Wes
e4b4bbcfdc Use ZEEKMERGED from zeek/config.map.jinja 2023-05-30 19:51:13 +00:00
Wes
b6e090f29f Move Elastic Fleet logic in so-common to so-elastic-fleet-common 2023-05-30 18:43:56 +00:00
weslambert
25006ed20b Merge pull request #10455 from Security-Onion-Solutions/fix/curator_cluster_delete_delete
Update so-elasticsearch-cluster-space-used and so-curator-cluster-delete-delete
2023-05-30 14:28:22 -04:00
Wes
4469a93a75 Fix typo 2023-05-30 18:24:30 +00:00
Mike Reeves
0027016b5a Merge pull request #10463 from Security-Onion-Solutions/TOoSmOotH-patch-2
Update so-setup
2023-05-30 13:52:30 -04:00
Mike Reeves
0143e2412d Update so-setup 2023-05-30 13:51:20 -04:00
Mike Reeves
20212414c4 Update so-setup 2023-05-30 13:46:24 -04:00
Mike Reeves
8a63ed5124 Update so-setup 2023-05-30 13:33:30 -04:00
Wes
096dadf9bd Change 1024 to 1000 for gigabytes 2023-05-30 17:29:42 +00:00
Wes
b441fe662f Change 1024 to 1000 for gigabytes 2023-05-30 17:28:59 +00:00
Wes
e5117a343d Change description 2023-05-30 17:10:17 +00:00
Wes
b9d692eb0e Remove default value 2023-05-30 17:08:52 +00:00
Wes
36a7f54160 Add extension 2023-05-30 16:46:38 +00:00
Josh Brower
96134684dc Merge pull request #10459 from Security-Onion-Solutions/2.4/fixes
Change Fleet Host URL API Endpoint
2023-05-30 12:13:52 -04:00
Jason Ertel
374ab0779a Merge pull request #10458 from Security-Onion-Solutions/jertel/debugrsa
Add short sleeps around show_top to isolate if there's a race conditi…
2023-05-30 12:09:34 -04:00
Jason Ertel
d0d1cc9106 Add short sleeps around show_top to isolate if there's a race condition causing intermittent RSA key format errors 2023-05-30 12:08:39 -04:00
Wes
9035fa3037 Don't load Elasticsearch integration 2023-05-30 15:46:00 +00:00
Wes
b4b87e5620 Only provide JSON output 2023-05-30 15:43:31 +00:00
Wes
97c53d70a4 Remove integrations 2023-05-30 14:05:40 +00:00
Wes
53b4f7bd5c Add spacing 2023-05-30 14:05:11 +00:00
Mike Reeves
192c8c78c7 Merge pull request #10456 from Security-Onion-Solutions/airgaps
Update verifications
2023-05-30 09:52:07 -04:00
Mike Reeves
62a063dae4 Update verifications 2023-05-30 09:50:43 -04:00
Wes
79014a53ec Remove extra lines 2023-05-30 12:35:32 +00:00
Wes
e910f04beb Add default description and Zeek log exclusions for Elastic Fleet 2023-05-30 03:10:52 +00:00
Wes
ef5b63337b Add check for integration existence and integration update functionality 2023-05-30 02:58:00 +00:00
Wes
799e92e595 Add files 2023-05-30 02:56:23 +00:00
Wes
c835c523a9 Elastic Fleet integration update improvements 2023-05-30 02:54:39 +00:00
Josh Brower
9ec1492fad Change Fleet Host URL API Endpoint 2023-05-29 07:44:18 -04:00
Wes
5af1bfe142 Move alert generation outside of the inner loop 2023-05-27 21:15:45 +00:00
Jason Ertel
482c5324db Merge pull request #10442 from Security-Onion-Solutions/airgaps
Rule Updates
2023-05-26 20:32:39 -04:00
Mike Reeves
3c1f1cd50e Rule Updates 2023-05-26 20:11:22 -04:00
Mike Reeves
aecd900203 Merge pull request #10387 from Security-Onion-Solutions/airgaps
Docker Enhancements
2023-05-26 17:35:23 -04:00
Mike Reeves
89f5d9f292 Rule Updates 2023-05-26 17:14:10 -04:00
Josh Brower
de43a202a3 Merge pull request #10441 from Security-Onion-Solutions/2.4/fleet-retry
Add Fleet download retry
2023-05-26 17:03:58 -04:00
Josh Brower
6176fa7ca5 Add Fleet download retry 2023-05-26 16:46:02 -04:00
Mike Reeves
9ff27e5b6a Rule Updates 2023-05-26 16:34:48 -04:00
Mike Reeves
5922fc0e45 Rule Updates 2023-05-26 16:29:13 -04:00
Mike Reeves
b48e259fee Rule Updates 2023-05-26 16:27:29 -04:00
Mike Reeves
b4d85a7bf8 Rule Updates 2023-05-26 16:21:07 -04:00
Mike Reeves
38881231ac Merge branch '2.4/dev' of https://github.com/Security-Onion-Solutions/securityonion into airgaps 2023-05-26 15:16:38 -04:00
Mike Reeves
b2d2a9f0ed Rule Updates 2023-05-26 15:16:14 -04:00
Jason Ertel
32021cf272 Merge pull request #10438 from Security-Onion-Solutions/jertel/redircurl
support forwarding urls
2023-05-26 13:42:57 -04:00
Jason Ertel
4410e136b1 Merge branch '2.4/dev' into jertel/redircurl 2023-05-26 12:12:09 -04:00
Jason Ertel
81d4584819 allow following redirects 2023-05-26 12:11:40 -04:00
Jason Ertel
657ef97d17 Merge pull request #10433 from Security-Onion-Solutions/kilo
Use common fail routine when explicitly aborting setup; Enhance cloud detection
2023-05-26 09:54:15 -04:00
Jason Ertel
8f247f962a undo version for PR 2023-05-26 09:50:12 -04:00
Josh Patterson
bcbdab1682 Merge pull request #10435 from Security-Onion-Solutions/issue/10429
Issue/10429
2023-05-26 09:47:33 -04:00
m0duspwnens
5b4ec70ca6 fix typo on suricata annotations. add to global annotations 2023-05-26 09:37:57 -04:00
Wes
ce114a2601 Fix total space logic and rename TOTAL_AVAILABLE_SPACE to TOTAL_USED_SPACE 2023-05-26 13:19:45 +00:00
Wes
5de59a879a Break out of index deletion when unable to bring space below the disk space threshold 2023-05-26 13:15:27 +00:00
Jason Ertel
a2e6469a38 provide custom cloud detection path 2023-05-26 08:05:34 -04:00
m0duspwnens
5c933910aa simplify map for updating suricata config if md engine is suricata 2023-05-25 17:25:54 -04:00
m0duspwnens
a3c3f08511 convert list to dict to work better with ui. regex on suricata vars HOME_NET for soc 2023-05-25 17:00:48 -04:00
Jason Ertel
9aa58be286 correct kilo version 2023-05-25 16:14:07 -04:00
Jason Ertel
db56b3d6a3 pin version to kilo 2023-05-25 15:27:05 -04:00
Jason Ertel
7d6182a18f redir err to out to avoid leaks to console 2023-05-25 15:24:09 -04:00
Jason Ertel
074f84ae4d flag all forced setup aborts 2023-05-25 14:57:58 -04:00
Mike Reeves
8ce0d76287 Zeek Annotations 2023-05-25 12:12:18 -04:00
Mike Reeves
3be3df00d1 Zeek Annotations 2023-05-25 12:10:15 -04:00
m0duspwnens
d99d4756c3 set defaults as example in soc ui for suricata cpu affinity 2023-05-25 11:11:53 -04:00
m0duspwnens
0d83b13585 Merge remote-tracking branch 'origin/2.4/dev' into issue/10229 2023-05-25 11:04:04 -04:00
m0duspwnens
6505d3e2ce update annotations for suricata 2023-05-25 11:03:37 -04:00
Josh Patterson
6edfadd18b Merge pull request #10432 from Security-Onion-Solutions/distribsetup
Update so-functions
2023-05-25 10:44:33 -04:00
Josh Patterson
9552510c7d Update so-functions
assign proper hostgroups for setup
2023-05-25 10:43:47 -04:00
Doug Burks
36ddcfa4e5 Merge pull request #10431 from Security-Onion-Solutions/dougburks-patch-1
Update README.md for Beta 3
2023-05-25 08:36:14 -04:00
Doug Burks
fcc1337e1a Update README.md for Beta 3 2023-05-25 07:51:08 -04:00
Mike Reeves
10f9d0f4bd Suricata Airgap 2023-05-24 16:21:51 -04:00
Mike Reeves
edf531739c Suricata Airgap 2023-05-24 15:47:07 -04:00
Mike Reeves
11d7e66ea0 Suricata Airgap 2023-05-24 15:30:52 -04:00
Mike Reeves
caaedee5a7 Suricata Airgap 2023-05-24 15:18:52 -04:00
Mike Reeves
1bdd79c578 Suricata Airgap 2023-05-24 15:05:40 -04:00
Mike Reeves
c199acc64e Suricata Airgap 2023-05-24 14:58:11 -04:00
Josh Patterson
a01704a1d7 Merge pull request #10427 from Security-Onion-Solutions/issue/10229
Issue/10229
2023-05-24 13:23:29 -04:00
Wes
53f258b08f Add eligible_indices to index deletion requirements 2023-05-24 17:02:11 +00:00
Wes
a308a39bbe Use disk space taken up by indices if the script is not running on a manager 2023-05-24 16:48:45 +00:00
m0duspwnens
5c00655ad0 Merge remote-tracking branch 'origin/2.4/dev' into issue/10229 2023-05-24 12:22:52 -04:00
m0duspwnens
67a608ea56 adjust suricata defaults 2023-05-24 12:22:42 -04:00
Josh Brower
01d983fc00 Merge pull request #10426 from Security-Onion-Solutions/2.4/fleet-punchlist
2.4/fleet punchlist
2023-05-24 12:15:50 -04:00
Mike Reeves
d6f1bcfdf0 Merge branch '2.4/dev' of https://github.com/Security-Onion-Solutions/securityonion into airgaps 2023-05-24 11:42:44 -04:00
Josh Brower
f156573f8d Merge remote-tracking branch 'remotes/origin/2.4/dev' into 2.4/fleet-punchlist 2023-05-24 11:28:38 -04:00
Josh Brower
b3e0e68896 Change Fleet Host URL API 2023-05-24 11:27:41 -04:00
Mike Reeves
86803f1fb5 Add Suricata 2023-05-24 10:48:01 -04:00
Jason Ertel
aad08a830b Merge pull request #10425 from Security-Onion-Solutions/kilo
fix malformed alert templates
2023-05-24 10:21:21 -04:00
Mike Reeves
c9db6c0f18 Add Suricata 2023-05-24 10:18:58 -04:00
Jason Ertel
d9a9c8738c fix malformed alert templates 2023-05-24 10:17:59 -04:00
Mike Reeves
cb0ed9ae6d Merge branch '2.4/dev' of https://github.com/Security-Onion-Solutions/securityonion into airgaps 2023-05-24 10:04:15 -04:00
Josh Brower
4f72fca2d7 Merge remote-tracking branch 'remotes/origin/2.4/dev' into 2.4/fleet-punchlist 2023-05-24 09:55:29 -04:00
Josh Patterson
1dc426b8ce Merge pull request #10422 from Security-Onion-Solutions/issue/10229
fix suricata sostatus
2023-05-24 09:54:14 -04:00
m0duspwnens
8995012c80 fix suricata sostatus 2023-05-24 09:52:07 -04:00
Mike Reeves
2c4ba2e8b2 Add Suricata 2023-05-24 09:35:50 -04:00
Mike Reeves
c42959d040 soup skeleton 2023-05-24 09:29:50 -04:00
Mike Reeves
fa6dcd7f83 Merge branch '2.4/dev' of https://github.com/Security-Onion-Solutions/securityonion into airgaps 2023-05-24 09:04:04 -04:00
Josh Brower
9c6365aa2f Merge remote-tracking branch 'remotes/origin/2.4/dev' into 2.4/fleet-punchlist 2023-05-24 09:03:57 -04:00
Josh Patterson
6e4c4febfb Merge pull request #10421 from Security-Onion-Solutions/issue/10229
rename state to resolve conflicting / duplicate state ids
2023-05-24 09:02:47 -04:00
m0duspwnens
732d2aadf8 rename state to resolve conflicting / duplicate state ids 2023-05-24 08:58:43 -04:00
Mike Reeves
cace817c79 Merge branch '2.4/dev' of https://github.com/Security-Onion-Solutions/securityonion into airgaps 2023-05-24 08:43:03 -04:00
Josh Brower
e1c361e555 Fix variable 2023-05-23 16:50:40 -04:00
Josh Brower
502277b1b7 Hash check, use url base 2023-05-23 16:38:37 -04:00
bryant-treacle
57f5a22f0f Merge pull request #10396 from Security-Onion-Solutions/2.4/Influxdb_alerts
2.4/influxdb alerts
2023-05-23 14:14:48 -04:00
Josh Patterson
4b18a0e758 Merge pull request #10417 from Security-Onion-Solutions/issue/10229
Issue/10229
2023-05-23 13:47:48 -04:00
Josh Brower
f6a9a764de Merge pull request #10416 from Security-Onion-Solutions/2.4/smallfixes
2.4/EQL
2023-05-23 13:28:11 -04:00
m0duspwnens
e65214b097 Merge remote-tracking branch 'origin/2.4/dev' into issue/10229 2023-05-23 12:10:29 -04:00
m0duspwnens
cc47f9a595 fix suricata thresholding 2023-05-23 11:16:32 -04:00
m0duspwnens
eb633be437 enable/disable suricata in ui. assign threads properly 2023-05-22 17:48:22 -04:00
Josh Brower
df0dc2e4d1 Merge remote-tracking branch 'remotes/origin/2.4/dev' into 2.4/smallfixes 2023-05-22 16:02:30 -04:00
Josh Brower
766f4dd661 Add Elastic Defend Integration 2023-05-22 16:02:08 -04:00
Jason Ertel
f53fb69ffb Merge pull request #10407 from Security-Onion-Solutions/kilo
Ignore Synchronize button clicks when an active salt job is running and another is already in queue
2023-05-22 14:59:42 -04:00
Jason Ertel
ba0ec18a33 Ignore Synchronize button clicks when an active salt job is running and another is already in queue 2023-05-22 14:52:07 -04:00
weslambert
79182cecfd Merge pull request #10397 from Security-Onion-Solutions/fix/elastic_exclude_zeek_reporter_log
Exclude Zeek's reporter.log from being picked up by Elastic Agent
2023-05-22 07:56:54 -04:00
weslambert
8cf82c4b6a Merge pull request #10398 from Security-Onion-Solutions/fix/elasticsearch_ingest_dns_query
Check if 'dns.query' is null
2023-05-22 07:56:44 -04:00
weslambert
78d4586033 Merge pull request #10399 from Security-Onion-Solutions/fix/elastalert_playbook_alerter
Update 'url' to use 'es_hosts'
2023-05-22 07:56:31 -04:00
Jason Ertel
02cf1074f2 Merge pull request #10400 from Security-Onion-Solutions/kilo
use the same requests version that's already packaged with the analyzer
2023-05-20 08:45:21 -04:00
Jason Ertel
a881cab469 use the same requests version that's already packaged with the analyzer 2023-05-19 23:54:30 -04:00
weslambert
00bd93c026 Update 'url' to use 'es_hosts' 2023-05-19 17:14:13 -04:00
weslambert
2c10ad7eec Check if 'dns.query' is null 2023-05-19 15:50:33 -04:00
weslambert
167051af28 Exclude Zeek's reporter.log from being picked up by Elastic Agent 2023-05-19 15:44:09 -04:00
weslambert
eb9c5e9af0 Merge pull request #10307 from Security-Onion-Solutions/fix/elastic_fleet_ignore_zeek_logs
Don't read from 'known_hosts.log', 'known_services.log', or 'ntp.log'
2023-05-19 15:09:15 -04:00
Jason Ertel
2f942a3e37 Merge pull request #10393 from Security-Onion-Solutions/kilo
fix lib dependency issue with whoisit
2023-05-19 14:34:42 -04:00
Jason Ertel
03f97b309a fix lib dependency issue with whoisit 2023-05-19 14:18:19 -04:00
weslambert
c6a962a46b Merge pull request #10392 from Security-Onion-Solutions/fix/elastalert_index
Change Elastalert writeback index name from 'elastalert_status' to 'elastalert'
2023-05-19 13:31:29 -04:00
weslambert
1ddf45bbbe Change Elastalert writeback index name from 'elastalert_status' to 'elastalert' 2023-05-19 12:39:27 -04:00
Doug Burks
f0c4cebaca Merge pull request #10391 from Security-Onion-Solutions/2.4/elastic-8.7.1
UPGRADE: Elastic 8.7.1 #10269
2023-05-19 12:29:01 -04:00
Doug Burks
87c42ece00 Update so-kibana-config-load 2023-05-19 12:21:09 -04:00
Doug Burks
4f8fcd3369 Update config_saved_objects.ndjson 2023-05-19 12:19:44 -04:00
bryant-treacle
5b2d91b5b5 Update alarm_zeek_packet_loss.json 2023-05-19 10:32:53 -04:00
bryant-treacle
a84322f9b7 Update alarm_suricata_packet_loss.json 2023-05-19 10:32:29 -04:00
bryant-treacle
2de95bcb63 Update alarm_steno_packet_loss.json 2023-05-19 10:32:13 -04:00
bryant-treacle
1e9e2facde Update alarm_low_monitor_traffic.json 2023-05-19 10:29:53 -04:00
bryant-treacle
592c67d1f2 Update alarm_pcap_retention.json 2023-05-19 10:29:15 -04:00
bryant-treacle
e91dd29cb2 Update alarm_high_redis_memory_usage.json 2023-05-19 10:25:22 -04:00
bryant-treacle
13c9142814 Update alarm_low_monitor_traffic.json 2023-05-19 10:21:43 -04:00
bryant-treacle
ef4f2491f3 Update alarm_high_redis_memory_usage.json 2023-05-19 10:12:44 -04:00
bryant-treacle
645555b990 Update alarm_zeek_packet_loss.json 2023-05-19 10:10:44 -04:00
bryant-treacle
839275814c Update redis.sh - Added percent of used memory. 2023-05-19 08:51:49 -04:00
bryant-treacle
9b973e07e2 Add files via upload 2023-05-19 08:49:43 -04:00
Josh Patterson
0027385da9 Merge pull request #10389 from Security-Onion-Solutions/issue/10229
enable playbook on eval in pillar during setup
2023-05-18 17:38:05 -04:00
m0duspwnens
4ef77f9050 enable playbook on eval in pillar during setup 2023-05-18 17:34:59 -04:00
Mike Reeves
debbdec350 Allow additional docker parameters 2023-05-18 17:10:18 -04:00
Mike Reeves
bf4ac0c2dd Allow additional docker parameters 2023-05-18 17:08:39 -04:00
Mike Reeves
cb9e7e63db Allow additional docker parameters 2023-05-18 17:00:54 -04:00
Mike Reeves
32560af767 Allow additional docker parameters 2023-05-18 16:59:45 -04:00
Mike Reeves
1e5ac61ff5 Allow additional docker parameters 2023-05-18 16:57:48 -04:00
Mike Reeves
5315c51197 Allow additional docker parameters 2023-05-18 16:52:38 -04:00
Mike Reeves
8917f9b9d2 Allow additional docker parameters 2023-05-18 16:46:28 -04:00
Mike Reeves
c0dc05f26a Allow additional docker parameters 2023-05-18 16:39:42 -04:00
Mike Reeves
2aa801d906 Allow additional docker parameters 2023-05-18 16:31:29 -04:00
weslambert
c192ec9109 Merge pull request #10385 from Security-Onion-Solutions/feature/elastalert_eql
Add initial support for EQL queries for Elastalert
2023-05-18 15:36:28 -04:00
Mike Reeves
7ab31e36af Merge branch '2.4/dev' of https://github.com/Security-Onion-Solutions/securityonion into airgaps 2023-05-18 15:19:15 -04:00
Mike Reeves
0fd9fb9294 Allow additional docker parameters 2023-05-18 15:19:09 -04:00
Josh Patterson
059f80bfc4 Merge pull request #10384 from Security-Onion-Solutions/issue/10334
Issue/10334
2023-05-18 13:28:47 -04:00
m0duspwnens
bab2f7282c fix spaciong 2023-05-18 13:27:48 -04:00
m0duspwnens
02920b5ac9 confirm manager ip when found in setup 2023-05-18 13:25:12 -04:00
m0duspwnens
25b0934cda confirm manager ip when found in setup 2023-05-18 13:06:20 -04:00
Wes
d3c7ea4805 Add EQL option 2023-05-18 16:55:26 +00:00
Wes
82c3d78672 Change Elasticsearch host syntax 2023-05-18 16:52:27 +00:00
Josh Brower
97b68609bc Merge pull request #10381 from Security-Onion-Solutions/2.4/smallfixes
2.4/ElasticFleetPunchList
2023-05-18 09:04:30 -04:00
Josh Patterson
1d611e618f Merge pull request #10383 from Security-Onion-Solutions/issue/10229
remove conditional on cacertz and capemz
2023-05-18 08:45:41 -04:00
m0duspwnens
f4b8d385ee remove conditional on cacertz and capemz 2023-05-18 08:36:24 -04:00
Jason Ertel
b7e0923ec4 Merge pull request #10382 from Security-Onion-Solutions/kilo
add missing var for local dev
2023-05-17 18:58:29 -04:00
Jason Ertel
4930ae4ba6 add missing var for local dev 2023-05-17 18:14:21 -04:00
Josh Brower
d11479ec5f Merge remote-tracking branch 'remotes/origin/2.4/dev' into 2.4/smallfixes 2023-05-17 16:11:46 -04:00
Josh Brower
901e3c4a20 Set Fleet Host timeouts to 120 seconds 2023-05-17 16:07:59 -04:00
Josh Patterson
81842462ba Merge pull request #10380 from Security-Onion-Solutions/issue/10229
Issue/10229
2023-05-17 15:53:15 -04:00
m0duspwnens
e15c14cc2e fix indent 2023-05-17 15:50:31 -04:00
m0duspwnens
f7ddf57f39 move files out of config 2023-05-17 15:49:22 -04:00
Josh Brower
47e67fda46 Rework restart scripts for Elastic Fleet 2023-05-17 15:37:39 -04:00
Josh Brower
7d0251952c Filter out uneeded Logstash metadata 2023-05-17 11:06:16 -04:00
Josh Brower
5536f5a8c2 Add Fleet node to other roles 2023-05-17 09:32:20 -04:00
Josh Patterson
2c932fae9d Merge pull request #10371 from Security-Onion-Solutions/salt3006.1
Salt3006.1
2023-05-16 16:59:31 -04:00
Josh Brower
24445cf36a Rename Fleet pipelines 2023-05-16 16:43:21 -04:00
m0duspwnens
0feb25c962 Merge remote-tracking branch 'origin/2.4/dev' into salt3006.1 2023-05-16 16:07:31 -04:00
m0duspwnens
3abb4d79ba change path where SALTVERSION is pulled from 2023-05-16 16:07:06 -04:00
Josh Patterson
1df183deb3 Merge pull request #10370 from Security-Onion-Solutions/issue/10229
fix grep logic for so-elastic-fleet sostatus.sls
2023-05-16 15:46:41 -04:00
m0duspwnens
77834c1e58 fix grep logic for so-elastic-fleet sostatus.sls 2023-05-16 15:05:14 -04:00
Josh Patterson
d6207705cd Merge pull request #10369 from Security-Onion-Solutions/salt3006.1
specify salt version to install during setup
2023-05-16 14:47:35 -04:00
m0duspwnens
e4b61aa08d specify salt version to install during setup 2023-05-16 14:28:57 -04:00
Josh Patterson
736ff2930d Merge pull request #10368 from Security-Onion-Solutions/salt3006.1
Salt3006.1
2023-05-16 13:48:11 -04:00
m0duspwnens
6aff526d9e Merge remote-tracking branch 'origin/2.4/dev' into salt3006.1 2023-05-16 13:08:28 -04:00
Josh Brower
8101171c97 Merge pull request #10367 from Security-Onion-Solutions/2.4/integrationfix
Update Integrations
2023-05-16 12:56:47 -04:00
Josh Brower
000507c366 Update Integrations 2023-05-16 12:50:40 -04:00
Josh Patterson
82fdee45aa Merge pull request #10366 from Security-Onion-Solutions/issue/10229
cwd for catrustscript
2023-05-16 12:11:20 -04:00
m0duspwnens
2419fa43b6 cwd for catrustscript 2023-05-16 12:08:44 -04:00
m0duspwnens
acc7619023 salt 3006.1 2023-05-16 12:04:02 -04:00
Jason Ertel
dcd761ad74 Merge pull request #10364 from Security-Onion-Solutions/kilo
import installs do not use monitor ifaces
2023-05-16 10:15:26 -04:00
Jason Ertel
9871ecd223 import installs do not use monitor ifaces 2023-05-16 10:14:31 -04:00
Josh Patterson
56a7fdcfcd Merge pull request #10363 from Security-Onion-Solutions/issue/10229
Issue/10229
2023-05-16 09:36:31 -04:00
m0duspwnens
6325f6db16 run elasticfleet.config so elasticfleet setup script gets put in place 2023-05-16 09:30:27 -04:00
m0duspwnens
b253cd45ca Merge remote-tracking branch 'origin/2.4/dev' into issue/10229 2023-05-16 09:22:48 -04:00
Jason Ertel
1724565331 Merge pull request #10362 from Security-Onion-Solutions/kilo
ensure automated tests have passwordless sudo
2023-05-16 08:49:00 -04:00
Jason Ertel
00a7beaca2 ensure automated tests have passwordless sudo 2023-05-16 08:43:13 -04:00
Mike Reeves
c129bba7e5 Merge pull request #10361 from Security-Onion-Solutions/TOoSmOotH-patch-3
Update defaults.yaml
2023-05-16 08:19:07 -04:00
Mike Reeves
fb298224fc Update defaults.yaml 2023-05-16 08:17:50 -04:00
Josh Brower
1feed47185 Merge pull request #10360 from Security-Onion-Solutions/2.4/retry
2.4/retry
2023-05-16 08:15:42 -04:00
Josh Brower
923de356e1 Fix typos 2023-05-16 08:06:31 -04:00
Jason Ertel
cea9af4e01 Merge pull request #10359 from Security-Onion-Solutions/kilo
missing braces
2023-05-16 07:25:36 -04:00
Jason Ertel
0f6d894322 missing braces 2023-05-16 07:22:17 -04:00
Josh Brower
9f879164ec Fix broken loop 2023-05-16 06:45:17 -04:00
Jason Ertel
1ddc4b6ff8 Merge pull request #10357 from Security-Onion-Solutions/kilo
ISO tests also use DHCP
2023-05-15 19:04:31 -04:00
Jason Ertel
58f80120bd ISO tests also use DHCP 2023-05-15 18:58:04 -04:00
m0duspwnens
a0e08e4f41 enable elasticfleet via pillar, fix sostatus for elasticfleet 2023-05-15 17:41:09 -04:00
m0duspwnens
2813d67670 import GLOBALS 2023-05-15 16:47:33 -04:00
m0duspwnens
c49b134122 move so-catrust 2023-05-15 16:43:47 -04:00
Mike Reeves
48ce377b02 Merge pull request #10340 from Security-Onion-Solutions/airgaps
Fix IDS Tools
2023-05-15 16:10:03 -04:00
Josh Brower
40de01e8c4 Temp fix 2023-05-15 15:56:21 -04:00
Mike Reeves
2fe88a1e66 Fix verify so copying sigma rules isnt fail 2023-05-15 15:33:52 -04:00
Mike Reeves
214117e0e0 Fix verify so copying sigma rules isnt fail 2023-05-15 15:33:32 -04:00
Josh Brower
bc2d3e43f0 Merge pull request #10356 from Security-Onion-Solutions/2.4/retry
Fix path
2023-05-15 15:20:43 -04:00
Josh Brower
b3528b2139 Fix path 2023-05-15 15:18:49 -04:00
Josh Brower
7ecd067e2b Merge pull request #10355 from Security-Onion-Solutions/2.4/retry
Add retry
2023-05-15 14:57:46 -04:00
Josh Brower
576c1d7cc1 Add retry 2023-05-15 14:55:43 -04:00
m0duspwnens
6320528263 move so-catrust 2023-05-15 14:08:30 -04:00
Josh Brower
6528632861 Merge pull request #10352 from Security-Onion-Solutions/2.4/taglogs
Refactor wrapper
2023-05-15 13:56:38 -04:00
m0duspwnens
928b3b5471 create local kibana pillar dirs before touching pillar files 2023-05-15 13:40:52 -04:00
m0duspwnens
f1c8467e9b create and assign kibana.soc and kibana.adv 2023-05-15 13:13:38 -04:00
m0duspwnens
f5337eba1a Merge remote-tracking branch 'origin/2.4/dev' into issue/10229 2023-05-15 13:08:53 -04:00
Jason Ertel
de28e15805 Merge pull request #10354 from Security-Onion-Solutions/kilo
Relax rate limiting thresholds when installing in test mode
2023-05-15 13:02:07 -04:00
Jason Ertel
09ba15f9bb Merge branch '2.4/dev' into kilo 2023-05-15 12:57:46 -04:00
Jason Ertel
ba9892941d relax login rate limiting when testing 2023-05-15 12:57:41 -04:00
Josh Brower
b381c51246 Merge branch '2.4/dev' into 2.4/taglogs 2023-05-15 12:13:44 -04:00
Josh Brower
64726af69c Change from tmp 2023-05-15 12:09:16 -04:00
m0duspwnens
7a4fea7a12 fix nginx merge conflicts 2023-05-15 11:40:12 -04:00
m0duspwnens
db47256cdd rename 2023-05-15 11:23:27 -04:00
m0duspwnens
ba2392997b enabled/disable elastic-fleet-package-registry via ui 2023-05-15 11:14:21 -04:00
m0duspwnens
1a1bcb3526 enable/disable idh via ui 2023-05-15 10:53:39 -04:00
m0duspwnens
997e6c141a enable/disable idstools in ui 2023-05-15 10:19:15 -04:00
Doug Burks
9a3c997779 Merge pull request #10351 from Security-Onion-Solutions/dougburks-patch-1
Update install_agent_grid.sls
2023-05-15 10:13:55 -04:00
Doug Burks
53ed4d49c2 Update install_agent_grid.sls 2023-05-15 10:10:27 -04:00
m0duspwnens
0cee5b54a1 make advnaced 2023-05-15 10:00:15 -04:00
m0duspwnens
3f8e15d16f enabled/disable elaticfleet in ui 2023-05-15 09:41:44 -04:00
Doug Burks
f8f6a1433a Merge pull request #10350 from Security-Onion-Solutions/2.4/fix-agent-iso
2.4/fix agent iso
2023-05-15 08:47:05 -04:00
Doug Burks
83188401c5 update status messages 2023-05-15 08:43:53 -04:00
Doug Burks
b01367a294 remove the temp directory when finished 2023-05-15 08:41:05 -04:00
Doug Burks
d8e0e320f4 so-elastic-agent-gen-installers should use /nsm to avoid filling /tmp 2023-05-15 07:31:32 -04:00
m0duspwnens
b033f0d20f fix import 2023-05-12 16:57:31 -04:00
m0duspwnens
b71b4225c4 enabled/disable kratos in ui 2023-05-12 16:53:18 -04:00
m0duspwnens
2a39f5f0b5 enabled/disable mysql in ui 2023-05-12 16:27:18 -04:00
m0duspwnens
e27e690bc8 fix disabled for registry 2023-05-12 16:07:49 -04:00
m0duspwnens
57371ffe5a fix so-status for dockerregistry 2023-05-12 16:05:23 -04:00
m0duspwnens
4440ecd433 enabled/disable registry in ui 2023-05-12 15:51:00 -04:00
m0duspwnens
277ad61920 enabled/disable registry in ui 2023-05-12 15:49:13 -04:00
m0duspwnens
0860b1501e fix so-status state name 2023-05-12 15:17:51 -04:00
m0duspwnens
b06610088a fix so-status state names 2023-05-12 15:15:21 -04:00
m0duspwnens
aa2f168b73 make node_description a string 2023-05-12 15:12:12 -04:00
m0duspwnens
d1f7e5f4a7 fix and rename timeout_ms and parallel_limit 2023-05-12 14:57:55 -04:00
m0duspwnens
05a81596e5 place and access sensoronikey from sensoroni.config 2023-05-12 14:38:39 -04:00
m0duspwnens
00d1ca0b62 configure and enable/disable sensoroni via ui 2023-05-12 14:26:46 -04:00
Josh Brower
dbd4a5bd98 Refactor wrapper 2023-05-12 12:11:28 -04:00
Doug Burks
3db34a3346 Merge pull request #10341 from Security-Onion-Solutions/dougburks-patch-1
revert last change to so-verify
2023-05-11 16:47:50 -04:00
Doug Burks
f9890778ad revert last change to so-verify 2023-05-11 16:45:46 -04:00
m0duspwnens
e342dae818 put srvKey under soc:config:server 2023-05-11 16:14:52 -04:00
Mike Reeves
64e294ef48 Fix verify so copying sigma rules isnt fail 2023-05-11 16:02:58 -04:00
Mike Reeves
992bbdfac1 Merge branch '2.4/dev' of https://github.com/Security-Onion-Solutions/securityonion into airgaps 2023-05-11 16:00:15 -04:00
Mike Reeves
a4cd695cc8 Airgap Rules Fix 2023-05-11 16:00:07 -04:00
Doug Burks
9f85b3cb4f Merge pull request #10339 from Security-Onion-Solutions/dougburks-patch-1
add another error exclusion to so-verify
2023-05-11 15:59:14 -04:00
Doug Burks
e9fd7d8b8b add another error exclusion to so-verify 2023-05-11 15:38:57 -04:00
m0duspwnens
fa1a428133 fix import 2023-05-11 15:36:20 -04:00
m0duspwnens
8e18986671 enabled/disable soc in ui 2023-05-11 15:33:16 -04:00
m0duspwnens
a3b97b40ba enabled/disable soctopus in ui 2023-05-11 13:57:08 -04:00
Doug Burks
634dd9907d Merge pull request #10338 from Security-Onion-Solutions/dougburks-patch-1
fix typo in so-elastic-fleet-setup
2023-05-11 13:40:15 -04:00
Doug Burks
1d12dcd243 fix typo in so-elastic-fleet-setup 2023-05-11 13:39:07 -04:00
Jason Ertel
2ec8d6abf0 Merge pull request #10337 from Security-Onion-Solutions/kilo
Prevent duplicate telegraph data from elastic from distorting Influx graphs
2023-05-11 13:38:14 -04:00
Jason Ertel
98c19e5934 handle duplicate telegraph data for elastic 2023-05-11 13:34:44 -04:00
m0duspwnens
03e7636a18 include nginx.config in soctopus 2023-05-11 13:19:16 -04:00
m0duspwnens
6ce9561ba7 enabled/disable nginx via ui 2023-05-11 13:15:26 -04:00
m0duspwnens
b80dd996cc fix import 2023-05-11 12:46:05 -04:00
m0duspwnens
63cea88c1d enable/disable influxdb in ui 2023-05-11 12:43:06 -04:00
m0duspwnens
f41c75c633 fix include 2023-05-11 12:14:30 -04:00
m0duspwnens
20f706f165 enable/disable telegraf in ui 2023-05-11 12:12:25 -04:00
m0duspwnens
c74b440922 configure and enable/disable curator in ui 2023-05-11 10:17:28 -04:00
Mike Reeves
badaab94de Merge pull request #10331 from Security-Onion-Solutions/airgaps
Fix so_user shennanigans
2023-05-10 18:34:39 -04:00
Mike Reeves
2be6c603ab Fix so_user shennanigans 2023-05-10 17:47:41 -04:00
Jason Ertel
7700a5a1bf Merge pull request #10328 from Security-Onion-Solutions/kilo
add missing dollar sign
2023-05-10 17:06:35 -04:00
Jason Ertel
687a89e30b add missing dollar sign 2023-05-10 17:00:13 -04:00
m0duspwnens
06a0492226 import DOCKER and GLOBALS for filestream enabled 2023-05-10 16:04:53 -04:00
m0duspwnens
4e4034e054 cleanup strelka in top and allowed_states 2023-05-10 15:59:10 -04:00
m0duspwnens
5b06aa518e makedirs if needed 2023-05-10 15:55:21 -04:00
m0duspwnens
c91fb438bb update map file with new strelka format 2023-05-10 15:53:28 -04:00
m0duspwnens
54c9a3ec71 enable/disable each strelka container in ui 2023-05-10 15:50:07 -04:00
Mike Reeves
cc1babbea6 Merge pull request #10325 from Security-Onion-Solutions/airgaps
Initial airgap support
2023-05-10 15:00:57 -04:00
Mike Reeves
bde67266d4 Add elastic agent logic 2023-05-10 14:28:46 -04:00
Josh Brower
1de1e2fdc2 Merge pull request #10324 from Security-Onion-Solutions/2.4/taglogs
tag container logs
2023-05-10 14:21:16 -04:00
Josh Brower
2293574f2e tag container logs 2023-05-10 14:19:17 -04:00
Mike Reeves
3077c21bd9 Add official key 2023-05-10 14:15:06 -04:00
Mike Reeves
a52ca6e298 Add official key 2023-05-10 13:29:22 -04:00
m0duspwnens
02e1a29f0c configure redis in ui 2023-05-10 11:54:21 -04:00
m0duspwnens
1b9ed1c72b uncomment so-playbook when enabled 2023-05-10 11:24:14 -04:00
Mike Reeves
9564158c32 Don't sync down the repo for airgap 2023-05-10 11:19:36 -04:00
m0duspwnens
ce1f75aab6 fix indent for description and helplink 2023-05-10 11:19:00 -04:00
m0duspwnens
a0ce46e702 enable/disable logstash in ui 2023-05-10 11:16:03 -04:00
Mike Reeves
f501fac9cd Don't sync down the repo for airgap 2023-05-10 11:07:03 -04:00
Mike Reeves
8b95edd91a Fix setup whiptail for airgap 2023-05-10 10:46:29 -04:00
m0duspwnens
c5e5763014 uncomment so-kibana in so-status 2023-05-10 09:55:20 -04:00
m0duspwnens
2322ed4b6d fix require 2023-05-09 17:13:36 -04:00
m0duspwnens
38d69701a4 fix require 2023-05-09 17:09:00 -04:00
m0duspwnens
4dc0f06331 add add_kibana_to_minion to so-minion 2023-05-09 16:51:41 -04:00
m0duspwnens
ec7bcd9b0c enabled/disable kibana in ui 2023-05-09 16:46:48 -04:00
Doug Burks
24140c4cda Merge pull request #10319 from Security-Onion-Solutions/dougburks-patch-1
Update soc_idstools.yaml
2023-05-09 12:18:36 -04:00
m0duspwnens
6909d3ed14 move cacertz and capemz to ssl state 2023-05-09 12:16:18 -04:00
Doug Burks
cf5feafb1e Update soc_idstools.yaml 2023-05-09 12:11:42 -04:00
Josh Brower
ebc20a86eb Merge pull request #10316 from Security-Onion-Solutions/2.4/integrationversions
Remove Hardcoded Versions
2023-05-09 12:04:24 -04:00
Mike Reeves
e792fbe023 Merge pull request #10317 from Security-Onion-Solutions/airgaps
Remove escaping from nmcli
2023-05-09 11:58:02 -04:00
Mike Reeves
02b619193d Remove escaping from nmcli 2023-05-09 11:55:51 -04:00
Mike Reeves
e5aab3b707 Merge pull request #10315 from Security-Onion-Solutions/airgaps
Fix NIC escaping
2023-05-09 11:40:20 -04:00
Mike Reeves
089fcbd0c5 Fix NIC escaping 2023-05-09 11:37:50 -04:00
Josh Brower
62bafb94f9 Remove Hardcoded Versions 2023-05-09 11:30:25 -04:00
m0duspwnens
9d6fb98e3b move cacertz and capemz to ca state 2023-05-09 11:13:57 -04:00
m0duspwnens
7bd9a84aa1 changes to top and allow_states for enable/disable elasticsearch in ui 2023-05-09 10:01:30 -04:00
m0duspwnens
328b714306 import ELASTICSEARCHMERGED 2023-05-09 09:51:53 -04:00
m0duspwnens
2a979197a0 enabled/disable elasticsearch in ui 2023-05-09 09:33:37 -04:00
Jason Ertel
6f7f09f1cd Merge pull request #10310 from Security-Onion-Solutions/kilo
nginx changes: add rate limiting, remove old HH html
2023-05-08 16:32:27 -04:00
m0duspwnens
f9804c218d only append to so-status.conf if needed 2023-05-08 16:20:17 -04:00
Jason Ertel
dfc4498921 Clarify auth throttle desc 2023-05-08 16:06:10 -04:00
m0duspwnens
9049f9cf03 enabled/disable elastalert via web ui 2023-05-08 15:56:26 -04:00
Jason Ertel
79a5f3a89f add missing slash 2023-05-08 15:55:00 -04:00
Jason Ertel
c7cb11e919 remove obsolete code 2023-05-08 15:34:19 -04:00
Jason Ertel
da81d93930 adjust var name 2023-05-08 15:32:04 -04:00
Jason Ertel
44344612b7 adjust var name 2023-05-08 15:31:08 -04:00
Jason Ertel
7ac4bc52a3 add missing file 2023-05-08 14:55:37 -04:00
m0duspwnens
9aaa33c224 fix allowed_states logic in playbook config 2023-05-08 14:51:10 -04:00
weslambert
a13e6257c3 Don't read from 'known_hosts.log', 'known_services.log', or 'ntp.log' 2023-05-08 14:38:55 -04:00
m0duspwnens
ef18cb3704 top and allow_states changes for playbook 2023-05-08 14:12:46 -04:00
m0duspwnens
d5c7eec4ef enabled false by default, enabled via pillar in so-minion 2023-05-08 13:43:53 -04:00
m0duspwnens
a2c444e03b enabled/disable playbook in ui 2023-05-08 13:43:08 -04:00
Jason Ertel
40c3f9a156 Merge branch '2.4/dev' into kilo 2023-05-08 12:19:00 -04:00
Jason Ertel
bd23d1ab7b implement selective rate limiting 2023-05-08 12:18:46 -04:00
weslambert
a1e0041b14 Merge pull request #10287 from Security-Onion-Solutions/fix/strelka_ignore_yara_rules_2.4
Ignore "expl_outlook_cve_2023_23397.yar" and "gen_mal_3cx_compromise_mar23.yar" since they are causing problems with YARA compilation
2023-05-08 11:58:17 -04:00
weslambert
7483dbf442 Merge pull request #10304 from Security-Onion-Solutions/fix/kibana_pivot_to_pcap_url_2.4
Surround _id field in double quotes to prevent errors associated with values beginning with a hyphen
2023-05-08 11:55:35 -04:00
Wes
0f30e787b3 Surround _id field in double quotes to prevent errors associated with values beginning with a hyphen 2023-05-08 15:34:35 +00:00
m0duspwnens
5d50dbb69e enabled/disable zeek 2023-05-08 10:12:32 -04:00
Mike Reeves
867ea5a1ac Merge pull request #10298 from Security-Onion-Solutions/dockerbinds
Add custom volume binds to all containers
2023-05-08 09:48:45 -04:00
Doug Burks
52cfc59113 Merge pull request #10300 from Security-Onion-Solutions/dougburks-patch-2
FIX: Improve soup's local file modification logic #8972
2023-05-08 09:47:57 -04:00
Mike Reeves
789eafa8c2 Fix string entry 2023-05-08 09:45:08 -04:00
Doug Burks
ed712477d6 FIX: Improve soup's local file modification logic #8972 2023-05-08 09:43:20 -04:00
Mike Reeves
e3cb0a9953 Fix string entry 2023-05-08 09:35:07 -04:00
m0duspwnens
743bbfea35 add zeek.enabled to zeek annotation file 2023-05-05 17:09:01 -04:00
m0duspwnens
e8a5a5bffb import GLOBALS 2023-05-05 16:44:46 -04:00
m0duspwnens
a97fa9675b enable/disable zeek in ui 2023-05-05 16:33:59 -04:00
Mike Reeves
2418d9a096 Add volume mounts 2023-05-05 16:01:23 -04:00
m0duspwnens
2a8ed24045 import GLOBALS 2023-05-05 15:35:04 -04:00
Mike Reeves
f1c91e91b1 Remove port bindings from logstash config section 2023-05-05 15:10:21 -04:00
m0duspwnens
5405bc4e20 handle import node and merge with 2.4/dev 2023-05-05 14:41:26 -04:00
m0duspwnens
47a580d110 fix enabled and disable steno in ui 2023-05-05 13:59:52 -04:00
Mike Reeves
61a43f7df5 Merge pull request #10233 from Security-Onion-Solutions/mkrfixes
Several Fixes
2023-05-05 13:52:56 -04:00
Mike Reeves
21ffcbf2fd Update so-setup 2023-05-05 13:16:45 -04:00
Mike Reeves
563c0631ba Update so-functions 2023-05-05 13:01:40 -04:00
Mike Reeves
77cbf35625 Update so-functions 2023-05-05 11:26:10 -04:00
Mike Reeves
d7972032e4 Update init.sls 2023-05-05 10:33:11 -04:00
Mike Reeves
f6dcefe0f8 Update so-user 2023-05-05 09:34:33 -04:00
Mike Reeves
d5a1406095 Update so-user 2023-05-05 09:15:52 -04:00
Josh Patterson
3d3be6bd29 Merge pull request #10290 from Security-Onion-Solutions/ui/logstash
UI/logstash
2023-05-05 09:01:57 -04:00
m0duspwnens
52fec5fef0 Merge remote-tracking branch 'origin/mkrfixes' into ui/logstash 2023-05-05 09:00:23 -04:00
m0duspwnens
ddb776c80e add redis pillars to searchnode. move redis scripts with jinja to sbin_jinja 2023-05-04 17:26:18 -04:00
Mike Reeves
469258ee5e Update init.sls 2023-05-04 16:46:54 -04:00
Mike Reeves
4fec2a18a5 Update so-functions 2023-05-04 16:26:40 -04:00
weslambert
c7ed29dfa8 Ignore "expl_outlook_cve_2023_23397.yar" and "gen_mal_3cx_compromise_mar23.yar" since they are causing problems with YARA compilation 2023-05-04 16:16:06 -04:00
Mike Reeves
80cbe5f6e8 Update so-functions 2023-05-04 15:45:05 -04:00
Mike Reeves
a64eb0ba97 Update so-setup 2023-05-04 15:30:44 -04:00
Josh Patterson
dbb1b82e1b Merge pull request #10285 from Security-Onion-Solutions/ui/logstash
source from sbin_jinja and exlude pat
2023-05-04 15:14:47 -04:00
m0duspwnens
f34627f709 source from sbin_jinja and exlude pat 2023-05-04 15:13:42 -04:00
Josh Patterson
59451fc4d0 Merge pull request #10284 from Security-Onion-Solutions/ui/logstash
remove extra " from so-elasticsearch-roles-load
2023-05-04 15:02:34 -04:00
m0duspwnens
dc77b20723 remove extra " from so-elasticsearch-roles-load 2023-05-04 14:54:37 -04:00
Josh Patterson
51869ce5b2 Merge pull request #10282 from Security-Onion-Solutions/ui/logstash
UI/logstash
2023-05-04 13:55:28 -04:00
m0duspwnens
98705608a6 Merge remote-tracking branch 'origin/mkrfixes' into ui/logstash 2023-05-04 13:53:55 -04:00
Mike Reeves
8055088d25 Fix some errors 2023-05-04 13:35:44 -04:00
Mike Reeves
d0cfaaeb26 Fix some errors 2023-05-04 13:28:11 -04:00
Mike Reeves
fbacfce0e4 Fix some errors 2023-05-04 13:18:08 -04:00
m0duspwnens
082704ce1f logstash jinja for ui 2023-05-04 13:07:07 -04:00
m0duspwnens
71b6311edc add logstash.nodes to pillar top 2023-05-04 13:05:16 -04:00
Mike Reeves
7e71c60334 Fix some errors 2023-05-04 12:57:35 -04:00
Mike Reeves
c5c2600799 Fix some errors 2023-05-04 12:56:04 -04:00
Josh Brower
c6c3cc82e4 Merge pull request #10281 from Security-Onion-Solutions/2.4/airgapfix
Reenable Elastic Package Registry - all managers
2023-05-04 12:25:00 -04:00
Josh Brower
b17b68034e Reenable Elastic Package Registry - all managers 2023-05-04 12:19:45 -04:00
Mike Reeves
cbd1c05929 Sbin Changes 2023-05-04 10:36:03 -04:00
m0duspwnens
b14d33ced8 add logstash jinja for ui changes 2023-05-03 15:22:03 -04:00
Mike Reeves
a5b1660778 Fix firewall changes 2023-05-03 14:12:32 -04:00
Mike Reeves
d5c4a2887e Fix annotations and defaults for logstash 2023-05-03 13:37:06 -04:00
Josh Brower
b4b84038ed Merge pull request #10277 from Security-Onion-Solutions/2.4/package-registry
Reenable Elastic Package Registry
2023-05-03 12:57:21 -04:00
Josh Patterson
85ce0bb472 Merge pull request #10274 from Security-Onion-Solutions/ui/firewall
UI/firewall
2023-05-03 12:44:18 -04:00
m0duspwnens
b0bd64bc10 define and assign elastic_agent_update port 2023-05-03 12:40:56 -04:00
Josh Brower
17dd21703d Reenable Elastic Package Registry 2023-05-03 12:08:46 -04:00
m0duspwnens
767c922083 add idh to firewall annotation 2023-05-03 11:55:29 -04:00
Josh Brower
a57ba7e35d Merge pull request #10273 from Security-Onion-Solutions/2.4/fleet-airgap
Fleet Airgap - Phase 1
2023-05-03 11:24:52 -04:00
Josh Brower
81c1678ec7 Merge branch '2.4/dev' into 2.4/fleet-airgap 2023-05-03 11:19:57 -04:00
m0duspwnens
1593da4597 idh services are no longer selected in setup 2023-05-03 11:05:21 -04:00
m0duspwnens
8359f1983c idh firewall 2023-05-03 10:53:13 -04:00
Josh Brower
87a20ffede Refactor Wrapper gen script 2023-05-03 10:44:46 -04:00
m0duspwnens
c597766390 assign firewall pillars to * in top 2023-05-03 10:17:45 -04:00
Mike Reeves
3d10a60502 Fix annotations and defaults for logstash 2023-05-03 10:01:44 -04:00
Mike Reeves
220c534ad4 Fix annotations and defaults for logstash 2023-05-03 09:32:03 -04:00
Mike Reeves
c7604e893e Fix annotations and defaults for logstash 2023-05-03 09:17:37 -04:00
Josh Brower
b56486d88e Set Elastic Agent Artifact Registry URL 2023-05-03 08:55:29 -04:00
Josh Brower
c99f19251b More visibility 2023-05-02 17:04:41 -04:00
Josh Brower
544fa824ea Initial cut for Artifact Registry 2023-05-02 14:17:59 -04:00
Mike Reeves
dd034edad6 Fix some files 2023-05-02 13:12:14 -04:00
Mike Reeves
2419cf86ee Fix some files 2023-05-02 12:41:49 -04:00
m0duspwnens
61f9573ace Merge remote-tracking branch 'origin/2.4/dev' into ui/firewall 2023-05-02 12:21:09 -04:00
Mike Reeves
7595072e85 Fix some files 2023-05-02 12:15:05 -04:00
Mike Reeves
e60e21d9ff Move files out of common 2023-05-02 09:40:02 -04:00
Jason Ertel
b46a5c4b2a Merge pull request #10267 from Security-Onion-Solutions/kilo
more detection improvements
2023-05-02 08:17:09 -04:00
Jason Ertel
40ff2677c4 more detection improvements 2023-05-02 07:57:49 -04:00
m0duspwnens
80b40503fb no more plural roles, update so-firewall-minion 2023-05-01 17:28:16 -04:00
m0duspwnens
6a501efa75 remove unneeded imports 2023-05-01 16:55:16 -04:00
m0duspwnens
1f6463a9bb rework so-firewall to work with pillar files 2023-05-01 16:49:06 -04:00
Mike Reeves
2d4f4791e0 Move files out of common 2023-05-01 15:21:31 -04:00
Mike Reeves
102906f5dd Change to new repo layout 2023-05-01 13:39:24 -04:00
Jason Ertel
6c151d3ebd Merge pull request #10260 from Security-Onion-Solutions/kilo
simplify cloud detection
2023-05-01 11:26:34 -04:00
Jason Ertel
17e6f5b899 simplify cloud detection 2023-05-01 11:06:00 -04:00
Mike Reeves
a38495ce39 Fix pillar top for firewall 2023-05-01 10:40:36 -04:00
Mike Reeves
38629a7676 fix defaults for logstash 2023-05-01 09:55:16 -04:00
m0duspwnens
9a4ae2b832 start with customhostgroup0 2023-04-28 16:44:02 -04:00
m0duspwnens
3fdcb92dfe dont apply firewall.soc state anymore for manager highstate 2023-04-28 15:33:54 -04:00
m0duspwnens
725f5414ba fw rework for ui, still need to add idh to map 2023-04-28 15:30:18 -04:00
Jason Ertel
73aceb9697 Merge pull request #10251 from Security-Onion-Solutions/kilo
Kilo
2023-04-28 14:44:25 -04:00
Jason Ertel
03c89a02ad Add privileged session config option to kratos config UI 2023-04-28 14:01:19 -04:00
Jason Ertel
666d4ea260 Add privileged session config option to kratos config UI 2023-04-28 13:56:28 -04:00
Jason Ertel
4c58aa2ccf Add privileged session config option to kratos config UI 2023-04-28 13:14:30 -04:00
Mike Reeves
26619e5f8d Merge pull request #10245 from Security-Onion-Solutions/2.4/Fix_zeek_idstools
2.4/fix zeek idstools
2023-04-28 09:38:08 -04:00
bryant-treacle
57d90a62f7 Update soc_zeek.yaml 2023-04-27 16:21:41 -04:00
bryant-treacle
a8b8a1d0b7 Update soc_idstools.yaml 2023-04-27 15:32:37 -04:00
Mike Reeves
e4375a6568 regex for hostgroups 2023-04-27 15:30:59 -04:00
Mike Reeves
b8f9a9a311 regex for hostgroups 2023-04-27 15:08:01 -04:00
Mike Reeves
3d7f2bc691 Fix annotations and file locations 2023-04-27 13:23:53 -04:00
Mike Reeves
e799edaf49 Fix globals order 2023-04-26 15:54:16 -04:00
Mike Reeves
be003f7ee4 Merge branch '2.4/dev' of https://github.com/Security-Onion-Solutions/securityonion into mkrfixes 2023-04-26 15:50:47 -04:00
Mike Reeves
868cb8183c Fix the top file 2023-04-26 14:15:34 -04:00
Mike Reeves
b3f94961ea Fix Kibana and friends 2023-04-26 13:30:23 -04:00
bryant-treacle
12120e94c8 Update soc_idstools.yaml 2023-04-26 09:32:08 -04:00
bryant-treacle
49a60bac76 Update soc_idstools.yaml 2023-04-26 08:49:04 -04:00
bryant-treacle
f07f0775ac Update top.sls 2023-04-26 08:30:28 -04:00
bryant-treacle
e93e58fedb Update node.cfg.jinja 2023-04-26 08:28:40 -04:00
Jason Ertel
8459054ff8 Merge pull request #10220 from Security-Onion-Solutions/kilo
timeout more quickly on aws imdsv2 detection
2023-04-26 07:56:22 -04:00
Jason Ertel
43ec897397 timeout more quickly on aws imdsv2 detection 2023-04-26 07:53:07 -04:00
Mike Reeves
4b73f859d1 don't sync the repo 2x 2023-04-25 15:33:08 -04:00
Jason Ertel
969cf25818 Merge pull request #10199 from Security-Onion-Solutions/jertel/imdsv2
Detect cloud install on forced imdsv2 instances
2023-04-24 16:33:56 -04:00
Jason Ertel
e25bbd8a0d Detect cloud install on forced imdsv2 instances 2023-04-24 16:19:20 -04:00
Mike Reeves
5b11c41434 Merge pull request #10197 from Security-Onion-Solutions/TOoSmOotH-patch-1
Update VERSION
2023-04-24 13:40:36 -04:00
Mike Reeves
99f21ce46f Update VERSION 2023-04-24 13:39:51 -04:00
530 changed files with 14071 additions and 8910 deletions

View File

@@ -1,6 +1,6 @@
## Security Onion 2.4 Beta 2
## Security Onion 2.4 Beta 3
Security Onion 2.4 Beta 2 is here!
Security Onion 2.4 Beta 3 is here!
## Screenshots

View File

@@ -1 +1,52 @@
### An ISO will be available starting in RC1.
### 2.4.2-20230531 ISO image built on 2023/05/31
### Download and Verify
2.4.2-20230531 ISO image:
https://download.securityonion.net/file/securityonion/securityonion-2.4.2-20230531.iso
MD5: EB861EFB7F7DA6FB418075B4C452E4EB
SHA1: 479A72DBB0633CB23608122F7200A24E2C3C3128
SHA256: B69C1AE4C576BBBC37F4B87C2A8379903421E65B2C4F24C90FABB0EAD6F0471B
Signature for ISO image:
https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.2-20230531.iso.sig
Signing key:
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/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/2.4/main/KEYS -O - | gpg --import -
```
Download the signature file for the ISO:
```
wget https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.2-20230531.iso.sig
```
Download the ISO image:
```
wget https://download.securityonion.net/file/securityonion/securityonion-2.4.2-20230531.iso
```
Verify the downloaded ISO image using the signature file:
```
gpg --verify securityonion-2.4.2-20230531.iso.sig securityonion-2.4.2-20230531.iso
```
The output should show "Good signature" and the Primary key fingerprint should match what's shown below:
```
gpg: Signature made Wed 31 May 2023 05:01:41 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.4/installation.html

View File

@@ -1 +1 @@
2.4.1
2.4.2

View File

@@ -1,6 +0,0 @@
logstash:
pipelines:
fleet:
config:
- so/0012_input_elastic_agent.conf
- so/9806_output_lumberjack_fleet.conf.jinja

View File

@@ -1,42 +0,0 @@
logstash:
pipelines:
helix:
config:
- so/0010_input_hhbeats.conf
- so/1033_preprocess_snort.conf
- so/1100_preprocess_bro_conn.conf
- so/1101_preprocess_bro_dhcp.conf
- so/1102_preprocess_bro_dns.conf
- so/1103_preprocess_bro_dpd.conf
- so/1104_preprocess_bro_files.conf
- so/1105_preprocess_bro_ftp.conf
- so/1106_preprocess_bro_http.conf
- so/1107_preprocess_bro_irc.conf
- so/1108_preprocess_bro_kerberos.conf
- so/1109_preprocess_bro_notice.conf
- so/1110_preprocess_bro_rdp.conf
- so/1111_preprocess_bro_signatures.conf
- so/1112_preprocess_bro_smtp.conf
- so/1113_preprocess_bro_snmp.conf
- so/1114_preprocess_bro_software.conf
- so/1115_preprocess_bro_ssh.conf
- so/1116_preprocess_bro_ssl.conf
- so/1117_preprocess_bro_syslog.conf
- so/1118_preprocess_bro_tunnel.conf
- so/1119_preprocess_bro_weird.conf
- so/1121_preprocess_bro_mysql.conf
- so/1122_preprocess_bro_socks.conf
- so/1123_preprocess_bro_x509.conf
- so/1124_preprocess_bro_intel.conf
- so/1125_preprocess_bro_modbus.conf
- so/1126_preprocess_bro_sip.conf
- so/1127_preprocess_bro_radius.conf
- so/1128_preprocess_bro_pe.conf
- so/1129_preprocess_bro_rfb.conf
- so/1130_preprocess_bro_dnp3.conf
- so/1131_preprocess_bro_smb_files.conf
- so/1132_preprocess_bro_smb_mapping.conf
- so/1133_preprocess_bro_ntlm.conf
- so/1134_preprocess_bro_dce_rpc.conf
- so/8001_postprocess_common_ip_augmentation.conf
- so/9997_output_helix.conf.jinja

View File

@@ -1,8 +0,0 @@
logstash:
pipelines:
manager:
config:
- so/0011_input_endgame.conf
- so/0012_input_elastic_agent.conf
- so/0013_input_lumberjack_fleet.conf
- so/9999_output_redis.conf.jinja

View File

@@ -1,8 +0,0 @@
logstash:
pipelines:
receiver:
config:
- so/0011_input_endgame.conf
- so/0012_input_elastic_agent.conf
- so/9999_output_redis.conf.jinja

View File

@@ -1,7 +0,0 @@
logstash:
pipelines:
search:
config:
- so/0900_input_redis.conf.jinja
- so/9805_output_elastic_agent.conf.jinja
- so/9900_output_endgame.conf.jinja

View File

@@ -1,44 +1,26 @@
base:
'*':
- patch.needs_restarting
- ntp.soc_ntp
- ntp.adv_ntp
- logrotate
- global.soc_global
- global.adv_global
- docker.soc_docker
- docker.adv_docker
- firewall.soc_firewall
- firewall.adv_firewall
- influxdb.token
- logrotate.soc_logrotate
- logrotate.adv_logrotate
- nginx.soc_nginx
- nginx.adv_nginx
- node_data.ips
- ntp.soc_ntp
- ntp.adv_ntp
- patch.needs_restarting
- patch.soc_patch
- patch.adv_patch
- sensoroni.soc_sensoroni
- sensoroni.adv_sensoroni
- telegraf.soc_telegraf
- telegraf.adv_telegraf
- influxdb.token
- node_data.ips
'* and not *_eval and not *_import':
- logstash.nodes
'*_eval or *_heavynode or *_sensor or *_standalone or *_import':
- match: compound
- zeek
- bpf.soc_bpf
- bpf.adv_bpf
'*_managersearch or *_heavynode':
- match: compound
- logstash
- logstash.manager
- logstash.search
- logstash.soc_logstash
- logstash.adv_logstash
- elasticsearch.index_templates
- elasticsearch.soc_elasticsearch
- elasticsearch.adv_elasticsearch
'*_manager':
- logstash
- logstash.manager
- logstash.soc_logstash
- logstash.adv_logstash
- elasticsearch.index_templates
'*_manager or *_managersearch':
- match: compound
@@ -49,14 +31,19 @@ base:
- kibana.secrets
{% endif %}
- secrets
- global.soc_global
- global.adv_global
- manager.soc_manager
- manager.adv_manager
- idstools.soc_idstools
- idstools.adv_idstools
- logstash.nodes
- logstash.soc_logstash
- logstash.adv_logstash
- soc.soc_soc
- soc.adv_soc
- soctopus.soc_soctopus
- soctopus.adv_soctopus
- kibana.soc_kibana
- kibana.adv_kibana
- kratos.soc_kratos
- kratos.adv_kratos
- redis.soc_redis
@@ -65,17 +52,31 @@ base:
- influxdb.adv_influxdb
- elasticsearch.soc_elasticsearch
- elasticsearch.adv_elasticsearch
- elasticfleet.soc_elasticfleet
- elasticfleet.adv_elasticfleet
- elastalert.soc_elastalert
- elastalert.adv_elastalert
- backup.soc_backup
- backup.adv_backup
- firewall.soc_firewall
- firewall.adv_firewall
- curator.soc_curator
- curator.adv_curator
- soctopus.soc_soctopus
- soctopus.adv_soctopus
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
'*_sensor':
- healthcheck.sensor
- global.soc_global
- global.adv_global
- strelka.soc_strelka
- strelka.adv_strelka
- zeek.soc_zeek
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
@@ -89,16 +90,27 @@ base:
{% if salt['file.file_exists']('/opt/so/saltstack/local/pillar/kibana/secrets.sls') %}
- kibana.secrets
{% endif %}
- global.soc_global
- global.adv_global
- kratos.soc_kratos
- elasticsearch.soc_elasticsearch
- elasticsearch.adv_elasticsearch
- elasticfleet.soc_elasticfleet
- elasticfleet.adv_elasticfleet
- elastalert.soc_elastalert
- elastalert.adv_elastalert
- manager.soc_manager
- manager.adv_manager
- idstools.soc_idstools
- idstools.adv_idstools
- soc.soc_soc
- soc.adv_soc
- soctopus.soc_soctopus
- soctopus.adv_soctopus
- kibana.soc_kibana
- kibana.adv_kibana
- strelka.soc_strelka
- strelka.adv_strelka
- curator.soc_curator
- curator.adv_curator
- kratos.soc_kratos
- kratos.adv_kratos
- redis.soc_redis
@@ -107,15 +119,19 @@ base:
- influxdb.adv_influxdb
- backup.soc_backup
- backup.adv_backup
- firewall.soc_firewall
- firewall.adv_firewall
- zeek.soc_zeek
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
'*_standalone':
- logstash
- logstash.manager
- logstash.search
- logstash.nodes
- logstash.soc_logstash
- logstash.adv_logstash
- elasticsearch.index_templates
@@ -127,8 +143,6 @@ base:
{% endif %}
- secrets
- healthcheck.standalone
- global.soc_global
- global.adv_global
- idstools.soc_idstools
- idstools.adv_idstools
- kratos.soc_kratos
@@ -139,52 +153,81 @@ base:
- influxdb.adv_influxdb
- elasticsearch.soc_elasticsearch
- elasticsearch.adv_elasticsearch
- elasticfleet.soc_elasticfleet
- elasticfleet.adv_elasticfleet
- elastalert.soc_elastalert
- elastalert.adv_elastalert
- manager.soc_manager
- manager.adv_manager
- soc.soc_soc
- soc.adv_soc
- soctopus.soc_soctopus
- soctopus.adv_soctopus
- kibana.soc_kibana
- kibana.adv_kibana
- strelka.soc_strelka
- strelka.adv_strelka
- curator.soc_curator
- curator.adv_curator
- backup.soc_backup
- backup.adv_backup
- firewall.soc_firewall
- firewall.adv_firewall
- zeek.soc_zeek
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
'*_heavynode':
- elasticsearch.auth
- global.soc_global
- global.adv_global
- logstash.nodes
- logstash.soc_logstash
- logstash.adv_logstash
- elasticsearch.soc_elasticsearch
- elasticsearch.adv_elasticsearch
- curator.soc_curator
- curator.adv_curator
- redis.soc_redis
- redis.adv_redis
- zeek.soc_zeek
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- strelka.soc_strelka
- strelka.adv_strelka
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
'*_idh':
- global.soc_global
- global.adv_global
- idh.soc_idh
- idh.adv_idh
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
'*_searchnode':
- logstash
- logstash.search
- logstash.nodes
- logstash.soc_logstash
- logstash.adv_logstash
- elasticsearch.index_templates
- elasticsearch.soc_elasticsearch
- elasticsearch.adv_elasticsearch
{% if salt['file.file_exists']('/opt/so/saltstack/local/pillar/elasticsearch/auth.sls') %}
- elasticsearch.auth
{% endif %}
- redis.soc_redis
- global.soc_global
- global.adv_global
- redis.adv_redis
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
'*_receiver':
- logstash
- logstash.receiver
- logstash.nodes
- logstash.soc_logstash
- logstash.adv_logstash
{% if salt['file.file_exists']('/opt/so/saltstack/local/pillar/elasticsearch/auth.sls') %}
@@ -192,8 +235,6 @@ base:
{% endif %}
- redis.soc_redis
- redis.adv_redis
- global.soc_global
- global.adv_global
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
@@ -209,11 +250,20 @@ base:
- kratos.soc_kratos
- elasticsearch.soc_elasticsearch
- elasticsearch.adv_elasticsearch
- elasticfleet.soc_elasticfleet
- elasticfleet.adv_elasticfleet
- elastalert.soc_elastalert
- elastalert.adv_elastalert
- manager.soc_manager
- manager.adv_manager
- soc.soc_soc
- global.soc_global
- global.adv_global
- soc.adv_soc
- soctopus.soc_soctopus
- soctopus.adv_soctopus
- kibana.soc_kibana
- kibana.adv_kibana
- curator.soc_curator
- curator.adv_curator
- backup.soc_backup
- backup.adv_backup
- kratos.soc_kratos
@@ -222,23 +272,30 @@ base:
- redis.adv_redis
- influxdb.soc_influxdb
- influxdb.adv_influxdb
- firewall.soc_firewall
- firewall.adv_firewall
- zeek.soc_zeek
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- strelka.soc_strelka
- strelka.adv_strelka
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
'*_fleet':
- global.soc_global
- global.adv_global
- backup.soc_backup
- backup.adv_backup
- logstash
- logstash.fleet
- logstash.nodes
- logstash.soc_logstash
- logstash.adv_logstash
- elasticfleet.soc_elasticfleet
- elasticfleet.adv_elasticfleet
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
'*_workstation':
'*_desktop':
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}

View File

@@ -3,16 +3,6 @@
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% set ZEEKVER = salt['pillar.get']('global:mdengine', '') %}
{% set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') %}
{% set ELASTALERT = salt['pillar.get']('elastalert:enabled', True) %}
{% set ELASTICSEARCH = salt['pillar.get']('elasticsearch:enabled', True) %}
{% set KIBANA = salt['pillar.get']('kibana:enabled', True) %}
{% set LOGSTASH = salt['pillar.get']('logstash:enabled', True) %}
{% set CURATOR = salt['pillar.get']('curator:enabled', True) %}
{% set REDIS = salt['pillar.get']('redis:enabled', True) %}
{% set STRELKA = salt['pillar.get']('strelka:enabled', '0') %}
{% set ISAIRGAP = salt['pillar.get']('global:airgap', False) %}
{% import_yaml 'salt/minion.defaults.yaml' as saltversion %}
{% set saltversion = saltversion.salt.minion.version %}
@@ -35,6 +25,7 @@
'soc',
'kratos',
'elasticfleet',
'elastic-fleet-package-registry',
'firewall',
'idstools',
'suricata.manager',
@@ -105,7 +96,8 @@
'schedule',
'tcpreplay',
'docker_clean',
'elasticfleet'
'elasticfleet',
'elastic-fleet-package-registry'
],
'so-manager': [
'salt.master',
@@ -119,6 +111,7 @@
'soc',
'kratos',
'elasticfleet',
'elastic-fleet-package-registry',
'firewall',
'idstools',
'suricata.manager',
@@ -137,6 +130,7 @@
'influxdb',
'soc',
'kratos',
'elastic-fleet-package-registry',
'elasticfleet',
'firewall',
'manager',
@@ -166,6 +160,7 @@
'influxdb',
'soc',
'kratos',
'elastic-fleet-package-registry',
'elasticfleet',
'firewall',
'idstools',
@@ -212,27 +207,27 @@
],
}, grain='role') %}
{% if (PLAYBOOK != 0) and grains.role in ['so-eval', 'so-manager', 'so-managersearch', 'so-standalone'] %}
{% if grains.role in ['so-eval', 'so-manager', 'so-managersearch', 'so-standalone'] %}
{% do allowed_states.append('mysql') %}
{% endif %}
{%- if ZEEKVER != 'SURICATA' and grains.role in ['so-sensor', 'so-eval', 'so-standalone', 'so-heavynode'] %}
{%- if grains.role in ['so-sensor', 'so-eval', 'so-standalone', 'so-heavynode'] %}
{% do allowed_states.append('zeek') %}
{%- endif %}
{% if STRELKA and grains.role in ['so-sensor', 'so-eval', 'so-standalone', 'so-heavynode'] %}
{% if grains.role in ['so-sensor', 'so-eval', 'so-standalone', 'so-heavynode'] %}
{% do allowed_states.append('strelka') %}
{% endif %}
{% if ELASTICSEARCH and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-searchnode', 'so-managersearch', 'so-heavynode', 'so-import'] %}
{% if grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-searchnode', 'so-managersearch', 'so-heavynode', 'so-import'] %}
{% do allowed_states.append('elasticsearch') %}
{% endif %}
{% if ELASTICSEARCH and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-import'] %}
{% if grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-import'] %}
{% do allowed_states.append('elasticsearch.auth') %}
{% endif %}
{% if KIBANA and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-import'] %}
{% if grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-import'] %}
{% do allowed_states.append('kibana') %}
{% do allowed_states.append('kibana.secrets') %}
{% endif %}
@@ -241,23 +236,19 @@
{% do allowed_states.append('curator') %}
{% endif %}
{% if ELASTALERT and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
{% if grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
{% do allowed_states.append('elastalert') %}
{% endif %}
{% if (PLAYBOOK !=0) and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
{% if grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
{% do allowed_states.append('playbook') %}
{% endif %}
{% if (PLAYBOOK !=0) and grains.role in ['so-eval'] %}
{% do allowed_states.append('redis') %}
{% endif %}
{% if LOGSTASH and grains.role in ['so-helixsensor', 'so-manager', 'so-standalone', 'so-searchnode', 'so-managersearch', 'so-heavynode', 'so-receiver'] %}
{% if grains.role in ['so-helixsensor', 'so-manager', 'so-standalone', 'so-searchnode', 'so-managersearch', 'so-heavynode', 'so-receiver'] %}
{% do allowed_states.append('logstash') %}
{% endif %}
{% if REDIS and grains.role in ['so-manager', 'so-standalone', 'so-managersearch', 'so-heavynode', 'so-receiver'] %}
{% if grains.role in ['so-manager', 'so-standalone', 'so-managersearch', 'so-heavynode', 'so-receiver', 'so-eval'] %}
{% do allowed_states.append('redis') %}
{% endif %}

View File

@@ -49,13 +49,12 @@ so-status.conf:
- name: /opt/so/conf/so-status/so-status.conf
- unless: ls /opt/so/conf/so-status/so-status.conf
sosaltstackperms:
socore_opso_perms:
file.directory:
- name: /opt/so/saltstack
- name: /opt/so
- user: 939
- group: 939
- dir_mode: 770
so_log_perms:
file.directory:
- name: /opt/so/log
@@ -112,21 +111,23 @@ elastic_curl_config:
{% endif %}
{% endif %}
# Sync some Utilities
utilsyncscripts:
common_sbin:
file.recurse:
- name: /usr/sbin
- user: root
- group: root
- source: salt://common/tools/sbin
- user: 939
- group: 939
- file_mode: 755
common_sbin_jinja:
file.recurse:
- name: /usr/sbin
- source: salt://common/tools/sbin_jinja
- user: 939
- group: 939
- file_mode: 755
- template: jinja
- source: salt://common/tools/sbin
- exclude_pat:
- so-common
- so-firewall
- so-image-common
- soup
- so-status
so-status_script:
file.managed:

View File

@@ -160,39 +160,6 @@ disable_fastestmirror() {
sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
}
elastic_fleet_integration_create() {
JSON_STRING=$1
curl -K /opt/so/conf/elasticsearch/curl.config -L -X POST "localhost:5601/api/fleet/package_policies" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING"
}
elastic_fleet_policy_create() {
NAME=$1
DESC=$2
FLEETSERVER=$3
JSON_STRING=$( jq -n \
--arg NAME "$NAME" \
--arg DESC "$DESC" \
--arg FLEETSERVER "$FLEETSERVER" \
'{"name": $NAME,"id":$NAME,"description":$DESC,"namespace":"default","monitoring_enabled":["logs"],"inactivity_timeout":1209600,"has_fleet_server":$FLEETSERVER}'
)
# Create Fleet Policy
curl -K /opt/so/conf/elasticsearch/curl.config -L -X POST "localhost:5601/api/fleet/agent_policies" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING"
}
elastic_fleet_policy_update() {
POLICYID=$1
JSON_STRING=$2
curl -K /opt/so/conf/elasticsearch/curl.config -L -X PUT "localhost:5601/api/fleet/agent_policies/$POLICYID" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING"
}
elastic_license() {
read -r -d '' message <<- EOM
@@ -238,7 +205,7 @@ gpg_rpm_import() {
local RPMKEYSLOC="$UPDATE_DIR/salt/repo/client/files/rocky/keys"
fi
RPMKEYS=('RPM-GPG-KEY-EPEL-9' 'SALT-PROJECT-GPG-PUBKEY-2023.pub' 'docker.pub' 'securityonion.pub')
RPMKEYS=('RPM-GPG-KEY-rockyofficial' 'RPM-GPG-KEY-EPEL-9' 'SALT-PROJECT-GPG-PUBKEY-2023.pub' 'docker.pub' 'securityonion.pub')
for RPMKEY in "${RPMKEYS[@]}"; do
rpm --import $RPMKEYSLOC/$RPMKEY

View File

@@ -1,34 +0,0 @@
#!/bin/bash
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
# this file except in compliance with the Elastic License 2.0.
#so-elastic-agent-gen-installers $FleetHost $EnrollmentToken
{% from 'vars/globals.map.jinja' import GLOBALS %}
. /usr/sbin/so-common
ENROLLMENTOKEN=$(curl -K /opt/so/conf/elasticsearch/curl.config -L "localhost:5601/api/fleet/enrollment_api_keys" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' | jq .list | jq -r -c '.[] | select(.policy_id | contains("endpoints")) | .api_key')
#FLEETHOST=$(lookup_pillar "server:url" "elasticfleet")
FLEETHOST="{{ GLOBALS.manager_ip }}"
#FLEETHOST=$1
#ENROLLMENTOKEN=$2
CONTAINERGOOS=( "linux" "darwin" "windows" )
#rm -rf /tmp/elastic-agent-workspace
#mkdir -p /tmp/elastic-agent-workspace
for OS in "${CONTAINERGOOS[@]}"
do
printf "\n\nGenerating $OS Installer..."
#cp /opt/so/saltstack/default/salt/elasticfleet/files/elastic-agent/so-elastic-agent-*-$OS-x86_64.tar.gz /tmp/elastic-agent-workspace/$OS.tar.gz
docker run -e CGO_ENABLED=0 -e GOOS=$OS \
--mount type=bind,source=/etc/ssl/certs/,target=/workspace/files/cert/ \
--mount type=bind,source=/opt/so/saltstack/local/salt/elasticfleet/files/so_agent-installers/,target=/output/ \
{{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastic-agent-builder:{{ GLOBALS.so_version }} go build -ldflags "-X main.fleetHost=$FLEETHOST -X main.enrollmentToken=$ENROLLMENTOKEN" -o /output/so-elastic-agent_$OS
printf "\n $OS Installer Generated..."
done

View File

@@ -1,21 +0,0 @@
#!/bin/bash
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
# Initial Endpoints
for INTEGRATION in /opt/so/saltstack/default/salt/elasticfleet/files/integrations/endpoints-initial/*.json
do
printf "\n\nInitial Endpoint Policy - Loading $INTEGRATION\n"
elastic_fleet_integration_create "@$INTEGRATION"
done
# Grid Nodes
for INTEGRATION in /opt/so/saltstack/default/salt/elasticfleet/files/integrations/grid-nodes/*.json
do
printf "\n\nGrid Nodes Policy - Loading $INTEGRATION\n"
elastic_fleet_integration_create "@$INTEGRATION"
done

View File

@@ -1,31 +0,0 @@
#!/bin/bash
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
{%- if grains['role'] in ['so-eval','so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode', 'so-import']%}
/usr/sbin/so-restart elasticsearch $1
{%- endif %}
{%- if grains['role'] in ['so-eval', 'so-manager', 'so-managersearch', 'so-standalone', 'so-import']%}
/usr/sbin/so-restart kibana $1
{%- endif %}
{%- if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode']%}
/usr/sbin/so-restart logstash $1
{%- endif %}
{%- if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode']%}
/usr/sbin/so-restart curator $1
{%- endif %}
{%- if grains['role'] in ['so-eval','so-manager', 'so-managersearch', 'so-standalone']%}
/usr/sbin/so-restart elastalert $1
{%- endif %}

View File

@@ -1,31 +0,0 @@
#!/bin/bash
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
{%- if grains['role'] in ['so-eval','so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode', 'so-import']%}
/usr/sbin/so-start elasticsearch $1
{%- endif %}
{%- if grains['role'] in ['so-eval', 'so-manager', 'so-managersearch', 'so-standalone', 'so-import']%}
/usr/sbin/so-start kibana $1
{%- endif %}
{%- if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode']%}
/usr/sbin/so-start logstash $1
{%- endif %}
{%- if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode']%}
/usr/sbin/so-start curator $1
{%- endif %}
{%- if grains['role'] in ['so-eval','so-manager', 'so-managersearch', 'so-standalone']%}
/usr/sbin/so-start elastalert $1
{%- endif %}

View File

@@ -1,31 +0,0 @@
#!/bin/bash
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
{%- if grains['role'] in ['so-eval','so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode', 'so-import']%}
/usr/sbin/so-stop elasticsearch $1
{%- endif %}
{%- if grains['role'] in ['so-eval', 'so-manager', 'so-managersearch', 'so-standalone', 'so-import']%}
/usr/sbin/so-stop kibana $1
{%- endif %}
{%- if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode']%}
/usr/sbin/so-stop logstash $1
{%- endif %}
{%- if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone', 'so-heavynode', 'so-searchnode']%}
/usr/sbin/so-stop curator $1
{%- endif %}
{%- if grains['role'] in ['so-eval','so-manager', 'so-managersearch', 'so-standalone']%}
/usr/sbin/so-stop elastalert $1
{%- endif %}

View File

@@ -1,15 +0,0 @@
#!/bin/bash
#
#
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
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
echo "Removing read only attributes for indices..."
echo
curl -K /opt/so/conf/elasticsearch/curl.config -s -k -XPUT -H "Content-Type: application/json" -L https://$IP:9200/_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;

View File

@@ -1,104 +0,0 @@
#!/usr/bin/bash
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
if [[ $# -lt 1 ]]; then
echo "Usage: $0 --role=<ROLE> --ip=<IP ADDRESS> --apply=<true|false>"
echo ""
echo " Example: so-firewall --role=sensor --ip=192.168.254.100 --apply=true"
echo ""
exit 1
fi
for i in "$@"; do
case $i in
-r=*|--role=*)
ROLE="${i#*=}"
shift
;;
-i=*|--ip=*)
IP="${i#*=}"
shift
;;
-a=*|--apply*)
APPLY="${i#*=}"
shift
;;
-*|--*)
echo "Unknown option $i"
exit 1
;;
*)
;;
esac
done
ROLE=${ROLE,,}
APPLY=${APPLY,,}
function rolecall() {
THEROLE=$1
THEROLES="analyst analyst_workstations beats_endpoint beats_endpoint_ssl elastic_agent_endpoint elasticsearch_rest endgame eval fleet heavynodes idh manager managersearch receivers searchnodes sensors standalone strelka_frontend syslog"
for AROLE in $THEROLES; do
if [ "$AROLE" = "$THEROLE" ]; then
return 0
fi
done
return 1
}
# Make sure the required options are specified
if [ -z "$ROLE" ]; then
echo "Please specify a role with --role="
exit 1
fi
if [ -z "$IP" ]; then
echo "Please specify an IP address with --ip="
exit 1
fi
# Are we dealing with a role that this script supports?
if rolecall "$ROLE"; then
echo "$ROLE is a supported role"
else
echo "This is not a supported role"
exit 1
fi
# Are we dealing with an IP?
if verify_ip4 "$IP"; then
echo "$IP is a valid IP or CIDR"
else
echo "$IP is not a valid IP or CIDR"
exit 1
fi
local_salt_dir=/opt/so/saltstack/local/salt/firewall
# Let's see if the file exists and if it does, let's see if the IP exists.
if [ -f "$local_salt_dir/hostgroups/$ROLE" ]; then
if grep -q $IP "$local_salt_dir/hostgroups/$ROLE"; then
echo "Host already exists"
exit 0
fi
fi
# If you have reached this part of your quest then let's add the IP
echo "Adding $IP to the $ROLE role"
echo "$IP" >> $local_salt_dir/hostgroups/$ROLE
# Check to see if we are applying this right away.
if [ "$APPLY" = "true" ]; then
echo "Applying the firewall rules"
salt-call state.apply firewall queue=True
echo "Firewall rules have been applied... Review logs further if there were errors."
echo ""
else
echo "Firewall rules will be applied next salt run"
fi

View File

@@ -1,27 +0,0 @@
#!/bin/bash
local_salt_dir=/opt/so/saltstack/local
got_root() {
# Make sure you are root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run using sudo!"
exit 1
fi
}
got_root
if [ ! -f $local_salt_dir/pillar/fireeye/init.sls ]; then
echo "This is nto configured for Helix Mode. Please re-install."
exit
else
echo "Enter your Helix API Key: "
read APIKEY
sed -i "s/^ api_key.*/ api_key: $APIKEY/g" $local_salt_dir/pillar/fireeye/init.sls
docker stop so-logstash
docker rm so-logstash
echo "Restarting Logstash for updated key"
salt-call state.apply logstash queue=True
fi

View File

@@ -38,6 +38,7 @@ container_list() {
"so-zeek"
"so-elastic-agent"
"so-elastic-agent-builder"
"so-elastic-fleet-package-registry"
)
elif [ $MANAGERCHECK != 'so-helix' ]; then
TRUSTED_CONTAINERS=(
@@ -45,6 +46,7 @@ container_list() {
"so-elastalert"
"so-elastic-agent"
"so-elastic-agent-builder"
"so-elastic-fleet-package-registry"
"so-elasticsearch"
"so-idh"
"so-idstools"

View File

@@ -1,17 +0,0 @@
#!/bin/bash
#
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% set MAININT = salt['pillar.get']('host:mainint') -%}
{% set NODEIP = salt['grains.get']('ip_interfaces').get(MAININT)[0] -%}
. /usr/sbin/so-common
if [ "$1" == "" ]; then
for i in $(curl -s -L http://{{ NODEIP }}:9600/_node/stats | jq .pipelines | jq '. | to_entries | .[].key' | sed 's/\"//g'); do echo ${i^}:; curl -s localhost:9600/_node/stats | jq .pipelines.$i.events; done
else
curl -s -L http://{{ NODEIP }}:9600/_node/stats | jq .pipelines.$1.events
fi

View File

@@ -24,6 +24,7 @@ if [ $# -ge 1 ]; then
case $1 in
"steno") docker stop so-steno && docker rm so-steno && salt-call state.apply pcap queue=True;;
"elastic-fleet") docker stop so-elastic-fleet && docker rm so-elastic-fleet && salt-call state.apply elasticfleet queue=True;;
*) docker stop so-$1 ; docker rm so-$1 ; salt-call state.apply $1 queue=True;;
esac
else

View File

@@ -1,10 +0,0 @@
#!/bin/bash
. /usr/sbin/so-common
argstr=""
for arg in "$@"; do
argstr="${argstr} \"${arg}\""
done
docker exec so-idstools /bin/bash -c "cd /opt/so/idstools/etc && idstools-rulecat --force ${argstr}"

View File

@@ -24,6 +24,7 @@ if [ $# -ge 1 ]; then
case $1 in
"all") salt-call state.highstate queue=True;;
"steno") if docker ps | grep -q so-$1; then printf "\n$1 is already running!\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply pcap queue=True; fi ;;
"elastic-fleet") if docker ps | grep -q so-$1; then printf "\n$1 is already running!\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply elasticfleet queue=True; fi ;;
*) if docker ps | grep -E -q '^so-$1$'; then printf "\n$1 is already running\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply $1 queue=True; fi ;;
esac
else

81
salt/curator/config.sls Normal file
View File

@@ -0,0 +1,81 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
{% from "curator/map.jinja" import CURATORMERGED %}
# Create the group
curatorgroup:
group.present:
- name: curator
- gid: 934
# Add user
curator:
user.present:
- uid: 934
- gid: 934
- home: /opt/so/conf/curator
- createhome: False
# Create the log directory
curlogdir:
file.directory:
- name: /opt/so/log/curator
- user: 934
- group: 939
curactiondir:
file.directory:
- name: /opt/so/conf/curator/action
- user: 934
- group: 939
- makedirs: True
actionconfs:
file.recurse:
- name: /opt/so/conf/curator/action
- source: salt://curator/files/action
- user: 934
- group: 939
- template: jinja
- defaults:
CURATORMERGED: {{ CURATORMERGED.elasticsearch.index_settings }}
curconf:
file.managed:
- name: /opt/so/conf/curator/curator.yml
- source: salt://curator/files/curator.yml
- user: 934
- group: 939
- mode: 660
- template: jinja
- show_changes: False
curator_sbin:
file.recurse:
- name: /usr/sbin
- source: salt://curator/tools/sbin
- user: 934
- group: 939
- file_mode: 755
curator_sbin_jinja:
file.recurse:
- name: /usr/sbin
- source: salt://curator/tools/sbin_jinja
- user: 934
- group: 939
- file_mode: 755
- template: jinja
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,98 +1,100 @@
elasticsearch:
index_settings:
logs-import-so:
close: 73000
delete: 73001
logs-strelka-so:
close: 30
delete: 365
logs-suricata-so:
close: 30
delete: 365
logs-syslog-so:
close: 30
delete: 365
logs-zeek-so:
close: 30
delete: 365
logs-elastic_agent-metricbeat-default:
close: 30
delete: 365
logs-elastic_agent-osquerybeat-default:
close: 30
delete: 365
logs-elastic_agent-fleet_server-default:
close: 30
delete: 365
logs-elastic_agent-filebeat-default:
close: 30
delete: 365
logs-elastic_agent-default:
close: 30
delete: 365
logs-system-auth-default:
close: 30
delete: 365
logs-system-application-default:
close: 30
delete: 365
logs-system-security-default:
close: 30
delete: 365
logs-system-system-default:
close: 30
delete: 365
logs-system-syslog-default:
close: 30
delete: 365
logs-windows-powershell-default:
close: 30
delete: 365
logs-windows-sysmon_operational-default:
close: 30
delete: 365
so-beats:
close: 30
delete: 365
so-elasticsearch:
close: 30
delete: 365
so-firewall:
close: 30
delete: 365
so-ids:
close: 30
delete: 365
so-import:
close: 73000
delete: 73001
so-kratos:
close: 30
delete: 365
so-kibana:
close: 30
delete: 365
so-logstash:
close: 30
delete: 365
so-netflow:
close: 30
delete: 365
so-osquery:
close: 30
delete: 365
so-ossec:
close: 30
delete: 365
so-redis:
close: 30
delete: 365
so-strelka:
close: 30
delete: 365
so-syslog:
close: 30
delete: 365
so-zeek:
close: 30
delete: 365
curator:
enabled: False
elasticsearch:
index_settings:
logs-import-so:
close: 73000
delete: 73001
logs-strelka-so:
close: 30
delete: 365
logs-suricata-so:
close: 30
delete: 365
logs-syslog-so:
close: 30
delete: 365
logs-zeek-so:
close: 30
delete: 365
logs-elastic_agent-metricbeat-default:
close: 30
delete: 365
logs-elastic_agent-osquerybeat-default:
close: 30
delete: 365
logs-elastic_agent-fleet_server-default:
close: 30
delete: 365
logs-elastic_agent-filebeat-default:
close: 30
delete: 365
logs-elastic_agent-default:
close: 30
delete: 365
logs-system-auth-default:
close: 30
delete: 365
logs-system-application-default:
close: 30
delete: 365
logs-system-security-default:
close: 30
delete: 365
logs-system-system-default:
close: 30
delete: 365
logs-system-syslog-default:
close: 30
delete: 365
logs-windows-powershell-default:
close: 30
delete: 365
logs-windows-sysmon_operational-default:
close: 30
delete: 365
so-beats:
close: 30
delete: 365
so-elasticsearch:
close: 30
delete: 365
so-firewall:
close: 30
delete: 365
so-ids:
close: 30
delete: 365
so-import:
close: 73000
delete: 73001
so-kratos:
close: 30
delete: 365
so-kibana:
close: 30
delete: 365
so-logstash:
close: 30
delete: 365
so-netflow:
close: 30
delete: 365
so-osquery:
close: 30
delete: 365
so-ossec:
close: 30
delete: 365
so-redis:
close: 30
delete: 365
so-strelka:
close: 30
delete: 365
so-syslog:
close: 30
delete: 365
so-zeek:
close: 30
delete: 365

35
salt/curator/disabled.sls Normal file
View File

@@ -0,0 +1,35 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
include:
- curator.sostatus
so-curator:
docker_container.absent:
- force: True
so-curator_so-status.disabled:
file.comment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-curator$
so-curator-cluster-close:
cron.absent:
- identifier: so-curator-cluster-close
so-curator-cluster-delete:
cron.absent:
- identifier: so-curator-cluster-delete
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

88
salt/curator/enabled.sls Normal file
View File

@@ -0,0 +1,88 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
include:
- curator.config
- curator.sostatus
so-curator:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-curator:{{ GLOBALS.so_version }}
- start: True
- hostname: curator
- name: so-curator
- user: curator
- networks:
- sobridge:
- ipv4_address: {{ DOCKER.containers['so-curator'].ip }}
- interactive: True
- tty: True
- binds:
- /opt/so/conf/curator/curator.yml:/etc/curator/config/curator.yml:ro
- /opt/so/conf/curator/action/:/etc/curator/action:ro
- /opt/so/log/curator:/var/log/curator:rw
{% if DOCKER.containers['so-curator'].custom_bind_mounts %}
{% for BIND in DOCKER.containers['so-curator'].custom_bind_mounts %}
- {{ BIND }}
{% endfor %}
{% endif %}
{% if DOCKER.containers['so-curator'].extra_hosts %}
- extra_hosts:
{% for XTRAHOST in DOCKER.containers['so-curator'].extra_hosts %}
- {{ XTRAHOST }}
{% endfor %}
{% endif %}
{% if DOCKER.containers['so-curator'].extra_env %}
- environment:
{% for XTRAENV in DOCKER.containers['so-curator'].extra_env %}
- {{ XTRAENV }}
{% endfor %}
{% endif %}
- require:
- file: actionconfs
- file: curconf
- file: curlogdir
- watch:
- file: curconf
delete_so-curator_so-status.disabled:
file.uncomment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-curator$
so-curator-cluster-close:
cron.present:
- name: /usr/sbin/so-curator-cluster-close > /opt/so/log/curator/cron-close.log 2>&1
- identifier: so-curator-cluster-close
- user: root
- minute: '2'
- hour: '*/1'
- daymonth: '*'
- month: '*'
- dayweek: '*'
so-curator-cluster-delete:
cron.present:
- name: /usr/sbin/so-curator-cluster-delete > /opt/so/log/curator/cron-cluster-delete.log 2>&1
- identifier: so-curator-cluster-delete
- user: root
- minute: '*/5'
- hour: '*'
- daymonth: '*'
- month: '*'
- dayweek: '*'
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -4,9 +4,9 @@
# Elastic License 2.0.
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% if grains['role'] in ['so-searchnode', 'so-heavynode'] %}
{% if GLOBALS.role in ['so-searchnode', 'so-heavynode'] %}
{%- set elasticsearch = GLOBALS.node_ip -%}
{% elif grains['role'] in ['so-eval', 'so-managersearch', 'so-standalone', 'so-manager'] %}
{% elif GLOBALS.role in ['so-eval', 'so-managersearch', 'so-standalone', 'so-manager'] %}
{%- set elasticsearch = GLOBALS.manager_ip -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:user', '') %}
@@ -30,10 +30,8 @@ elasticsearch:
id:
api_key:
master_only: False
{%- if salt['pillar.get']('elasticsearch:auth:enabled') is sameas true %}
username: "{{ ES_USER }}"
password: "{{ ES_PASS }}"
{%- endif %}
logging:
loglevel: INFO

View File

@@ -3,155 +3,11 @@
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
{% from "curator/map.jinja" import CURATOROPTIONS %}
{% from "curator/map.jinja" import CURATORMERGED %}
{% set REMOVECURATORCRON = False %}
# Curator
# Create the group
curatorgroup:
group.present:
- name: curator
- gid: 934
# Add user
curator:
user.present:
- uid: 934
- gid: 934
- home: /opt/so/conf/curator
- createhome: False
# Create the log directory
curlogdir:
file.directory:
- name: /opt/so/log/curator
- user: 934
- group: 939
curactiondir:
file.directory:
- name: /opt/so/conf/curator/action
- user: 934
- group: 939
- makedirs: True
actionconfs:
file.recurse:
- name: /opt/so/conf/curator/action
- source: salt://curator/files/action
- user: 934
- group: 939
- template: jinja
- defaults:
CURATORMERGED: {{ CURATORMERGED }}
curconf:
file.managed:
- name: /opt/so/conf/curator/curator.yml
- source: salt://curator/files/curator.yml
- user: 934
- group: 939
- mode: 660
- template: jinja
- show_changes: False
curclusterclose:
file.managed:
- name: /usr/sbin/so-curator-cluster-close
- source: salt://curator/files/bin/so-curator-cluster-close
- user: 934
- group: 939
- mode: 755
- template: jinja
curclusterdelete:
file.managed:
- name: /usr/sbin/so-curator-cluster-delete
- source: salt://curator/files/bin/so-curator-cluster-delete
- user: 934
- group: 939
- mode: 755
curclusterdeletedelete:
file.managed:
- name: /usr/sbin/so-curator-cluster-delete-delete
- source: salt://curator/files/bin/so-curator-cluster-delete-delete
- user: 934
- group: 939
- mode: 755
- template: jinja
so-curator:
docker_container.{{ CURATOROPTIONS.status }}:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-curator:{{ GLOBALS.so_version }}
- start: {{ CURATOROPTIONS.start }}
- hostname: curator
- name: so-curator
- user: curator
- networks:
- sobridge:
- ipv4_address: {{ DOCKER.containers['so-curator'].ip }}
- interactive: True
- tty: True
- binds:
- /opt/so/conf/curator/curator.yml:/etc/curator/config/curator.yml:ro
- /opt/so/conf/curator/action/:/etc/curator/action:ro
- /opt/so/log/curator:/var/log/curator:rw
- require:
- file: actionconfs
- file: curconf
- file: curlogdir
- watch:
- file: curconf
append_so-curator_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-curator
- unless: grep -q so-curator /opt/so/conf/so-status/so-status.conf
{% if not CURATOROPTIONS.start %}
so-curator_so-status.disabled:
file.comment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-curator$
{% else %}
delete_so-curator_so-status.disabled:
file.uncomment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-curator$
{% endif %}
so-curator-cluster-close:
cron.present:
- name: /usr/sbin/so-curator-cluster-close > /opt/so/log/curator/cron-close.log 2>&1
- identifier: so-curator-cluster-close
- user: root
- minute: '2'
- hour: '*/1'
- daymonth: '*'
- month: '*'
- dayweek: '*'
so-curator-cluster-delete:
cron.present:
- name: /usr/sbin/so-curator-cluster-delete > /opt/so/log/curator/cron-cluster-delete.log 2>&1
- identifier: so-curator-cluster-delete
- user: root
- minute: '*/5'
- hour: '*'
- daymonth: '*'
- month: '*'
- dayweek: '*'
{% from 'curator/map.jinja' import CURATORMERGED %}
include:
{% if CURATORMERGED.enabled %}
- curator.enabled
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
- curator.disabled
{% endif %}

View File

@@ -1,18 +1,7 @@
{% set CURATOROPTIONS = {} %}
{% set ENABLED = salt['pillar.get']('curator:enabled', True) %}
{% do CURATOROPTIONS.update({'manage_sostatus': True}) %}
# don't start the docker container if curator is disabled via pillar
{% if not ENABLED %}
{% do CURATOROPTIONS.update({'start': False}) %}
{% do CURATOROPTIONS.update({'status': 'absent'}) %}
{% if (TRUECLUSTER and grains.id.split('_')|last == 'searchnode') or (not TRUECLUSTER and grains.id.split('_')|last == 'manager') %}
{% do CURATOROPTIONS.update({'manage_sostatus': False}) %}
{% endif %}
{% else %}
{% do CURATOROPTIONS.update({'start': True}) %}
{% do CURATOROPTIONS.update({'status': 'running'}) %}
{% endif %}
{# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
https://securityonion.net/license; you may not use this file except in compliance with the
Elastic License 2.0. #}
{% import_yaml 'curator/defaults.yaml' as CURATORDEFAULTS %}
{% set CURATORMERGED = salt['pillar.get']('elasticsearch:index_settings', CURATORDEFAULTS.elasticsearch.index_settings, merge=true) %}
{% set CURATORMERGED = salt['pillar.get']('curator', CURATORDEFAULTS.curator, merge=true) %}

View File

@@ -0,0 +1,108 @@
curator:
enabled:
description: You can enable or disable Curator.
helpLink: curator.html
elasticsearch:
index_settings:
logs-import-so:
close: &close
description: Age, in days, when Curator closes the index.
helpLink: curator.html
forcedType: int
delete: &delete
description: Age, in days, when Curator deletes the index.
helpLink: curator.html
forcedType: int
logs-strelka-so:
close: *close
delete: *delete
logs-suricata-so:
close: *close
delete: *delete
logs-syslog-so:
close: *close
delete: *delete
logs-zeek-so:
close: *close
delete: *delete
logs-elastic_agent-metricbeat-default:
close: *close
delete: *delete
logs-elastic_agent-osquerybeat-default:
close: *close
delete: *delete
logs-elastic_agent-fleet_server-default:
close: *close
delete: *delete
logs-elastic_agent-filebeat-default:
close: *close
delete: *delete
logs-elastic_agent-default:
close: *close
delete: *delete
logs-system-auth-default:
close: *close
delete: *delete
logs-system-application-default:
close: *close
delete: *delete
logs-system-security-default:
close: *close
delete: *delete
logs-system-system-default:
close: *close
delete: *delete
logs-system-syslog-default:
close: *close
delete: *delete
logs-windows-powershell-default:
close: *close
delete: *delete
logs-windows-sysmon_operational-default:
close: *close
delete: *delete
so-beats:
close: *close
delete: *delete
so-elasticsearch:
close: *close
delete: *delete
so-firewall:
close: *close
delete: *delete
so-ids:
close: *close
delete: *delete
so-import:
close: *close
delete: *delete
so-kratos:
close: *close
delete: *delete
so-kibana:
close: *close
delete: *delete
so-logstash:
close: *close
delete: *delete
so-netflow:
close: *close
delete: *delete
so-osquery:
close: *close
delete: *delete
so-ossec:
close: *close
delete: *delete
so-redis:
close: *close
delete: *delete
so-strelka:
close: *close
delete: *delete
so-syslog:
close: *close
delete: *delete
so-zeek:
close: *close
delete: *delete

21
salt/curator/sostatus.sls Normal file
View File

@@ -0,0 +1,21 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
append_so-curator_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-curator
- unless: grep -q so-curator /opt/so/conf/so-status/so-status.conf
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -10,44 +10,58 @@
{%- set RETENTION = salt['pillar.get']('elasticsearch:retention', ELASTICDEFAULTS.elasticsearch.retention, merge=true) -%}
LOG="/opt/so/log/curator/so-curator-cluster-delete.log"
LOG_SIZE_LIMIT=$(/usr/sbin/so-elasticsearch-cluster-space-total {{ RETENTION.retention_pct}})
ALERT_LOG="/opt/so/log/curator/alert.log"
LOG_SIZE_LIMIT_GB=$(/usr/sbin/so-elasticsearch-cluster-space-total {{ RETENTION.retention_pct}})
LOG_SIZE_LIMIT=$(( "$LOG_SIZE_LIMIT_GB" * 1000 * 1000 * 1000 ))
ITERATION=0
MAX_ITERATIONS=10
overlimit() {
[[ $(/usr/sbin/so-elasticsearch-cluster-space-used) -gt "${LOG_SIZE_LIMIT}" ]]
[[ $(/usr/sbin/so-elasticsearch-cluster-space-used) -gt ${LOG_SIZE_LIMIT} ]]
}
# Check to see if Elasticsearch indices using more disk space than LOG_SIZE_LIMIT
# Closed indices will be deleted first. If we are able to bring disk space under LOG_SIZE_LIMIT, we will break out of the loop.
while overlimit; do
###########################
# Check for 2 conditions: #
###########################
# 1. Check if Elasticsearch indices are using more disk space than LOG_SIZE_LIMIT
# 2. Check if the maximum number of iterations - MAX_ITERATIONS - has been exceeded. If so, exit.
# Closed indices will be deleted first. If we are able to bring disk space under LOG_SIZE_LIMIT, or the number of iterations has exceeded the maximum allowed number of iterations, we will break out of the loop.
while overlimit && [[ $ITERATION -lt $MAX_ITERATIONS ]]; do
# If we can't query Elasticsearch, then immediately return false.
/usr/sbin/so-elasticsearch-query _cat/indices?h=index,status > /dev/null 2>&1
[ $? -eq 1 ] && echo "$(date) - Could not query Elasticsearch." >> ${LOG} && exit
# We iterate through the closed and open indices
CLOSED_INDICES=$(/usr/sbin/so-elasticsearch-query _cat/indices?h=index,status | grep 'close$' | awk '{print $1}' | grep -v "so-case" | grep -E "(logstash-|so-|.ds-logs-)" | sort -t- -k3)
OPEN_INDICES=$(/usr/sbin/so-elasticsearch-query _cat/indices?h=index,status | grep 'open$' | awk '{print $1}' | grep -v "so-case" | grep -E "(logstash-|so-|.ds-logs-)" | sort -t- -k3)
for INDEX in ${CLOSED_INDICES} ${OPEN_INDICES}; do
# Now that we've sorted the indices from oldest to newest, we need to check each index to see if it is assigned as the current write index for a data stream
CLOSED_INDICES=$(/usr/sbin/so-elasticsearch-query _cat/indices?h=index,status | grep 'close$' | awk '{print $1}' | grep -vE "playbook|so-case" | grep -E "(logstash-|so-|.ds-logs-)" | sort -t- -k3)
OPEN_INDICES=$(/usr/sbin/so-elasticsearch-query _cat/indices?h=index,status | grep 'open$' | awk '{print $1}' | grep -vE "playbook|so-case" | grep -E "(logstash-|so-|.ds-logs-)" | sort -t- -k3)
for INDEX in ${CLOSED_INDICES} ${OPEN_INDICES}; do
# Now that we've sorted the indices from oldest to newest, we need to check each index to see if it is assigned as the current write index for a data stream
# To do so, we need to identify to which data stream this index is associated
# We extract the data stream name using the pattern below
DATASTREAM_PATTERN="logs-[a-zA-Z_.]+-[a-zA-Z_.]+"
DATASTREAM=$(echo "${INDEX}" | grep -oE "$DATASTREAM_PATTERN")
# We look up the data stream, and determine the write index. If there is only one backing index, we delete the entire data stream
BACKING_INDICES=$(/usr/sbin/so-elasticsearch-query _data_stream/${DATASTREAM} | jq -r '.data_streams[0].indices | length')
if [ "$BACKING_INDICES" -gt 1 ]; then
BACKING_INDICES=$(/usr/sbin/so-elasticsearch-query _data_stream/${DATASTREAM} | jq -r '.data_streams[0].indices | length')
if [ "$BACKING_INDICES" -gt 1 ]; then
CURRENT_WRITE_INDEX=$(/usr/sbin/so-elasticsearch-query _data_stream/$DATASTREAM | jq -r .data_streams[0].indices[-1].index_name)
# We make sure we are not trying to delete a write index
# We make sure we are not trying to delete a write index
if [ "${INDEX}" != "${CURRENT_WRITE_INDEX}" ]; then
# This should not be a write index, so we should be allowed to delete it
printf "\n$(date) - Used disk space exceeds LOG_SIZE_LIMIT (${LOG_SIZE_LIMIT} GB) - Deleting ${INDEX} index...\n" >> ${LOG}
printf "\n$(date) - Used disk space exceeds LOG_SIZE_LIMIT (${LOG_SIZE_LIMIT_GB} GB) - Deleting ${INDEX} index...\n" >> ${LOG}
/usr/sbin/so-elasticsearch-query ${INDEX} -XDELETE >> ${LOG} 2>&1
fi
else
# We delete the entire data stream, since there is only one backing index
printf "\n$(date) - Used disk space exceeds LOG_SIZE_LIMIT (${LOG_SIZE_LIMIT} GB) - Deleting ${DATASTREAM} data stream...\n" >> ${LOG}
/usr/sbin/so-elasticsearch-query _data_stream/${DATASTREAM} -XDELETE >> ${LOG} 2>&1
fi
if ! overlimit; then
fi
if ! overlimit ; then
exit
fi
((ITERATION++))
done
if [[ $ITERATION -ge $MAX_ITERATIONS ]]; then
alert_id=$(uuidgen)
printf "\n$(date) -> Maximum iteration limit reached ($MAX_ITERATIONS). Unable to bring disk below threshold. Writing alert ($alert_id) to ${ALERT_LOG}\n" >> ${LOG}
printf "\n$(date),$alert_id,Maximum iteration limit reached ($MAX_ITERATIONS). Unable to bring disk below threshold.\n" >> ${ALERT_LOG}
fi
done

View File

@@ -8,30 +8,51 @@ docker:
final_octet: 20
port_bindings:
- 0.0.0.0:5000:5000
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-elastic-fleet':
final_octet: 21
port_bindings:
- 0.0.0.0:8220:8220/tcp
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-elasticsearch':
final_octet: 22
port_bindings:
- 0.0.0.0:9200:9200/tcp
- 0.0.0.0:9300:9300/tcp
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-idstools':
final_octet: 25
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-influxdb':
final_octet: 26
port_bindings:
- 0.0.0.0:8086:8086
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-kibana':
final_octet: 27
port_bindings:
- 0.0.0.0:5601:5601
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-kratos':
final_octet: 28
port_bindings:
- 0.0.0.0:4433:4433
- 0.0.0.0:4434:4434
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-logstash':
final_octet: 29
port_bindings:
@@ -45,57 +66,135 @@ docker:
- 0.0.0.0:6052:6052
- 0.0.0.0:6053:6053
- 0.0.0.0:9600:9600
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-mysql':
final_octet: 30
port_bindings:
- 0.0.0.0:3306:3306
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-nginx':
final_octet: 31
port_bindings:
- 80:80
- 443:443
- 8443:8443
- 7788:7788
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-playbook':
final_octet: 32
port_bindings:
- 0.0.0.0:3000:3000
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-redis':
final_octet: 33
port_bindings:
- 0.0.0.0:6379:6379
- 0.0.0.0:9696:9696
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-sensoroni':
final_octet: 99
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-soc':
final_octet: 34
port_bindings:
- 0.0.0.0:9822:9822
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-soctopus':
final_octet: 35
port_bindings:
- 0.0.0.0:7000:7000
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-strelka-backend':
final_octet: 36
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-strelka-filestream':
final_octet: 37
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-strelka-frontend':
final_octet: 38
port_bindings:
- 0.0.0.0:57314:57314
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-strelka-manager':
final_octet: 39
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-strelka-gatekeeper':
final_octet: 40
port_bindings:
- 0.0.0.0:6381:6379
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-strelka-coordinator':
final_octet: 41
port_bindings:
- 0.0.0.0:6380:6379
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-elastalert':
final_octet: 42
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-curator':
final_octet: 43
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-elastic-fleet-package-registry':
final_octet: 44
port_bindings:
- 0.0.0.0:8080:8080/tcp
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-idh':
final_octet: 45
final_octet: 45
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-telegraf':
final_octet: 99
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-steno':
final_octet: 99
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-suricata':
final_octet: 99
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-zeek':
final_octet: 99
custom_bind_mounts: []
extra_hosts: []
extra_env: []

View File

@@ -26,10 +26,10 @@ dockerheldpackages:
dockerheldpackages:
pkg.installed:
- pkgs:
- containerd.io: 1.6.18-3.1.el9
- docker-ce: 23.0.1-1.el9
- docker-ce-cli: 23.0.1-1.el9
- docker-ce-rootless-extras: 23.0.1-1.el9
- containerd.io: 1.6.20-3.1.el9
- docker-ce: 23.0.5-1.el9
- docker-ce-cli: 23.0.5-1.el9
- docker-ce-rootless-extras: 23.0.5-1.el9
- hold: True
- update_holds: True
{% endif %}

View File

@@ -28,6 +28,24 @@ docker:
helpLink: docker.html
advanced: True
multiline: True
custom_bind_mounts:
description: List of custom local volume bindings.
advanced: True
helpLink: docker.html
multiline: True
forcedType: "[]string"
extra_hosts:
description: List of additional host entries for the container.
advanced: True
helpLink: docker.html
multiline: True
forcedType: "[]string"
extra_env:
description: List of additional ENV entries for the container.
advanced: True
helpLink: docker.html
multiline: True
forcedType: "[]string"
so-dockerregistry: *dockerOptions
so-elastalert: *dockerOptions
so-elastic-fleet-package-registry: *dockerOptions

103
salt/elastalert/config.sls Normal file
View File

@@ -0,0 +1,103 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
{% from 'elastalert/map.jinja' import ELASTALERTMERGED %}
# Create the group
elastagroup:
group.present:
- name: elastalert
- gid: 933
# Add user
elastalert:
user.present:
- uid: 933
- gid: 933
- home: /opt/so/conf/elastalert
- createhome: False
elastalogdir:
file.directory:
- name: /opt/so/log/elastalert
- user: 933
- group: 933
- makedirs: True
elastalert_sbin:
file.recurse:
- name: /usr/sbin
- source: salt://elastalert/tools/sbin
- user: 933
- group: 939
- file_mode: 755
#elastalert_sbin_jinja:
# file.recurse:
# - name: /usr/sbin
# - source: salt://elastalert/tools/sbin_jinja
# - user: 933
# - group: 939
# - file_mode: 755
# - template: jinja
elastarules:
file.directory:
- name: /opt/so/rules/elastalert
- user: 933
- group: 933
- makedirs: True
elastaconfdir:
file.directory:
- name: /opt/so/conf/elastalert
- user: 933
- group: 933
- makedirs: True
elastasomodulesdir:
file.directory:
- name: /opt/so/conf/elastalert/modules/so
- user: 933
- group: 933
- makedirs: True
elastacustmodulesdir:
file.directory:
- name: /opt/so/conf/elastalert/modules/custom
- user: 933
- group: 933
- makedirs: True
elastasomodulesync:
file.recurse:
- name: /opt/so/conf/elastalert/modules/so
- source: salt://elastalert/files/modules/so
- user: 933
- group: 933
- makedirs: True
elastaconf:
file.managed:
- name: /opt/so/conf/elastalert/elastalert_config.yaml
- source: salt://elastalert/files/elastalert_config.yaml.jinja
- context:
elastalert_config: {{ ELASTALERTMERGED.config }}
- user: 933
- group: 933
- mode: 660
- template: jinja
- show_changes: False
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,4 +1,5 @@
elastalert:
enabled: False
config:
rules_folder: /opt/elastalert/rules/
scan_subdirectories: true
@@ -12,9 +13,10 @@ elastalert:
es_port: 9200
es_conn_timeout: 55
max_query_size: 5000
eql: true
use_ssl: true
verify_certs: false
writeback_index: elastalert_status
writeback_index: elastalert
alert_time_limit:
days: 2
index_settings:

View File

@@ -0,0 +1,27 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
include:
- elastalert.sostatus
so-elastalert:
docker_container.absent:
- force: True
so-elastalert_so-status.disabled:
file.comment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-elastalert$
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,11 +0,0 @@
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% import_yaml 'elastalert/defaults.yaml' as ELASTALERT %}
{% set elastalert_pillar = salt['pillar.get']('elastalert:config', {}) %}
{% do ELASTALERT.elastalert.config.update({'es_host': GLOBALS.manager}) %}
{% do ELASTALERT.elastalert.config.update({'es_username': pillar.elasticsearch.auth.users.so_elastic_user.user}) %}
{% do ELASTALERT.elastalert.config.update({'es_password': pillar.elasticsearch.auth.users.so_elastic_user.pass}) %}
{% do salt['defaults.merge'](ELASTALERT.elastalert.config, elastalert_pillar, in_place=True) %}

View File

@@ -0,0 +1,74 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
include:
- elastalert.config
- elastalert.sostatus
wait_for_elasticsearch:
cmd.run:
- name: so-elasticsearch-wait
so-elastalert:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastalert:{{ GLOBALS.so_version }}
- hostname: elastalert
- name: so-elastalert
- user: so-elastalert
- networks:
- sobridge:
- ipv4_address: {{ DOCKER.containers['so-elastalert'].ip }}
- detach: True
- binds:
- /opt/so/rules/elastalert:/opt/elastalert/rules/:ro
- /opt/so/log/elastalert:/var/log/elastalert:rw
- /opt/so/conf/elastalert/modules/:/opt/elastalert/modules/:ro
- /opt/so/conf/elastalert/elastalert_config.yaml:/opt/elastalert/config.yaml:ro
{% if DOCKER.containers['so-elastalert'].custom_bind_mounts %}
{% for BIND in DOCKER.containers['so-elastalert'].custom_bind_mounts %}
- {{ BIND }}
{% endfor %}
{% endif %}
- extra_hosts:
- {{ GLOBALS.manager }}:{{ GLOBALS.manager_ip }}
{% if DOCKER.containers['so-elastalert'].extra_hosts %}
{% for XTRAHOST in DOCKER.containers['so-elastalert'].extra_hosts %}
- {{ XTRAHOST }}
{% endfor %}
{% endif %}
{% if DOCKER.containers['so-elastalert'].extra_env %}
- environment:
{% for XTRAENV in DOCKER.containers['so-elastalert'].extra_env %}
- {{ XTRAENV }}
{% endfor %}
{% endif %}
- require:
- cmd: wait_for_elasticsearch
- file: elastarules
- file: elastalogdir
- file: elastacustmodulesdir
- file: elastaconf
- watch:
- file: elastaconf
- onlyif:
- "so-elasticsearch-query / | jq -r '.version.number[0:1]' | grep -q 8" {# only run this state if elasticsearch is version 8 #}
delete_so-elastalert_so-status.disabled:
file.uncomment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-elastalert$
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -31,8 +31,8 @@ class PlaybookESAlerter(Alerter):
creds = (self.rule['es_username'], self.rule['es_password'])
payload = {"rule": { "name": self.rule['play_title'],"case_template": self.rule['play_id'],"uuid": self.rule['play_id'],"category": self.rule['rule.category']},"event":{ "severity": self.rule['event.severity'],"module": self.rule['event.module'],"dataset": self.rule['event.dataset'],"severity_label": self.rule['sigma_level']},"kibana_pivot": self.rule['kibana_pivot'],"soc_pivot": self.rule['soc_pivot'],"play_url": self.rule['play_url'],"sigma_level": self.rule['sigma_level'],"event_data": match, "@timestamp": timestamp}
url = f"https://{self.rule['es_host']}:{self.rule['es_port']}/so-playbook-alerts-{today}/_doc/"
url = f"{self.rule['es_hosts']}/so-playbook-alerts-{today}/_doc/"
requests.post(url, data=json.dumps(payload), headers=headers, verify=False, auth=creds)
def get_info(self):
return {'type': 'PlaybookESAlerter'}
return {'type': 'PlaybookESAlerter'}

View File

@@ -1,124 +1,13 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
# this file except in compliance with the Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %}
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
{% from 'elastalert/elastalert_config.map.jinja' import ELASTALERT as elastalert_config with context %}
# Create the group
elastagroup:
group.present:
- name: elastalert
- gid: 933
# Add user
elastalert:
user.present:
- uid: 933
- gid: 933
- home: /opt/so/conf/elastalert
- createhome: False
elastalogdir:
file.directory:
- name: /opt/so/log/elastalert
- user: 933
- group: 933
- makedirs: True
elastarules:
file.directory:
- name: /opt/so/rules/elastalert
- user: 933
- group: 933
- makedirs: True
elastaconfdir:
file.directory:
- name: /opt/so/conf/elastalert
- user: 933
- group: 933
- makedirs: True
elastasomodulesdir:
file.directory:
- name: /opt/so/conf/elastalert/modules/so
- user: 933
- group: 933
- makedirs: True
elastacustmodulesdir:
file.directory:
- name: /opt/so/conf/elastalert/modules/custom
- user: 933
- group: 933
- makedirs: True
elastasomodulesync:
file.recurse:
- name: /opt/so/conf/elastalert/modules/so
- source: salt://elastalert/files/modules/so
- user: 933
- group: 933
- makedirs: True
elastaconf:
file.managed:
- name: /opt/so/conf/elastalert/elastalert_config.yaml
- source: salt://elastalert/files/elastalert_config.yaml.jinja
- context:
elastalert_config: {{ elastalert_config.elastalert.config }}
- user: 933
- group: 933
- mode: 660
- template: jinja
- show_changes: False
wait_for_elasticsearch:
cmd.run:
- name: so-elasticsearch-wait
so-elastalert:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastalert:{{ GLOBALS.so_version }}
- hostname: elastalert
- name: so-elastalert
- user: so-elastalert
- networks:
- sobridge:
- ipv4_address: {{ DOCKER.containers['so-elastalert'].ip }}
- detach: True
- binds:
- /opt/so/rules/elastalert:/opt/elastalert/rules/:ro
- /opt/so/log/elastalert:/var/log/elastalert:rw
- /opt/so/conf/elastalert/modules/:/opt/elastalert/modules/:ro
- /opt/so/conf/elastalert/elastalert_config.yaml:/opt/elastalert/config.yaml:ro
- extra_hosts:
- {{ GLOBALS.manager }}:{{ GLOBALS.manager_ip }}
- require:
- cmd: wait_for_elasticsearch
- file: elastarules
- file: elastalogdir
- file: elastacustmodulesdir
- file: elastaconf
- watch:
- file: elastaconf
- onlyif:
- "so-elasticsearch-query / | jq -r '.version.number[0:1]' | grep -q 8" {# only run this state if elasticsearch is version 8 #}
append_so-elastalert_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-elastalert
{% from 'elastalert/map.jinja' import ELASTALERTMERGED %}
include:
{% if ELASTALERTMERGED.enabled %}
- elastalert.enabled
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
- elastalert.disabled
{% endif %}

15
salt/elastalert/map.jinja Normal file
View File

@@ -0,0 +1,15 @@
{# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
https://securityonion.net/license; you may not use this file except in compliance with the
Elastic License 2.0. #}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% import_yaml 'elastalert/defaults.yaml' as ELASTALERTDEFAULTS %}
{% set elastalert_pillar = salt['pillar.get']('elastalert:config', {}) %}
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_hosts': 'https://' + GLOBALS.manager + ':' + ELASTALERTDEFAULTS.elastalert.config.es_port|string}) %}
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_username': pillar.elasticsearch.auth.users.so_elastic_user.user}) %}
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_password': pillar.elasticsearch.auth.users.so_elastic_user.pass}) %}
{% set ELASTALERTMERGED = salt['pillar.get']('elastalert', ELASTALERTDEFAULTS.elastalert, merge=True) %}

View File

@@ -1,4 +1,7 @@
elastalert:
enabled:
description: You can enable or disable Elastalert.
helpLink: elastalert.html
config:
disable_rules_on_error:
description: Disable rules on failure.

View File

@@ -0,0 +1,21 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
append_so-elastalert_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-elastalert
- unless: grep -q so-elastalert /opt/so/conf/so-status/so-status.conf
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -0,0 +1,29 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
# Add Group
elasticsagentprgroup:
group.present:
- name: elastic-agent-pr
- gid: 948
# Add user
elastic-agent-pr:
user.present:
- uid: 948
- gid: 948
- home: /opt/so/conf/elastic-fleet-pr
- createhome: False
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -0,0 +1,2 @@
elastic_fleet_package_registry:
enabled: False

View File

@@ -0,0 +1,27 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
include:
- elastic-fleet-package-registry.sostatus
so-elastic-fleet-package-registry:
docker_container.absent:
- force: True
so-elastic-fleet-package-registry_so-status.disabled:
file.comment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-elastic-fleet-package-registry$
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -0,0 +1,59 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
include:
- elastic-fleet-package-registry.config
- elastic-fleet-package-registry.sostatus
so-elastic-fleet-package-registry:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastic-fleet-package-registry:{{ GLOBALS.so_version }}
- name: so-elastic-fleet-package-registry
- hostname: Fleet-package-reg-{{ GLOBALS.hostname }}
- detach: True
- user: 948
- networks:
- sobridge:
- ipv4_address: {{ DOCKER.containers['so-elastic-fleet-package-registry'].ip }}
- extra_hosts:
- {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }}
{% if DOCKER.containers['so-elastic-fleet-package-registry'].extra_hosts %}
{% for XTRAHOST in DOCKER.containers['so-elastic-fleet-package-registry'].extra_hosts %}
- {{ XTRAHOST }}
{% endfor %}
{% endif %}
- port_bindings:
{% for BINDING in DOCKER.containers['so-elastic-fleet-package-registry'].port_bindings %}
- {{ BINDING }}
{% endfor %}
{% if DOCKER.containers['so-elastic-fleet-package-registry'].custom_bind_mounts %}
- binds:
{% for BIND in DOCKER.containers['so-elastic-fleet-package-registry'].custom_bind_mounts %}
- {{ BIND }}
{% endfor %}
{% endif %}
{% if DOCKER.containers['so-elastic-fleet-package-registry'].extra_env %}
- environment:
{% for XTRAENV in DOCKER.containers['so-elastic-fleet-package-registry'].extra_env %}
- {{ XTRAENV }}
{% endfor %}
{% endif %}
delete_so-elastic-fleet-package-registry_so-status.disabled:
file.uncomment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-elastic-fleet-package-registry$
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,52 +1,13 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
# this file except in compliance with the Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
# Add Group
elasticsagentprgroup:
group.present:
- name: elastic-agent-pr
- gid: 948
# Add user
elastic-agent-pr:
user.present:
- uid: 948
- gid: 948
- home: /opt/so/conf/elastic-fleet-pr
- createhome: False
so-elastic-fleet-package-registry:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastic-fleet-package-registry:{{ GLOBALS.so_version }}
- name: so-elastic-fleet-package-registry
- hostname: Fleet-package-reg-{{ GLOBALS.hostname }}
- detach: True
- user: 948
- networks:
- sobridge:
- ipv4_address: {{ DOCKER.containers['so-elastic-fleet-package-registry'].ip }}
- extra_hosts:
- {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }}
- port_bindings:
{% for BINDING in DOCKER.containers['so-elastic-fleet-package-registry'].port_bindings %}
- {{ BINDING }}
{% endfor %}
append_so-elastic-fleet-package-registry_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-elastic-fleet-package-registry
{% from 'elastic-fleet-package-registry/map.jinja' import ELASTICFLEETPACKAGEREGISTRYMERGED %}
include:
{% if ELASTICFLEETPACKAGEREGISTRYMERGED.enabled %}
- elastic-fleet-package-registry.enabled
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
- elastic-fleet-package-registry.disabled
{% endif %}

View File

@@ -0,0 +1,7 @@
{# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
https://securityonion.net/license; you may not use this file except in compliance with the
Elastic License 2.0. #}
{% import_yaml 'elastic-fleet-package-registry/defaults.yaml' as ELASTICFLEETPACKAGEREGISTRYDEFAULTS %}
{% set ELASTICFLEETPACKAGEREGISTRYMERGED = salt['pillar.get']('elastic_fleet_package_registry', ELASTICFLEETPACKAGEREGISTRYDEFAULTS.elastic_fleet_package_registry, merge=True) %}

View File

@@ -0,0 +1,4 @@
elastic_fleet_package_registry:
enabled:
description: You can enable or disable Elastic Fleet Package Registry.
advanced: True

View File

@@ -0,0 +1,21 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
append_so-elastic-fleet-package-registry_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-elastic-fleet-package-registry
- unless: grep -q so-elastic-fleet-package-registry /opt/so/conf/so-status/so-status.conf
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -0,0 +1,11 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
# this file except in compliance with the Elastic License 2.0.
fleetartifactdir:
file.directory:
- name: /nsm/elastic-fleet/artifacts
- user: 947
- group: 939
- makedirs: True

View File

@@ -0,0 +1,91 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% if sls.split('.')[0] in allowed_states %}
# Add EA Group
elasticsagentgroup:
group.present:
- name: elastic-agent
- gid: 947
# Add EA user
elastic-agent:
user.present:
- uid: 947
- gid: 947
- home: /opt/so/conf/elastic-fleet
- createhome: False
elasticfleet_sbin:
file.recurse:
- name: /usr/sbin
- source: salt://elasticfleet/tools/sbin
- user: 947
- group: 939
- file_mode: 755
elasticfleet_sbin_jinja:
file.recurse:
- name: /usr/sbin
- source: salt://elasticfleet/tools/sbin_jinja
- user: 947
- group: 939
- file_mode: 755
- template: jinja
eaconfdir:
file.directory:
- name: /opt/so/conf/elastic-fleet
- user: 947
- group: 939
- makedirs: True
eastatedir:
file.directory:
- name: /opt/so/conf/elastic-fleet/state
- user: 947
- group: 939
- makedirs: True
{% if GLOBALS.role != "so-fleet" %}
eaintegrationsdir:
file.directory:
- name: /opt/so/conf/elastic-fleet/integrations
- user: 947
- group: 939
- makedirs: True
eadynamicintegration:
file.recurse:
- name: /opt/so/conf/elastic-fleet/integrations
- source: salt://elasticfleet/files/integrations-dynamic
- user: 947
- group: 939
- template: jinja
eaintegration:
file.recurse:
- name: /opt/so/conf/elastic-fleet/integrations
- source: salt://elasticfleet/files/integrations
- user: 947
- group: 939
ea-integrations-load:
file.absent:
- name: /opt/so/state/eaintegrations.txt
- onchanges:
- file: eaintegration
- file: eadynamicintegration
{% endif %}
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -0,0 +1,23 @@
elasticfleet:
enabled: False
config:
server:
endpoints_enrollment: ''
es_token: ''
grid_enrollment: ''
url: ''
logging:
zeek:
excluded:
- broker
- capture_loss
- ecat_arp_info
- known_hosts
- known_services
- loaded_scripts
- ntp
- packet_filter
- reporter
- stats
- stderr
- stdout

View File

@@ -0,0 +1,27 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
include:
- elasticfleet.sostatus
so-elastic-fleet:
docker_container.absent:
- force: True
so-elastic-fleet_so-status.disabled:
file.comment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-elastic-fleet$
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -0,0 +1,83 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
{# This value is generated during node install and stored in minion pillar #}
{% set SERVICETOKEN = salt['pillar.get']('elasticfleet:config:server:es_token','') %}
include:
- elasticfleet.config
- elasticfleet.sostatus
{% if SERVICETOKEN != '' %}
so-elastic-fleet:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastic-agent:{{ GLOBALS.so_version }}
- name: so-elastic-fleet
- hostname: FleetServer-{{ GLOBALS.hostname }}
- detach: True
- user: 947
- networks:
- sobridge:
- ipv4_address: {{ DOCKER.containers['so-elastic-fleet'].ip }}
- extra_hosts:
- {{ GLOBALS.manager }}:{{ GLOBALS.manager_ip }}
- {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }}
{% if DOCKER.containers['so-elastic-fleet'].extra_hosts %}
{% for XTRAHOST in DOCKER.containers['so-elastic-fleet'].extra_hosts %}
- {{ XTRAHOST }}
{% endfor %}
{% endif %}
- port_bindings:
{% for BINDING in DOCKER.containers['so-elastic-fleet'].port_bindings %}
- {{ BINDING }}
{% endfor %}
- binds:
- /etc/pki:/etc/pki:ro
#- /opt/so/conf/elastic-fleet/state:/usr/share/elastic-agent/state:rw
{% if DOCKER.containers['so-elastic-fleet'].custom_bind_mounts %}
{% for BIND in DOCKER.containers['so-elastic-fleet'].custom_bind_mounts %}
- {{ BIND }}
{% endfor %}
{% endif %}
- environment:
- FLEET_SERVER_ENABLE=true
- FLEET_URL=https://{{ GLOBALS.node_ip }}:8220
- FLEET_SERVER_ELASTICSEARCH_HOST=https://{{ GLOBALS.manager }}:9200
- FLEET_SERVER_SERVICE_TOKEN={{ SERVICETOKEN }}
- FLEET_SERVER_POLICY_ID=FleetServer_{{ GLOBALS.hostname }}
- FLEET_SERVER_ELASTICSEARCH_CA=/etc/pki/tls/certs/intca.crt
- FLEET_SERVER_CERT=/etc/pki/elasticfleet.crt
- FLEET_SERVER_CERT_KEY=/etc/pki/elasticfleet.key
- FLEET_CA=/etc/pki/tls/certs/intca.crt
{% if DOCKER.containers['so-elastic-fleet'].extra_env %}
{% for XTRAENV in DOCKER.containers['so-elastic-fleet'].extra_env %}
- {{ XTRAENV }}
{% endfor %}
{% endif %}
{% endif %}
{% if GLOBALS.role != "so-fleet" %}
so-elastic-fleet-integrations:
cmd.run:
- name: /usr/sbin/so-elastic-fleet-integration-policy-load
{% endif %}
delete_so-elastic-fleet_so-status.disabled:
file.uncomment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-elastic-fleet$
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,7 +1,9 @@
{% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
{%- raw -%}
{
"package": {
"name": "log",
"version": "1.1.0"
"version": ""
},
"name": "import-zeek-logs",
"namespace": "so",
@@ -20,10 +22,11 @@
"data_stream.dataset": "import",
"tags": [],
"processors": "- dissect:\n tokenizer: \"/nsm/import/%{import.id}/zeek/logs/%{import.file}\"\n field: \"log.file.path\"\n target_prefix: \"\"\n- script:\n lang: javascript\n source: >\n function process(event) {\n var pl = event.Get(\"import.file\").slice(0,-4);\n event.Put(\"@metadata.pipeline\", \"zeek.\" + pl);\n }\n- add_fields:\n target: event\n fields:\n category: network\n module: zeek\n imported: true\n- add_tags:\n tags: \"ics\"\n when:\n regexp:\n import.file: \"^bacnet*|^bsap*|^cip*|^cotp*|^dnp3*|^ecat*|^enip*|^modbus*|^opcua*|^profinet*|^s7comm*\"",
"custom": "exclude_files: [\"broker|capture_loss|ecat_arp_info|loaded_scripts|packet_filter|stats|stderr|stdout.log$\"]\n"
"custom": "exclude_files: [\"{%- endraw -%}{{ ELASTICFLEETMERGED.logging.zeek.excluded | join('|') }}{%- raw -%}.log$\"]\n"
}
}
}
}
}
}
{%- endraw -%}

View File

@@ -1,8 +1,11 @@
{% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
{%- raw -%}
{
"package": {
"name": "log",
"version": "1.1.0"
"version": ""
},
"id": "zeek-logs",
"name": "zeek-logs",
"namespace": "so",
"description": "Zeek logs",
@@ -20,10 +23,11 @@
"data_stream.dataset": "zeek",
"tags": [],
"processors": "- dissect:\n tokenizer: \"/nsm/zeek/logs/current/%{pipeline}.log\"\n field: \"log.file.path\"\n trim_chars: \".log\"\n target_prefix: \"\"\n- script:\n lang: javascript\n source: >\n function process(event) {\n var pl = event.Get(\"pipeline\");\n event.Put(\"@metadata.pipeline\", \"zeek.\" + pl);\n }\n- add_fields:\n target: event\n fields:\n category: network\n module: zeek\n- add_tags:\n tags: \"ics\"\n when:\n regexp:\n pipeline: \"^bacnet*|^bsap*|^cip*|^cotp*|^dnp3*|^ecat*|^enip*|^modbus*|^opcua*|^profinet*|^s7comm*\"",
"custom": "exclude_files: [\"broker|capture_loss|ecat_arp_info|loaded_scripts|packet_filter|stats|stderr|stdout.log$\"]\n"
"custom": "exclude_files: [\"{%- endraw -%}{{ ELASTICFLEETMERGED.logging.zeek.excluded | join('|') }}{%- raw -%}.log$\"]\n"
}
}
}
}
}
}
{%- endraw -%}

View File

@@ -0,0 +1,28 @@
{
"name": "elastic-defend-endpoints",
"namespace": "default",
"description": "",
"package": {
"name": "endpoint",
"title": "Elastic Defend",
"version": ""
},
"enabled": true,
"policy_id": "endpoints-initial",
"vars": {},
"inputs": [{
"type": "endpoint",
"enabled": true,
"streams": [],
"config": {
"integration_config": {
"value": {
"type": "endpoint",
"endpointConfig": {
"preset": "DataCollection"
}
}
}
}
}]
}

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "osquery_manager",
"version": "1.6.0"
"version": ""
},
"name": "osquery-endpoints",
"namespace": "default",

View File

@@ -1,11 +1,11 @@
{
"policy_id": "endpoints-initial",
"package": {
"name": "system",
"version": "1.25.2"
"version": ""
},
"name": "system-endpoints",
"namespace": "default",
"policy_id": "endpoints-initial",
"inputs": {
"system-logfile": {
"enabled": true,
@@ -13,14 +13,9 @@
"system.auth": {
"enabled": true,
"vars": {
"ignore_older": "72h",
"paths": [
"/var/log/auth.log*",
"/var/log/secure*"
],
"preserve_original_event": false,
"tags": [
"system-auth"
]
}
},
@@ -30,47 +25,33 @@
"paths": [
"/var/log/messages*",
"/var/log/syslog*"
],
"tags": [],
"ignore_older": "72h"
]
}
}
}
},
"system-winlog": {
"enabled": true,
"vars": {
"preserve_original_event": false
},
"streams": {
"system.application": {
"enabled": true,
"vars": {
"preserve_original_event": false,
"ignore_older": "72h",
"language": 0,
"tags": []
}
},
"system.security": {
"enabled": true,
"vars": {
"preserve_original_event": false,
"ignore_older": "72h",
"language": 0,
"tags": []
}
},
"system.system": {
"enabled": true,
"vars": {
"preserve_original_event": false,
"ignore_older": "72h",
"language": 0,
"tags": []
}
}
}
},
"system-system/metrics": {
"enabled": false
}
},
"system-system/metrics": {
"enabled": false
}
}
}

View File

@@ -1,11 +1,12 @@
{
"policy_id": "endpoints-initial",
"package": {
"name": "windows",
"version": "1.19.1"
"version": ""
},
"name": "windows-endpoints",
"description": "",
"namespace": "default",
"policy_id": "endpoints-initial",
"inputs": {
"windows-winlog": {
"enabled": true,
@@ -13,47 +14,54 @@
"windows.forwarded": {
"enabled": true,
"vars": {
"preserve_original_event": false,
"ignore_older": "72h",
"language": 0,
"tags": [
"forwarded"
]
],
"preserve_original_event": false
}
},
"windows.powershell": {
"enabled": true,
"vars": {
"preserve_original_event": false,
"event_id": "400, 403, 600, 800",
"ignore_older": "72h",
"language": 0,
"tags": []
"tags": [],
"preserve_original_event": false
}
},
"windows.powershell_operational": {
"enabled": true,
"vars": {
"preserve_original_event": false,
"event_id": "4103, 4104, 4105, 4106",
"ignore_older": "72h",
"language": 0,
"tags": []
"tags": [],
"preserve_original_event": false
}
},
"windows.sysmon_operational": {
"enabled": true,
"vars": {
"preserve_original_event": false,
"ignore_older": "72h",
"language": 0,
"tags": []
"tags": [],
"preserve_original_event": false
}
}
}
},
"windows-windows/metrics": {
"enabled": false
"enabled": false,
"streams": {
"windows.perfmon": {
"enabled": false,
"vars": {
"perfmon.group_measurements_by_instance": false,
"perfmon.ignore_non_existent_counters": false,
"perfmon.queries": "- object: 'Process'\n instance: [\"*\"]\n counters:\n - name: '% Processor Time'\n field: cpu_perc\n format: \"float\"\n - name: \"Working Set\"\n",
"period": "10s"
}
},
"windows.service": {
"enabled": false,
"vars": {
"period": "60s"
}
}
}
}
}
}

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "elasticsearch",
"version": "1.0.0"
"version": ""
},
"name": "elasticsearch-logs",
"namespace": "default",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.1"
"version": ""
},
"name": "idh-logs",
"namespace": "so",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.0"
"version": ""
},
"name": "import-evtx-logs",
"namespace": "so",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.0"
"version": ""
},
"name": "import-suricata-logs",
"namespace": "so",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.0"
"version": ""
},
"name": "kratos-logs",
"namespace": "so",
@@ -18,7 +18,7 @@
"/opt/so/log/kratos/kratos.log"
],
"data_stream.dataset": "kratos",
"tags": [],
"tags": ["so-kratos"],
"processors": "- decode_json_fields:\n fields: [\"message\"]\n target: \"\"\n add_error_key: true \n- add_fields:\n target: event\n fields:\n category: iam\n module: kratos",
"custom": "pipeline: kratos"
}

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "osquery_manager",
"version": "1.6.0"
"version": ""
},
"name": "osquery-grid-nodes",
"namespace": "default",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "redis",
"version": "1.4.0"
"version": ""
},
"name": "redis-logs",
"namespace": "default",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.2"
"version": ""
},
"name": "soc-auth-sync-logs",
"namespace": "so",
@@ -18,7 +18,7 @@
"/opt/so/log/soc/sync.log"
],
"data_stream.dataset": "soc",
"tags": [],
"tags": ["so-soc"],
"processors": "- dissect:\n tokenizer: \"%{event.action}\"\n field: \"message\"\n target_prefix: \"\"\n- add_fields:\n target: event\n fields:\n category: host\n module: soc\n dataset_temp: auth_sync",
"custom": "pipeline: common"
}

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.2"
"version": ""
},
"name": "soc-salt-relay-logs",
"namespace": "so",
@@ -18,7 +18,7 @@
"/opt/so/log/soc/salt-relay.log"
],
"data_stream.dataset": "soc",
"tags": [],
"tags": ["so-soc"],
"processors": "- dissect:\n tokenizer: \"%{soc.ts} | %{event.action}\"\n field: \"message\"\n target_prefix: \"\"\n- add_fields:\n target: event\n fields:\n category: host\n module: soc\n dataset_temp: salt_relay",
"custom": "pipeline: common"
}

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.2"
"version": ""
},
"name": "soc-sensoroni-logs",
"namespace": "so",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.2"
"version": ""
},
"name": "soc-server-logs",
"namespace": "so",
@@ -18,7 +18,7 @@
"/opt/so/log/soc/sensoroni-server.log"
],
"data_stream.dataset": "soc",
"tags": [],
"tags": ["so-soc"],
"processors": "- decode_json_fields:\n fields: [\"message\"]\n target: \"soc\"\n process_array: true\n max_depth: 2\n add_error_key: true \n- add_fields:\n target: event\n fields:\n category: host\n module: soc\n dataset_temp: server\n- rename:\n fields:\n - from: \"soc.fields.sourceIp\"\n to: \"source.ip\"\n - from: \"soc.fields.status\"\n to: \"http.response.status_code\"\n - from: \"soc.fields.method\"\n to: \"http.request.method\"\n - from: \"soc.fields.path\"\n to: \"url.path\"\n - from: \"soc.message\"\n to: \"event.action\"\n - from: \"soc.level\"\n to: \"log.level\"\n ignore_missing: true",
"custom": "pipeline: common"
}

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.0"
"version": ""
},
"name": "strelka-logs",
"namespace": "so",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "log",
"version": "1.1.0"
"version": ""
},
"name": "suricata-logs",
"namespace": "so",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "tcp",
"version": "1.5.0"
"version": ""
},
"name": "syslog-tcp-514",
"namespace": "so",

View File

@@ -1,7 +1,7 @@
{
"package": {
"name": "udp",
"version": "1.5.0"
"version": ""
},
"name": "syslog-udp-514",
"namespace": "so",

View File

@@ -1,11 +1,11 @@
{
"policy_id": "so-grid-nodes",
"package": {
"name": "system",
"version": "1.25.2"
"version": ""
},
"name": "system-grid-nodes",
"namespace": "default",
"policy_id": "so-grid-nodes",
"inputs": {
"system-logfile": {
"enabled": true,
@@ -13,14 +13,9 @@
"system.auth": {
"enabled": true,
"vars": {
"ignore_older": "72h",
"paths": [
"/var/log/auth.log*",
"/var/log/secure*"
],
"preserve_original_event": false,
"tags": [
"system-auth"
]
}
},
@@ -30,9 +25,7 @@
"paths": [
"/var/log/messages*",
"/var/log/syslog*"
],
"tags": [],
"ignore_older": "72h"
]
}
}
}

View File

@@ -1,87 +1,13 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
# this file except in compliance with the Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
# These values are generated during node install and stored in minion pillar
{% set SERVICETOKEN = salt['pillar.get']('elasticfleet:server:es_token','') %}
#{% set FLEETSERVERPOLICY = salt['pillar.get']('elasticfleet:server:server_policy','so-manager') %}
#{% set FLEETURL = salt['pillar.get']('elasticfleet:server:url') %}
# Add EA Group
elasticsagentgroup:
group.present:
- name: elastic-agent
- gid: 947
# Add EA user
elastic-agent:
user.present:
- uid: 947
- gid: 947
- home: /opt/so/conf/elastic-fleet
- createhome: False
eaconfdir:
file.directory:
- name: /opt/so/conf/elastic-fleet
- user: 947
- group: 939
- makedirs: True
eastatedir:
file.directory:
- name: /opt/so/conf/elastic-fleet/state
- user: 947
- group: 939
- makedirs: True
{% if SERVICETOKEN != '' %}
so-elastic-fleet:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastic-agent:{{ GLOBALS.so_version }}
- name: so-elastic-fleet
- hostname: FleetServer-{{ GLOBALS.hostname }}
- detach: True
- user: 947
- networks:
- sobridge:
- ipv4_address: {{ DOCKER.containers['so-elastic-fleet'].ip }}
- extra_hosts:
- {{ GLOBALS.manager }}:{{ GLOBALS.manager_ip }}
- {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }}
- port_bindings:
{% for BINDING in DOCKER.containers['so-elastic-fleet'].port_bindings %}
- {{ BINDING }}
{% endfor %}
- binds:
- /etc/pki:/etc/pki:ro
#- /opt/so/conf/elastic-fleet/state:/usr/share/elastic-agent/state:rw
- environment:
- FLEET_SERVER_ENABLE=true
- FLEET_URL=https://{{ GLOBALS.node_ip }}:8220
- FLEET_SERVER_ELASTICSEARCH_HOST=https://{{ GLOBALS.manager }}:9200
- FLEET_SERVER_SERVICE_TOKEN={{ SERVICETOKEN }}
- FLEET_SERVER_POLICY_ID=FleetServer_{{ GLOBALS.hostname }}
- FLEET_SERVER_ELASTICSEARCH_CA=/etc/pki/tls/certs/intca.crt
- FLEET_SERVER_CERT=/etc/pki/elasticfleet.crt
- FLEET_SERVER_CERT_KEY=/etc/pki/elasticfleet.key
- FLEET_CA=/etc/pki/tls/certs/intca.crt
{% endif %}
append_so-elastic-fleet_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-elastic-fleet
{% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
include:
{% if ELASTICFLEETMERGED.enabled %}
- elasticfleet.enabled
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
- elasticfleet.disabled
{% endif %}

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