mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Compare commits
602 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d99acdb72c | ||
|
|
0d70d2e6f8 | ||
|
|
64b37cedc7 | ||
|
|
852f588512 | ||
|
|
a197d5addf | ||
|
|
3983e08fe5 | ||
|
|
8f8651c52c | ||
|
|
85e059a766 | ||
|
|
2df871adcd | ||
|
|
3e1a31c0b0 | ||
|
|
4e9bfbefda | ||
|
|
1a1e3caec8 | ||
|
|
be7dcdb442 | ||
|
|
8a9c7fa279 | ||
|
|
bfa7c85e27 | ||
|
|
ed2c836250 | ||
|
|
1ae46b82ec | ||
|
|
6e8777b9d6 | ||
|
|
def3637bf6 | ||
|
|
64cc894948 | ||
|
|
55b6efba7b | ||
|
|
cf9be3521d | ||
|
|
6113bcc261 | ||
|
|
810ffbdaf5 | ||
|
|
c1a8e1971b | ||
|
|
7451aa990b | ||
|
|
839ab30b2c | ||
|
|
9631327c71 | ||
|
|
b6fe8dec3b | ||
|
|
fd877a2256 | ||
|
|
26a22b8e3b | ||
|
|
cc15e9a0b1 | ||
|
|
4a03862fc4 | ||
|
|
069f6eccbf | ||
|
|
be1f641bf0 | ||
|
|
8910b5c3a7 | ||
|
|
333a7e6173 | ||
|
|
b893a2b887 | ||
|
|
b4c1c56e72 | ||
|
|
45f626887d | ||
|
|
5678e66b39 | ||
|
|
9fa625189f | ||
|
|
e06ca75677 | ||
|
|
a47a3d51c9 | ||
|
|
b024dae72e | ||
|
|
8a0e0e88e0 | ||
|
|
2c8bc16c8f | ||
|
|
37c13362df | ||
|
|
51e8839daf | ||
|
|
fcd3f81400 | ||
|
|
c8213fa3d4 | ||
|
|
add66e750e | ||
|
|
6a097beaff | ||
|
|
79fefd83ef | ||
|
|
d52abcbcbd | ||
|
|
c18c865764 | ||
|
|
ef1e296415 | ||
|
|
ae89260793 | ||
|
|
34dab9009c | ||
|
|
ef7cdf27bf | ||
|
|
c39b516f38 | ||
|
|
39860ea6bd | ||
|
|
701cfe7e9a | ||
|
|
4ae34f928c | ||
|
|
ff577cdf41 | ||
|
|
4a6ad7c87e | ||
|
|
b30f964974 | ||
|
|
262bf03595 | ||
|
|
ae17a3aeb8 | ||
|
|
ab66f175c5 | ||
|
|
8f3ba7633c | ||
|
|
5949119cb5 | ||
|
|
6058400aad | ||
|
|
f042312aac | ||
|
|
52fd3c0470 | ||
|
|
6ea8eab9af | ||
|
|
775f274962 | ||
|
|
e500e24802 | ||
|
|
298f7da90b | ||
|
|
38d60752b7 | ||
|
|
25ca70efd8 | ||
|
|
bdfec5176d | ||
|
|
ece79379a5 | ||
|
|
ac6f1df86f | ||
|
|
4507a89d95 | ||
|
|
2be7ccac33 | ||
|
|
eba5d271aa | ||
|
|
3552abfca1 | ||
|
|
1d45472b48 | ||
|
|
68c683e3bf | ||
|
|
050058a959 | ||
|
|
09c94ddf95 | ||
|
|
54367db99b | ||
|
|
56daae64be | ||
|
|
00deab9305 | ||
|
|
fa6fd20ff9 | ||
|
|
d195efa8e5 | ||
|
|
a7eb3cd38d | ||
|
|
5baa4cb6a5 | ||
|
|
a361ca0e19 | ||
|
|
9cf15cdae5 | ||
|
|
d5477b4721 | ||
|
|
5a2fa26d72 | ||
|
|
61a23509a1 | ||
|
|
25698dafe3 | ||
|
|
186710964b | ||
|
|
3b32eb539f | ||
|
|
6ee69ff21b | ||
|
|
00cc640224 | ||
|
|
40721d7dec | ||
|
|
e76ee07932 | ||
|
|
122e34b69c | ||
|
|
1f2475c1c5 | ||
|
|
141fbaced1 | ||
|
|
fa9fe82046 | ||
|
|
fad87a8789 | ||
|
|
9287209750 | ||
|
|
982967fdde | ||
|
|
fb3af255d9 | ||
|
|
3e3c923ab9 | ||
|
|
b00cc88801 | ||
|
|
e9b85337ff | ||
|
|
fd33a6cebe | ||
|
|
cdf766eeae | ||
|
|
8fc82fa3ef | ||
|
|
6ed1cc3875 | ||
|
|
84f138772f | ||
|
|
71c7ffae3e | ||
|
|
bcce205430 | ||
|
|
943cbdbf1f | ||
|
|
43e0c3a60b | ||
|
|
d5069d12cf | ||
|
|
e65c9e5c7c | ||
|
|
4bcb7403a9 | ||
|
|
bef3a6921c | ||
|
|
f7bef9200b | ||
|
|
bb6f3107bc | ||
|
|
3467f30603 | ||
|
|
d4ee2b86e6 | ||
|
|
f2a1e89633 | ||
|
|
abae673568 | ||
|
|
747d62dae5 | ||
|
|
5ca3dc492c | ||
|
|
85b9cac110 | ||
|
|
40780f192e | ||
|
|
7222f1faa5 | ||
|
|
e07e0b201d | ||
|
|
9d3c82a589 | ||
|
|
04b3a20e22 | ||
|
|
cb6fe75ddb | ||
|
|
8ab12c71a1 | ||
|
|
046cc0fbb0 | ||
|
|
8c69e19419 | ||
|
|
2a324eac32 | ||
|
|
8db3602679 | ||
|
|
08abad747d | ||
|
|
c73970620d | ||
|
|
34174a3290 | ||
|
|
0ea29144a8 | ||
|
|
3ea1ec99d5 | ||
|
|
9302b9302b | ||
|
|
b4b449aa14 | ||
|
|
4689e32ce4 | ||
|
|
2184c6d59f | ||
|
|
9183c0a92c | ||
|
|
88eb5b1d61 | ||
|
|
5493b3ef91 | ||
|
|
4a510df205 | ||
|
|
faa78c0e26 | ||
|
|
79e7b1da4d | ||
|
|
03487c2a31 | ||
|
|
e912b2fd96 | ||
|
|
0ab9577863 | ||
|
|
bf100a2310 | ||
|
|
2092044335 | ||
|
|
e730efb4ec | ||
|
|
76cdc45fad | ||
|
|
069997a65c | ||
|
|
6f7bc650a0 | ||
|
|
a9da761fab | ||
|
|
95df18c545 | ||
|
|
a4d5f58256 | ||
|
|
3f7cdb933f | ||
|
|
74ca4487de | ||
|
|
4b07d5e457 | ||
|
|
041d193f2d | ||
|
|
0bef8b6662 | ||
|
|
b5087b815a | ||
|
|
d2a74c80e2 | ||
|
|
741f674a4c | ||
|
|
29c5f3212f | ||
|
|
174ed84750 | ||
|
|
7a595df5b6 | ||
|
|
2b07d89b5a | ||
|
|
e6ae1af85f | ||
|
|
ce313d8dc4 | ||
|
|
fddef1a6f4 | ||
|
|
cda36f178b | ||
|
|
bec437c2cf | ||
|
|
996bf0768b | ||
|
|
0bd5ddf6a6 | ||
|
|
8016511414 | ||
|
|
eb18ec552c | ||
|
|
fabe3c87f2 | ||
|
|
7099ed4bf5 | ||
|
|
1ccc5480e1 | ||
|
|
d6fa54b606 | ||
|
|
3323e900ef | ||
|
|
7a9f801eb1 | ||
|
|
38a5b86813 | ||
|
|
23221065eb | ||
|
|
5e8d09be51 | ||
|
|
397d8d0964 | ||
|
|
3248edea8b | ||
|
|
bf3b609a44 | ||
|
|
100601c452 | ||
|
|
31a0c2bc82 | ||
|
|
797d2c4dba | ||
|
|
fd4cb0b7a8 | ||
|
|
c717773fc3 | ||
|
|
ce04b109fe | ||
|
|
4affb20b27 | ||
|
|
724f5cad78 | ||
|
|
8323f3f57a | ||
|
|
a8598a50e4 | ||
|
|
3b0c2b3e91 | ||
|
|
1ffa7afefa | ||
|
|
188d844d27 | ||
|
|
b4e9a44572 | ||
|
|
7e4d7a6985 | ||
|
|
d9b4c09cf0 | ||
|
|
ce8db8abdb | ||
|
|
bf8ca590d0 | ||
|
|
97594f84cb | ||
|
|
f8903c2554 | ||
|
|
9eb1e6a448 | ||
|
|
3cfbc61f4e | ||
|
|
10553938b5 | ||
|
|
125f7d6262 | ||
|
|
940bac3634 | ||
|
|
5043b970ef | ||
|
|
a3ca84db66 | ||
|
|
bf79c92456 | ||
|
|
8f97973fac | ||
|
|
4d6d2edd17 | ||
|
|
e427f8178d | ||
|
|
a13b31fbcc | ||
|
|
d4e5ab477f | ||
|
|
58e4205602 | ||
|
|
6b54a29ac7 | ||
|
|
3ebedcd4e8 | ||
|
|
179efa3a51 | ||
|
|
91480abaa0 | ||
|
|
55a8f6aa7a | ||
|
|
8f0b0ac936 | ||
|
|
ef2fe2bb61 | ||
|
|
46581c0528 | ||
|
|
2253603544 | ||
|
|
e7e1f4c155 | ||
|
|
b3c08229db | ||
|
|
f736d9f8dd | ||
|
|
8cf0a3da98 | ||
|
|
8d01b87ab5 | ||
|
|
8f476bbbdd | ||
|
|
8ff6d1639a | ||
|
|
daebe90b6e | ||
|
|
44617fdddf | ||
|
|
02f0ef989b | ||
|
|
36ce389202 | ||
|
|
1c8a8f6b7b | ||
|
|
160d307f4a | ||
|
|
4212afe0c9 | ||
|
|
0ea504c16a | ||
|
|
8ca15a6679 | ||
|
|
929896c191 | ||
|
|
22e6e45667 | ||
|
|
edfd985353 | ||
|
|
18f2c7b482 | ||
|
|
aa93e2b48f | ||
|
|
7a3c7322fc | ||
|
|
618b94b9b6 | ||
|
|
f50a89a0cf | ||
|
|
482b6eb699 | ||
|
|
e6ecd609cc | ||
|
|
2926527ad0 | ||
|
|
73909c4dea | ||
|
|
c055427e40 | ||
|
|
194f480017 | ||
|
|
0936dbdb1c | ||
|
|
f12947362b | ||
|
|
bfa6aabc4b | ||
|
|
34c2116669 | ||
|
|
b7aef32eeb | ||
|
|
8df9e020ac | ||
|
|
0ac19142c4 | ||
|
|
d277bf6d05 | ||
|
|
13ab4c66eb | ||
|
|
f5c044e3e3 | ||
|
|
be0b2b99e9 | ||
|
|
1939fe85d7 | ||
|
|
f8242a931c | ||
|
|
ffd01d6975 | ||
|
|
f1faab7b1a | ||
|
|
7b2ec05dbf | ||
|
|
bcd5bdd82d | ||
|
|
3b1cea94d1 | ||
|
|
88abd284a7 | ||
|
|
891a7592d8 | ||
|
|
e43a80b9c6 | ||
|
|
4ef38f8d04 | ||
|
|
049daa6701 | ||
|
|
df21b28d5c | ||
|
|
b0c74cf38c | ||
|
|
ae233b5757 | ||
|
|
8ec0b95f02 | ||
|
|
2f8b5afe3e | ||
|
|
944817732b | ||
|
|
17a1189e42 | ||
|
|
50345628f0 | ||
|
|
7dcca6f364 | ||
|
|
6e9bdde9e2 | ||
|
|
2e32b53158 | ||
|
|
e1f7c090f3 | ||
|
|
2a4eac74c4 | ||
|
|
fe09479dde | ||
|
|
995d618ff5 | ||
|
|
560e510b44 | ||
|
|
b4c8b439a0 | ||
|
|
85e2a14f1e | ||
|
|
6f14f27ca0 | ||
|
|
59a4b148bc | ||
|
|
2159914742 | ||
|
|
47d69bbc9e | ||
|
|
7273c8a066 | ||
|
|
4079f8a8e8 | ||
|
|
f1781b1fde | ||
|
|
537f7529f8 | ||
|
|
249651edc7 | ||
|
|
e0bbc8cc51 | ||
|
|
f156106e57 | ||
|
|
bcdf826204 | ||
|
|
636687ac59 | ||
|
|
9408d62c65 | ||
|
|
f85ecf254e | ||
|
|
9f984036c5 | ||
|
|
b0914fa604 | ||
|
|
9759990233 | ||
|
|
bb523c44e6 | ||
|
|
013b706ce4 | ||
|
|
583b65e952 | ||
|
|
84b75a38a3 | ||
|
|
6de70ec820 | ||
|
|
d6043d091b | ||
|
|
19d22e1f8a | ||
|
|
35c741ae63 | ||
|
|
76aadbd04e | ||
|
|
a99246c600 | ||
|
|
0039877779 | ||
|
|
9a91674688 | ||
|
|
74e315841a | ||
|
|
cd5abf924c | ||
|
|
845ab92d36 | ||
|
|
516634ef8d | ||
|
|
18217ba38b | ||
|
|
6e756b3586 | ||
|
|
e7e6243399 | ||
|
|
18278a97ac | ||
|
|
b693373d8d | ||
|
|
58f922aac3 | ||
|
|
b1c5b83fd5 | ||
|
|
caaa8cc764 | ||
|
|
d53945888c | ||
|
|
d3d11ff67b | ||
|
|
b2b221fa46 | ||
|
|
e20891ac44 | ||
|
|
8cca792a8f | ||
|
|
5dad143c42 | ||
|
|
9dd3199ec4 | ||
|
|
71e0014115 | ||
|
|
0fec46505d | ||
|
|
8023e79020 | ||
|
|
3ef8106d8d | ||
|
|
650008e1e6 | ||
|
|
d91913e58e | ||
|
|
12aa4033b6 | ||
|
|
a795f0a487 | ||
|
|
2006677a22 | ||
|
|
32839f8a53 | ||
|
|
0af6afa216 | ||
|
|
8cb836a17a | ||
|
|
432d231a0e | ||
|
|
9726ff9ce6 | ||
|
|
9cf63545bc | ||
|
|
76c7c46887 | ||
|
|
e440f6c44a | ||
|
|
ed129bcf1f | ||
|
|
f4de5e28bf | ||
|
|
07b5f1d23e | ||
|
|
0f6805823e | ||
|
|
0d93b15a63 | ||
|
|
dbe22f901d | ||
|
|
ebc5a4314a | ||
|
|
df07cc578c | ||
|
|
2e23e0d690 | ||
|
|
a7b9b565fd | ||
|
|
e7070ef217 | ||
|
|
8793965f4a | ||
|
|
ddcd487edc | ||
|
|
0db439df1e | ||
|
|
82c7832d60 | ||
|
|
a2b52a1a98 | ||
|
|
3c22738ae1 | ||
|
|
9d0dca05b1 | ||
|
|
2ccf77eaef | ||
|
|
8245b25835 | ||
|
|
b68685e00e | ||
|
|
90f085b2d7 | ||
|
|
6d6779bba6 | ||
|
|
0a1ab29d19 | ||
|
|
ea1ab75072 | ||
|
|
6ea3a651a4 | ||
|
|
4dc3a6aa35 | ||
|
|
59b016695f | ||
|
|
df590bfd23 | ||
|
|
d254fd960a | ||
|
|
489f702e47 | ||
|
|
0734998315 | ||
|
|
9b060fb2d1 | ||
|
|
bb386f9935 | ||
|
|
ebac17ce38 | ||
|
|
2950779d91 | ||
|
|
02d4813ef7 | ||
|
|
225ed1c14a | ||
|
|
96dab31ab0 | ||
|
|
aa8a14d74a | ||
|
|
dbb9f90f00 | ||
|
|
dd20002fd5 | ||
|
|
5c6f8f9d47 | ||
|
|
ff69d022b3 | ||
|
|
fb31b56c8b | ||
|
|
38e37a0385 | ||
|
|
5d077d278e | ||
|
|
0dc0780e28 | ||
|
|
332c6877b8 | ||
|
|
ef7a934b9d | ||
|
|
cc0697cefa | ||
|
|
4f384991ba | ||
|
|
9405990a2e | ||
|
|
6ea1a83afe | ||
|
|
4d84b64056 | ||
|
|
8b49876e26 | ||
|
|
bc8e200919 | ||
|
|
63047b4b85 | ||
|
|
95a9d14832 | ||
|
|
f07e583013 | ||
|
|
ae63b52e7a | ||
|
|
9eedb874fb | ||
|
|
a6f88b2843 | ||
|
|
86cb1abad4 | ||
|
|
567d80bb01 | ||
|
|
d2848b9985 | ||
|
|
83e7493691 | ||
|
|
1ec45fb4ae | ||
|
|
c1e32ed680 | ||
|
|
fa06a38a3b | ||
|
|
d287dd2412 | ||
|
|
8fa2b14c98 | ||
|
|
948f900673 | ||
|
|
a5735e6654 | ||
|
|
ae7c0a26be | ||
|
|
bbdb47703d | ||
|
|
7f64d57111 | ||
|
|
e7db1a99bd | ||
|
|
7d25e8a08b | ||
|
|
d37023e0f5 | ||
|
|
9d8fb79d9f | ||
|
|
c864cc607f | ||
|
|
80a3d8dcf8 | ||
|
|
ac35a345ff | ||
|
|
958635b012 | ||
|
|
6ba11f835d | ||
|
|
1cc8a78aa5 | ||
|
|
7dcd934269 | ||
|
|
bedbd39b82 | ||
|
|
7d97e3590c | ||
|
|
bdbc637852 | ||
|
|
10d04f760d | ||
|
|
ebb0e615b9 | ||
|
|
f20feabda2 | ||
|
|
9b40318bfe | ||
|
|
fc44474519 | ||
|
|
229657f7d2 | ||
|
|
fb28faa4e3 | ||
|
|
36ae09ac4a | ||
|
|
55344725e7 | ||
|
|
875908dc90 | ||
|
|
f2b677bfcb | ||
|
|
48f81d9ac6 | ||
|
|
94fd79cd28 | ||
|
|
aecc0c025e | ||
|
|
91ad7f26bf | ||
|
|
c65e722164 | ||
|
|
749b21e684 | ||
|
|
1154b533d6 | ||
|
|
0f9bf9deb6 | ||
|
|
c93dfa7b33 | ||
|
|
81c4d879eb | ||
|
|
dc429494ac | ||
|
|
294601ff64 | ||
|
|
707528d7e8 | ||
|
|
c1e245043e | ||
|
|
f94e421f4e | ||
|
|
38f985ae22 | ||
|
|
9d674d6d3a | ||
|
|
7bfac1e8df | ||
|
|
65c3849c7b | ||
|
|
f8c7413b15 | ||
|
|
e51f60f7fa | ||
|
|
535820bfa7 | ||
|
|
0fa001ed92 | ||
|
|
a714d36b99 | ||
|
|
455da7ec5d | ||
|
|
4b244645ba | ||
|
|
6b81419d38 | ||
|
|
e167bfed20 | ||
|
|
df305c49a6 | ||
|
|
3f3fe78322 | ||
|
|
13f0ddabfc | ||
|
|
19d14cf277 | ||
|
|
a49ddfb887 | ||
|
|
827a571db8 | ||
|
|
989e2b8b78 | ||
|
|
0a57b78900 | ||
|
|
74dd2187fb | ||
|
|
ea5e25c4a5 | ||
|
|
afe40fe87b | ||
|
|
e9a6155e44 | ||
|
|
deb38844ba | ||
|
|
97466957a7 | ||
|
|
cdb6dfcea0 | ||
|
|
5059373485 | ||
|
|
af62e64852 | ||
|
|
b03408df6b | ||
|
|
5836d22525 | ||
|
|
a4239d7fe4 | ||
|
|
5bd15b91ea | ||
|
|
a0533dd6b5 | ||
|
|
f7a60a011b | ||
|
|
17160dcdbe | ||
|
|
0dd80a664f | ||
|
|
1e0525b1ad | ||
|
|
7050b1fce5 | ||
|
|
7fe0182ede | ||
|
|
4d1cb37468 | ||
|
|
8f15d794bc | ||
|
|
baf5be1a3a | ||
|
|
9cf150f988 | ||
|
|
7800e90776 | ||
|
|
2d44b69e8d | ||
|
|
aa5c0a7351 | ||
|
|
eef1f49d09 | ||
|
|
cfe5019f51 | ||
|
|
f6a199156b | ||
|
|
ac96ded2dc | ||
|
|
aa15f3ca4a | ||
|
|
3a3182a51f | ||
|
|
36207d0440 | ||
|
|
88bfe7c49c | ||
|
|
7116c2103b | ||
|
|
b49355d346 | ||
|
|
aecde2dd54 | ||
|
|
f2d8c7f10d | ||
|
|
627d4da432 | ||
|
|
a18c89d804 | ||
|
|
416d98071d | ||
|
|
d73f3bb6f8 | ||
|
|
48931116ab | ||
|
|
544c473338 | ||
|
|
5d0cef5e3d | ||
|
|
7653ad56a9 | ||
|
|
1374ac0628 | ||
|
|
b506f0455f | ||
|
|
e7a833e890 | ||
|
|
6e202f2ee0 | ||
|
|
59ae5f63cf | ||
|
|
9fd2ab530e | ||
|
|
fffca7e0d8 | ||
|
|
3a66af0b16 | ||
|
|
32482710db | ||
|
|
95c068a37f | ||
|
|
2b412b6a48 | ||
|
|
81e914ab23 | ||
|
|
8983ff994c | ||
|
|
3ee562a243 | ||
|
|
ae464c38b2 | ||
|
|
5f0f20918b | ||
|
|
ae7672f395 | ||
|
|
22ebb5af03 | ||
|
|
d178a7c5f3 | ||
|
|
762441fdda | ||
|
|
868286a58a | ||
|
|
146c1a4d75 |
2
.github/workflows/leaktest.yml
vendored
2
.github/workflows/leaktest.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: leak-test
|
name: leak-test
|
||||||
|
|
||||||
on: [push,pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## Security Onion 2.3.20
|
## Security Onion 2.3.30
|
||||||
|
|
||||||
Security Onion 2.3.20 is here!
|
Security Onion 2.3.30 is here!
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
### 2.3.20 ISO image built on 2020/12/20
|
### 2.3.30 ISO image built on 2021/03/01
|
||||||
|
|
||||||
### Download and Verify
|
### Download and Verify
|
||||||
|
|
||||||
2.3.20 ISO image:
|
2.3.30 ISO image:
|
||||||
https://download.securityonion.net/file/securityonion/securityonion-2.3.20.iso
|
https://download.securityonion.net/file/securityonion/securityonion-2.3.30.iso
|
||||||
|
|
||||||
MD5: E348FA65A46FD3FBA0D574D9C1A0582D
|
MD5: 65202BA0F7661A5E27087F097B8E571E
|
||||||
SHA1: 4A6E6D4E0B31ECA1B72E642E3DB2C186B59009D6
|
SHA1: 14E842E39EDBB55A104263281CF25BF88A2E9D67
|
||||||
SHA256: 25DE77097903640771533FA13094D0720A032B70223875F8C77A92F5C44CA687
|
SHA256: 210B37B9E3DFC827AFE2940E2C87B175ADA968EDD04298A5926F63D9269847B7
|
||||||
|
|
||||||
Signature for ISO image:
|
Signature for ISO image:
|
||||||
https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.20.iso.sig
|
https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.30.iso.sig
|
||||||
|
|
||||||
Signing key:
|
Signing key:
|
||||||
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS
|
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS
|
||||||
@@ -24,22 +24,22 @@ wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/ma
|
|||||||
|
|
||||||
Download the signature file for the ISO:
|
Download the signature file for the ISO:
|
||||||
```
|
```
|
||||||
wget https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.20.iso.sig
|
wget https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.30.iso.sig
|
||||||
```
|
```
|
||||||
|
|
||||||
Download the ISO image:
|
Download the ISO image:
|
||||||
```
|
```
|
||||||
wget https://download.securityonion.net/file/securityonion/securityonion-2.3.20.iso
|
wget https://download.securityonion.net/file/securityonion/securityonion-2.3.30.iso
|
||||||
```
|
```
|
||||||
|
|
||||||
Verify the downloaded ISO image using the signature file:
|
Verify the downloaded ISO image using the signature file:
|
||||||
```
|
```
|
||||||
gpg --verify securityonion-2.3.20.iso.sig securityonion-2.3.20.iso
|
gpg --verify securityonion-2.3.30.iso.sig securityonion-2.3.30.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 Sun 20 Dec 2020 11:11:28 AM EST using RSA key ID FE507013
|
gpg: Signature made Mon 01 Mar 2021 02:15:28 PM EST 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.
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
# user: socore
|
# user: socore
|
||||||
|
|
||||||
log_file: /opt/so/log/salt/master
|
log_file: /opt/so/log/salt/master
|
||||||
|
log_level_logfile: info
|
||||||
|
log_level: info
|
||||||
|
|
||||||
##### File Server settings #####
|
##### File Server settings #####
|
||||||
##########################################
|
##########################################
|
||||||
|
|||||||
@@ -8,4 +8,6 @@ logrotate:
|
|||||||
create
|
create
|
||||||
extension .log
|
extension .log
|
||||||
dateext
|
dateext
|
||||||
dateyesterday
|
dateyesterday
|
||||||
|
group_conf: |
|
||||||
|
su root socore
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||||
|
{% if sls in allowed_states %}
|
||||||
|
|
||||||
{% set MANAGER = salt['grains.get']('master') %}
|
{% set MANAGER = salt['grains.get']('master') %}
|
||||||
airgapyum:
|
airgapyum:
|
||||||
file.managed:
|
file.managed:
|
||||||
@@ -57,4 +60,12 @@ agssrepo:
|
|||||||
|
|
||||||
agwazrepo:
|
agwazrepo:
|
||||||
file.absent:
|
file.absent:
|
||||||
- name: /etc/yum.repos.d/wazuh.repo
|
- name: /etc/yum.repos.d/wazuh.repo
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{{sls}}_state_not_allowed:
|
||||||
|
test.fail_without_changes:
|
||||||
|
- name: {{sls}}_state_not_allowed
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
299
salt/allowed_states.map.jinja
Normal file
299
salt/allowed_states.map.jinja
Normal file
@@ -0,0 +1,299 @@
|
|||||||
|
{% set ZEEKVER = salt['pillar.get']('global:mdengine', '') %}
|
||||||
|
{% set WAZUH = salt['pillar.get']('global:wazuh', '0') %}
|
||||||
|
{% set THEHIVE = salt['pillar.get']('manager:thehive', '0') %}
|
||||||
|
{% set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') %}
|
||||||
|
{% set FREQSERVER = salt['pillar.get']('manager:freq', '0') %}
|
||||||
|
{% set DOMAINSTATS = salt['pillar.get']('manager:domainstats', '0') %}
|
||||||
|
{% set FLEETMANAGER = salt['pillar.get']('global:fleet_manager', False) %}
|
||||||
|
{% set FLEETNODE = salt['pillar.get']('global:fleet_node', False) %}
|
||||||
|
{% set ELASTALERT = salt['pillar.get']('elastalert:enabled', True) %}
|
||||||
|
{% set ELASTICSEARCH = salt['pillar.get']('elasticsearch:enabled', True) %}
|
||||||
|
{% set FILEBEAT = salt['pillar.get']('filebeat:enabled', True) %}
|
||||||
|
{% set KIBANA = salt['pillar.get']('kibana:enabled', True) %}
|
||||||
|
{% set LOGSTASH = salt['pillar.get']('logstash:enabled', True) %}
|
||||||
|
{% set CURATOR = salt['pillar.get']('curator:enabled', True) %}
|
||||||
|
{% set REDIS = salt['pillar.get']('redis:enabled', True) %}
|
||||||
|
{% set STRELKA = salt['pillar.get']('strelka:enabled', '0') %}
|
||||||
|
{% set ISAIRGAP = salt['pillar.get']('global:airgap', False) %}
|
||||||
|
{% import_yaml 'salt/minion.defaults.yaml' as saltversion %}
|
||||||
|
{% set saltversion = saltversion.salt.minion.version %}
|
||||||
|
|
||||||
|
{# this is the list we are returning from this map file, it gets built below #}
|
||||||
|
{% set allowed_states= [] %}
|
||||||
|
|
||||||
|
{% if grains.saltversion | string == saltversion | string %}
|
||||||
|
|
||||||
|
{% set allowed_states= salt['grains.filter_by']({
|
||||||
|
'so-eval': [
|
||||||
|
'salt.master',
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'registry',
|
||||||
|
'manager',
|
||||||
|
'nginx',
|
||||||
|
'telegraf',
|
||||||
|
'influxdb',
|
||||||
|
'grafana',
|
||||||
|
'soc',
|
||||||
|
'firewall',
|
||||||
|
'idstools',
|
||||||
|
'suricata.manager',
|
||||||
|
'healthcheck',
|
||||||
|
'pcap',
|
||||||
|
'suricata',
|
||||||
|
'utility',
|
||||||
|
'schedule',
|
||||||
|
'soctopus',
|
||||||
|
'tcpreplay',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-heavynode': [
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'nginx',
|
||||||
|
'telegraf',
|
||||||
|
'firewall',
|
||||||
|
'pcap',
|
||||||
|
'suricata',
|
||||||
|
'healthcheck',
|
||||||
|
'schedule',
|
||||||
|
'tcpreplay',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-helixsensor': [
|
||||||
|
'salt.master',
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'registry',
|
||||||
|
'telegraf',
|
||||||
|
'firewall',
|
||||||
|
'idstools',
|
||||||
|
'suricata.manager',
|
||||||
|
'zeek',
|
||||||
|
'redis',
|
||||||
|
'elasticsearch',
|
||||||
|
'logstash',
|
||||||
|
'schedule',
|
||||||
|
'tcpreplay',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-fleet': [
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'nginx',
|
||||||
|
'telegraf',
|
||||||
|
'firewall',
|
||||||
|
'mysql',
|
||||||
|
'redis',
|
||||||
|
'fleet',
|
||||||
|
'fleet.install_package',
|
||||||
|
'filebeat',
|
||||||
|
'schedule',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-import': [
|
||||||
|
'salt.master',
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'registry',
|
||||||
|
'manager',
|
||||||
|
'nginx',
|
||||||
|
'soc',
|
||||||
|
'firewall',
|
||||||
|
'idstools',
|
||||||
|
'suricata.manager',
|
||||||
|
'pcap',
|
||||||
|
'utility',
|
||||||
|
'suricata',
|
||||||
|
'zeek',
|
||||||
|
'schedule',
|
||||||
|
'tcpreplay',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-manager': [
|
||||||
|
'salt.master',
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'registry',
|
||||||
|
'manager',
|
||||||
|
'nginx',
|
||||||
|
'telegraf',
|
||||||
|
'influxdb',
|
||||||
|
'grafana',
|
||||||
|
'soc',
|
||||||
|
'firewall',
|
||||||
|
'idstools',
|
||||||
|
'suricata.manager',
|
||||||
|
'utility',
|
||||||
|
'schedule',
|
||||||
|
'soctopus',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-managersearch': [
|
||||||
|
'salt.master',
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'registry',
|
||||||
|
'nginx',
|
||||||
|
'telegraf',
|
||||||
|
'influxdb',
|
||||||
|
'grafana',
|
||||||
|
'soc',
|
||||||
|
'firewall',
|
||||||
|
'manager',
|
||||||
|
'idstools',
|
||||||
|
'suricata.manager',
|
||||||
|
'utility',
|
||||||
|
'schedule',
|
||||||
|
'soctopus',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-node': [
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'nginx',
|
||||||
|
'telegraf',
|
||||||
|
'firewall',
|
||||||
|
'schedule',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-standalone': [
|
||||||
|
'salt.master',
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'registry',
|
||||||
|
'manager',
|
||||||
|
'nginx',
|
||||||
|
'telegraf',
|
||||||
|
'influxdb',
|
||||||
|
'grafana',
|
||||||
|
'soc',
|
||||||
|
'firewall',
|
||||||
|
'idstools',
|
||||||
|
'suricata.manager',
|
||||||
|
'pcap',
|
||||||
|
'suricata',
|
||||||
|
'healthcheck',
|
||||||
|
'utility',
|
||||||
|
'schedule',
|
||||||
|
'soctopus',
|
||||||
|
'tcpreplay',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
'so-sensor': [
|
||||||
|
'ca',
|
||||||
|
'ssl',
|
||||||
|
'telegraf',
|
||||||
|
'firewall',
|
||||||
|
'nginx',
|
||||||
|
'pcap',
|
||||||
|
'suricata',
|
||||||
|
'healthcheck',
|
||||||
|
'wazuh',
|
||||||
|
'filebeat',
|
||||||
|
'schedule',
|
||||||
|
'tcpreplay',
|
||||||
|
'docker_clean'
|
||||||
|
],
|
||||||
|
}, grain='role') %}
|
||||||
|
|
||||||
|
{% if FILEBEAT and grains.role in ['so-helixsensor', 'so-eval', 'so-manager', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode', 'so-import'] %}
|
||||||
|
{% do allowed_states.append('filebeat') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if ((FLEETMANAGER or FLEETNODE) or PLAYBOOK != 0) and grains.role in ['so-eval', 'so-manager', 'so-managersearch', 'so-standalone'] %}
|
||||||
|
{% do allowed_states.append('mysql') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (FLEETMANAGER or FLEETNODE) and grains.role in ['so-sensor', 'so-eval', 'so-manager', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode'] %}
|
||||||
|
{% do allowed_states.append('fleet.install_package') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (FLEETMANAGER or FLEETNODE) and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-heavynode'] %}
|
||||||
|
{% do allowed_states.append('fleet') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (FLEETMANAGER or FLEETNODE) and grains.role in ['so-eval'] %}
|
||||||
|
{% do allowed_states.append('redis') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if ZEEKVER != 'SURICATA' and grains.role in ['so-sensor', 'so-eval', 'so-standalone', 'so-heavynode'] %}
|
||||||
|
{% do allowed_states.append('zeek') %}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{% if STRELKA and grains.role in ['so-sensor', 'so-eval', 'so-standalone', 'so-heavynode'] %}
|
||||||
|
{% do allowed_states.append('strelka') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if WAZUH and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode']%}
|
||||||
|
{% do allowed_states.append('wazuh') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if ELASTICSEARCH and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode', 'so-import'] %}
|
||||||
|
{% do allowed_states.append('elasticsearch') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if KIBANA and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-import'] %}
|
||||||
|
{% do allowed_states.append('kibana') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if CURATOR and grains.role in ['so-eval', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode'] %}
|
||||||
|
{% do allowed_states.append('curator') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if ELASTALERT and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
|
||||||
|
{% do allowed_states.append('elastalert') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (THEHIVE != 0) and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
|
||||||
|
{% do allowed_states.append('thehive') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (PLAYBOOK !=0) and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
|
||||||
|
{% do allowed_states.append('playbook') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (PLAYBOOK !=0) and grains.role in ['so-eval'] %}
|
||||||
|
{% do allowed_states.append('redis') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (FREQSERVER !=0) and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
|
||||||
|
{% do allowed_states.append('freqserver') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (DOMAINSTATS !=0) and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
|
||||||
|
{% do allowed_states.append('domainstats') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if LOGSTASH and grains.role in ['so-helixsensor', 'so-manager', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode'] %}
|
||||||
|
{% do allowed_states.append('logstash') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if REDIS and grains.role in ['so-manager', 'so-standalone', 'so-managersearch', 'so-heavynode'] %}
|
||||||
|
{% do allowed_states.append('redis') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if grains.os == 'CentOS' %}
|
||||||
|
{% if not ISAIRGAP %}
|
||||||
|
{% do allowed_states.append('yum') %}
|
||||||
|
{% endif %}
|
||||||
|
{% do allowed_states.append('yum.packages') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# all nodes on the right salt version can run the following states #}
|
||||||
|
{% do allowed_states.append('common') %}
|
||||||
|
{% do allowed_states.append('patch.os.schedule') %}
|
||||||
|
{% do allowed_states.append('motd') %}
|
||||||
|
{% do allowed_states.append('salt.minion-check') %}
|
||||||
|
{% do allowed_states.append('sensoroni') %}
|
||||||
|
{% do allowed_states.append('salt.lasthighstate') %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if ISAIRGAP %}
|
||||||
|
{% do allowed_states.append('airgap') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# all nodes can always run salt.minion state #}
|
||||||
|
{% do allowed_states.append('salt.minion') %}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{% set show_top = salt['state.show_top']() %}
|
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||||
{% set top_states = show_top.values() | join(', ') %}
|
{% if sls in allowed_states %}
|
||||||
|
|
||||||
{% if 'ca' in top_states %}
|
|
||||||
|
|
||||||
{% set manager = salt['grains.get']('master') %}
|
{% set manager = salt['grains.get']('master') %}
|
||||||
/etc/salt/minion.d/signing_policies.conf:
|
/etc/salt/minion.d/signing_policies.conf:
|
||||||
@@ -44,6 +42,9 @@ pki_private_key:
|
|||||||
- replace: False
|
- replace: False
|
||||||
- require:
|
- require:
|
||||||
- file: /etc/pki
|
- file: /etc/pki
|
||||||
|
- timeout: 30
|
||||||
|
- retry: 5
|
||||||
|
- interval: 30
|
||||||
|
|
||||||
x509_pem_entries:
|
x509_pem_entries:
|
||||||
module.run:
|
module.run:
|
||||||
@@ -60,8 +61,8 @@ cakeyperms:
|
|||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
ca_state_not_allowed:
|
{{sls}}_state_not_allowed:
|
||||||
test.fail_without_changes:
|
test.fail_without_changes:
|
||||||
- name: ca_state_not_allowed
|
- name: {{sls}}_state_not_allowed
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
logrotate -f /opt/so/conf/log-rotate.conf >/dev/null 2>&1
|
/usr/sbin/logrotate -f /opt/so/conf/log-rotate.conf > /dev/null 2>&1
|
||||||
|
|||||||
1
salt/common/files/99-reserved-ports.conf
Normal file
1
salt/common/files/99-reserved-ports.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
net.ipv4.ip_local_reserved_ports="55000,57314"
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
{%- set logrotate_conf = salt['pillar.get']('logrotate:conf') %}
|
{%- set logrotate_conf = salt['pillar.get']('logrotate:conf') %}
|
||||||
|
{%- set group_conf = salt['pillar.get']('logrotate:group_conf') %}
|
||||||
|
|
||||||
|
|
||||||
/opt/so/log/aptcacher-ng/*.log
|
/opt/so/log/aptcacher-ng/*.log
|
||||||
/opt/so/log/idstools/*.log
|
/opt/so/log/idstools/*.log
|
||||||
@@ -13,12 +15,21 @@
|
|||||||
/opt/so/log/fleet/*.log
|
/opt/so/log/fleet/*.log
|
||||||
/opt/so/log/suricata/*.log
|
/opt/so/log/suricata/*.log
|
||||||
/opt/so/log/mysql/*.log
|
/opt/so/log/mysql/*.log
|
||||||
/opt/so/log/playbook/*.log
|
|
||||||
/opt/so/log/logstash/*.log
|
|
||||||
/opt/so/log/filebeat/*.log
|
|
||||||
/opt/so/log/telegraf/*.log
|
/opt/so/log/telegraf/*.log
|
||||||
/opt/so/log/redis/*.log
|
/opt/so/log/redis/*.log
|
||||||
|
/opt/so/log/sensoroni/*.log
|
||||||
|
/opt/so/log/stenographer/*.log
|
||||||
/opt/so/log/salt/so-salt-minion-check
|
/opt/so/log/salt/so-salt-minion-check
|
||||||
|
/opt/so/log/salt/minion
|
||||||
|
/opt/so/log/salt/master
|
||||||
{
|
{
|
||||||
{{ logrotate_conf | indent(width=4) }}
|
{{ logrotate_conf | indent(width=4) }}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Playbook's log directory needs additional configuration
|
||||||
|
# because Playbook requires a more permissive directory
|
||||||
|
/opt/so/log/playbook/*.log
|
||||||
|
{
|
||||||
|
{{ logrotate_conf | indent(width=4) }}
|
||||||
|
{{ group_conf | indent(width=4) }}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,5 +6,17 @@
|
|||||||
nocompress
|
nocompress
|
||||||
create
|
create
|
||||||
sharedscripts
|
sharedscripts
|
||||||
endscript
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/nsm/strelka/log/strelka.log
|
||||||
|
{
|
||||||
|
daily
|
||||||
|
rotate 14
|
||||||
|
missingok
|
||||||
|
copytruncate
|
||||||
|
compress
|
||||||
|
create
|
||||||
|
extension .log
|
||||||
|
dateext
|
||||||
|
dateyesterday
|
||||||
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{% set show_top = salt['state.show_top']() %}
|
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||||
{% set top_states = show_top.values() | join(', ') %}
|
{% if sls in allowed_states %}
|
||||||
|
|
||||||
{% if 'common' in top_states %}
|
|
||||||
|
|
||||||
{% set role = grains.id.split('_') | last %}
|
{% set role = grains.id.split('_') | last %}
|
||||||
|
|
||||||
@@ -233,6 +231,15 @@ commonlogrotateconf:
|
|||||||
- dayweek: '*'
|
- dayweek: '*'
|
||||||
|
|
||||||
{% if role in ['eval', 'manager', 'managersearch', 'standalone'] %}
|
{% if role in ['eval', 'manager', 'managersearch', 'standalone'] %}
|
||||||
|
# Lock permissions on the backup directory
|
||||||
|
backupdir:
|
||||||
|
file.directory:
|
||||||
|
- name: /nsm/backup
|
||||||
|
- user: 0
|
||||||
|
- group: 0
|
||||||
|
- makedirs: True
|
||||||
|
- mode: 700
|
||||||
|
|
||||||
# Add config backup
|
# Add config backup
|
||||||
/usr/sbin/so-config-backup > /dev/null 2>&1:
|
/usr/sbin/so-config-backup > /dev/null 2>&1:
|
||||||
cron.present:
|
cron.present:
|
||||||
@@ -258,10 +265,34 @@ docker:
|
|||||||
- watch:
|
- watch:
|
||||||
- file: docker_daemon
|
- file: docker_daemon
|
||||||
|
|
||||||
{% else %}
|
# Reserve OS ports for Docker proxy in case boot settings are not already applied/present
|
||||||
|
dockerapplyports:
|
||||||
|
cmd.run:
|
||||||
|
- name: if [ ! -s /etc/sysctl.d/99-reserved-ports.conf ]; then sysctl -w net.ipv4.ip_local_reserved_ports="55000,57314"; fi
|
||||||
|
|
||||||
common_state_not_allowed:
|
# Reserve OS ports for Docker proxy
|
||||||
test.fail_without_changes:
|
dockerreserveports:
|
||||||
- name: common_state_not_allowed
|
file.managed:
|
||||||
|
- source: salt://common/files/99-reserved-ports.conf
|
||||||
|
- name: /etc/sysctl.d/99-reserved-ports.conf
|
||||||
|
|
||||||
|
{% if salt['grains.get']('sosmodel', '') %}
|
||||||
|
# Install raid check cron
|
||||||
|
/usr/sbin/so-raid-status > /dev/null 2>&1:
|
||||||
|
cron.present:
|
||||||
|
- user: root
|
||||||
|
- minute: '*/15'
|
||||||
|
- hour: '*'
|
||||||
|
- daymonth: '*'
|
||||||
|
- month: '*'
|
||||||
|
- dayweek: '*'
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{{sls}}_state_not_allowed:
|
||||||
|
test.fail_without_changes:
|
||||||
|
- name: {{sls}}_state_not_allowed
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ while [[ $INSTALL != "yes" ]] && [[ $INSTALL != "no" ]]; do
|
|||||||
echo "## ##"
|
echo "## ##"
|
||||||
echo "## Installing the Security Onion ##"
|
echo "## Installing the Security Onion ##"
|
||||||
echo "## analyst node on this device will ##"
|
echo "## analyst node on this device will ##"
|
||||||
echo "## make permanenet changes to ##"
|
echo "## make permanent changes to ##"
|
||||||
echo "## the system. ##"
|
echo "## the system. ##"
|
||||||
echo "## ##"
|
echo "## ##"
|
||||||
echo "###########################################"
|
echo "###########################################"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,55 +17,73 @@
|
|||||||
|
|
||||||
# Check for prerequisites
|
# Check for prerequisites
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo "This script must be run using sudo!"
|
echo "This script must be run using sudo!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define a banner to separate sections
|
# Define a banner to separate sections
|
||||||
banner="========================================================================="
|
banner="========================================================================="
|
||||||
|
|
||||||
header() {
|
add_interface_bond0() {
|
||||||
echo
|
local BNIC=$1
|
||||||
printf '%s\n' "$banner" "$*" "$banner"
|
if [[ -z $MTU ]]; then
|
||||||
}
|
local MTU
|
||||||
|
MTU=$(lookup_pillar "mtu" "sensor")
|
||||||
|
fi
|
||||||
|
local nic_error=0
|
||||||
|
|
||||||
lookup_salt_value() {
|
# Check if specific offload features are able to be disabled
|
||||||
key=$1
|
for string in "generic-segmentation-offload" "generic-receive-offload" "tcp-segmentation-offload"; do
|
||||||
group=$2
|
if ethtool -k "$BNIC" | grep $string | grep -q "on [fixed]"; then
|
||||||
kind=$3
|
echo "The hardware or driver for interface ${BNIC} is not supported, packet capture may not work as expected."
|
||||||
|
((nic_error++))
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if [ -z "$kind" ]; then
|
case "$2" in
|
||||||
kind=pillar
|
-v|--verbose)
|
||||||
fi
|
local verbose=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -n "$group" ]; then
|
for i in rx tx sg tso ufo gso gro lro; do
|
||||||
group=${group}:
|
if [[ $verbose == true ]]; then
|
||||||
fi
|
ethtool -K "$BNIC" $i off
|
||||||
|
else
|
||||||
|
ethtool -K "$BNIC" $i off &>/dev/null
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Check if the bond slave connection has already been created
|
||||||
|
nmcli -f name,uuid -p con | grep -q "bond0-slave-$BNIC"
|
||||||
|
local found_int=$?
|
||||||
|
|
||||||
salt-call --no-color ${kind}.get ${group}${key} --out=newline_values_only
|
if [[ $found_int != 0 ]]; then
|
||||||
}
|
# Create the slave interface and assign it to the bond
|
||||||
|
nmcli con add type ethernet ifname "$BNIC" con-name "bond0-slave-$BNIC" master bond0 -- \
|
||||||
|
ethernet.mtu "$MTU" \
|
||||||
|
connection.autoconnect "yes"
|
||||||
|
else
|
||||||
|
local int_uuid
|
||||||
|
int_uuid=$(nmcli -f name,uuid -p con | sed -n "s/bond0-slave-$BNIC //p" | tr -d ' ')
|
||||||
|
|
||||||
lookup_pillar() {
|
nmcli con mod "$int_uuid" \
|
||||||
key=$1
|
ethernet.mtu "$MTU" \
|
||||||
pillar=$2
|
connection.autoconnect "yes"
|
||||||
if [ -z "$pillar" ]; then
|
fi
|
||||||
pillar=global
|
|
||||||
fi
|
|
||||||
lookup_salt_value "$key" "$pillar" "pillar"
|
|
||||||
}
|
|
||||||
|
|
||||||
lookup_pillar_secret() {
|
ip link set dev "$BNIC" arp off multicast off allmulticast off promisc on
|
||||||
lookup_pillar "$1" "secrets"
|
|
||||||
}
|
# Bring the slave interface up
|
||||||
|
if [[ $verbose == true ]]; then
|
||||||
lookup_grain() {
|
nmcli con up "bond0-slave-$BNIC"
|
||||||
lookup_salt_value "$1" "" "grains"
|
else
|
||||||
}
|
nmcli con up "bond0-slave-$BNIC" &>/dev/null
|
||||||
|
fi
|
||||||
lookup_role() {
|
|
||||||
id=$(lookup_grain id)
|
if [ "$nic_error" != 0 ]; then
|
||||||
pieces=($(echo $id | tr '_' ' '))
|
return "$nic_error"
|
||||||
echo ${pieces[1]}
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_container() {
|
check_container() {
|
||||||
@@ -74,69 +92,295 @@ check_container() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_password() {
|
check_password() {
|
||||||
local password=$1
|
local password=$1
|
||||||
echo "$password" | egrep -v "'|\"|\\$|\\\\" > /dev/null 2>&1
|
echo "$password" | egrep -v "'|\"|\\$|\\\\" > /dev/null 2>&1
|
||||||
return $?
|
return $?
|
||||||
}
|
|
||||||
|
|
||||||
set_os() {
|
|
||||||
if [ -f /etc/redhat-release ]; then
|
|
||||||
OS=centos
|
|
||||||
else
|
|
||||||
OS=ubuntu
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
set_minionid() {
|
|
||||||
MINIONID=$(lookup_grain id)
|
|
||||||
}
|
|
||||||
|
|
||||||
set_version() {
|
|
||||||
CURRENTVERSION=0.0.0
|
|
||||||
if [ -f /etc/soversion ]; then
|
|
||||||
CURRENTVERSION=$(cat /etc/soversion)
|
|
||||||
fi
|
|
||||||
if [ -z "$VERSION" ]; then
|
|
||||||
if [ -z "$NEWVERSION" ]; then
|
|
||||||
if [ "$CURRENTVERSION" == "0.0.0" ]; then
|
|
||||||
echo "ERROR: Unable to detect Security Onion version; terminating script."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
VERSION=$CURRENTVERSION
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
VERSION="$NEWVERSION"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
require_manager() {
|
|
||||||
# Check to see if this is a manager
|
|
||||||
MANAGERCHECK=$(cat /etc/salt/grains | grep role | awk '{print $2}')
|
|
||||||
if [ $MANAGERCHECK == 'so-eval' ] || [ $MANAGERCHECK == 'so-manager' ] || [ $MANAGERCHECK == 'so-managersearch' ] || [ $MANAGERCHECK == 'so-standalone' ] || [ $MANAGERCHECK == 'so-helix' ] || [ $MANAGERCHECK == 'so-import' ]; then
|
|
||||||
echo "This is a manager, We can proceed."
|
|
||||||
else
|
|
||||||
echo "Please run this command on the manager; the manager controls the grid."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
is_single_node_grid() {
|
|
||||||
role=$(lookup_role)
|
|
||||||
if [ "$role" != "eval" ] && [ "$role" != "standalone" ] && [ "$role" != "import" ]; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
msg=$1
|
msg=$1
|
||||||
echo "ERROR: $msg"
|
echo "ERROR: $msg"
|
||||||
echo "Exiting."
|
echo "Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
get_random_value() {
|
get_random_value() {
|
||||||
length=${1:-20}
|
length=${1:-20}
|
||||||
head -c 5000 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $length | head -n 1
|
head -c 5000 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $length | head -n 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header() {
|
||||||
|
printf '%s\n' "" "$banner" " $*" "$banner"
|
||||||
|
}
|
||||||
|
|
||||||
|
init_monitor() {
|
||||||
|
MONITORNIC=$1
|
||||||
|
|
||||||
|
if [[ $MONITORNIC == "bond0" ]]; then
|
||||||
|
BIFACES=$(lookup_bond_interfaces)
|
||||||
|
else
|
||||||
|
BIFACES=$MONITORNIC
|
||||||
|
fi
|
||||||
|
|
||||||
|
for DEVICE_IFACE in $BIFACES; do
|
||||||
|
for i in rx tx sg tso ufo gso gro lro; do
|
||||||
|
ethtool -K "$DEVICE_IFACE" "$i" off;
|
||||||
|
done
|
||||||
|
ip link set dev "$DEVICE_IFACE" arp off multicast off allmulticast off promisc on
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
is_manager_node() {
|
||||||
|
# Check to see if this is a manager node
|
||||||
|
role=$(lookup_role)
|
||||||
|
is_single_node_grid && return 0
|
||||||
|
[ $role == 'manager' ] && return 0
|
||||||
|
[ $role == 'managersearch' ] && return 0
|
||||||
|
[ $role == 'helix' ] && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
is_sensor_node() {
|
||||||
|
# Check to see if this is a sensor (forward) node
|
||||||
|
role=$(lookup_role)
|
||||||
|
is_single_node_grid && return 0
|
||||||
|
[ $role == 'sensor' ] && return 0
|
||||||
|
[ $role == 'heavynode' ] && return 0
|
||||||
|
[ $role == 'helix' ] && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
is_single_node_grid() {
|
||||||
|
role=$(lookup_role)
|
||||||
|
[ $role == 'eval' ] && return 0
|
||||||
|
[ $role == 'standalone' ] && return 0
|
||||||
|
[ $role == 'import' ] && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
lookup_bond_interfaces() {
|
||||||
|
cat /proc/net/bonding/bond0 | grep "Slave Interface:" | sed -e "s/Slave Interface: //g"
|
||||||
|
}
|
||||||
|
|
||||||
|
lookup_salt_value() {
|
||||||
|
key=$1
|
||||||
|
group=$2
|
||||||
|
kind=$3
|
||||||
|
|
||||||
|
if [ -z "$kind" ]; then
|
||||||
|
kind=pillar
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$group" ]; then
|
||||||
|
group=${group}:
|
||||||
|
fi
|
||||||
|
|
||||||
|
salt-call --no-color ${kind}.get ${group}${key} --out=newline_values_only
|
||||||
|
}
|
||||||
|
|
||||||
|
lookup_pillar() {
|
||||||
|
key=$1
|
||||||
|
pillar=$2
|
||||||
|
if [ -z "$pillar" ]; then
|
||||||
|
pillar=global
|
||||||
|
fi
|
||||||
|
lookup_salt_value "$key" "$pillar" "pillar"
|
||||||
|
}
|
||||||
|
|
||||||
|
lookup_pillar_secret() {
|
||||||
|
lookup_pillar "$1" "secrets"
|
||||||
|
}
|
||||||
|
|
||||||
|
lookup_grain() {
|
||||||
|
lookup_salt_value "$1" "" "grains"
|
||||||
|
}
|
||||||
|
|
||||||
|
lookup_role() {
|
||||||
|
id=$(lookup_grain id)
|
||||||
|
pieces=($(echo $id | tr '_' ' '))
|
||||||
|
echo ${pieces[1]}
|
||||||
|
}
|
||||||
|
|
||||||
|
require_manager() {
|
||||||
|
if is_manager_node; then
|
||||||
|
echo "This is a manager, We can proceed."
|
||||||
|
else
|
||||||
|
echo "Please run this command on the manager; the manager controls the grid."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
retry() {
|
||||||
|
maxAttempts=$1
|
||||||
|
sleepDelay=$2
|
||||||
|
cmd=$3
|
||||||
|
expectedOutput=$4
|
||||||
|
attempt=0
|
||||||
|
while [[ $attempt -lt $maxAttempts ]]; do
|
||||||
|
attempt=$((attempt+1))
|
||||||
|
echo "Executing command with retry support: $cmd"
|
||||||
|
output=$(eval "$cmd")
|
||||||
|
exitcode=$?
|
||||||
|
echo "Results: $output ($exitcode)"
|
||||||
|
if [ -n "$expectedOutput" ]; then
|
||||||
|
if [[ "$output" =~ "$expectedOutput" ]]; then
|
||||||
|
return $exitCode
|
||||||
|
else
|
||||||
|
echo "Expected '$expectedOutput' but got '$output'"
|
||||||
|
fi
|
||||||
|
elif [[ $exitcode -eq 0 ]]; then
|
||||||
|
return $exitCode
|
||||||
|
fi
|
||||||
|
echo "Command failed with exit code $exitcode; will retry in $sleepDelay seconds ($attempt / $maxAttempts)..."
|
||||||
|
sleep $sleepDelay
|
||||||
|
done
|
||||||
|
echo "Command continues to fail; giving up."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
set_os() {
|
||||||
|
if [ -f /etc/redhat-release ]; then
|
||||||
|
OS=centos
|
||||||
|
else
|
||||||
|
OS=ubuntu
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
set_minionid() {
|
||||||
|
MINIONID=$(lookup_grain id)
|
||||||
|
}
|
||||||
|
|
||||||
|
set_version() {
|
||||||
|
CURRENTVERSION=0.0.0
|
||||||
|
if [ -f /etc/soversion ]; then
|
||||||
|
CURRENTVERSION=$(cat /etc/soversion)
|
||||||
|
fi
|
||||||
|
if [ -z "$VERSION" ]; then
|
||||||
|
if [ -z "$NEWVERSION" ]; then
|
||||||
|
if [ "$CURRENTVERSION" == "0.0.0" ]; then
|
||||||
|
echo "ERROR: Unable to detect Security Onion version; terminating script."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
VERSION=$CURRENTVERSION
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
VERSION="$NEWVERSION"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
valid_cidr() {
|
||||||
|
# Verify there is a backslash in the string
|
||||||
|
echo "$1" | grep -qP "^[^/]+/[^/]+$" || return 1
|
||||||
|
|
||||||
|
local cidr
|
||||||
|
local ip
|
||||||
|
|
||||||
|
cidr=$(echo "$1" | sed 's/.*\///')
|
||||||
|
ip=$(echo "$1" | sed 's/\/.*//' )
|
||||||
|
|
||||||
|
if valid_ip4 "$ip"; then
|
||||||
|
[[ $cidr =~ ([0-9]|[1-2][0-9]|3[0-2]) ]] && return 0 || return 1
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
valid_cidr_list() {
|
||||||
|
local all_valid=0
|
||||||
|
|
||||||
|
IFS="," read -r -a net_arr <<< "$1"
|
||||||
|
|
||||||
|
for net in "${net_arr[@]}"; do
|
||||||
|
valid_cidr "$net" || all_valid=1
|
||||||
|
done
|
||||||
|
|
||||||
|
return $all_valid
|
||||||
|
}
|
||||||
|
|
||||||
|
valid_dns_list() {
|
||||||
|
local all_valid=0
|
||||||
|
|
||||||
|
IFS="," read -r -a dns_arr <<< "$1"
|
||||||
|
|
||||||
|
for addr in "${dns_arr[@]}"; do
|
||||||
|
valid_ip4 "$addr" || all_valid=1
|
||||||
|
done
|
||||||
|
|
||||||
|
return $all_valid
|
||||||
|
}
|
||||||
|
|
||||||
|
valid_fqdn() {
|
||||||
|
local fqdn=$1
|
||||||
|
|
||||||
|
echo "$fqdn" | grep -qP '(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\.)+[a-zA-Z]{2,63}$)' \
|
||||||
|
&& return 0 \
|
||||||
|
|| return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
valid_hostname() {
|
||||||
|
local hostname=$1
|
||||||
|
|
||||||
|
[[ $hostname =~ ^[a-zA-Z0-9\-]+$ ]] && [[ $hostname != 'localhost' ]] && return 0 || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
valid_ip4() {
|
||||||
|
local ip=$1
|
||||||
|
|
||||||
|
echo "$ip" | grep -qP '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$' && return 0 || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
valid_int() {
|
||||||
|
local num=$1
|
||||||
|
local min=${2:-1}
|
||||||
|
local max=${3:-1000000000}
|
||||||
|
|
||||||
|
[[ $num =~ ^[0-9]*$ ]] && [[ $num -ge $min ]] && [[ $num -le $max ]] && return 0 || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# {% raw %}
|
||||||
|
|
||||||
|
valid_string() {
|
||||||
|
local str=$1
|
||||||
|
local min_length=${2:-1}
|
||||||
|
local max_length=${3:-64}
|
||||||
|
|
||||||
|
echo "$str" | grep -qP '^\S+$' && [[ ${#str} -ge $min_length ]] && [[ ${#str} -le $max_length ]] && return 0 || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# {% endraw %}
|
||||||
|
|
||||||
|
valid_username() {
|
||||||
|
local user=$1
|
||||||
|
|
||||||
|
echo "$user" | grep -qP '^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$' && return 0 || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
wait_for_web_response() {
|
||||||
|
url=$1
|
||||||
|
expected=$2
|
||||||
|
maxAttempts=${3:-300}
|
||||||
|
logfile=/root/wait_for_web_response.log
|
||||||
|
attempt=0
|
||||||
|
while [[ $attempt -lt $maxAttempts ]]; do
|
||||||
|
attempt=$((attempt+1))
|
||||||
|
echo "Waiting for value '$expected' at '$url' ($attempt/$maxAttempts)"
|
||||||
|
result=$(curl -ks -L $url)
|
||||||
|
exitcode=$?
|
||||||
|
|
||||||
|
echo "--------------------------------------------------" >> $logfile
|
||||||
|
echo "$(date) - Checking web URL: $url ($attempt/$maxAttempts)" >> $logfile
|
||||||
|
echo "$result" >> $logfile
|
||||||
|
echo "exit code=$exitcode" >> $logfile
|
||||||
|
echo "" >> $logfile
|
||||||
|
|
||||||
|
if [[ $exitcode -eq 0 && "$result" =~ $expected ]]; then
|
||||||
|
echo "Received expected response; proceeding."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
echo "Server is not ready"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
echo "Server still not ready after $maxAttempts attempts; giving up."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -33,12 +33,15 @@ if [ ! -f $BACKUPFILE ]; then
|
|||||||
{%- for LOCATION in BACKUPLOCATIONS %}
|
{%- for LOCATION in BACKUPLOCATIONS %}
|
||||||
tar -rf $BACKUPFILE {{ LOCATION }}
|
tar -rf $BACKUPFILE {{ LOCATION }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
tar -rf $BACKUPFILE /etc/pki
|
||||||
|
tar -rf $BACKUPFILE /etc/salt
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Find oldest backup file and remove it
|
# Find oldest backup files and remove them
|
||||||
NUMBACKUPS=$(find /nsm/backup/ -type f -name "so-config-backup*" | wc -l)
|
NUMBACKUPS=$(find /nsm/backup/ -type f -name "so-config-backup*" | wc -l)
|
||||||
OLDESTBACKUP=$(find /nsm/backup/ -type f -name "so-config-backup*" | ls -1t | tail -1)
|
while [ "$NUMBACKUPS" -gt "$MAXBACKUPS" ]; do
|
||||||
if [ "$NUMBACKUPS" -gt "$MAXBACKUPS" ]; then
|
OLDESTBACKUP=$(find /nsm/backup/ -type f -name "so-config-backup*" -type f -printf '%T+ %p\n' | sort | head -n 1 | awk -F" " '{print $2}')
|
||||||
rm -f /nsm/backup/$OLDESTBACKUP
|
rm -f $OLDESTBACKUP
|
||||||
fi
|
NUMBACKUPS=$(find /nsm/backup/ -type f -name "so-config-backup*" | wc -l)
|
||||||
|
done
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ rule_prompt(){
|
|||||||
echo "-----------------------------------"
|
echo "-----------------------------------"
|
||||||
echo
|
echo
|
||||||
while [ -z "$RULE_NAME" ]; do
|
while [ -z "$RULE_NAME" ]; do
|
||||||
read -p "Please enter the rule filename you want to test (filename only, no path): " -e RULE_NAME
|
read -p "Choose a rule to test from the list above (must be typed exactly as shown above): " -e RULE_NAME
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,31 +15,42 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
lockFile = "/tmp/so-firewall.lock"
|
||||||
hostgroupsFilename = "/opt/so/saltstack/local/salt/firewall/hostgroups.local.yaml"
|
hostgroupsFilename = "/opt/so/saltstack/local/salt/firewall/hostgroups.local.yaml"
|
||||||
portgroupsFilename = "/opt/so/saltstack/local/salt/firewall/portgroups.local.yaml"
|
portgroupsFilename = "/opt/so/saltstack/local/salt/firewall/portgroups.local.yaml"
|
||||||
|
defaultPortgroupsFilename = "/opt/so/saltstack/default/salt/firewall/portgroups.yaml"
|
||||||
supportedProtocols = ['tcp', 'udp']
|
supportedProtocols = ['tcp', 'udp']
|
||||||
|
|
||||||
def showUsage(args):
|
def showUsage(options, args):
|
||||||
print('Usage: {} [OPTIONS] <COMMAND> [ARGS...]'.format(sys.argv[0]))
|
print('Usage: {} [OPTIONS] <COMMAND> [ARGS...]'.format(sys.argv[0]))
|
||||||
print(' Options:')
|
print(' Options:')
|
||||||
print(' --apply - After updating the firewall configuration files, apply the new firewall state')
|
print(' --apply - After updating the firewall configuration files, apply the new firewall state')
|
||||||
|
print(' --defaultports - Read port groups from default configuration files instead of local configuration.')
|
||||||
print('')
|
print('')
|
||||||
print(' Available commands:')
|
print(' General commands:')
|
||||||
print(' help - Prints this usage information.')
|
print(' help - Prints this usage information.')
|
||||||
print(' includedhosts - Lists the IPs included in the given group. Args: <GROUP_NAME>')
|
print('')
|
||||||
print(' excludedhosts - Lists the IPs excluded from the given group. Args: <GROUP_NAME>')
|
print(' Host commands:')
|
||||||
print(' includehost - Includes the given IP in the given group. Args: <GROUP_NAME> <IP>')
|
print(' listhostgroups - Lists the known host groups.')
|
||||||
print(' excludehost - Excludes the given IP from the given group. Args: <GROUP_NAME> <IP>')
|
print(' includedhosts - Lists the IPs included in the given group. Args: <GROUP_NAME>')
|
||||||
print(' removehost - Removes an excluded IP from the given group. Args: <GROUP_NAME> <IP>')
|
print(' excludedhosts - Lists the IPs excluded from the given group. Args: <GROUP_NAME>')
|
||||||
print(' addhostgroup - Adds a new, custom host group. Args: <GROUP_NAME>')
|
print(' includehost - Includes the given IP in the given group. Args: <GROUP_NAME> <IP>')
|
||||||
print(' listports - Lists ports in the given group and protocol. Args: <GROUP_NAME> <PORT_PROTOCOL>')
|
print(' excludehost - Excludes the given IP from the given group. Args: <GROUP_NAME> <IP>')
|
||||||
print(' addport - Adds a PORT to the given group. Args: <GROUP_NAME> <PORT_PROTOCOL> <PORT>')
|
print(' removehost - Removes an excluded IP from the given group. Args: <GROUP_NAME> <IP>')
|
||||||
print(' removeport - Removes a PORT from the given group. Args: <GROUP_NAME> <PORT_PROTOCOL> <PORT>')
|
print(' addhostgroup - Adds a new, custom host group. Args: <GROUP_NAME>')
|
||||||
print(' addportgroup - Adds a new, custom port group. Args: <GROUP_NAME>')
|
print('')
|
||||||
|
print(' Port commands:')
|
||||||
|
print(' listportgroups - Lists the known port groups.')
|
||||||
|
print(' listports - Lists ports in the given group and protocol. Args: <GROUP_NAME> <PORT_PROTOCOL>')
|
||||||
|
print(' addport - Adds a PORT to the given group. Args: <GROUP_NAME> <PORT_PROTOCOL> <PORT>')
|
||||||
|
print(' removeport - Removes a PORT from the given group. Args: <GROUP_NAME> <PORT_PROTOCOL> <PORT>')
|
||||||
|
print(' addportgroup - Adds a new, custom port group. Args: <GROUP_NAME>')
|
||||||
print('')
|
print('')
|
||||||
print(' Where:')
|
print(' Where:')
|
||||||
print(' GROUP_NAME - The name of an alias group (Ex: analyst)')
|
print(' GROUP_NAME - The name of an alias group (Ex: analyst)')
|
||||||
@@ -48,6 +59,15 @@ def showUsage(args):
|
|||||||
print(' PORT - Either a single numeric port (Ex: 443), or a port range (Ex: 8000:8002).')
|
print(' PORT - Either a single numeric port (Ex: 443), or a port range (Ex: 8000:8002).')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
def checkDefaultPortsOption(options):
|
||||||
|
global portgroupsFilename
|
||||||
|
if "--defaultports" in options:
|
||||||
|
portgroupsFilename = defaultPortgroupsFilename
|
||||||
|
|
||||||
|
def checkApplyOption(options):
|
||||||
|
if "--apply" in options:
|
||||||
|
return apply()
|
||||||
|
|
||||||
def loadYaml(filename):
|
def loadYaml(filename):
|
||||||
file = open(filename, "r")
|
file = open(filename, "r")
|
||||||
return yaml.load(file.read())
|
return yaml.load(file.read())
|
||||||
@@ -56,6 +76,14 @@ def writeYaml(filename, content):
|
|||||||
file = open(filename, "w")
|
file = open(filename, "w")
|
||||||
return yaml.dump(content, file)
|
return yaml.dump(content, file)
|
||||||
|
|
||||||
|
def listHostGroups():
|
||||||
|
content = loadYaml(hostgroupsFilename)
|
||||||
|
hostgroups = content['firewall']['hostgroups']
|
||||||
|
if hostgroups is not None:
|
||||||
|
for group in hostgroups:
|
||||||
|
print(group)
|
||||||
|
return 0
|
||||||
|
|
||||||
def listIps(name, mode):
|
def listIps(name, mode):
|
||||||
content = loadYaml(hostgroupsFilename)
|
content = loadYaml(hostgroupsFilename)
|
||||||
if name not in content['firewall']['hostgroups']:
|
if name not in content['firewall']['hostgroups']:
|
||||||
@@ -111,10 +139,18 @@ def createProtocolMap():
|
|||||||
map[protocol] = []
|
map[protocol] = []
|
||||||
return map
|
return map
|
||||||
|
|
||||||
def addhostgroup(args):
|
def listPortGroups():
|
||||||
|
content = loadYaml(portgroupsFilename)
|
||||||
|
portgroups = content['firewall']['aliases']['ports']
|
||||||
|
if portgroups is not None:
|
||||||
|
for group in portgroups:
|
||||||
|
print(group)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def addhostgroup(options, args):
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
print('Missing host group name argument', file=sys.stderr)
|
print('Missing host group name argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
|
|
||||||
name = args[0]
|
name = args[0]
|
||||||
content = loadYaml(hostgroupsFilename)
|
content = loadYaml(hostgroupsFilename)
|
||||||
@@ -125,10 +161,17 @@ def addhostgroup(args):
|
|||||||
writeYaml(hostgroupsFilename, content)
|
writeYaml(hostgroupsFilename, content)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def addportgroup(args):
|
def listportgroups(options, args):
|
||||||
|
if len(args) != 0:
|
||||||
|
print('Unexpected arguments', file=sys.stderr)
|
||||||
|
showUsage(options, args)
|
||||||
|
checkDefaultPortsOption(options)
|
||||||
|
return listPortGroups()
|
||||||
|
|
||||||
|
def addportgroup(options, args):
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
print('Missing port group name argument', file=sys.stderr)
|
print('Missing port group name argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
|
|
||||||
name = args[0]
|
name = args[0]
|
||||||
content = loadYaml(portgroupsFilename)
|
content = loadYaml(portgroupsFilename)
|
||||||
@@ -143,11 +186,12 @@ def addportgroup(args):
|
|||||||
writeYaml(portgroupsFilename, content)
|
writeYaml(portgroupsFilename, content)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def listports(args):
|
def listports(options, args):
|
||||||
if len(args) != 2:
|
if len(args) != 2:
|
||||||
print('Missing port group name or port protocol', file=sys.stderr)
|
print('Missing port group name or port protocol', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
|
|
||||||
|
checkDefaultPortsOption(options)
|
||||||
name = args[0]
|
name = args[0]
|
||||||
protocol = args[1]
|
protocol = args[1]
|
||||||
if protocol not in supportedProtocols:
|
if protocol not in supportedProtocols:
|
||||||
@@ -162,16 +206,19 @@ def listports(args):
|
|||||||
if name not in ports:
|
if name not in ports:
|
||||||
print('Port group does not exist', file=sys.stderr)
|
print('Port group does not exist', file=sys.stderr)
|
||||||
return 3
|
return 3
|
||||||
|
if protocol not in ports[name]:
|
||||||
|
print('Port group does not contain protocol', file=sys.stderr)
|
||||||
|
return 3
|
||||||
ports = ports[name][protocol]
|
ports = ports[name][protocol]
|
||||||
if ports is not None:
|
if ports is not None:
|
||||||
for port in ports:
|
for port in ports:
|
||||||
print(port)
|
print(port)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def addport(args):
|
def addport(options, args):
|
||||||
if len(args) != 3:
|
if len(args) != 3:
|
||||||
print('Missing port group name or port protocol, or port argument', file=sys.stderr)
|
print('Missing port group name or port protocol, or port argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
|
|
||||||
name = args[0]
|
name = args[0]
|
||||||
protocol = args[1]
|
protocol = args[1]
|
||||||
@@ -197,12 +244,13 @@ def addport(args):
|
|||||||
return 3
|
return 3
|
||||||
ports.append(port)
|
ports.append(port)
|
||||||
writeYaml(portgroupsFilename, content)
|
writeYaml(portgroupsFilename, content)
|
||||||
return 0
|
code = checkApplyOption(options)
|
||||||
|
return code
|
||||||
|
|
||||||
def removeport(args):
|
def removeport(options, args):
|
||||||
if len(args) != 3:
|
if len(args) != 3:
|
||||||
print('Missing port group name or port protocol, or port argument', file=sys.stderr)
|
print('Missing port group name or port protocol, or port argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
|
|
||||||
name = args[0]
|
name = args[0]
|
||||||
protocol = args[1]
|
protocol = args[1]
|
||||||
@@ -225,49 +273,66 @@ def removeport(args):
|
|||||||
return 3
|
return 3
|
||||||
ports.remove(port)
|
ports.remove(port)
|
||||||
writeYaml(portgroupsFilename, content)
|
writeYaml(portgroupsFilename, content)
|
||||||
return 0
|
code = checkApplyOption(options)
|
||||||
|
return code
|
||||||
|
|
||||||
def includedhosts(args):
|
|
||||||
|
def listhostgroups(options, args):
|
||||||
|
if len(args) != 0:
|
||||||
|
print('Unexpected arguments', file=sys.stderr)
|
||||||
|
showUsage(options, args)
|
||||||
|
return listHostGroups()
|
||||||
|
|
||||||
|
def includedhosts(options, args):
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
print('Missing host group name argument', file=sys.stderr)
|
print('Missing host group name argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
return listIps(args[0], 'insert')
|
return listIps(args[0], 'insert')
|
||||||
|
|
||||||
def excludedhosts(args):
|
def excludedhosts(options, args):
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
print('Missing host group name argument', file=sys.stderr)
|
print('Missing host group name argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
return listIps(args[0], 'delete')
|
return listIps(args[0], 'delete')
|
||||||
|
|
||||||
def includehost(args):
|
def includehost(options, args):
|
||||||
if len(args) != 2:
|
if len(args) != 2:
|
||||||
print('Missing host group name or ip argument', file=sys.stderr)
|
print('Missing host group name or ip argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
result = addIp(args[0], args[1], 'insert')
|
result = addIp(args[0], args[1], 'insert')
|
||||||
if result == 0:
|
if result == 0:
|
||||||
removeIp(args[0], args[1], 'delete', True)
|
removeIp(args[0], args[1], 'delete', True)
|
||||||
return result
|
code = result
|
||||||
|
if code == 0:
|
||||||
|
code = checkApplyOption(options)
|
||||||
|
return code
|
||||||
|
|
||||||
def excludehost(args):
|
def excludehost(options, args):
|
||||||
if len(args) != 2:
|
if len(args) != 2:
|
||||||
print('Missing host group name or ip argument', file=sys.stderr)
|
print('Missing host group name or ip argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
result = addIp(args[0], args[1], 'delete')
|
result = addIp(args[0], args[1], 'delete')
|
||||||
if result == 0:
|
if result == 0:
|
||||||
removeIp(args[0], args[1], 'insert', True)
|
removeIp(args[0], args[1], 'insert', True)
|
||||||
return result
|
code = result
|
||||||
|
if code == 0:
|
||||||
|
code = checkApplyOption(options)
|
||||||
|
return code
|
||||||
|
|
||||||
def removehost(args):
|
def removehost(options, args):
|
||||||
if len(args) != 2:
|
if len(args) != 2:
|
||||||
print('Missing host group name or ip argument', file=sys.stderr)
|
print('Missing host group name or ip argument', file=sys.stderr)
|
||||||
showUsage(args)
|
showUsage(options, args)
|
||||||
return removeIp(args[0], args[1], 'delete')
|
code = removeIp(args[0], args[1], 'delete')
|
||||||
|
if code == 0:
|
||||||
|
code = checkApplyOption(options)
|
||||||
|
return code
|
||||||
|
|
||||||
def apply():
|
def apply():
|
||||||
proc = subprocess.run(['salt-call', 'state.apply', 'firewall', 'queue=True'])
|
proc = subprocess.run(['salt-call', 'state.apply', 'firewall', 'queue=True'])
|
||||||
return proc.returncode
|
return proc.returncode
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
options = []
|
options = []
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
for option in args:
|
for option in args:
|
||||||
@@ -276,28 +341,48 @@ def main():
|
|||||||
args.remove(option)
|
args.remove(option)
|
||||||
|
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
showUsage(None)
|
showUsage(options, None)
|
||||||
|
|
||||||
commands = {
|
commands = {
|
||||||
"help": showUsage,
|
"help": showUsage,
|
||||||
|
"listhostgroups": listhostgroups,
|
||||||
"includedhosts": includedhosts,
|
"includedhosts": includedhosts,
|
||||||
"excludedhosts": excludedhosts,
|
"excludedhosts": excludedhosts,
|
||||||
"includehost": includehost,
|
"includehost": includehost,
|
||||||
"excludehost": excludehost,
|
"excludehost": excludehost,
|
||||||
"removehost": removehost,
|
"removehost": removehost,
|
||||||
|
"listportgroups": listportgroups,
|
||||||
"listports": listports,
|
"listports": listports,
|
||||||
"addport": addport,
|
"addport": addport,
|
||||||
"removeport": removeport,
|
"removeport": removeport,
|
||||||
"addhostgroup": addhostgroup,
|
"addhostgroup": addhostgroup,
|
||||||
"addportgroup": addportgroup
|
"addportgroup": addportgroup
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = commands.get(args[0], showUsage)
|
|
||||||
code = cmd(args[1:])
|
|
||||||
|
|
||||||
|
code=1
|
||||||
|
|
||||||
if code == 0 and "--apply" in options:
|
try:
|
||||||
code = apply()
|
lockAttempts = 0
|
||||||
|
maxAttempts = 30
|
||||||
|
while lockAttempts < maxAttempts:
|
||||||
|
lockAttempts = lockAttempts + 1
|
||||||
|
try:
|
||||||
|
f = open(lockFile, "x")
|
||||||
|
f.close()
|
||||||
|
break
|
||||||
|
except:
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
if lockAttempts == maxAttempts:
|
||||||
|
print("Lock file (" + lockFile + ") could not be created; proceeding without lock.")
|
||||||
|
|
||||||
|
cmd = commands.get(args[0], showUsage)
|
||||||
|
code = cmd(options, args[1:])
|
||||||
|
finally:
|
||||||
|
try:
|
||||||
|
os.remove(lockFile)
|
||||||
|
except:
|
||||||
|
print("Lock file (" + lockFile + ") already removed")
|
||||||
|
|
||||||
sys.exit(code)
|
sys.exit(code)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if [ ! "$(docker ps -q -f name=so-fleet)" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
docker exec so-fleet fleetctl config set --address https://127.0.0.1:8080 --tls-skip-verify --url-prefix /fleet
|
docker exec so-fleet fleetctl config set --address https://127.0.0.1:8080 --tls-skip-verify --url-prefix /fleet
|
||||||
docker exec -it so-fleet bash -c 'while [[ "$(curl -s -o /dev/null --insecure -w ''%{http_code}'' https://127.0.0.1:8080/fleet)" != "301" ]]; do sleep 5; done'
|
docker exec so-fleet bash -c 'while [[ "$(curl -s -o /dev/null --insecure -w ''%{http_code}'' https://127.0.0.1:8080/fleet)" != "301" ]]; do sleep 5; done'
|
||||||
docker exec so-fleet fleetctl setup --email $1 --password $2
|
docker exec so-fleet fleetctl setup --email $1 --password $2
|
||||||
|
|
||||||
docker exec so-fleet fleetctl apply -f /packs/palantir/Fleet/Endpoints/MacOS/osquery.yaml
|
docker exec so-fleet fleetctl apply -f /packs/palantir/Fleet/Endpoints/MacOS/osquery.yaml
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# NOTE: This script depends on so-common
|
# NOTE: This script depends on so-common
|
||||||
IMAGEREPO=securityonion
|
IMAGEREPO=security-onion-solutions
|
||||||
|
|
||||||
container_list() {
|
container_list() {
|
||||||
MANAGERCHECK=$1
|
MANAGERCHECK=$1
|
||||||
@@ -30,6 +30,7 @@ container_list() {
|
|||||||
|
|
||||||
if [ $MANAGERCHECK == 'so-import' ]; then
|
if [ $MANAGERCHECK == 'so-import' ]; then
|
||||||
TRUSTED_CONTAINERS=(
|
TRUSTED_CONTAINERS=(
|
||||||
|
"so-acng"
|
||||||
"so-elasticsearch"
|
"so-elasticsearch"
|
||||||
"so-filebeat"
|
"so-filebeat"
|
||||||
"so-idstools"
|
"so-idstools"
|
||||||
@@ -103,7 +104,7 @@ update_docker_containers() {
|
|||||||
local PROGRESS_CALLBACK=$3
|
local PROGRESS_CALLBACK=$3
|
||||||
local LOG_FILE=$4
|
local LOG_FILE=$4
|
||||||
|
|
||||||
local CONTAINER_REGISTRY=quay.io
|
local CONTAINER_REGISTRY=ghcr.io
|
||||||
local SIGNPATH=/root/sosigs
|
local SIGNPATH=/root/sosigs
|
||||||
|
|
||||||
if [ -z "$CURLTYPE" ]; then
|
if [ -z "$CURLTYPE" ]; then
|
||||||
@@ -126,12 +127,19 @@ update_docker_containers() {
|
|||||||
container_list
|
container_list
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Let's make sure we have the public key
|
|
||||||
curl -sSL https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS | gpg --import - >> "$LOG_FILE" 2>&1
|
|
||||||
|
|
||||||
rm -rf $SIGNPATH >> "$LOG_FILE" 2>&1
|
rm -rf $SIGNPATH >> "$LOG_FILE" 2>&1
|
||||||
mkdir -p $SIGNPATH >> "$LOG_FILE" 2>&1
|
mkdir -p $SIGNPATH >> "$LOG_FILE" 2>&1
|
||||||
|
|
||||||
|
# Let's make sure we have the public key
|
||||||
|
retry 50 10 "curl -sSL https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS -o $SIGNPATH/KEYS" >> "$LOG_FILE" 2>&1
|
||||||
|
result=$?
|
||||||
|
if [[ $result -eq 0 ]]; then
|
||||||
|
cat $SIGNPATH/KEYS | gpg --import - >> "$LOG_FILE" 2>&1
|
||||||
|
else
|
||||||
|
echo "Failed to pull signature key file: $result"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Download the containers from the interwebs
|
# Download the containers from the interwebs
|
||||||
for i in "${TRUSTED_CONTAINERS[@]}"
|
for i in "${TRUSTED_CONTAINERS[@]}"
|
||||||
do
|
do
|
||||||
@@ -143,10 +151,10 @@ update_docker_containers() {
|
|||||||
|
|
||||||
# Pull down the trusted docker image
|
# Pull down the trusted docker image
|
||||||
local image=$i:$VERSION$IMAGE_TAG_SUFFIX
|
local image=$i:$VERSION$IMAGE_TAG_SUFFIX
|
||||||
docker pull $CONTAINER_REGISTRY/$IMAGEREPO/$image >> "$LOG_FILE" 2>&1
|
retry 50 10 "docker pull $CONTAINER_REGISTRY/$IMAGEREPO/$image" >> "$LOG_FILE" 2>&1
|
||||||
|
|
||||||
# Get signature
|
# Get signature
|
||||||
curl -A "$CURLTYPE/$CURRENTVERSION/$OS/$(uname -r)" https://sigs.securityonion.net/$VERSION/$i:$VERSION$IMAGE_TAG_SUFFIX.sig --output $SIGNPATH/$image.sig >> "$LOG_FILE" 2>&1
|
retry 50 10 "curl -A '$CURLTYPE/$CURRENTVERSION/$OS/$(uname -r)' https://sigs.securityonion.net/$VERSION/$i:$VERSION$IMAGE_TAG_SUFFIX.sig --output $SIGNPATH/$image.sig" >> "$LOG_FILE" 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Unable to pull signature file for $image" >> "$LOG_FILE" 2>&1
|
echo "Unable to pull signature file for $image" >> "$LOG_FILE" 2>&1
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# {%- set FLEET_IP = salt['pillar.get']('global:fleet_ip', '') %}
|
# {%- set FLEET_IP = salt['pillar.get']('global:fleet_ip', '') %}
|
||||||
# {%- set MANAGER = salt['pillar.get']('global:url_base', '') %}
|
# {%- set MANAGER = salt['pillar.get']('global:url_base', '') %}
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
23
salt/common/tools/sbin/so-monitor-add
Normal file
23
salt/common/tools/sbin/so-monitor-add
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /usr/sbin/so-common
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
read -r -d '' message <<- EOM
|
||||||
|
usage: so-monitor-add [-h] NIC
|
||||||
|
|
||||||
|
positional arguments:
|
||||||
|
NIC The interface to add to the monitor bond (ex: eth2)
|
||||||
|
|
||||||
|
optional arguments:
|
||||||
|
-h, --help Show this help message and exit
|
||||||
|
EOM
|
||||||
|
echo "$message"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $# -eq 0 || $# -gt 1 ]] || [[ $1 == '-h' || $1 == '--help' ]]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
add_interface_bond0 "$1"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
27
salt/common/tools/sbin/so-playbook-sigma-refresh
Normal file
27
salt/common/tools/sbin/so-playbook-sigma-refresh
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
. /usr/sbin/so-common
|
||||||
|
|
||||||
|
# Regenerate ElastAlert & update Plays
|
||||||
|
docker exec so-soctopus python3 playbook_play-update.py
|
||||||
|
|
||||||
|
# Delete current Elastalert Rules
|
||||||
|
rm /opt/so/rules/elastalert/playbook/*.yaml
|
||||||
|
|
||||||
|
# Regenerate Elastalert Rules
|
||||||
|
so-playbook-sync
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
81
salt/common/tools/sbin/so-raid-status
Normal file
81
salt/common/tools/sbin/so-raid-status
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2014,2015,2016,2017,2018,2019,2020,2021 Security Onion Solutions, LLC
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
. /usr/sbin/so-common
|
||||||
|
|
||||||
|
#check_boss_raid() {
|
||||||
|
# BOSSBIN=/opt/boss/mvcli
|
||||||
|
# BOSSRC=$($BOSSBIN info -o vd | grep functional)
|
||||||
|
#
|
||||||
|
# if [[ $BOSSRC ]]; then
|
||||||
|
# # Raid is good
|
||||||
|
# BOSSRAID=0
|
||||||
|
# else
|
||||||
|
# BOSSRAID=1
|
||||||
|
# fi
|
||||||
|
#}
|
||||||
|
|
||||||
|
check_lsi_raid() {
|
||||||
|
# For use for LSI on Ubuntu
|
||||||
|
#MEGA=/opt/MegaRAID/MegeCli/MegaCli64
|
||||||
|
#LSIRC=$($MEGA -LDInfo -Lall -aALL | grep Optimal)
|
||||||
|
# Open Source Centos
|
||||||
|
MEGA=/opt/mega/megasasctl
|
||||||
|
LSIRC=$($MEGA | grep optimal)
|
||||||
|
|
||||||
|
if [[ $LSIRC ]]; then
|
||||||
|
# Raid is good
|
||||||
|
LSIRAID=0
|
||||||
|
else
|
||||||
|
LSIRAID=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
check_software_raid() {
|
||||||
|
SWRC=$(grep "_" /proc/mdstat)
|
||||||
|
|
||||||
|
if [[ $SWRC ]]; then
|
||||||
|
# RAID is failed in some way
|
||||||
|
SWRAID=1
|
||||||
|
else
|
||||||
|
SWRAID=0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# This script checks raid status if you use SO appliances
|
||||||
|
|
||||||
|
# See if this is an appliance
|
||||||
|
|
||||||
|
{%- if salt['grains.get']('sosmodel', '') %}
|
||||||
|
mkdir -p /opt/so/log/raid
|
||||||
|
{%- if grains['sosmodel'] in ['SOSMN', 'SOSSNNV'] %}
|
||||||
|
#check_boss_raid
|
||||||
|
check_software_raid
|
||||||
|
echo "osraid=$BOSSRAID nsmraid=$SWRAID" > /opt/so/log/raid/status.log
|
||||||
|
{%- elif grains['sosmodel'] in ['SOS1000F', 'SOS1000', 'SOSSN7200', 'SOS10K', 'SOS4000'] %}
|
||||||
|
#check_boss_raid
|
||||||
|
check_lsi_raid
|
||||||
|
echo "osraid=$BOSSRAID nsmraid=$LSIRAID" > /opt/so/log/raid/status.log
|
||||||
|
{%- else %}
|
||||||
|
exit 0
|
||||||
|
{%- endif %}
|
||||||
|
{%- else %}
|
||||||
|
exit 0
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user