Compare commits

...

160 Commits

Author SHA1 Message Date
Doug Burks
a13b3f305a Merge pull request #10970 from Security-Onion-Solutions/2.4/dev
2.4.5 RC2
2023-08-07 10:21:29 -04:00
Doug Burks
38089c6662 Merge pull request #10971 from Security-Onion-Solutions/2.4/main
2.4/main to 2.4/dev
2023-08-07 10:17:51 -04:00
Doug Burks
2d863f09eb Merge pull request #10969 from Security-Onion-Solutions/dougburks-patch-1
add spaces for proper rendering DOWNLOAD_AND_VERIFY_ISO.md
2023-08-07 09:31:33 -04:00
Doug Burks
37b98ba188 add spaces for proper rendering DOWNLOAD_AND_VERIFY_ISO.md 2023-08-07 09:29:34 -04:00
Doug Burks
65d1e57ccd Merge pull request #10968 from Security-Onion-Solutions/dougburks-patch-1
prepare for 2.4.5 ISO image release
2023-08-07 09:15:53 -04:00
Doug Burks
9ae32e2bd6 create sigs directory and add sig for 2.4.5 2023-08-07 09:02:52 -04:00
Doug Burks
6e8f31e083 Delete sigs 2023-08-07 08:59:24 -04:00
Doug Burks
3c5cd941c7 Update DOWNLOAD_AND_VERIFY_ISO.md for 2.4.5 2023-08-07 08:45:30 -04:00
Doug Burks
2ea2a4d0a7 Merge pull request #10964 from Security-Onion-Solutions/dougburks-patch-1
Revert yesterday's change to zeekcaptureloss.sh
2023-08-05 09:23:58 -04:00
Doug Burks
90102b1148 Finish reverting yesterday's change to zeekcaptureloss.sh 2023-08-05 09:23:27 -04:00
Doug Burks
ec81cbd70d Revert yesterday's change to zeekcaptureloss.sh 2023-08-05 09:11:58 -04:00
Josh Patterson
59c0109c91 Merge pull request #10961 from Security-Onion-Solutions/fix/tgrafzeekcloss
fix count of WORKERS for zeekcaptureloss script for telegraf
2023-08-04 16:39:26 -04:00
m0duspwnens
9af2a731ca fix count of WORKERS for zeekcaptureloss script for telegraf 2023-08-04 16:29:30 -04:00
Josh Brower
9b656ebbc0 Merge pull request #10960 from Security-Onion-Solutions/2.4/fleetcustomfqdn
Refactor to remove new line
2023-08-04 16:16:43 -04:00
Josh Brower
9d3744aa25 Refactor to remove new line 2023-08-04 16:05:28 -04:00
Josh Patterson
9fddd56c96 Merge pull request #10959 from Security-Onion-Solutions/desktopyummv
Desktopyummv
2023-08-04 16:03:20 -04:00
m0duspwnens
89c4f58296 fix indents 2023-08-04 15:41:10 -04:00
m0duspwnens
0ba1e7521a set default session for preexisting users 2023-08-04 15:36:44 -04:00
m0duspwnens
36747cf940 add networkminer to desktop.packages 2023-08-04 13:52:01 -04:00
Doug Burks
118088c35f Merge pull request #10953 from Security-Onion-Solutions/dougburks-patch-1
FEATURE: soup should rotate its log file #10951
2023-08-04 12:38:21 -04:00
Doug Burks
63373710b4 Update soup to rotate log file 2023-08-04 12:26:36 -04:00
Doug Burks
209da766ba Update soup to rotate log file 2023-08-04 12:16:14 -04:00
m0duspwnens
433cde0f9e Merge remote-tracking branch 'origin/2.4/dev' into desktopyummv 2023-08-04 11:25:06 -04:00
Josh Patterson
9fe9256a0f Merge pull request #10950 from Security-Onion-Solutions/fix/idhfirewall
Fix/idhfirewall
2023-08-04 11:00:58 -04:00
m0duspwnens
014aeffb2a add analyst back 2023-08-04 09:56:33 -04:00
m0duspwnens
3b86b60207 Merge remote-tracking branch 'origin/2.4/dev' into fix/idhfirewall 2023-08-04 09:40:01 -04:00
m0duspwnens
0f52530d07 soc_firewall.yaml update adding idh and rename analyst to workstation 2023-08-04 09:37:58 -04:00
m0duspwnens
726ec72350 allow idh to connect to salt_manager ports on managres 2023-08-04 09:22:59 -04:00
Doug Burks
560ec9106d Merge pull request #10948 from Security-Onion-Solutions/dougburks-patch-1
Update so-whiptail
2023-08-04 09:21:55 -04:00
m0duspwnens
a51acfc314 rename analyst to workstation for fw rules. allow workstation to connect to salt_manager port on managers 2023-08-04 09:17:22 -04:00
Doug Burks
78950ebfbb Update so-whiptail 2023-08-04 09:16:58 -04:00
Josh Brower
d3ae2b03f0 Merge pull request #10947 from Security-Onion-Solutions/2.4/comm_id
Generate community_id for defend endpoint logs
2023-08-04 09:07:35 -04:00
Josh Brower
dd1fa51eb5 Generate community_id for defend endpoint logs 2023-08-04 09:03:17 -04:00
m0duspwnens
682289ef23 add sensoroni ports where missing 2023-08-04 09:01:09 -04:00
m0duspwnens
593cdbd060 add rules for idh to connect to managers, change idh from sensor to idh in so-firewall-minion 2023-08-04 08:50:06 -04:00
Josh Brower
4ed0ba5040 Merge pull request #10946 from Security-Onion-Solutions/2.4/logstashfix
Don't watch certs on search nodes
2023-08-03 19:01:13 -04:00
Josh Brower
2472d6a727 Don't watch certs on search nodes 2023-08-03 18:52:29 -04:00
Mike Reeves
18e31a4490 Merge pull request #10944 from Security-Onion-Solutions/raid
Raid refactor + yara and rule proxy
2023-08-03 17:18:19 -04:00
Mike Reeves
2caca92082 Raid refactor + yara and rule proxy 2023-08-03 17:11:43 -04:00
weslambert
abf74e0ae4 Merge pull request #10940 from Security-Onion-Solutions/foxtrot
Add time shift for so-import-evtx
2023-08-03 16:56:40 -04:00
Josh Brower
dc7ce5ba8f Merge pull request #10941 from Security-Onion-Solutions/2.4/defendupdate
Update for 8.8.2
2023-08-03 16:28:56 -04:00
Josh Brower
6b5343f582 Update for 8.8.2 2023-08-03 16:25:02 -04:00
weslambert
ca6276b922 Update VERSION 2023-08-03 15:58:33 -04:00
weslambert
3e4136e641 Update help text 2023-08-03 15:56:05 -04:00
m0duspwnens
15b8e1a753 add convert-gnome-classic.sh 2023-08-03 15:37:26 -04:00
Doug Burks
b7197bbd16 Merge pull request #10939 from Security-Onion-Solutions/dougburks-patch-1
Update soup for airgap
2023-08-03 15:28:28 -04:00
Josh Brower
8966617508 Merge pull request #10926 from Security-Onion-Solutions/2.4/FleetEnhancments
2.4/fleet-Enhancements
2023-08-03 15:28:03 -04:00
Doug Burks
9319c3f2e1 Update soup for airgap 2023-08-03 15:27:24 -04:00
m0duspwnens
d4fbf7d6a6 convert to gnome classic 2023-08-03 15:26:43 -04:00
Josh Brower
e78fcbc6cb Refactor for Jinja instead 2023-08-03 15:25:11 -04:00
Josh Brower
27b70cbf68 Use jinja instead 2023-08-03 15:21:20 -04:00
Josh Patterson
ffb54135d1 Merge pull request #10938 from Security-Onion-Solutions/desktopyummv
Desktopyummv
2023-08-03 14:54:29 -04:00
m0duspwnens
d40a8927c3 install salt version specified in master.defaults.yaml for desktop 2023-08-03 14:51:43 -04:00
m0duspwnens
9172e10dba check if there are files in yum.repos.d before trying to move them 2023-08-03 14:47:53 -04:00
Doug Burks
1907ea805c Merge pull request #10937 from Security-Onion-Solutions/dougburks-patch-1
Update soup for airgap
2023-08-03 14:39:53 -04:00
Doug Burks
80598d7f8d Update soup for airgap 2023-08-03 14:36:47 -04:00
Josh Patterson
13c3e7f5ff Merge pull request #10934 from Security-Onion-Solutions/fix/soupairgap
ensure AIRGAP is lowercase and check for true
2023-08-03 12:00:06 -04:00
m0duspwnens
d4389d5057 ensure AIRGAP is lowercase and check for true 2023-08-03 11:56:48 -04:00
weslambert
cf2233bbb6 Add help information for time shift 2023-08-03 08:54:54 -04:00
weslambert
3847863b3d Add time shift 2023-08-03 08:51:23 -04:00
weslambert
3368789b43 Update VERSION 2023-08-03 08:49:45 -04:00
Josh Brower
1bc7bbc76e Refactor custom_fqdn 2023-08-02 20:02:37 -04:00
Jason Ertel
e108bb9bcd Merge pull request #10932 from Security-Onion-Solutions/jertel/agentcommon
remove unused vars
2023-08-02 19:29:03 -04:00
Jason Ertel
5414b0756c remove unused vars 2023-08-02 19:25:07 -04:00
Jason Ertel
11c827927c Merge pull request #10931 from Security-Onion-Solutions/jertel/agentcommon
refactor elastic-agent download for soup ctrl+c anomalies
2023-08-02 19:20:45 -04:00
Jason Ertel
3054b8dcb9 refactor elastic-agent download for soup ctrl+c anomalies 2023-08-02 18:57:46 -04:00
Josh Brower
399758cd5f Merge remote-tracking branch 'origin/2.4/dev' into 2.4/FleetEnhancments 2023-08-02 17:58:48 -04:00
Josh Brower
1c8a8c460c Restart logstash when certs change 2023-08-02 17:53:29 -04:00
Josh Brower
ab28cee7cf Allow multiple Custom Fleet FQDN 2023-08-02 17:45:37 -04:00
Mike Reeves
5a3c1f0373 Merge pull request #10930 from Security-Onion-Solutions/m0duspwnens-patch-2
add gtk2
2023-08-02 16:58:38 -04:00
Josh Patterson
435da77388 add gtk2 2023-08-02 16:53:45 -04:00
Mike Reeves
da2910e36f Merge pull request #10927 from Security-Onion-Solutions/m0duspwnens-patch-1
add mono-devel
2023-08-02 16:22:09 -04:00
Josh Patterson
eb512d9aa2 add mono-devel 2023-08-02 16:21:23 -04:00
Mike Reeves
03f5e44be7 Merge pull request #10924 from Security-Onion-Solutions/2.4/regenagent
Regen Agent Installers
2023-08-02 15:28:29 -04:00
Josh Brower
f153c1125d Allow multiple Custom Fleet FQDN 2023-08-02 15:23:18 -04:00
Jason Ertel
99b61b5e1d Merge pull request #10925 from Security-Onion-Solutions/jertel/fiximportsuri
ensure suri rules are synced for import installs
2023-08-02 15:13:59 -04:00
Jason Ertel
8036df4b20 ensure suri rules are synced for import installs 2023-08-02 15:10:31 -04:00
Josh Brower
aab55c8cf6 Regen Agent Installers 2023-08-02 15:09:26 -04:00
Josh Patterson
f3c5d26a4e Merge pull request #10923 from Security-Onion-Solutions/soupaloop
Soupaloop
2023-08-02 14:44:49 -04:00
m0duspwnens
64776936cc no longer need so-user migrate in 2.4 2023-08-02 14:09:43 -04:00
m0duspwnens
c17b324108 dont count adv_ sls files for number of minions in deployment 2023-08-02 14:04:19 -04:00
weslambert
72e1cbbfb6 Merge pull request #10920 from Security-Onion-Solutions/fix/pfsense
Pfsense fix
2023-08-02 13:27:33 -04:00
weslambert
f102351052 Add event 2023-08-02 13:25:44 -04:00
weslambert
ac28f90af3 Remove override 2023-08-02 13:15:11 -04:00
m0duspwnens
f6c6204555 procps to procps-ng 2023-08-02 13:05:24 -04:00
m0duspwnens
9873121000 change pgrep for salt-minion PID 2023-08-02 12:54:31 -04:00
m0duspwnens
5630b353c4 change how pgrep finds salt-master PID 2023-08-02 11:20:51 -04:00
Josh Patterson
04ed5835ae Merge pull request #10918 from Security-Onion-Solutions/issue/10917
force portgroups added to hostgroups in roles to be list of strings
2023-08-02 11:00:41 -04:00
m0duspwnens
407cb2a537 force portgroups added to hostgroups in roles to be list of strings 2023-08-02 10:56:41 -04:00
Josh Brower
b520c1abb7 Allow multiple Custom Fleet FQDN 2023-08-02 10:36:40 -04:00
weslambert
25b11c35fb Merge pull request #10915 from Security-Onion-Solutions/fix/ea_elastic_defend
Set version for Elastic Defend and enable updates
2023-08-02 10:32:30 -04:00
weslambert
ef0301d364 Merge pull request #10914 from Security-Onion-Solutions/feature/package_list
Add package list
2023-08-02 10:03:38 -04:00
Wes
e694019027 Add package list 2023-08-02 13:50:14 +00:00
weslambert
22ebb2faf6 Merge pull request #10907 from Security-Onion-Solutions/fix/ea_container_logs
EA Container Logs
2023-08-02 09:26:53 -04:00
Wes
0d5ed2e835 Set version for Elastic Defend and enable updates 2023-08-02 13:21:03 +00:00
Josh Patterson
8ab1769d70 Merge pull request #10912 from Security-Onion-Solutions/mineerror
Mine error
2023-08-01 17:21:31 -04:00
Jason Ertel
6692fffb9b Merge pull request #10910 from Security-Onion-Solutions/jertel/noautoredirforapi
Fix login flicker; so-status sluggishness
2023-08-01 17:05:48 -04:00
Jason Ertel
23414599ee use simple json (w/o template) to resolve sluggishness 2023-08-01 16:53:26 -04:00
Jason Ertel
8b3a38f573 resolve login page flicker 2023-08-01 16:30:24 -04:00
m0duspwnens
9ec4322bf4 Merge remote-tracking branch 'origin/2.4/dev' into mineerror 2023-08-01 16:21:22 -04:00
m0duspwnens
7037fc52f8 sync all modules before running states 2023-08-01 16:21:06 -04:00
Wes
0e047cffad Add to logrotate 2023-08-01 20:14:53 +00:00
Wes
44b086a028 Change path 2023-08-01 20:13:50 +00:00
Wes
4e2eb86b36 Move LOGS_PATH to environment vars 2023-08-01 20:11:51 +00:00
weslambert
1cbf60825d Add log dir 2023-08-01 14:40:52 -04:00
weslambert
2d13bf1a61 Present logs to the host 2023-08-01 14:40:12 -04:00
Josh Brower
968fee3488 Regen Agent Installers when Fleet URLs change 2023-08-01 13:10:41 -04:00
Doug Burks
da51fd59a0 Merge pull request #10905 from Security-Onion-Solutions/dougburks-patch-1
Update verbiage and links in soc_sensor.yaml
2023-08-01 12:52:22 -04:00
Doug Burks
3fa0a98830 Update verbiage and links in soc_sensor.yaml 2023-08-01 12:45:09 -04:00
weslambert
e7bef745eb Merge pull request #10904 from Security-Onion-Solutions/fix/syslog
Move syslog to the INPUT chain where needed
2023-08-01 12:14:48 -04:00
Mike Reeves
82b335ed04 Merge pull request #10899 from Security-Onion-Solutions/offload
Fix Offload
2023-08-01 10:32:53 -04:00
Mike Reeves
f35f42c83d Sensor NIC offload 2023-08-01 10:23:45 -04:00
weslambert
4adaddf13f Move syslog to the INPUT chain where needed 2023-08-01 10:14:59 -04:00
Mike Reeves
b6579d7d45 Sensor NIC offload 2023-08-01 10:13:44 -04:00
Mike Reeves
87a5d20ac9 Sensor NIC offload 2023-08-01 10:03:59 -04:00
Mike Reeves
2875a7a2e5 Sensor NIC offload 2023-08-01 09:48:44 -04:00
Josh Brower
f27ebc47c1 Merge pull request #10897 from Security-Onion-Solutions/2.4/heavyrc2
2.4/heavyrc2
2023-08-01 09:15:10 -04:00
Josh Brower
63b4bdcebe Merge remote-tracking branch 'origin/2.4/dev' into 2.4/heavyrc2 2023-08-01 08:53:07 -04:00
weslambert
ba3660d0da Merge pull request #10894 from Security-Onion-Solutions/fix/soc_auth
SOC Auth msg fix
2023-08-01 08:35:41 -04:00
weslambert
83265d9d6c Merge pull request #10893 from Security-Onion-Solutions/foxtrot
Elastic 8.2.2
2023-08-01 08:20:07 -04:00
weslambert
527a6ba454 Use asterisk when searching 'msg' since it is now a keyword 2023-07-31 23:52:38 -04:00
weslambert
f84b0a3219 Update VERSION 2023-07-31 23:16:46 -04:00
weslambert
ae6997a6b7 Merge pull request #10892 from Security-Onion-Solutions/feature/elastic_8.8.2
Elastic 8.8.2
2023-07-31 22:24:21 -04:00
weslambert
9d59e4250f Update VERSION 2023-07-31 22:23:54 -04:00
Wes
48d9c14563 Enable log package by default 2023-08-01 02:20:43 +00:00
Wes
29b64eadd4 Change log.log to log.logs 2023-08-01 02:20:22 +00:00
weslambert
5dd5f9fc1c Elastic 8.8.2 2023-07-31 22:18:43 -04:00
weslambert
44c926ba8d Elastic 8.8.2 2023-07-31 22:18:07 -04:00
weslambert
6a55a8e5c0 Elastic 8.2.2 2023-07-31 22:17:22 -04:00
Josh Brower
64bad0a9cf Merge remote-tracking branch 'origin/2.4/dev' into 2.4/heavyrc2 2023-07-31 15:24:32 -04:00
Josh Brower
b6dd347eb8 Heavy Node add manager 2023-07-31 15:22:29 -04:00
Josh Brower
a89508f1ae Heavy Node fixes 2023-07-31 15:17:24 -04:00
Josh Patterson
ed7b674fbb Merge pull request #10891 from Security-Onion-Solutions/fix/idh
import DOCKER in idh.enabled
2023-07-31 15:06:26 -04:00
Josh Patterson
0c2a4cbaba Merge pull request #10889 from Security-Onion-Solutions/searchnodefw
add managersearch and standlone fw rules for searchnode
2023-07-31 13:37:39 -04:00
m0duspwnens
57562ad5e3 add managersearch and standlone fw rules for searchnode 2023-07-31 13:34:08 -04:00
m0duspwnens
95581f505a import DOCKER in idh.enabled 2023-07-31 13:18:57 -04:00
Mike Reeves
599de60dc8 Merge pull request #10888 from Security-Onion-Solutions/soups
Update Soup
2023-07-31 13:14:54 -04:00
Mike Reeves
77101fec12 Update Soup 2023-07-31 13:12:32 -04:00
Mike Reeves
069d32be1a Merge pull request #10887 from Security-Onion-Solutions/soups
Soup
2023-07-31 13:10:02 -04:00
Mike Reeves
e78e6b74ed Update Soup 2023-07-31 13:07:29 -04:00
Mike Reeves
16217912db Update Soup 2023-07-31 13:04:33 -04:00
Josh Patterson
635ddc9b21 Merge pull request #10886 from Security-Onion-Solutions/iptables
Iptables
2023-07-31 11:36:22 -04:00
Mike Reeves
18d8f0d448 Merge pull request #10885 from Security-Onion-Solutions/sensorfix
Sensor Fix
2023-07-31 10:37:28 -04:00
Mike Reeves
1c42d70d30 Update soc_sensor.yaml 2023-07-31 10:36:00 -04:00
Mike Reeves
282f13a774 Merge pull request #10881 from Security-Onion-Solutions/TOoSmOotH-patch-1
Update so-yara-download
2023-07-31 10:23:32 -04:00
Mike Reeves
f867be9e04 Fix no_proxy 2023-07-31 10:19:51 -04:00
Mike Reeves
4939447764 Update so-yara-download 2023-07-31 10:16:37 -04:00
Mike Reeves
5a59975cb8 Update so-yara-download 2023-07-31 10:14:31 -04:00
coreyogburn
20f3cedc01 Merge pull request #10842 from Security-Onion-Solutions/cogburn/7992
New Action "Add to Case"
2023-07-28 14:54:28 -06:00
Doug Burks
e563d71856 Merge pull request #10871 from Security-Onion-Solutions/dougburks-patch-1
Update README.md to 2.4 RC2
2023-07-28 16:33:06 -04:00
Doug Burks
1ca78fd297 Update README.md to 2.4 RC2 2023-07-28 16:29:46 -04:00
Mike Reeves
e76ee718e0 Merge pull request #10870 from Security-Onion-Solutions/TOoSmOotH-patch-1
Update VERSION
2023-07-28 16:08:53 -04:00
Mike Reeves
5c90a5f27e Update VERSION 2023-07-28 16:08:01 -04:00
m0duspwnens
ecbb353d68 Merge remote-tracking branch 'origin/2.4/dev' into iptables 2023-07-28 15:12:08 -04:00
Corey Ogburn
aa56085758 New Action "Add to Case" 2023-07-28 09:55:44 -06:00
m0duspwnens
4c8373452d change to iptables-nft-services 2023-07-28 11:35:34 -04:00
m0duspwnens
3a22ef8e86 change iptables package name for redhat fam 2023-07-28 08:40:32 -04:00
m0duspwnens
54080c42fe enable, not enabled 2023-07-27 17:01:19 -04:00
m0duspwnens
12486599e0 Merge remote-tracking branch 'origin/2.4/dev' into iptables 2023-07-27 16:13:58 -04:00
m0duspwnens
3c16218c5a map services,pkg,config for firewall state 2023-07-27 15:45:18 -04:00
74 changed files with 971 additions and 577 deletions

View File

@@ -1,18 +1,18 @@
### 2.4.4-20230728 ISO image built on 2023/07/28 ### 2.4.5-20230807 ISO image released on 2023/08/07
### Download and Verify ### Download and Verify
2.4.4-20230728 ISO image: 2.4.5-20230807 ISO image:
https://download.securityonion.net/file/securityonion/securityonion-2.4.4-20230728.iso https://download.securityonion.net/file/securityonion/securityonion-2.4.5-20230807.iso
MD5: F63E76245F3E745B5BDE9E6E647A7CB6 MD5: F83FD635025A3A65B380EAFCEB61A92E
SHA1: 6CE4E4A3399CD282D4F8592FB19D510388AB3EEA SHA1: 5864D4CD520617E3328A3D956CAFCC378A8D2D08
SHA256: BF8FEB91B1D94B67C3D4A79D209B068F4A46FEC7C15EEF65B0FCE9851D7E6C9F SHA256: D333BAE0DD198DFD80DF59375456D228A4E18A24EDCDB15852CD4CA3F92B69A7
Signature for ISO image: Signature for ISO image:
https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.4-20230728.iso.sig https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.5-20230807.iso.sig
Signing key: Signing key:
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/KEYS https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/KEYS
@@ -26,22 +26,22 @@ wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.
Download the signature file for the ISO: Download the signature file for the ISO:
``` ```
wget https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.4-20230728.iso.sig wget https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.5-20230807.iso.sig
``` ```
Download the ISO image: Download the ISO image:
``` ```
wget https://download.securityonion.net/file/securityonion/securityonion-2.4.4-20230728.iso wget https://download.securityonion.net/file/securityonion/securityonion-2.4.5-20230807.iso
``` ```
Verify the downloaded ISO image using the signature file: Verify the downloaded ISO image using the signature file:
``` ```
gpg --verify securityonion-2.4.4-20230728.iso.sig securityonion-2.4.4-20230728.iso gpg --verify securityonion-2.4.5-20230807.iso.sig securityonion-2.4.5-20230807.iso
``` ```
The output should show "Good signature" and the Primary key fingerprint should match what's shown below: The output should show "Good signature" and the Primary key fingerprint should match what's shown below:
``` ```
gpg: Signature made Tue 11 Jul 2023 06:23:37 PM EDT using RSA key ID FE507013 gpg: Signature made Sat 05 Aug 2023 10:12:46 AM EDT using RSA key ID FE507013
gpg: Good signature from "Security Onion Solutions, LLC <info@securityonionsolutions.com>" gpg: Good signature from "Security Onion Solutions, LLC <info@securityonionsolutions.com>"
gpg: WARNING: This key is not certified with a trusted signature! gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner. gpg: There is no indication that the signature belongs to the owner.

View File

@@ -1,6 +1,6 @@
## Security Onion 2.4 Release Candidate 1 (RC1) ## Security Onion 2.4 Release Candidate 2 (RC2)
Security Onion 2.4 Release Candidate 1 (RC1) is here! Security Onion 2.4 Release Candidate 2 (RC2) is here!
## Screenshots ## Screenshots

View File

@@ -1 +1 @@
2.4.4 2.4.5

View File

@@ -17,6 +17,7 @@ commonpkgs:
- netcat-openbsd - netcat-openbsd
- sqlite3 - sqlite3
- libssl-dev - libssl-dev
- procps
- python3-dateutil - python3-dateutil
- python3-docker - python3-docker
- python3-packaging - python3-packaging
@@ -70,6 +71,7 @@ commonpkgs:
- net-tools - net-tools
- nmap-ncat - nmap-ncat
- openssl - openssl
- procps-ng
- python3-dnf-plugin-versionlock - python3-dnf-plugin-versionlock
- python3-docker - python3-docker
- python3-m2crypto - python3-m2crypto

View File

@@ -5,7 +5,16 @@
# https://securityonion.net/license; you may not use this file except in compliance with the # https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0. # Elastic License 2.0.
ELASTIC_AGENT_TARBALL_VERSION="8.7.1" # Elastic agent is not managed by salt. Because of this we must store this base information in a
# script that accompanies the soup system. Since so-common is one of those special soup files,
# and since this same logic is required during installation, it's included in this file.
ELASTIC_AGENT_TARBALL_VERSION="8.8.2"
ELASTIC_AGENT_URL="https://repo.securityonion.net/file/so-repo/prod/2.4/elasticagent/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.tar.gz"
ELASTIC_AGENT_MD5_URL="https://repo.securityonion.net/file/so-repo/prod/2.4/elasticagent/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.md5"
ELASTIC_AGENT_FILE="/nsm/elastic-fleet/artifacts/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.tar.gz"
ELASTIC_AGENT_MD5="/nsm/elastic-fleet/artifacts/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.md5"
ELASTIC_AGENT_EXPANSION_DIR=/nsm/elastic-fleet/artifacts/beats/elastic-agent
DEFAULT_SALT_DIR=/opt/so/saltstack/default DEFAULT_SALT_DIR=/opt/so/saltstack/default
DOC_BASE_URL="https://docs.securityonion.net/en/2.4" DOC_BASE_URL="https://docs.securityonion.net/en/2.4"
@@ -161,6 +170,34 @@ disable_fastestmirror() {
sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
} }
download_and_verify() {
source_url=$1
source_md5_url=$2
dest_file=$3
md5_file=$4
expand_dir=$5
if [[ -n "$expand_dir" ]]; then
mkdir -p "$expand_dir"
fi
if ! verify_md5_checksum "$dest_file" "$md5_file"; then
retry 15 10 "curl --fail --retry 5 --retry-delay 15 -L '$source_url' --output '$dest_file'" "" ""
retry 15 10 "curl --fail --retry 5 --retry-delay 15 -L '$source_md5_url' --output '$md5_file'" "" ""
if verify_md5_checksum "$dest_file" "$md5_file"; then
echo "Source file and checksum are good."
else
echo "Unable to download and verify the source file and checksum."
return 1
fi
fi
if [[ -n "$expand_dir" ]]; then
tar -xf "$dest_file" -C "$expand_dir"
fi
}
elastic_license() { elastic_license() {
read -r -d '' message <<- EOM read -r -d '' message <<- EOM
@@ -211,7 +248,7 @@ gpg_rpm_import() {
echo "Imported $RPMKEY" echo "Imported $RPMKEY"
done done
elif [[ $is_rpm ]]; then elif [[ $is_rpm ]]; then
info "Importing the security onion GPG key" echo "Importing the security onion GPG key"
rpm --import ../salt/repo/client/files/oracle/keys/securityonion.pub rpm --import ../salt/repo/client/files/oracle/keys/securityonion.pub
fi fi
} }
@@ -225,12 +262,15 @@ init_monitor() {
if [[ $MONITORNIC == "bond0" ]]; then if [[ $MONITORNIC == "bond0" ]]; then
BIFACES=$(lookup_bond_interfaces) BIFACES=$(lookup_bond_interfaces)
for i in rx tx sg tso ufo gso gro lro rx-vlan-offload tx-vlan-offload generic-receive-offload generic-segmentation-offload tcp-segmentation-offload; do
ethtool -K "$MONITORNIC" "$i" off;
done
else else
BIFACES=$MONITORNIC BIFACES=$MONITORNIC
fi fi
for DEVICE_IFACE in $BIFACES; do for DEVICE_IFACE in $BIFACES; do
for i in rx tx sg tso ufo gso gro lro; do for i in rx tx sg tso ufo gso gro lro rx-vlan-offload tx-vlan-offload generic-receive-offload generic-segmentation-offload tcp-segmentation-offload; do
ethtool -K "$DEVICE_IFACE" "$i" off; ethtool -K "$DEVICE_IFACE" "$i" off;
done done
ip link set dev "$DEVICE_IFACE" arp off multicast off allmulticast off promisc on ip link set dev "$DEVICE_IFACE" arp off multicast off allmulticast off promisc on
@@ -467,6 +507,11 @@ has_uppercase() {
|| return 1 || return 1
} }
update_elastic_agent() {
echo "Checking if Elastic Agent update is necessary..."
download_and_verify "$ELASTIC_AGENT_URL" "$ELASTIC_AGENT_MD5_URL" "$ELASTIC_AGENT_FILE" "$ELASTIC_AGENT_MD5" "$ELASTIC_AGENT_EXPANSION_DIR"
}
valid_cidr() { valid_cidr() {
# Verify there is a backslash in the string # Verify there is a backslash in the string
echo "$1" | grep -qP "^[^/]+/[^/]+$" || return 1 echo "$1" | grep -qP "^[^/]+/[^/]+$" || return 1
@@ -620,6 +665,23 @@ valid_username() {
echo "$user" | grep -qP '^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$' && return 0 || return 1 echo "$user" | grep -qP '^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$' && return 0 || return 1
} }
verify_md5_checksum() {
data_file=$1
md5_file=${2:-${data_file}.md5}
if [[ ! -f "$dest_file" || ! -f "$md5_file" ]]; then
return 2
fi
SOURCEHASH=$(md5sum "$data_file" | awk '{ print $1 }')
HASH=$(cat "$md5_file")
if [[ "$HASH" == "$SOURCEHASH" ]]; then
return 0
fi
return 1
}
wait_for_web_response() { wait_for_web_response() {
url=$1 url=$1
expected=$2 expected=$2

View File

@@ -103,7 +103,7 @@ def output(options, console, code, data):
def check_container_status(options, console): def check_container_status(options, console):
code = 0 code = 0
cli = "docker" cli = "docker"
proc = subprocess.run([cli, 'ps', '--format', '{{json .}}'], stdout=subprocess.PIPE, encoding="utf-8") proc = subprocess.run([cli, 'ps', '--format', 'json'], stdout=subprocess.PIPE, encoding="utf-8")
if proc.returncode != 0: if proc.returncode != 0:
fail("Container system error; unable to obtain container process statuses") fail("Container system error; unable to obtain container process statuses")

View File

@@ -27,6 +27,8 @@ Imports one or more evtx files into Security Onion. The evtx files will be analy
Options: Options:
--json Outputs summary in JSON format. Implies --quiet. --json Outputs summary in JSON format. Implies --quiet.
--quiet Silences progress information to stdout. --quiet Silences progress information to stdout.
--shift Adds a time shift. Accepts a single argument that is intended to be the date of the last record, and shifts the dates of the previous records accordingly.
Ex. sudo so-import-evtx --shift "2023-08-01 01:01:01" example.evtx
EOF EOF
} }
@@ -44,6 +46,10 @@ while [[ $# -gt 0 ]]; do
--quiet) --quiet)
quiet=1 quiet=1
;; ;;
--shift)
SHIFTDATE=$1
shift
;;
-*) -*)
echo "Encountered unexpected parameter: $param" echo "Encountered unexpected parameter: $param"
usage usage
@@ -68,8 +74,10 @@ function status {
function evtx2es() { function evtx2es() {
EVTX=$1 EVTX=$1
HASH=$2 HASH=$2
SHIFTDATE=$3
docker run --rm \ docker run --rm \
-e "SHIFTTS=$SHIFTDATE" \
-v "$EVTX:/tmp/data.evtx" \ -v "$EVTX:/tmp/data.evtx" \
-v "/nsm/import/$HASH/evtx/:/tmp/evtx/" \ -v "/nsm/import/$HASH/evtx/:/tmp/evtx/" \
-v "/nsm/import/evtx-end_newest:/tmp/newest" \ -v "/nsm/import/evtx-end_newest:/tmp/newest" \
@@ -113,7 +121,9 @@ echo $END_NEWEST > /nsm/import/evtx-end_newest
for EVTX in $INPUT_FILES; do for EVTX in $INPUT_FILES; do
EVTX=$(/usr/bin/realpath "$EVTX") EVTX=$(/usr/bin/realpath "$EVTX")
status "Processing Import: ${EVTX}" status "Processing Import: ${EVTX}"
if ! [ -z "$SHIFTDATE" ]; then
status "- timeshifting logs to end date of $SHIFTDATE"
fi
# generate a unique hash to assist with dedupe checks # generate a unique hash to assist with dedupe checks
HASH=$(md5sum "${EVTX}" | awk '{ print $1 }') HASH=$(md5sum "${EVTX}" | awk '{ print $1 }')
HASH_DIR=/nsm/import/${HASH} HASH_DIR=/nsm/import/${HASH}
@@ -136,7 +146,7 @@ for EVTX in $INPUT_FILES; do
# import evtx and write them to import ingest pipeline # import evtx and write them to import ingest pipeline
status "- importing logs to Elasticsearch..." status "- importing logs to Elasticsearch..."
evtx2es "${EVTX}" $HASH evtx2es "${EVTX}" $HASH "$SHIFTDATE"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
INVALID_EVTXS_COUNT=$((INVALID_EVTXS_COUNT + 1)) INVALID_EVTXS_COUNT=$((INVALID_EVTXS_COUNT + 1))
status "- WARNING: This evtx file may not have fully imported successfully" status "- WARNING: This evtx file may not have fully imported successfully"

View File

@@ -9,25 +9,26 @@
. /usr/sbin/so-common . /usr/sbin/so-common
appliance_check() { {%- if salt['grains.get']('sosmodel', '') %}
{%- if salt['grains.get']('sosmodel', '') %} {%- set model = salt['grains.get']('sosmodel') %}
APPLIANCE=1 model={{ model }}
{%- if grains['sosmodel'] in ['SO2AMI01', 'SO2GCI01', 'SO2AZI01'] %} # Don't need cloud images to use this
if [[ $model =~ ^(SO2AMI01|SO2AZI01|SO2GCI01)$ ]]; then
exit 0 exit 0
{%- endif %} fi
DUDEYOUGOTADELL=$(dmidecode |grep Dell) {%- else %}
if [[ -n $DUDEYOUGOTADELL ]]; then echo "This is not an appliance"
APPTYPE=dell exit 0
else {%- endif %}
APPTYPE=sm if [[ $model =~ ^(SOS10K|SOS500|SOS1000|SOS1000F|SOS4000|SOSSN7200|SOSSNNV|SOSMN)$ ]]; then
fi is_bossraid=true
mkdir -p /opt/so/log/raid fi
if [[ $model =~ ^(SOSSNNV|SOSMN)$ ]]; then
{%- else %} is_swraid=true
echo "This is not an appliance" fi
exit 0 if [[ $model =~ ^(SOS10K|SOS500|SOS1000|SOS1000F|SOS4000|SOSSN7200)$ ]]; then
{%- endif %} is_hwraid=true
} fi
check_nsm_raid() { check_nsm_raid() {
PERCCLI=$(/opt/raidtools/perccli/perccli64 /c0/v0 show|grep RAID|grep Optl) PERCCLI=$(/opt/raidtools/perccli/perccli64 /c0/v0 show|grep RAID|grep Optl)
@@ -49,61 +50,44 @@ check_nsm_raid() {
check_boss_raid() { check_boss_raid() {
MVCLI=$(/usr/local/bin/mvcli info -o vd |grep status |grep functional) MVCLI=$(/usr/local/bin/mvcli info -o vd |grep status |grep functional)
if [[ -n $DUDEYOUGOTADELL ]]; then
if [[ -n $MVCLI ]]; then if [[ -n $MVCLI ]]; then
BOSSRAID=0 BOSSRAID=0
else else
BOSSRAID=1 BOSSRAID=1
fi fi
fi
} }
check_software_raid() { check_software_raid() {
if [[ -n $DUDEYOUGOTADELL ]]; then
SWRC=$(grep "_" /proc/mdstat) SWRC=$(grep "_" /proc/mdstat)
if [[ -n $SWRC ]]; then if [[ -n $SWRC ]]; then
# RAID is failed in some way # RAID is failed in some way
SWRAID=1 SWRAID=1
else else
SWRAID=0 SWRAID=0
fi fi
fi
} }
# This script checks raid status if you use SO appliances # Set everything to 0
SWRAID=0
BOSSRAID=0
HWRAID=0
# See if this is an appliance if [[ $is_hwraid ]]; then
check_nsm_raid
fi
if [[ $is_bossraid ]]; then
check_boss_raid
fi
if [[ $is_swraid ]]; then
check_software_raid
fi
appliance_check sum=$(($SWRAID + $BOSSRAID + $HWRAID))
check_nsm_raid
check_boss_raid
{%- if salt['grains.get']('sosmodel', '') %}
{%- if grains['sosmodel'] in ['SOSMN', 'SOSSNNV'] %}
check_software_raid
{%- endif %}
{%- endif %}
if [[ -n $SWRAID ]]; then if [[ $sum == "0" ]]; then
if [[ $SWRAID == '0' && $BOSSRAID == '0' ]]; then
RAIDSTATUS=0 RAIDSTATUS=0
else else
RAIDSTATUS=1 RAIDSTATUS=1
fi
elif [[ -n $DUDEYOUGOTADELL ]]; then
if [[ $BOSSRAID == '0' && $HWRAID == '0' ]]; then
RAIDSTATUS=0
else
RAIDSTATUS=1
fi
elif [[ "$APPTYPE" == 'sm' ]]; then
if [[ -n "$HWRAID" ]]; then
RAIDSTATUS=0
else
RAIDSTATUS=1
fi
fi fi
echo "nsmraid=$RAIDSTATUS" > /opt/so/log/raid/status.log echo "nsmraid=$RAIDSTATUS" > /opt/so/log/raid/status.log

View File

@@ -0,0 +1,7 @@
# This file is managed by Salt in the desktop.xwindows state
# It will not be overwritten if it already exists
[User]
Session=gnome-classic
Icon=/home/{{USERNAME}}/.face
SystemAccount=false

View File

@@ -181,6 +181,7 @@ desktop_packages:
- gstreamer1-plugins-good-gtk - gstreamer1-plugins-good-gtk
- gstreamer1-plugins-ugly-free - gstreamer1-plugins-ugly-free
- gtk-update-icon-cache - gtk-update-icon-cache
- gtk2
- gtk3 - gtk3
- gtk4 - gtk4
- gtkmm30 - gtkmm30
@@ -295,6 +296,7 @@ desktop_packages:
- mesa-vulkan-drivers - mesa-vulkan-drivers
- microcode_ctl - microcode_ctl
- mobile-broadband-provider-info - mobile-broadband-provider-info
- mono-devel
- mpfr - mpfr
- mpg123-libs - mpg123-libs
- mtdev - mtdev
@@ -347,6 +349,7 @@ desktop_packages:
- snappy - snappy
- sound-theme-freedesktop - sound-theme-freedesktop
- soundtouch - soundtouch
- securityonion-networkminer
- speech-dispatcher - speech-dispatcher
- speech-dispatcher-espeak-ng - speech-dispatcher-espeak-ng
- speex - speex

View File

@@ -0,0 +1,4 @@
#!/bin/bash
echo "Setting default session to gnome-classic"
cp /usr/share/accountsservice/user-templates/standard /etc/accountsservice/user-templates/
sed -i 's|Session=gnome|Session=gnome-classic|g' /etc/accountsservice/user-templates/standard

View File

@@ -14,6 +14,27 @@ graphical_target:
- require: - require:
- desktop_packages - desktop_packages
convert_gnome_classic:
cmd.script:
- name: salt://desktop/scripts/convert-gnome-classic.sh
{% for username in salt['file.find'](path='/home/',mindepth=1,maxdepth=1,type='d') %}
{% set username = username.split('/')[2] %}
{% if username != 'zeek' %}
{% if not salt['file.file_exists']('/var/lib/AccountsService/users/' ~ username) %}
{{username}}_session:
file.managed:
- name: /var/lib/AccountsService/users/{{username}}
- source: salt://desktop/files/session.jinja
- template: jinja
- defaults:
USERNAME: {{username}}
{% endif %}
{% endif %}
{% endfor %}
{% else %} {% else %}
desktop_xwindows_os_fail: desktop_xwindows_os_fail:

View File

@@ -28,6 +28,13 @@ elasticagentconfdir:
- group: 939 - group: 939
- makedirs: True - makedirs: True
elasticagentlogdir:
file.directory:
- name: /opt/so/log/elasticagent
- user: 949
- group: 939
- makedirs: True
elasticagent_sbin_jinja: elasticagent_sbin_jinja:
file.recurse: file.recurse:
- name: /usr/sbin - name: /usr/sbin

View File

@@ -33,8 +33,10 @@ so-elastic-agent:
{% endif %} {% endif %}
- binds: - binds:
- /opt/so/conf/elastic-agent/elastic-agent.yml:/usr/share/elastic-agent/elastic-agent.yml:ro - /opt/so/conf/elastic-agent/elastic-agent.yml:/usr/share/elastic-agent/elastic-agent.yml:ro
- /opt/so/log/elasticagent:/usr/share/elastic-agent/logs
- /etc/pki/tls/certs/intca.crt:/etc/pki/tls/certs/intca.crt:ro - /etc/pki/tls/certs/intca.crt:/etc/pki/tls/certs/intca.crt:ro
- /nsm:/nsm:ro - /nsm:/nsm:ro
- /opt/so/log:/opt/so/log:ro
{% if DOCKER.containers['so-elastic-agent'].custom_bind_mounts %} {% if DOCKER.containers['so-elastic-agent'].custom_bind_mounts %}
{% for BIND in DOCKER.containers['so-elastic-agent'].custom_bind_mounts %} {% for BIND in DOCKER.containers['so-elastic-agent'].custom_bind_mounts %}
- {{ BIND }} - {{ BIND }}
@@ -42,11 +44,14 @@ so-elastic-agent:
{% endif %} {% endif %}
- environment: - environment:
- FLEET_CA=/etc/pki/tls/certs/intca.crt - FLEET_CA=/etc/pki/tls/certs/intca.crt
- LOGS_PATH=logs
{% if DOCKER.containers['so-elastic-agent'].extra_env %} {% if DOCKER.containers['so-elastic-agent'].extra_env %}
{% for XTRAENV in DOCKER.containers['so-elastic-agent'].extra_env %} {% for XTRAENV in DOCKER.containers['so-elastic-agent'].extra_env %}
- {{ XTRAENV }} - {{ XTRAENV }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
- require:
- file: create-elastic-agent-config
- watch: - watch:
- file: create-elastic-agent-config - file: create-elastic-agent-config

View File

@@ -3,7 +3,7 @@
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:pass', '') %} {%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:pass', '') %}
id: aea1ba80-1065-11ee-a369-97538913b6a9 id: aea1ba80-1065-11ee-a369-97538913b6a9
revision: 2 revision: 1
outputs: outputs:
default: default:
type: elasticsearch type: elasticsearch
@@ -22,9 +22,9 @@ agent:
metrics: false metrics: false
features: {} features: {}
inputs: inputs:
- id: logfile-logs-80ffa884-2cfc-459a-964a-34df25714d85 - id: logfile-logs-fefef78c-422f-4cfa-8abf-4cd1b9428f62
name: suricata-logs name: import-evtx-logs
revision: 1 revision: 2
type: logfile type: logfile
use_output: default use_output: default
meta: meta:
@@ -33,23 +33,336 @@ inputs:
version: version:
data_stream: data_stream:
namespace: so namespace: so
package_policy_id: 80ffa884-2cfc-459a-964a-34df25714d85 package_policy_id: fefef78c-422f-4cfa-8abf-4cd1b9428f62
streams: streams:
- id: logfile-log.log-80ffa884-2cfc-459a-964a-34df25714d85 - id: logfile-log.log-fefef78c-422f-4cfa-8abf-4cd1b9428f62
data_stream:
dataset: import
paths:
- /nsm/import/*/evtx/*.json
processors:
- dissect:
field: log.file.path
tokenizer: '/nsm/import/%{import.id}/evtx/%{import.file}'
target_prefix: ''
- decode_json_fields:
fields:
- message
target: ''
- drop_fields:
ignore_missing: true
fields:
- host
- add_fields:
fields:
dataset: system.security
type: logs
namespace: default
target: data_stream
- add_fields:
fields:
dataset: system.security
module: system
imported: true
target: event
- then:
- add_fields:
fields:
dataset: windows.sysmon_operational
target: data_stream
- add_fields:
fields:
dataset: windows.sysmon_operational
module: windows
imported: true
target: event
if:
equals:
winlog.channel: Microsoft-Windows-Sysmon/Operational
- then:
- add_fields:
fields:
dataset: system.application
target: data_stream
- add_fields:
fields:
dataset: system.application
target: event
if:
equals:
winlog.channel: Application
- then:
- add_fields:
fields:
dataset: system.system
target: data_stream
- add_fields:
fields:
dataset: system.system
target: event
if:
equals:
winlog.channel: System
- then:
- add_fields:
fields:
dataset: windows.powershell_operational
target: data_stream
- add_fields:
fields:
dataset: windows.powershell_operational
module: windows
target: event
if:
equals:
winlog.channel: Microsoft-Windows-PowerShell/Operational
tags:
- import
- id: logfile-redis-fc98c947-7d17-4861-a318-7ad075f6d1b0
name: redis-logs
revision: 2
type: logfile
use_output: default
meta:
package:
name: redis
version:
data_stream:
namespace: default
package_policy_id: fc98c947-7d17-4861-a318-7ad075f6d1b0
streams:
- id: logfile-redis.log-fc98c947-7d17-4861-a318-7ad075f6d1b0
data_stream:
dataset: redis.log
type: logs
exclude_files:
- .gz$
paths:
- /opt/so/log/redis/redis.log
tags:
- redis-log
exclude_lines:
- '^\s+[\-`(''.|_]'
- id: logfile-logs-3b56803d-5ade-4c93-b25e-9b37182f66b8
name: import-suricata-logs
revision: 2
type: logfile
use_output: default
meta:
package:
name: log
version:
data_stream:
namespace: so
package_policy_id: 3b56803d-5ade-4c93-b25e-9b37182f66b8
streams:
- id: logfile-log.log-3b56803d-5ade-4c93-b25e-9b37182f66b8
data_stream:
dataset: import
pipeline: suricata.common
paths:
- /nsm/import/*/suricata/eve*.json
processors:
- add_fields:
fields:
module: suricata
imported: true
category: network
target: event
- dissect:
field: log.file.path
tokenizer: '/nsm/import/%{import.id}/suricata/%{import.file}'
target_prefix: ''
- id: logfile-logs-c327e1a3-1ebe-449c-a8eb-f6f35032e69d
name: soc-server-logs
revision: 2
type: logfile
use_output: default
meta:
package:
name: log
version:
data_stream:
namespace: so
package_policy_id: c327e1a3-1ebe-449c-a8eb-f6f35032e69d
streams:
- id: logfile-log.log-c327e1a3-1ebe-449c-a8eb-f6f35032e69d
data_stream:
dataset: soc
pipeline: common
paths:
- /opt/so/log/soc/sensoroni-server.log
processors:
- decode_json_fields:
add_error_key: true
process_array: true
max_depth: 2
fields:
- message
target: soc
- add_fields:
fields:
module: soc
dataset_temp: server
category: host
target: event
- rename:
ignore_missing: true
fields:
- from: soc.fields.sourceIp
to: source.ip
- from: soc.fields.status
to: http.response.status_code
- from: soc.fields.method
to: http.request.method
- from: soc.fields.path
to: url.path
- from: soc.message
to: event.action
- from: soc.level
to: log.level
tags:
- so-soc
- id: logfile-logs-906e0d4c-9ec3-4c6a-bef6-e347ec9fd073
name: soc-sensoroni-logs
revision: 2
type: logfile
use_output: default
meta:
package:
name: log
version:
data_stream:
namespace: so
package_policy_id: 906e0d4c-9ec3-4c6a-bef6-e347ec9fd073
streams:
- id: logfile-log.log-906e0d4c-9ec3-4c6a-bef6-e347ec9fd073
data_stream:
dataset: soc
pipeline: common
paths:
- /opt/so/log/sensoroni/sensoroni.log
processors:
- decode_json_fields:
add_error_key: true
process_array: true
max_depth: 2
fields:
- message
target: sensoroni
- add_fields:
fields:
module: soc
dataset_temp: sensoroni
category: host
target: event
- rename:
ignore_missing: true
fields:
- from: sensoroni.fields.sourceIp
to: source.ip
- from: sensoroni.fields.status
to: http.response.status_code
- from: sensoroni.fields.method
to: http.request.method
- from: sensoroni.fields.path
to: url.path
- from: sensoroni.message
to: event.action
- from: sensoroni.level
to: log.level
- id: logfile-logs-df0d7f2c-221f-433b-b18b-d1cf83250515
name: soc-salt-relay-logs
revision: 2
type: logfile
use_output: default
meta:
package:
name: log
version:
data_stream:
namespace: so
package_policy_id: df0d7f2c-221f-433b-b18b-d1cf83250515
streams:
- id: logfile-log.log-df0d7f2c-221f-433b-b18b-d1cf83250515
data_stream:
dataset: soc
pipeline: common
paths:
- /opt/so/log/soc/salt-relay.log
processors:
- dissect:
field: message
tokenizer: '%{soc.ts} | %{event.action}'
target_prefix: ''
- add_fields:
fields:
module: soc
dataset_temp: salt_relay
category: host
target: event
tags:
- so-soc
- id: logfile-logs-74bd2366-fe52-493c-bddc-843a017fc4d0
name: soc-auth-sync-logs
revision: 2
type: logfile
use_output: default
meta:
package:
name: log
version:
data_stream:
namespace: so
package_policy_id: 74bd2366-fe52-493c-bddc-843a017fc4d0
streams:
- id: logfile-log.log-74bd2366-fe52-493c-bddc-843a017fc4d0
data_stream:
dataset: soc
pipeline: common
paths:
- /opt/so/log/soc/sync.log
processors:
- dissect:
field: message
tokenizer: '%{event.action}'
target_prefix: ''
- add_fields:
fields:
module: soc
dataset_temp: auth_sync
category: host
target: event
tags:
- so-soc
- id: logfile-logs-d151d9bf-ff2a-4529-9520-c99244bc0253
name: suricata-logs
revision: 2
type: logfile
use_output: default
meta:
package:
name: log
version:
data_stream:
namespace: so
package_policy_id: d151d9bf-ff2a-4529-9520-c99244bc0253
streams:
- id: logfile-log.log-d151d9bf-ff2a-4529-9520-c99244bc0253
data_stream: data_stream:
dataset: suricata dataset: suricata
pipeline: suricata.common
paths: paths:
- /nsm/suricata/eve*.json - /nsm/suricata/eve*.json
processors: processors:
- add_fields: - add_fields:
target: event
fields: fields:
category: network
module: suricata module: suricata
pipeline: suricata.common category: network
- id: logfile-logs-90103ac4-f6bd-4a4a-b596-952c332390fc target: event
- id: logfile-logs-31f94d05-ae75-40ee-b9c5-0e0356eff327
name: strelka-logs name: strelka-logs
revision: 1 revision: 2
type: logfile type: logfile
use_output: default use_output: default
meta: meta:
@@ -58,20 +371,20 @@ inputs:
version: version:
data_stream: data_stream:
namespace: so namespace: so
package_policy_id: 90103ac4-f6bd-4a4a-b596-952c332390fc package_policy_id: 31f94d05-ae75-40ee-b9c5-0e0356eff327
streams: streams:
- id: logfile-log.log-90103ac4-f6bd-4a4a-b596-952c332390fc - id: logfile-log.log-31f94d05-ae75-40ee-b9c5-0e0356eff327
data_stream: data_stream:
dataset: strelka dataset: strelka
pipeline: strelka.file
paths: paths:
- /nsm/strelka/log/strelka.log - /nsm/strelka/log/strelka.log
processors: processors:
- add_fields: - add_fields:
target: event
fields: fields:
category: file
module: strelka module: strelka
pipeline: strelka.file category: file
target: event
- id: logfile-logs-6197fe84-9b58-4d9b-8464-3d517f28808d - id: logfile-logs-6197fe84-9b58-4d9b-8464-3d517f28808d
name: zeek-logs name: zeek-logs
revision: 1 revision: 1

View File

@@ -2,7 +2,7 @@ elasticfleet:
enabled: False enabled: False
config: config:
server: server:
custom_fqdn: '' custom_fqdn: []
enable_auto_configuration: True enable_auto_configuration: True
endpoints_enrollment: '' endpoints_enrollment: ''
es_token: '' es_token: ''
@@ -32,4 +32,5 @@ elasticfleet:
- fim - fim
- github - github
- google_workspace - google_workspace
- log
- 1password - 1password

View File

@@ -15,6 +15,7 @@
include: include:
- elasticfleet.config - elasticfleet.config
- elasticfleet.sostatus - elasticfleet.sostatus
- ssl
# If enabled, automatically update Fleet Logstash Outputs # If enabled, automatically update Fleet Logstash Outputs
{% if ELASTICFLEETMERGED.config.server.enable_auto_configuration and grains.role not in ['so-import', 'so-eval', 'so-fleet'] %} {% if ELASTICFLEETMERGED.config.server.enable_auto_configuration and grains.role not in ['so-import', 'so-eval', 'so-fleet'] %}
@@ -61,11 +62,14 @@ so-elastic-fleet:
- {{ BINDING }} - {{ BINDING }}
{% endfor %} {% endfor %}
- binds: - binds:
- /etc/pki:/etc/pki:ro - /etc/pki/elasticfleet-server.crt:/etc/pki/elasticfleet-server.crt:ro
- /etc/pki/elasticfleet-server.key:/etc/pki/elasticfleet-server.key:ro
- /etc/pki/tls/certs/intca.crt:/etc/pki/tls/certs/intca.crt:ro
{% if GLOBALS.os_family == 'Debian' %} {% if GLOBALS.os_family == 'Debian' %}
- /etc/ssl:/etc/ssl:ro - /etc/ssl/elasticfleet-server.crt:/etc/ssl/elasticfleet-server.crt:ro
- /etc/ssl/elasticfleet-server.key:/etc/ssl/elasticfleet-server.key:ro
- /etc/ssl/tls/certs/intca.crt:/etc/ssl/tls/certs/intca.crt:ro
{% endif %} {% endif %}
#- /opt/so/conf/elastic-fleet/state:/usr/share/elastic-agent/state:rw
- /opt/so/log/elasticfleet:/usr/share/elastic-agent/logs - /opt/so/log/elasticfleet:/usr/share/elastic-agent/logs
{% if DOCKER.containers['so-elastic-fleet'].custom_bind_mounts %} {% if DOCKER.containers['so-elastic-fleet'].custom_bind_mounts %}
{% for BIND in DOCKER.containers['so-elastic-fleet'].custom_bind_mounts %} {% for BIND in DOCKER.containers['so-elastic-fleet'].custom_bind_mounts %}
@@ -93,6 +97,9 @@ so-elastic-fleet:
- {{ XTRAENV }} - {{ XTRAENV }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
- watch:
- x509: etc_elasticfleet_key
- x509: etc_elasticfleet_crt
{% endif %} {% endif %}
{% if GLOBALS.role != "so-fleet" %} {% if GLOBALS.role != "so-fleet" %}

View File

@@ -13,7 +13,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -14,7 +14,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -5,17 +5,16 @@
"package": { "package": {
"name": "endpoint", "name": "endpoint",
"title": "Elastic Defend", "title": "Elastic Defend",
"version": "" "version": "8.8.0"
}, },
"enabled": true, "enabled": true,
"policy_id": "endpoints-initial", "policy_id": "endpoints-initial",
"vars": {},
"inputs": [{ "inputs": [{
"type": "endpoint", "type": "ENDPOINT_INTEGRATION_CONFIG",
"enabled": true, "enabled": true,
"streams": [], "streams": [],
"config": { "config": {
"integration_config": { "_config": {
"value": { "value": {
"type": "endpoint", "type": "endpoint",
"endpointConfig": { "endpointConfig": {

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -12,7 +12,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -11,7 +11,7 @@
"logs-logfile": { "logs-logfile": {
"enabled": true, "enabled": true,
"streams": { "streams": {
"log.log": { "log.logs": {
"enabled": true, "enabled": true,
"vars": { "vars": {
"paths": [ "paths": [

View File

@@ -1,106 +0,0 @@
{
"package": {
"name": "elasticsearch",
"version": ""
},
"name": "elasticsearch-logs",
"namespace": "default",
"description": "Elasticsearch Logs",
"policy_id": "so-grid-nodes_heavy",
"inputs": {
"elasticsearch-logfile": {
"enabled": true,
"streams": {
"elasticsearch.audit": {
"enabled": false,
"vars": {
"paths": [
"/var/log/elasticsearch/*_audit.json"
]
}
},
"elasticsearch.deprecation": {
"enabled": false,
"vars": {
"paths": [
"/var/log/elasticsearch/*_deprecation.json"
]
}
},
"elasticsearch.gc": {
"enabled": false,
"vars": {
"paths": [
"/var/log/elasticsearch/gc.log.[0-9]*",
"/var/log/elasticsearch/gc.log"
]
}
},
"elasticsearch.server": {
"enabled": true,
"vars": {
"paths": [
"/opt/so/log/elasticsearch/*.log"
]
}
},
"elasticsearch.slowlog": {
"enabled": false,
"vars": {
"paths": [
"/var/log/elasticsearch/*_index_search_slowlog.json",
"/var/log/elasticsearch/*_index_indexing_slowlog.json"
]
}
}
}
},
"elasticsearch-elasticsearch/metrics": {
"enabled": false,
"vars": {
"hosts": [
"http://localhost:9200"
],
"scope": "node"
},
"streams": {
"elasticsearch.stack_monitoring.ccr": {
"enabled": false
},
"elasticsearch.stack_monitoring.cluster_stats": {
"enabled": false
},
"elasticsearch.stack_monitoring.enrich": {
"enabled": false
},
"elasticsearch.stack_monitoring.index": {
"enabled": false
},
"elasticsearch.stack_monitoring.index_recovery": {
"enabled": false,
"vars": {
"active.only": true
}
},
"elasticsearch.stack_monitoring.index_summary": {
"enabled": false
},
"elasticsearch.stack_monitoring.ml_job": {
"enabled": false
},
"elasticsearch.stack_monitoring.node": {
"enabled": false
},
"elasticsearch.stack_monitoring.node_stats": {
"enabled": false
},
"elasticsearch.stack_monitoring.pending_tasks": {
"enabled": false
},
"elasticsearch.stack_monitoring.shard": {
"enabled": false
}
}
}
}
}

View File

@@ -1,29 +0,0 @@
{
"package": {
"name": "log",
"version": ""
},
"name": "kratos-logs",
"namespace": "so",
"description": "Kratos logs",
"policy_id": "so-grid-nodes_heavy",
"inputs": {
"logs-logfile": {
"enabled": true,
"streams": {
"log.log": {
"enabled": true,
"vars": {
"paths": [
"/opt/so/log/kratos/kratos.log"
],
"data_stream.dataset": "kratos",
"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

@@ -3,7 +3,7 @@
"name": "osquery_manager", "name": "osquery_manager",
"version": "" "version": ""
}, },
"name": "osquery-grid-nodes", "name": "osquery-grid-nodes_heavy",
"namespace": "default", "namespace": "default",
"policy_id": "so-grid-nodes_heavy", "policy_id": "so-grid-nodes_heavy",
"inputs": { "inputs": {

View File

@@ -1,76 +0,0 @@
{
"package": {
"name": "redis",
"version": ""
},
"name": "redis-logs",
"namespace": "default",
"description": "Redis logs",
"policy_id": "so-grid-nodes_heavy",
"inputs": {
"redis-logfile": {
"enabled": true,
"streams": {
"redis.log": {
"enabled": true,
"vars": {
"paths": [
"/opt/so/log/redis/redis.log"
],
"tags": [
"redis-log"
],
"preserve_original_event": false
}
}
}
},
"redis-redis": {
"enabled": false,
"streams": {
"redis.slowlog": {
"enabled": false,
"vars": {
"hosts": [
"127.0.0.1:6379"
],
"password": ""
}
}
}
},
"redis-redis/metrics": {
"enabled": false,
"vars": {
"hosts": [
"127.0.0.1:6379"
],
"idle_timeout": "20s",
"maxconn": 10,
"network": "tcp",
"password": ""
},
"streams": {
"redis.info": {
"enabled": false,
"vars": {
"period": "10s"
}
},
"redis.key": {
"enabled": false,
"vars": {
"key.patterns": "- limit: 20\n pattern: *\n",
"period": "10s"
}
},
"redis.keyspace": {
"enabled": false,
"vars": {
"period": "10s"
}
}
}
}
}
}

View File

@@ -1,29 +0,0 @@
{
"package": {
"name": "log",
"version": ""
},
"name": "soc-auth-sync-logs",
"namespace": "so",
"description": "Security Onion - Elastic Auth Sync - Logs",
"policy_id": "so-grid-nodes_heavy",
"inputs": {
"logs-logfile": {
"enabled": true,
"streams": {
"log.log": {
"enabled": true,
"vars": {
"paths": [
"/opt/so/log/soc/sync.log"
],
"data_stream.dataset": "soc",
"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,29 +0,0 @@
{
"package": {
"name": "log",
"version": ""
},
"name": "soc-salt-relay-logs",
"namespace": "so",
"description": "Security Onion - Salt Relay - Logs",
"policy_id": "so-grid-nodes_heavy",
"inputs": {
"logs-logfile": {
"enabled": true,
"streams": {
"log.log": {
"enabled": true,
"vars": {
"paths": [
"/opt/so/log/soc/salt-relay.log"
],
"data_stream.dataset": "soc",
"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,29 +0,0 @@
{
"package": {
"name": "log",
"version": ""
},
"name": "soc-sensoroni-logs",
"namespace": "so",
"description": "Security Onion - Sensoroni - Logs",
"policy_id": "so-grid-nodes_heavy",
"inputs": {
"logs-logfile": {
"enabled": true,
"streams": {
"log.log": {
"enabled": true,
"vars": {
"paths": [
"/opt/so/log/sensoroni/sensoroni.log"
],
"data_stream.dataset": "soc",
"tags": [],
"processors": "- decode_json_fields:\n fields: [\"message\"]\n target: \"sensoroni\"\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: sensoroni\n- rename:\n fields:\n - from: \"sensoroni.fields.sourceIp\"\n to: \"source.ip\"\n - from: \"sensoroni.fields.status\"\n to: \"http.response.status_code\"\n - from: \"sensoroni.fields.method\"\n to: \"http.request.method\"\n - from: \"sensoroni.fields.path\"\n to: \"url.path\"\n - from: \"sensoroni.message\"\n to: \"event.action\"\n - from: \"sensoroni.level\"\n to: \"log.level\"\n ignore_missing: true",
"custom": "pipeline: common"
}
}
}
}
}
}

View File

@@ -1,29 +0,0 @@
{
"package": {
"name": "log",
"version": ""
},
"name": "soc-server-logs",
"namespace": "so",
"description": "Security Onion Console Logs",
"policy_id": "so-grid-nodes_heavy",
"inputs": {
"logs-logfile": {
"enabled": true,
"streams": {
"log.log": {
"enabled": true,
"vars": {
"paths": [
"/opt/so/log/soc/sensoroni-server.log"
],
"data_stream.dataset": "soc",
"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

@@ -4,7 +4,7 @@
"name": "system", "name": "system",
"version": "" "version": ""
}, },
"name": "system-grid-nodes", "name": "system-grid-nodes_heavy",
"namespace": "default", "namespace": "default",
"inputs": { "inputs": {
"system-logfile": { "system-logfile": {

View File

@@ -12,10 +12,11 @@ elasticfleet:
config: config:
server: server:
custom_fqdn: custom_fqdn:
description: Custom FQDN for Agents to connect to. description: Custom FQDN for Agents to connect to. One per line.
global: True global: True
helpLink: elastic-fleet.html helpLink: elastic-fleet.html
advanced: True advanced: True
forcedType: "[]string"
enable_auto_configuration: enable_auto_configuration:
description: Enable auto-configuration of Logstash Outputs & Fleet Host URLs. description: Enable auto-configuration of Logstash Outputs & Fleet Host URLs.
global: True global: True

View File

@@ -15,10 +15,8 @@ if [ ! -f /opt/so/state/eaintegrations.txt ]; then
printf "\n\nInitial Endpoints Policy - Loading $INTEGRATION\n" printf "\n\nInitial Endpoints Policy - Loading $INTEGRATION\n"
elastic_fleet_integration_check "endpoints-initial" "$INTEGRATION" elastic_fleet_integration_check "endpoints-initial" "$INTEGRATION"
if [ -n "$INTEGRATION_ID" ]; then if [ -n "$INTEGRATION_ID" ]; then
if [ "$NAME" != "elastic-defend-endpoints" ]; then
printf "\n\nIntegration $NAME exists - Updating integration\n" printf "\n\nIntegration $NAME exists - Updating integration\n"
elastic_fleet_integration_update "$INTEGRATION_ID" "@$INTEGRATION" elastic_fleet_integration_update "$INTEGRATION_ID" "@$INTEGRATION"
fi
else else
printf "\n\nIntegration does not exist - Creating integration\n" printf "\n\nIntegration does not exist - Creating integration\n"
elastic_fleet_integration_create "@$INTEGRATION" elastic_fleet_integration_create "@$INTEGRATION"

View File

@@ -0,0 +1,15 @@
#!/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-elastic-fleet-common
# Let's snag a cookie from Kibana
SESSIONCOOKIE=$(curl -s -K /opt/so/conf/elasticsearch/curl.config -c - -X GET http://localhost:5601/ | grep sid | awk '{print $7}')
# List configured package policies
curl -s -K /opt/so/conf/elasticsearch/curl.config -b "sid=$SESSIONCOOKIE" -L -X GET "localhost:5601/api/fleet/epm/packages" -H 'kbn-xsrf: true' | jq
echo

View File

@@ -11,6 +11,12 @@
. /usr/sbin/so-common . /usr/sbin/so-common
. /usr/sbin/so-elastic-fleet-common . /usr/sbin/so-elastic-fleet-common
LOG="/opt/so/log/elasticfleet/so-elastic-agent-gen-installers.log"
# Check to see if we are already running
NUM_RUNNING=$(pgrep -cf "/bin/bash /sbin/so-elastic-agent-gen-installers")
[ "$NUM_RUNNING" -gt 1 ] && echo "$(date) - $NUM_RUNNING gen installers script processes running...exiting." >>$LOG && exit 0
for i in {1..30} for i in {1..30}
do do
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-initial")) | .api_key') 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-initial")) | .api_key')

View File

@@ -2,7 +2,7 @@
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use # 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. # this file except in compliance with the Elastic License 2.0.
{% from 'vars/globals.map.jinja' import GLOBALS %} {% from 'vars/globals.map.jinja' import GLOBALS %}
{% set CUSTOMFQDN = salt['pillar.get']('elasticfleet:config:server:custom_fqdn') %} {% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
. /usr/sbin/so-common . /usr/sbin/so-common
@@ -41,9 +41,14 @@ else
NEW_LIST=("{{ GLOBALS.url_base }}:5055" "{{ GLOBALS.hostname }}:5055") NEW_LIST=("{{ GLOBALS.url_base }}:5055" "{{ GLOBALS.hostname }}:5055")
fi fi
{% if CUSTOMFQDN != "" %} # Query for FQDN entries & add them to the list
# Add Custom Hostname to list {% if ELASTICFLEETMERGED.config.server.custom_fqdn | length > 0 %}
NEW_LIST+=("{{ CUSTOMFQDN }}:5055") CUSTOMFQDNLIST=('{{ ELASTICFLEETMERGED.config.server.custom_fqdn | join(' ') }}')
readarray -t -d ' ' CUSTOMFQDN < <(printf '%s' "$CUSTOMFQDNLIST")
for CUSTOMNAME in "${CUSTOMFQDN[@]}"
do
NEW_LIST+=("$CUSTOMNAME:5055")
done
{% endif %} {% endif %}
# Query for the current Grid Nodes that are running Logstash # Query for the current Grid Nodes that are running Logstash

View File

@@ -2,7 +2,7 @@
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use # 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. # this file except in compliance with the Elastic License 2.0.
{% from 'vars/globals.map.jinja' import GLOBALS %} {% from 'vars/globals.map.jinja' import GLOBALS %}
{% set CUSTOMFQDN = salt['pillar.get']('elasticfleet:config:server:custom_fqdn') %} {% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
. /usr/sbin/so-common . /usr/sbin/so-common
@@ -41,9 +41,14 @@ else
NEW_LIST=("https://{{ GLOBALS.url_base }}:8220" "https://{{ GLOBALS.hostname }}:8220") NEW_LIST=("https://{{ GLOBALS.url_base }}:8220" "https://{{ GLOBALS.hostname }}:8220")
fi fi
{% if CUSTOMFQDN != "" %} # Query for FQDN entries & add them to the list
# Add Custom Hostname to list {% if ELASTICFLEETMERGED.config.server.custom_fqdn | length > 0 %}
NEW_LIST+=("https://{{ CUSTOMFQDN }}:8220") CUSTOMFQDNLIST=('{{ ELASTICFLEETMERGED.config.server.custom_fqdn | join(' ') }}')
readarray -t -d ' ' CUSTOMFQDN < <(printf '%s' "$CUSTOMFQDNLIST")
for CUSTOMNAME in "${CUSTOMFQDN[@]}"
do
NEW_LIST+=("https://$CUSTOMNAME:8220")
done
{% endif %} {% endif %}
# Query for the current Grid Nodes that are running Logstash (which includes Fleet Nodes) # Query for the current Grid Nodes that are running Logstash (which includes Fleet Nodes)
@@ -62,7 +67,7 @@ fi
NEW_LIST_JSON=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${NEW_LIST[@]}") NEW_LIST_JSON=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${NEW_LIST[@]}")
NEW_HASH=$(sha1sum <<< "$NEW_LIST_JSON" | awk '{print $1}') NEW_HASH=$(sha1sum <<< "$NEW_LIST_JSON" | awk '{print $1}')
# Compare the current & new list of URLs - if different, update the Fleet Server URLs # Compare the current & new list of URLs - if different, update the Fleet Server URLs & regenerate the agent installer
if [ "$NEW_HASH" = "$CURRENT_HASH" ]; then if [ "$NEW_HASH" = "$CURRENT_HASH" ]; then
printf "\nHashes match - no update needed.\n" printf "\nHashes match - no update needed.\n"
printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n" printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n"
@@ -71,4 +76,5 @@ else
printf "\nHashes don't match - update needed.\n" printf "\nHashes don't match - update needed.\n"
printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n" printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n"
update_fleet_urls update_fleet_urls
/sbin/so-elastic-agent-gen-installers >> /opt/so/log/elasticfleet/so-elastic-agent-gen-installers.log &
fi fi

View File

@@ -78,6 +78,7 @@
{ "set": { "if": "ctx.network?.direction == 'ingress'", "override": true, "field": "network.initiated", "value": "false" } }, { "set": { "if": "ctx.network?.direction == 'ingress'", "override": true, "field": "network.initiated", "value": "false" } },
{ "set": { "if": "ctx.network?.type == 'ipv4'", "override": true, "field": "destination.ipv6", "value": "false" } }, { "set": { "if": "ctx.network?.type == 'ipv4'", "override": true, "field": "destination.ipv6", "value": "false" } },
{ "set": { "if": "ctx.network?.type == 'ipv6'", "override": true, "field": "destination.ipv6", "value": "true" } }, { "set": { "if": "ctx.network?.type == 'ipv6'", "override": true, "field": "destination.ipv6", "value": "true" } },
{"community_id":{ "if": "ctx.event?.dataset == 'endpoint.events.network'", "ignore_failure":true } },
{ "remove": { "field": [ "message2", "type", "fields", "category", "module", "dataset", "event.dataset_temp", "dataset_tag_temp", "module_temp" ], "ignore_missing": true, "ignore_failure": true } } { "remove": { "field": [ "message2", "type", "fields", "category", "module", "dataset", "event.dataset_temp", "dataset_tag_temp", "module_temp" ], "ignore_missing": true, "ignore_failure": true } }
], ],
"on_failure": [ "on_failure": [

View File

@@ -49,11 +49,10 @@
"on_failure" : [ {"set" : {"field" : "error.message","value" : "{{ _ingest.on_failure_message }}"}}] "on_failure" : [ {"set" : {"field" : "error.message","value" : "{{ _ingest.on_failure_message }}"}}]
} }
}, },
{ "set": { "field": "_index", "value": "so-firewall", "override": true } },
{ "set": { "if": "ctx.network?.transport_id == '0'", "field": "network.transport", "value": "icmp", "override": true } }, { "set": { "if": "ctx.network?.transport_id == '0'", "field": "network.transport", "value": "icmp", "override": true } },
{ "community_id": {} }, { "community_id": {} },
{ "set": { "field": "module", "value": "pfsense", "override": true } }, { "set": { "field": "event.module", "value": "pfsense", "override": true } },
{ "set": { "field": "dataset", "value": "firewall", "override": true } }, { "set": { "field": "event.dataset", "value": "firewall", "override": true } },
{ "set": { "field": "category", "value": "network", "override": true } }, { "set": { "field": "category", "value": "network", "override": true } },
{ "remove": { "field": ["real_message", "ip_sub_msg", "firewall.sub_message"], "ignore_failure": true } } { "remove": { "field": ["real_message", "ip_sub_msg", "firewall.sub_message"], "ignore_failure": true } }
] ]

View File

@@ -26,6 +26,7 @@ firewall:
standalone: [] standalone: []
strelka_frontend: [] strelka_frontend: []
syslog: [] syslog: []
workstation: []
customhostgroup0: [] customhostgroup0: []
customhostgroup1: [] customhostgroup1: []
customhostgroup2: [] customhostgroup2: []
@@ -198,9 +199,6 @@ firewall:
portgroups: portgroups:
- redis - redis
- elasticsearch_node - elasticsearch_node
self:
portgroups:
- syslog
beats_endpoint: beats_endpoint:
portgroups: portgroups:
- beats_5044 - beats_5044
@@ -218,9 +216,6 @@ firewall:
strelka_frontend: strelka_frontend:
portgroups: portgroups:
- strelka_frontend - strelka_frontend
syslog:
portgroups:
- syslog
analyst: analyst:
portgroups: portgroups:
- nginx - nginx
@@ -255,6 +250,12 @@ firewall:
localhost: localhost:
portgroups: portgroups:
- all - all
self:
portgroups:
- syslog
syslog:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -370,6 +371,7 @@ firewall:
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
- localrules - localrules
- sensoroni
fleet: fleet:
portgroups: portgroups:
- elasticsearch_rest - elasticsearch_rest
@@ -383,6 +385,17 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
idh:
portgroups:
- docker_registry
- influxdb
- sensoroni
- yum
- beats_5044
- beats_5644
- elastic_agent_control
- elastic_agent_data
- elastic_agent_update
sensor: sensor:
portgroups: portgroups:
- beats_5044 - beats_5044
@@ -393,6 +406,7 @@ firewall:
- yum - yum
- docker_registry - docker_registry
- influxdb - influxdb
- sensoroni
searchnode: searchnode:
portgroups: portgroups:
- redis - redis
@@ -405,6 +419,7 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
- sensoroni
heavynode: heavynode:
portgroups: portgroups:
- redis - redis
@@ -417,6 +432,7 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
- sensoroni
receiver: receiver:
portgroups: portgroups:
- yum - yum
@@ -425,12 +441,10 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
self: - sensoroni
analyst:
portgroups: portgroups:
- syslog - nginx
syslog:
portgroups:
- syslog
beats_endpoint: beats_endpoint:
portgroups: portgroups:
- beats_5044 - beats_5044
@@ -448,9 +462,9 @@ firewall:
endgame: endgame:
portgroups: portgroups:
- endgame - endgame
analyst: workstation:
portgroups: portgroups:
- nginx - yum
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -482,6 +496,9 @@ firewall:
fleet: fleet:
portgroups: portgroups:
- salt_manager - salt_manager
idh:
portgroups:
- salt_manager
localhost: localhost:
portgroups: portgroups:
- all - all
@@ -497,6 +514,15 @@ firewall:
receiver: receiver:
portgroups: portgroups:
- salt_manager - salt_manager
workstation:
portgroups:
- salt_manager
self:
portgroups:
- syslog
syslog:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -535,6 +561,7 @@ firewall:
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
- localrules - localrules
- sensoroni
fleet: fleet:
portgroups: portgroups:
- elasticsearch_rest - elasticsearch_rest
@@ -548,6 +575,17 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
idh:
portgroups:
- docker_registry
- influxdb
- sensoroni
- yum
- beats_5044
- beats_5644
- elastic_agent_control
- elastic_agent_data
- elastic_agent_update
sensor: sensor:
portgroups: portgroups:
- beats_5044 - beats_5044
@@ -558,6 +596,7 @@ firewall:
- yum - yum
- docker_registry - docker_registry
- influxdb - influxdb
- sensoroni
searchnode: searchnode:
portgroups: portgroups:
- redis - redis
@@ -569,6 +608,7 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
- sensoroni
heavynode: heavynode:
portgroups: portgroups:
- redis - redis
@@ -580,6 +620,7 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
- sensoroni
receiver: receiver:
portgroups: portgroups:
- yum - yum
@@ -588,9 +629,10 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
self: - sensoroni
analyst:
portgroups: portgroups:
- syslog - nginx
beats_endpoint: beats_endpoint:
portgroups: portgroups:
- beats_5044 - beats_5044
@@ -608,12 +650,9 @@ firewall:
endgame: endgame:
portgroups: portgroups:
- endgame - endgame
syslog: workstation:
portgroups: portgroups:
- syslog - yum
analyst:
portgroups:
- nginx
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -645,6 +684,9 @@ firewall:
fleet: fleet:
portgroups: portgroups:
- salt_manager - salt_manager
idh:
portgroups:
- salt_manager
localhost: localhost:
portgroups: portgroups:
- all - all
@@ -660,6 +702,15 @@ firewall:
receiver: receiver:
portgroups: portgroups:
- salt_manager - salt_manager
workstation:
portgroups:
- salt_manager
self:
portgroups:
- syslog
syslog:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -723,6 +774,17 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
idh:
portgroups:
- docker_registry
- influxdb
- sensoroni
- yum
- beats_5044
- beats_5644
- elastic_agent_control
- elastic_agent_data
- elastic_agent_update
sensor: sensor:
portgroups: portgroups:
- docker_registry - docker_registry
@@ -760,9 +822,10 @@ firewall:
- elastic_agent_control - elastic_agent_control
- elastic_agent_data - elastic_agent_data
- elastic_agent_update - elastic_agent_update
self: - sensoroni
analyst:
portgroups: portgroups:
- syslog - nginx
beats_endpoint: beats_endpoint:
portgroups: portgroups:
- beats_5044 - beats_5044
@@ -783,12 +846,9 @@ firewall:
strelka_frontend: strelka_frontend:
portgroups: portgroups:
- strelka_frontend - strelka_frontend
syslog: workstation:
portgroups: portgroups:
- syslog - yum
analyst:
portgroups:
- nginx
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -820,6 +880,9 @@ firewall:
fleet: fleet:
portgroups: portgroups:
- salt_manager - salt_manager
idh:
portgroups:
- salt_manager
localhost: localhost:
portgroups: portgroups:
- all - all
@@ -838,6 +901,15 @@ firewall:
receiver: receiver:
portgroups: portgroups:
- salt_manager - salt_manager
workstation:
portgroups:
- salt_manager
self:
portgroups:
- syslog
syslog:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -866,6 +938,14 @@ firewall:
portgroups: portgroups:
- elasticsearch_node - elasticsearch_node
- elasticsearch_rest - elasticsearch_rest
managersearch:
portgroups:
- elasticsearch_node
- elasticsearch_rest
standalone:
portgroups:
- elasticsearch_node
- elasticsearch_rest
dockernet: dockernet:
portgroups: portgroups:
- elasticsearch_node - elasticsearch_node
@@ -876,9 +956,6 @@ firewall:
searchnode: searchnode:
portgroups: portgroups:
- elasticsearch_node - elasticsearch_node
self:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -910,6 +987,12 @@ firewall:
localhost: localhost:
portgroups: portgroups:
- all - all
self:
portgroups:
- syslog
syslog:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -934,9 +1017,6 @@ firewall:
chain: chain:
DOCKER-USER: DOCKER-USER:
hostgroups: hostgroups:
self:
portgroups:
- syslog
strelka_frontend: strelka_frontend:
portgroups: portgroups:
- strelka_frontend - strelka_frontend
@@ -971,6 +1051,12 @@ firewall:
localhost: localhost:
portgroups: portgroups:
- all - all
self:
portgroups:
- syslog
syslog:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -1022,6 +1108,9 @@ firewall:
strelka_frontend: strelka_frontend:
portgroups: portgroups:
- strelka_frontend - strelka_frontend
syslog:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -1111,6 +1200,9 @@ firewall:
analyst: analyst:
portgroups: portgroups:
- nginx - nginx
workstation:
portgroups:
- yum
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:
@@ -1181,11 +1273,7 @@ firewall:
self: self:
portgroups: portgroups:
- redis - redis
- syslog
- beats_5644 - beats_5644
syslog:
portgroups:
- syslog
beats_endpoint: beats_endpoint:
portgroups: portgroups:
- beats_5044 - beats_5044
@@ -1226,6 +1314,12 @@ firewall:
localhost: localhost:
portgroups: portgroups:
- all - all
self:
portgroups:
- syslog
syslog:
portgroups:
- syslog
customhostgroup0: customhostgroup0:
portgroups: [] portgroups: []
customhostgroup1: customhostgroup1:

View File

@@ -1,15 +1,29 @@
{% from 'allowed_states.map.jinja' import allowed_states %} {% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %} {% if sls in allowed_states %}
{% from 'firewall/ipt.map.jinja' import iptmap %}
install_iptables:
pkg.installed:
- name: {{ iptmap.iptpkg }}
iptables_persist:
pkg.installed:
- name: {{ iptmap.persistpkg }}
iptables_service:
service.running:
- name: {{ iptmap.service }}
- enable: True
create_sysconfig_iptables: create_sysconfig_iptables:
file.touch: file.touch:
- name: /etc/sysconfig/iptables - name: {{ iptmap.configfile }}
- makedirs: True - makedirs: True
- unless: 'ls /etc/sysconfig/iptables' - unless: 'ls {{ iptmap.configfile }}'
iptables_config: iptables_config:
file.managed: file.managed:
- name: /etc/sysconfig/iptables - name: {{ iptmap.configfile }}
- source: salt://firewall/iptables.jinja - source: salt://firewall/iptables.jinja
- template: jinja - template: jinja
@@ -24,11 +38,11 @@ disable_firewalld:
iptables_restore: iptables_restore:
cmd.run: cmd.run:
- name: iptables-restore < /etc/sysconfig/iptables - name: iptables-restore < {{ iptmap.configfile }}
- require: - require:
- file: iptables_config - file: iptables_config
- onlyif: - onlyif:
- iptables-restore --test /etc/sysconfig/iptables - iptables-restore --test {{ iptmap.configfile }}
{% if grains.os_family == 'RedHat' %} {% if grains.os_family == 'RedHat' %}
enable_firewalld: enable_firewalld:

View File

@@ -0,0 +1,14 @@
{% set iptmap = salt['grains.filter_by']({
'Debian': {
'service': 'netfilter-persistent',
'iptpkg': 'iptables',
'persistpkg': 'iptables-persistent',
'configfile': '/etc/iptables/rules.v4'
},
'RedHat': {
'service': 'iptables',
'iptpkg': 'iptables-nft',
'persistpkg': 'iptables-nft-services',
'configfile': '/etc/sysconfig/iptables'
},
}) %}

View File

@@ -45,6 +45,7 @@ firewall:
standalone: *hostgroupsettings standalone: *hostgroupsettings
strelka_frontend: *hostgroupsettings strelka_frontend: *hostgroupsettings
syslog: *hostgroupsettings syslog: *hostgroupsettings
workstation: *hostgroupsettings
customhostgroup0: &customhostgroupsettings customhostgroup0: &customhostgroupsettings
description: List of IP or CIDR blocks to allow to this hostgroup. description: List of IP or CIDR blocks to allow to this hostgroup.
forcedType: "[]string" forcedType: "[]string"
@@ -191,6 +192,7 @@ firewall:
description: Portgroups to add access to the docker containers for this role. description: Portgroups to add access to the docker containers for this role.
advanced: True advanced: True
multiline: True multiline: True
forcedType: "[]string"
helpLink: firewall.html helpLink: firewall.html
sensor: sensor:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
@@ -214,6 +216,8 @@ firewall:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
analyst: analyst:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
workstation:
portgroups: *portgroupsdocker
customhostgroup0: customhostgroup0:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
customhostgroup1: customhostgroup1:
@@ -241,6 +245,7 @@ firewall:
description: Portgroups to add access to the host. description: Portgroups to add access to the host.
advanced: True advanced: True
multiline: True multiline: True
forcedType: "[]string"
helpLink: firewall.html helpLink: firewall.html
dockernet: dockernet:
portgroups: *portgroupshost portgroups: *portgroupshost
@@ -337,6 +342,8 @@ firewall:
hostgroups: hostgroups:
manager: manager:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
idh:
portgroups: *portgroupsdocker
sensor: sensor:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
searchnode: searchnode:
@@ -359,6 +366,8 @@ firewall:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
analyst: analyst:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
workstation:
portgroups: *portgroupsdocker
customhostgroup0: customhostgroup0:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
customhostgroup1: customhostgroup1:
@@ -387,12 +396,16 @@ firewall:
portgroups: *portgroupshost portgroups: *portgroupshost
localhost: localhost:
portgroups: *portgroupshost portgroups: *portgroupshost
idh:
portgroups: *portgroupshost
sensor: sensor:
portgroups: *portgroupshost portgroups: *portgroupshost
searchnode: searchnode:
portgroups: *portgroupshost portgroups: *portgroupshost
heavynode: heavynode:
portgroups: *portgroupshost portgroups: *portgroupshost
workstation:
portgroups: *portgroupshost
customhostgroup0: customhostgroup0:
portgroups: *portgroupshost portgroups: *portgroupshost
customhostgroup1: customhostgroup1:
@@ -420,6 +433,8 @@ firewall:
hostgroups: hostgroups:
managersearch: managersearch:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
idh:
portgroups: *portgroupsdocker
sensor: sensor:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
searchnode: searchnode:
@@ -442,6 +457,8 @@ firewall:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
analyst: analyst:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
workstation:
portgroups: *portgroupsdocker
customhostgroup0: customhostgroup0:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
customhostgroup1: customhostgroup1:
@@ -470,12 +487,16 @@ firewall:
portgroups: *portgroupshost portgroups: *portgroupshost
localhost: localhost:
portgroups: *portgroupshost portgroups: *portgroupshost
idh:
portgroups: *portgroupshost
sensor: sensor:
portgroups: *portgroupshost portgroups: *portgroupshost
searchnode: searchnode:
portgroups: *portgroupshost portgroups: *portgroupshost
heavynode: heavynode:
portgroups: *portgroupshost portgroups: *portgroupshost
workstation:
portgroups: *portgroupshost
customhostgroup0: customhostgroup0:
portgroups: *portgroupshost portgroups: *portgroupshost
customhostgroup1: customhostgroup1:
@@ -507,6 +528,8 @@ firewall:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
fleet: fleet:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
idh:
portgroups: *portgroupsdocker
sensor: sensor:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
searchnode: searchnode:
@@ -531,6 +554,8 @@ firewall:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
analyst: analyst:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
workstation:
portgroups: *portgroupsdocker
customhostgroup0: customhostgroup0:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
customhostgroup1: customhostgroup1:
@@ -563,12 +588,16 @@ firewall:
portgroups: *portgroupshost portgroups: *portgroupshost
standalone: standalone:
portgroups: *portgroupshost portgroups: *portgroupshost
idh:
portgroups: *portgroupshost
sensor: sensor:
portgroups: *portgroupshost portgroups: *portgroupshost
searchnode: searchnode:
portgroups: *portgroupshost portgroups: *portgroupshost
heavynode: heavynode:
portgroups: *portgroupshost portgroups: *portgroupshost
workstation:
portgroups: *portgroupshost
customhostgroup0: customhostgroup0:
portgroups: *portgroupshost portgroups: *portgroupshost
customhostgroup1: customhostgroup1:
@@ -793,6 +822,8 @@ firewall:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
analyst: analyst:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
workstation:
portgroups: *portgroupsdocker
customhostgroup0: customhostgroup0:
portgroups: *portgroupsdocker portgroups: *portgroupsdocker
customhostgroup1: customhostgroup1:

View File

@@ -6,6 +6,7 @@
{% from 'allowed_states.map.jinja' import allowed_states %} {% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %} {% if sls.split('.')[0] in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %} {% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
include: include:
- idh.config - idh.config

View File

@@ -3,17 +3,21 @@
{%- from 'vars/globals.map.jinja' import GLOBALS %} {%- from 'vars/globals.map.jinja' import GLOBALS %}
{%- from 'idstools/map.jinja' import IDSTOOLSMERGED %} {%- from 'idstools/map.jinja' import IDSTOOLSMERGED %}
{%- set proxy = salt['pillar.get']('manager:proxy') %} {%- set proxy = salt['pillar.get']('manager:proxy') %}
{%- set noproxy = salt['pillar.get']('manager:no_proxy', '') %}
# Download the rules from the internet
{%- if proxy %}
export http_proxy={{ proxy }}
export https_proxy={{ proxy }}
export no_proxy="{{ noproxy }}"
{%- endif %}
mkdir -p /nsm/rules/suricata mkdir -p /nsm/rules/suricata
chown -R socore:socore /nsm/rules/suricata chown -R socore:socore /nsm/rules/suricata
# Download the rules from the internet # Download the rules from the internet
{%- if GLOBALS.airgap != 'True' %} {%- if GLOBALS.airgap != 'True' %}
{%- if proxy %}
export http_proxy={{ proxy }}
export https_proxy={{ proxy }}
export no_proxy= salt['pillar.get']('manager:no_proxy')
{%- endif %}
{%- if IDSTOOLSMERGED.config.ruleset == 'ETOPEN' %} {%- if IDSTOOLSMERGED.config.ruleset == 'ETOPEN' %}
docker exec so-idstools idstools-rulecat -v --suricata-version 6.0 -o /nsm/rules/suricata/ --merged=/nsm/rules/suricata/emerging-all.rules --force docker exec so-idstools idstools-rulecat -v --suricata-version 6.0 -o /nsm/rules/suricata/ --merged=/nsm/rules/suricata/emerging-all.rules --force
{%- elif IDSTOOLSMERGED.config.ruleset == 'ETPRO' %} {%- elif IDSTOOLSMERGED.config.ruleset == 'ETPRO' %}

View File

@@ -1 +1 @@
{"attributes": {"buildNum": 39457,"defaultIndex": "logs-*","defaultRoute": "/app/dashboards#/view/a8411b30-6d03-11ea-b301-3d6c35840645","discover:sampleSize": 100,"theme:darkMode": true,"timepicker:timeDefaults": "{\n \"from\": \"now-24h\",\n \"to\": \"now\"\n}"},"coreMigrationVersion": "8.7.1","id": "8.7.1","migrationVersion": {"config": "7.13.0"},"references": [],"type": "config","updated_at": "2021-10-10T10:10:10.105Z","version": "WzI5NzUsMl0="} {"attributes": {"buildNum": 39457,"defaultIndex": "logs-*","defaultRoute": "/app/dashboards#/view/a8411b30-6d03-11ea-b301-3d6c35840645","discover:sampleSize": 100,"theme:darkMode": true,"timepicker:timeDefaults": "{\n \"from\": \"now-24h\",\n \"to\": \"now\"\n}"},"coreMigrationVersion": "8.8.2","id": "8.8.2","references": [],"type": "config","updated_at": "2021-10-10T10:10:10.105Z","version": "WzI5NzUsMl0="}

View File

@@ -63,7 +63,7 @@ update() {
IFS=$'\r\n' GLOBIGNORE='*' command eval 'LINES=($(cat $1))' IFS=$'\r\n' GLOBIGNORE='*' command eval 'LINES=($(cat $1))'
for i in "${LINES[@]}"; do for i in "${LINES[@]}"; do
RESPONSE=$(curl -K /opt/so/conf/elasticsearch/curl.config -X PUT "localhost:5601/api/saved_objects/config/8.7.1" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d " $i ") RESPONSE=$(curl -K /opt/so/conf/elasticsearch/curl.config -X PUT "localhost:5601/api/saved_objects/config/8.8.2" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d " $i ")
echo $RESPONSE; if [[ "$RESPONSE" != *"\"success\":true"* ]] && [[ "$RESPONSE" != *"updated_at"* ]] ; then RETURN_CODE=1;fi echo $RESPONSE; if [[ "$RESPONSE" != *"\"success\":true"* ]] && [[ "$RESPONSE" != *"updated_at"* ]] ; then RETURN_CODE=1;fi
done done

View File

@@ -90,6 +90,26 @@ logrotate:
- extension .log - extension .log
- dateext - dateext
- dateyesterday - dateyesterday
/opt/so/log/elasticagent/*_x_log:
- daily
- rotate 14
- missingok
- copytruncate
- compress
- create
- extension .log
- dateext
- dateyesterday
/opt/so/log/elasticagent/*_x_ndjson:
- daily
- rotate 14
- missingok
- copytruncate
- compress
- create
- extension .ndjson
- dateext
- dateyesterday
/opt/so/log/elasticfleet/*_x_log: /opt/so/log/elasticfleet/*_x_log:
- daily - daily
- rotate 14 - rotate 14

View File

@@ -9,6 +9,11 @@
{% from 'docker/docker.map.jinja' import DOCKER %} {% from 'docker/docker.map.jinja' import DOCKER %}
{% from 'logstash/map.jinja' import LOGSTASH_MERGED %} {% from 'logstash/map.jinja' import LOGSTASH_MERGED %}
{% from 'logstash/map.jinja' import REDIS_NODES %} {% from 'logstash/map.jinja' import REDIS_NODES %}
{# we append the manager here so that it is added to extra_hosts so the heavynode can resolve it #}
{# we cannont append in the logstash/map.jinja because then it would be added to the 0900_input_redis.conf #}
{% if GLOBALS.role == 'so-heavynode' %}
{% do REDIS_NODES.append({GLOBALS.manager:GLOBALS.manager_ip}) %}
{% endif %}
{% set lsheap = LOGSTASH_MERGED.settings.lsheap %} {% set lsheap = LOGSTASH_MERGED.settings.lsheap %}
include: include:
@@ -17,6 +22,7 @@ include:
{% endif %} {% endif %}
- logstash.config - logstash.config
- logstash.sostatus - logstash.sostatus
- ssl
so-logstash: so-logstash:
docker_container.running: docker_container.running:
@@ -85,6 +91,10 @@ so-logstash:
{% endfor %} {% endfor %}
{% endif %} {% endif %}
- watch: - watch:
{% if grains['role'] in ['so-manager', 'so-eval', 'so-managersearch', 'so-standalone', 'so-import', 'so-fleet', 'so-receiver'] %}
- x509: etc_elasticfleet_logstash_key
- x509: etc_elasticfleet_logstash_crt
{% endif %}
- file: lsetcsync - file: lsetcsync
{% for assigned_pipeline in LOGSTASH_MERGED.assigned_pipelines.roles[GLOBALS.role.split('-')[1]] %} {% for assigned_pipeline in LOGSTASH_MERGED.assigned_pipelines.roles[GLOBALS.role.split('-')[1]] %}
- file: ls_pipeline_{{assigned_pipeline}} - file: ls_pipeline_{{assigned_pipeline}}

View File

@@ -74,9 +74,12 @@ fi
so-firewall includehost heavynode "$IP" --apply so-firewall includehost heavynode "$IP" --apply
;; ;;
'IDH') 'IDH')
so-firewall includehost sensor "$IP" --apply so-firewall includehost idh "$IP" --apply
;; ;;
'RECEIVER') 'RECEIVER')
so-firewall includehost receiver "$IP" --apply so-firewall includehost receiver "$IP" --apply
;; ;;
'WORKSTATION')
so-firewall includehost workstation "$IP" --apply
;;
esac esac

View File

@@ -179,12 +179,12 @@ update_registry() {
check_airgap() { check_airgap() {
# See if this is an airgap install # See if this is an airgap install
AIRGAP=$(cat /opt/so/saltstack/local/pillar/global/soc_global.sls | grep airgap: | awk '{print $2}') AIRGAP=$(cat /opt/so/saltstack/local/pillar/global/soc_global.sls | grep airgap: | awk '{print $2}' | tr '[:upper:]' '[:lower:]')
if [[ "$AIRGAP" == "True" ]]; then if [[ "$AIRGAP" == "true" ]]; then
is_airgap=0 is_airgap=0
UPDATE_DIR=/tmp/soagupdate/SecurityOnion UPDATE_DIR=/tmp/soagupdate/SecurityOnion
AGDOCKER=/tmp/soagupdate/docker AGDOCKER=/tmp/soagupdate/docker
AGREPO=/tmp/soagupdate/Packages AGREPO=/tmp/soagupdate/minimal/Packages
else else
is_airgap=1 is_airgap=1
fi fi
@@ -346,7 +346,7 @@ clone_to_tmp() {
# Make a temp location for the files # Make a temp location for the files
mkdir -p /tmp/sogh mkdir -p /tmp/sogh
cd /tmp/sogh cd /tmp/sogh
SOUP_BRANCH="" SOUP_BRANCH="-b 2.4/main"
if [ -n "$BRANCH" ]; then if [ -n "$BRANCH" ]; then
SOUP_BRANCH="-b $BRANCH" SOUP_BRANCH="-b $BRANCH"
fi fi
@@ -391,6 +391,8 @@ preupgrade_changes() {
echo "Checking to see if changes are needed." echo "Checking to see if changes are needed."
[[ "$INSTALLEDVERSION" == 2.4.2 ]] && up_to_2.4.3 [[ "$INSTALLEDVERSION" == 2.4.2 ]] && up_to_2.4.3
[[ "$INSTALLEDVERSION" == 2.4.3 ]] && up_to_2.4.4
[[ "$INSTALLEDVERSION" == 2.4.4 ]] && up_to_2.4.5
true true
} }
@@ -399,8 +401,8 @@ postupgrade_changes() {
echo "Running post upgrade processes." echo "Running post upgrade processes."
[[ "$POSTVERSION" == 2.4.2 ]] && post_to_2.4.3 [[ "$POSTVERSION" == 2.4.2 ]] && post_to_2.4.3
[[ "$POSTVERSION" == 2.4.3 ]] && post_to_2.4.4
[[ "$POSTVERSION" == 2.4.4 ]] && post_to_2.4.5
true true
} }
@@ -409,6 +411,16 @@ post_to_2.4.3() {
POSTVERSION=2.4.3 POSTVERSION=2.4.3
} }
post_to_2.4.4() {
echo "Nothing to apply"
POSTVERSION=2.4.4
}
post_to_2.4.5() {
echo "Regenerating Elastic Agent Installers"
/sbin/so-elastic-agent-gen-installers
POSTVERSION=2.4.5
}
stop_salt_master() { stop_salt_master() {
# kill all salt jobs across the grid because the hang indefinitely if they are queued and salt-master restarts # kill all salt jobs across the grid because the hang indefinitely if they are queued and salt-master restarts
@@ -423,7 +435,7 @@ stop_salt_master() {
echo "" echo ""
echo "Storing salt-master pid." echo "Storing salt-master pid."
MASTERPID=$(pgrep salt-master | head -1) MASTERPID=$(pgrep -f '/opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master MainProcess')
echo "Found salt-master PID $MASTERPID" echo "Found salt-master PID $MASTERPID"
systemctl_func "stop" "salt-master" systemctl_func "stop" "salt-master"
timeout 30 tail --pid=$MASTERPID -f /dev/null || echo "salt-master still running at $(date +"%T.%6N") after waiting 30s. We cannot kill due to systemd restart option." timeout 30 tail --pid=$MASTERPID -f /dev/null || echo "salt-master still running at $(date +"%T.%6N") after waiting 30s. We cannot kill due to systemd restart option."
@@ -442,7 +454,7 @@ stop_salt_minion() {
set -e set -e
echo "Storing salt-minion pid." echo "Storing salt-minion pid."
MINIONPID=$(pgrep salt-minion | head -1) MINIONPID=$(pgrep -f '/opt/saltstack/salt/bin/python3.10 /usr/bin/salt-minion' | head -1)
echo "Found salt-minion PID $MINIONPID" echo "Found salt-minion PID $MINIONPID"
systemctl_func "stop" "salt-minion" systemctl_func "stop" "salt-minion"
@@ -454,8 +466,32 @@ stop_salt_minion() {
up_to_2.4.3() { up_to_2.4.3() {
echo "Nothing to do for 2.4.3" echo "Nothing to do for 2.4.3"
##
INSTALLEDVERSION=2.3.140 INSTALLEDVERSION=2.4.3
}
up_to_2.4.4() {
echo "Nothing to do for 2.4.4"
INSTALLEDVERSION=2.4.4
}
up_to_2.4.5() {
determine_elastic_agent_upgrade
INSTALLEDVERSION=2.4.5
}
determine_elastic_agent_upgrade() {
if [[ $is_airgap -eq 0 ]]; then
update_elastic_agent_airgap
else
update_elastic_agent
fi
}
update_elastic_agent_airgap() {
rsync -av /tmp/soagupdate/fleet/* /nsm/elastic-fleet/artifacts/
} }
verify_upgradespace() { verify_upgradespace() {
@@ -495,6 +531,7 @@ update_centos_repo() {
echo "Syncing new updates to /nsm/repo" echo "Syncing new updates to /nsm/repo"
rsync -av $AGREPO/* /nsm/repo/ rsync -av $AGREPO/* /nsm/repo/
echo "Creating repo" echo "Creating repo"
dnf -y install yum-utils createrepo
createrepo /nsm/repo createrepo /nsm/repo
} }
@@ -834,7 +871,7 @@ main() {
set +e set +e
echo "Checking the number of minions." echo "Checking the number of minions."
NUM_MINIONS=$(ls /opt/so/saltstack/local/pillar/minions/*_*.sls | wc -l) NUM_MINIONS=$(ls /opt/so/saltstack/local/pillar/minions/*_*.sls | grep -v adv_ | wc -l)
if [[ $UPGRADESALT -eq 1 ]] && [[ $NUM_MINIONS -gt 1 ]]; then if [[ $UPGRADESALT -eq 1 ]] && [[ $NUM_MINIONS -gt 1 ]]; then
if [[ $is_airgap -eq 0 ]]; then if [[ $is_airgap -eq 0 ]]; then
echo "" echo ""
@@ -850,9 +887,6 @@ main() {
echo "Checking sudoers file." echo "Checking sudoers file."
check_sudoers check_sudoers
echo "Checking for necessary user migrations."
so-user migrate
systemctl_func "start" "$cron_service_name" systemctl_func "start" "$cron_service_name"
if [[ -n $lsl_msg ]]; then if [[ -n $lsl_msg ]]; then
@@ -938,6 +972,11 @@ while getopts ":b:f:y" opt; do
done done
shift $((OPTIND - 1)) shift $((OPTIND - 1))
if [ -f $SOUP_LOG ]; then
CURRENT_TIME=$(date +%Y%m%d.%H%M%S)
mv $SOUP_LOG $SOUP_LOG.$INSTALLEDVERSION.$CURRENT_TIME
fi
if [[ -z $UNATTENDED ]]; then if [[ -z $UNATTENDED ]]; then
cat << EOF cat << EOF

View File

@@ -3,12 +3,13 @@ NOROOT=1
. /usr/sbin/so-common . /usr/sbin/so-common
{%- set proxy = salt['pillar.get']('manager:proxy') %} {%- set proxy = salt['pillar.get']('manager:proxy') %}
{%- set noproxy = salt['pillar.get']('manager:no_proxy', '') %}
# Download the rules from the internet # Download the rules from the internet
{%- if proxy %} {%- if proxy %}
export http_proxy={{ proxy }} export http_proxy={{ proxy }}
export https_proxy={{ proxy }} export https_proxy={{ proxy }}
export no_proxy= salt['pillar.get']('manager:no_proxy') export no_proxy="{{ noproxy }}"
{%- endif %} {%- endif %}
repos="/opt/so/conf/strelka/repos.txt" repos="/opt/so/conf/strelka/repos.txt"

View File

@@ -296,7 +296,9 @@ http {
error_page 429 = @error429; error_page 429 = @error429;
location @error401 { location @error401 {
if ($request_uri ~* ^/(?!(^/api/.*))) {
add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400"; add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400";
}
return 302 /auth/self-service/login/browser; return 302 /auth/self-service/login/browser;
} }

View File

@@ -0,0 +1,14 @@
#!/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
{% set MNIC = salt['pillar.get']('sensor:interface') %}
init_monitor {{ MNIC }}

12
salt/sensor/init.sls Normal file
View File

@@ -0,0 +1,12 @@
offload_script:
file.managed:
- name: /etc/NetworkManager/dispatcher.d/pre-up.d/99-so-checksum-offload-disable
- source: salt://sensor/files/99-so-checksum-offload-disable
- mode: 755
- template: jinja
execute_checksum:
cmd.run:
- name: /etc/NetworkManager/dispatcher.d/pre-up.d/99-so-checksum-offload-disable
- onchanges:
- file: offload_script

View File

@@ -1,7 +1,9 @@
sensor: sensor:
interface: interface:
description: Main sensor monitoring interface. description: Main sensor monitoring interface.
helpLink: sensor.html helpLink: network.html
readonly: True
mtu: mtu:
description: Main IP address of the grid host. description: Maximum Transmission Unit (MTU) of the sensor monitoring interface.
helpLink: host.html helpLink: network.html
readonly: True

View File

@@ -10,6 +10,14 @@ soc:
target: target:
links: links:
- '/#/hunt?q="{value|escape}" | groupby event.module* event.dataset' - '/#/hunt?q="{value|escape}" | groupby event.module* event.dataset'
- name: actionAddToCase
description: actionAddToCaseHelp
icon: fa-briefcase
jsCall: openAddToCaseDialog
categories:
- hunt
- alerts
- dashboards
- name: actionCorrelate - name: actionCorrelate
description: actionCorrelateHelp description: actionCorrelateHelp
icon: fab fa-searchengin icon: fab fa-searchengin
@@ -1132,7 +1140,7 @@ soc:
showSubtitle: true showSubtitle: true
- name: SOC - Auth - name: SOC - Auth
description: Users authenticated to SOC grouped by IP address and identity description: Users authenticated to SOC grouped by IP address and identity
query: 'event.dataset:kratos.audit AND msg:authenticated | groupby http_request.headers.x-real-ip identity_id' query: 'event.dataset:kratos.audit AND msg:*authenticated* | groupby http_request.headers.x-real-ip identity_id'
showSubtitle: true showSubtitle: true
- name: SOC - App - name: SOC - App
description: Logs generated by the Security Onion Console (SOC) server and modules description: Logs generated by the Security Onion Console (SOC) server and modules
@@ -1397,7 +1405,7 @@ soc:
query: '* | groupby -sankey event.dataset event.category* | groupby -pie event.category | groupby -bar event.module* | groupby event.dataset | groupby event.module* | groupby event.category | groupby observer.name | groupby source.ip | groupby destination.ip | groupby destination.port | groupby destination_geo.organization_name' query: '* | groupby -sankey event.dataset event.category* | groupby -pie event.category | groupby -bar event.module* | groupby event.dataset | groupby event.module* | groupby event.category | groupby observer.name | groupby source.ip | groupby destination.ip | groupby destination.port | groupby destination_geo.organization_name'
- name: SOC Auth - name: SOC Auth
description: SOC (Security Onion Console) authentication logs description: SOC (Security Onion Console) authentication logs
query: 'event.dataset:kratos.audit AND msg:authenticated | groupby -sankey http_request.headers.x-real-ip identity_id | groupby http_request.headers.x-real-ip | groupby identity_id | groupby http_request.headers.user-agent' query: 'event.dataset:kratos.audit AND msg:*authenticated* | groupby -sankey http_request.headers.x-real-ip identity_id | groupby http_request.headers.x-real-ip | groupby identity_id | groupby http_request.headers.user-agent'
- name: Elastalerts - name: Elastalerts
description: Elastalert logs description: Elastalert logs
query: '_index: "*:elastalert*" | groupby rule_name | groupby alert_info.type' query: '_index: "*:elastalert*" | groupby rule_name | groupby alert_info.type'

View File

@@ -7,7 +7,7 @@
{% if sls in allowed_states %} {% if sls in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %} {% from 'vars/globals.map.jinja' import GLOBALS %}
{% set CUSTOMFQDN = salt['pillar.get']('elasticfleet:config:server:custom_fqdn') %} {% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
{% set global_ca_text = [] %} {% set global_ca_text = [] %}
{% set global_ca_server = [] %} {% set global_ca_server = [] %}
@@ -154,7 +154,7 @@ etc_elasticfleet_crt:
- signing_policy: elasticfleet - signing_policy: elasticfleet
- private_key: /etc/pki/elasticfleet-server.key - private_key: /etc/pki/elasticfleet-server.key
- CN: {{ GLOBALS.url_base }} - CN: {{ GLOBALS.url_base }}
- subjectAltName: DNS:{{ GLOBALS.hostname }},IP:{{ GLOBALS.node_ip }} {% if CUSTOMFQDN != "" %},DNS:{{ CUSTOMFQDN }}{% endif %} - subjectAltName: DNS:{{ GLOBALS.hostname }},IP:{{ GLOBALS.node_ip }}{% if ELASTICFLEETMERGED.config.server.custom_fqdn | length > 0 %},DNS:{{ ELASTICFLEETMERGED.config.server.custom_fqdn | join(',DNS:') }}{% endif %}
- days_remaining: 0 - days_remaining: 0
- days_valid: 820 - days_valid: 820
- backup: True - backup: True
@@ -211,7 +211,7 @@ etc_elasticfleet_logstash_crt:
- signing_policy: elasticfleet - signing_policy: elasticfleet
- private_key: /etc/pki/elasticfleet-logstash.key - private_key: /etc/pki/elasticfleet-logstash.key
- CN: {{ GLOBALS.url_base }} - CN: {{ GLOBALS.url_base }}
- subjectAltName: DNS:{{ GLOBALS.hostname }},IP:{{ GLOBALS.node_ip }} {% if CUSTOMFQDN != "" %},DNS:{{ CUSTOMFQDN }}{% endif %} - subjectAltName: DNS:{{ GLOBALS.hostname }},IP:{{ GLOBALS.node_ip }}{% if ELASTICFLEETMERGED.config.server.custom_fqdn | length > 0 %},DNS:{{ ELASTICFLEETMERGED.config.server.custom_fqdn | join(',DNS:') }}{% endif %}
- days_remaining: 0 - days_remaining: 0
- days_valid: 820 - days_valid: 820
- backup: True - backup: True

View File

@@ -8,7 +8,7 @@ NOROOT=1
{%- if proxy %} {%- if proxy %}
export http_proxy={{ proxy }} export http_proxy={{ proxy }}
export https_proxy={{ proxy }} export https_proxy={{ proxy }}
export no_proxy= salt['pillar.get']('manager:no_proxy') export no_proxy=salt['pillar.get']('manager:no_proxy')
{%- endif %} {%- endif %}
mkdir -p /tmp/yara mkdir -p /tmp/yara

View File

@@ -36,6 +36,7 @@ base:
'*_sensor and G@saltversion:{{saltversion}}': '*_sensor and G@saltversion:{{saltversion}}':
- match: compound - match: compound
- sensor
- ssl - ssl
- sensoroni - sensoroni
- telegraf - telegraf
@@ -52,6 +53,7 @@ base:
'*_eval and G@saltversion:{{saltversion}}': '*_eval and G@saltversion:{{saltversion}}':
- match: compound - match: compound
- salt.master - salt.master
- sensor
- ca - ca
- ssl - ssl
- registry - registry
@@ -118,6 +120,7 @@ base:
'*_standalone and G@saltversion:{{saltversion}}': '*_standalone and G@saltversion:{{saltversion}}':
- match: compound - match: compound
- salt.master - salt.master
- sensor
- ca - ca
- ssl - ssl
- registry - registry
@@ -196,6 +199,7 @@ base:
'*_heavynode and G@saltversion:{{saltversion}}': '*_heavynode and G@saltversion:{{saltversion}}':
- match: compound - match: compound
- sensor
- ssl - ssl
- sensoroni - sensoroni
- nginx - nginx
@@ -216,6 +220,7 @@ base:
'*_import and G@saltversion:{{saltversion}}': '*_import and G@saltversion:{{saltversion}}':
- match: compound - match: compound
- salt.master - salt.master
- sensor
- ca - ca
- ssl - ssl
- registry - registry

View File

@@ -85,12 +85,13 @@ analyze_system() {
desktop_salt_local() { desktop_salt_local() {
SALTVERSION=$(egrep 'version: [0-9]{4}' ../salt/salt/master.defaults.yaml | sed 's/^.*version: //')
# Install everything using local salt # Install everything using local salt
# Set the repo # Set the repo
securityonion_repo securityonion_repo
gpg_rpm_import gpg_rpm_import
# Install salt # Install salt
logCmd "yum -y install salt-minion-3004.1 httpd-tools python3 python36-docker python36-dateutil python36-m2crypto python36-mysql python36-packaging python36-lxml yum-utils device-mapper-persistent-data lvm2 openssl jq" logCmd "yum -y install salt-minion-$SALTVERSION httpd-tools python3 python36-docker python36-dateutil python36-m2crypto python36-mysql python36-packaging python36-lxml yum-utils device-mapper-persistent-data lvm2 openssl jq"
logCmd "yum -y update --exclude=salt*" logCmd "yum -y update --exclude=salt*"
logCmd "salt-call state.apply desktop --local --file-root=../salt/ -l info" logCmd "salt-call state.apply desktop --local --file-root=../salt/ -l info"
@@ -1014,25 +1015,9 @@ detect_os() {
} }
download_elastic_agent_artifacts() { download_elastic_agent_artifacts() {
agentArchive=/nsm/elastic-fleet/artifacts/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.tar.gz if ! update_elastic_agent 2>&1 | tee -a "$setup_log"; then
agentMd5=/nsm/elastic-fleet/artifacts/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.md5
beatsDir=/nsm/elastic-fleet/artifacts/beats/elastic-agent
logCmd "mkdir -p $beatsDir"
if [[ ! -f "$agentArchive" ]]; then
retry 15 10 "curl --fail --retry 5 --retry-delay 15 -L https://repo.securityonion.net/file/so-repo/prod/2.4/elasticagent/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.tar.gz --output $agentArchive" "" ""
retry 15 10 "curl --fail --retry 5 --retry-delay 15 -L https://repo.securityonion.net/file/so-repo/prod/2.4/elasticagent/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.md5 --output $agentMd5" "" ""
SOURCEHASH=$(md5sum $agentArchive | awk '{ print $1 }')
HASH=$(cat $agentMd5)
if [[ "$HASH" == "$SOURCEHASH" ]]; then
info "Elastic Agent source hash is good."
else
info "Unable to download the Elastic Agent source files."
fail_setup fail_setup
fi fi
fi
logCmd "tar -xf $agentArchive -C $beatsDir"
} }
installer_progress_loop() { installer_progress_loop() {
@@ -1897,7 +1882,9 @@ securityonion_repo() {
if [[ $is_oracle ]]; then if [[ $is_oracle ]]; then
logCmd "dnf -v clean all" logCmd "dnf -v clean all"
logCmd "mkdir -vp /root/oldrepos" logCmd "mkdir -vp /root/oldrepos"
if [ -n "$(ls -A /etc/yum.repos.d/ 2>/dev/null)" ]; then
logCmd "mv -v /etc/yum.repos.d/* /root/oldrepos/" logCmd "mv -v /etc/yum.repos.d/* /root/oldrepos/"
fi
if [[ $is_desktop_iso ]]; then if [[ $is_desktop_iso ]]; then
gpg_rpm_import gpg_rpm_import
if [[ ! $is_airgap ]]; then if [[ ! $is_airgap ]]; then

View File

@@ -661,6 +661,7 @@ if ! [[ -f $install_opt_file ]]; then
logCmd "salt-call state.show_top" logCmd "salt-call state.show_top"
sleep 2 # Debug RSA Key format errors sleep 2 # Debug RSA Key format errors
logCmd "salt-key -ya $MINION_ID" logCmd "salt-key -ya $MINION_ID"
logCmd "salt-call saltutil.sync_all"
logCmd "salt-call state.apply common.packages" logCmd "salt-call state.apply common.packages"
logCmd "salt-call state.apply common" logCmd "salt-call state.apply common"
@@ -694,9 +695,11 @@ if ! [[ -f $install_opt_file ]]; then
logCmd "so-rule-update" logCmd "so-rule-update"
title "Downloading YARA rules" title "Downloading YARA rules"
logCmd "su socore -c '/usr/sbin/so-yara-download'" logCmd "su socore -c '/usr/sbin/so-yara-download'"
if [[ $monints ]]; then if [[ $monints || $is_import ]]; then
title "Restarting Suricata to pick up the new rules" title "Restarting Suricata to pick up the new rules"
logCmd "so-suricata-restart" logCmd "so-suricata-restart"
fi
if [[ $monints ]]; then
title "Restarting Strelka to use new rules" title "Restarting Strelka to use new rules"
logCmd "so-strelka-restart" logCmd "so-strelka-restart"
fi fi

View File

@@ -51,6 +51,7 @@ log_has_errors() {
grep -vE "/nsm/rules/sigma*" | \ grep -vE "/nsm/rules/sigma*" | \
grep -vE "/nsm/rules/yara*" | \ grep -vE "/nsm/rules/yara*" | \
grep -vE "Failed to restart snapd" | \ grep -vE "Failed to restart snapd" | \
grep -vE "Login Failed Details" | \
grep -vE "Running scope as unit" &> "$error_log" grep -vE "Running scope as unit" &> "$error_log"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then

View File

@@ -1012,9 +1012,9 @@ whiptail_manager_unreachable() {
local msg local msg
read -r -d '' msg <<- EOM read -r -d '' msg <<- EOM
Setup is unable to access the manager at this time. Setup is unable to access the manager. This most likely means that you need to allow this machine to connect through the manager's firewall.
Run the following on the manager: You can either go to SOC --> Administration --> Configuration and choose the correct firewall option from the list OR you can run the following command on the manager:
sudo so-firewall-minion --role=$install_type --ip=$MAINIP sudo so-firewall-minion --role=$install_type --ip=$MAINIP

BIN
sigs

Binary file not shown.

Binary file not shown.