mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-01-25 02:08:11 +00:00
Compare commits
835 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24cccf64d6 | ||
|
|
77f07cccf8 | ||
|
|
40985212ab | ||
|
|
e461714226 | ||
|
|
11e5d44d9b | ||
|
|
a1d26b44c3 | ||
|
|
42af217524 | ||
|
|
4a1d4060ec | ||
|
|
0210c43b60 | ||
|
|
ca34590da0 | ||
|
|
44716cfab2 | ||
|
|
1f3aaa8c7b | ||
|
|
6213a7418c | ||
|
|
bf9ffc0485 | ||
|
|
fff605b356 | ||
|
|
e41e77ed78 | ||
|
|
a6516e4af8 | ||
|
|
4fe575030b | ||
|
|
178a34e40d | ||
|
|
5f3293af1e | ||
|
|
28a8ae7572 | ||
|
|
daa26ed14c | ||
|
|
9bd54ca30e | ||
|
|
d832b11047 | ||
|
|
f99d35888a | ||
|
|
4d683a7566 | ||
|
|
35fc8cd0bf | ||
|
|
447657140d | ||
|
|
5069fd29f9 | ||
|
|
b9a4f2c4e8 | ||
|
|
0d1807bd33 | ||
|
|
a77d3b0361 | ||
|
|
274d02576f | ||
|
|
5cebebba97 | ||
|
|
092dc84186 | ||
|
|
528e14d4cf | ||
|
|
9519539de3 | ||
|
|
1e1de4fa46 | ||
|
|
fe2d2b45bb | ||
|
|
74cbbddc5c | ||
|
|
e575fcd6b2 | ||
|
|
aca93b7526 | ||
|
|
029c330ed1 | ||
|
|
4ecc9c929c | ||
|
|
2abe36083f | ||
|
|
d473ebe3f2 | ||
|
|
a824e064b3 | ||
|
|
24780b4caa | ||
|
|
b35350291f | ||
|
|
f038074e0c | ||
|
|
f797805970 | ||
|
|
ef001af1ec | ||
|
|
2d712f6ab0 | ||
|
|
8b5733b5fe | ||
|
|
278e382f9a | ||
|
|
425fe16752 | ||
|
|
3452ecdf03 | ||
|
|
e65a11bc27 | ||
|
|
f2f82165ab | ||
|
|
f735de8836 | ||
|
|
9fc0f6c61c | ||
|
|
41ccd4517b | ||
|
|
2f17cfbc30 | ||
|
|
ab5968cbee | ||
|
|
5f8c2328f1 | ||
|
|
cc0b1bcf11 | ||
|
|
f006c81e6a | ||
|
|
9ed7d75c44 | ||
|
|
4c1d1887e4 | ||
|
|
cea0cfb47d | ||
|
|
754ff31ea3 | ||
|
|
49ec898b9e | ||
|
|
c2f541134b | ||
|
|
b3b903959b | ||
|
|
4806d5fc78 | ||
|
|
a755ec806a | ||
|
|
3c703de4f4 | ||
|
|
7d324bed65 | ||
|
|
b22b0af2ce | ||
|
|
4cc5cd1ab1 | ||
|
|
f3bfe90587 | ||
|
|
53ea126065 | ||
|
|
688f028698 | ||
|
|
74380a62d9 | ||
|
|
c84190c3d9 | ||
|
|
42f15ce164 | ||
|
|
23be47a9b6 | ||
|
|
ab75f19a62 | ||
|
|
20b127f516 | ||
|
|
cc5da42797 | ||
|
|
f979c7334f | ||
|
|
1087d60457 | ||
|
|
d2b3e5ecdc | ||
|
|
3db94a5a98 | ||
|
|
0d120a4536 | ||
|
|
0ab5d87b8f | ||
|
|
39c7ea52c6 | ||
|
|
933e4152cc | ||
|
|
fc3f4e830e | ||
|
|
7e803bb6a9 | ||
|
|
2d5d551696 | ||
|
|
8e1aa17a80 | ||
|
|
dd5bf6c7f8 | ||
|
|
7cb869ad33 | ||
|
|
3b264d556b | ||
|
|
e4a063f9d1 | ||
|
|
559b0585dc | ||
|
|
2da125ff8b | ||
|
|
53f097c2af | ||
|
|
b6e34adc24 | ||
|
|
7b5ece8007 | ||
|
|
fe65eaf373 | ||
|
|
4af3dc1254 | ||
|
|
923fadbfa9 | ||
|
|
3f68accf6f | ||
|
|
25d1aa9126 | ||
|
|
dce9d5c96d | ||
|
|
80c6900193 | ||
|
|
2e11e0a3f2 | ||
|
|
c630c02a26 | ||
|
|
e18cea213b | ||
|
|
8f91bfee24 | ||
|
|
a191a4eae6 | ||
|
|
ce7e07d66d | ||
|
|
ab5ed2c527 | ||
|
|
c513e7af6c | ||
|
|
2e1cead3a2 | ||
|
|
5c8b0aa942 | ||
|
|
15dda01842 | ||
|
|
d19ae27f7c | ||
|
|
b61af3a9eb | ||
|
|
687686c929 | ||
|
|
94a90599bd | ||
|
|
669469e618 | ||
|
|
73a5ee1bac | ||
|
|
0ff9806d70 | ||
|
|
961b79a4aa | ||
|
|
264b84ae2a | ||
|
|
031b68adde | ||
|
|
d737193b98 | ||
|
|
649192eb41 | ||
|
|
f83ce78e8f | ||
|
|
054043d78e | ||
|
|
603ed0b16f | ||
|
|
3a893889b6 | ||
|
|
2e181920ab | ||
|
|
4f4591dc42 | ||
|
|
18e5c0b8ae | ||
|
|
e748275fc5 | ||
|
|
4ca5b53948 | ||
|
|
8bb1529c2a | ||
|
|
61ef02ec50 | ||
|
|
fb45fa0c03 | ||
|
|
6a52ebe492 | ||
|
|
9b81fc0ac7 | ||
|
|
508a9354b7 | ||
|
|
63898690c8 | ||
|
|
d026ed5cac | ||
|
|
529fc6421d | ||
|
|
7aa1573275 | ||
|
|
bb69f51456 | ||
|
|
5cadd0c2f2 | ||
|
|
df5def48d9 | ||
|
|
5252518d97 | ||
|
|
231f0e6fb3 | ||
|
|
be0bc7aa65 | ||
|
|
c460e351a4 | ||
|
|
827b1fdb3b | ||
|
|
23a7c7f393 | ||
|
|
e683ea5384 | ||
|
|
2c531a2ffc | ||
|
|
e25ea9621b | ||
|
|
826cc00a7c | ||
|
|
65f787bfe0 | ||
|
|
77b3a9b4d9 | ||
|
|
f8db025fdf | ||
|
|
d4fad17416 | ||
|
|
ddb498320a | ||
|
|
31a4024dfc | ||
|
|
38c0b60141 | ||
|
|
81cc85a8fc | ||
|
|
ffcfef02a6 | ||
|
|
27305365ef | ||
|
|
08cd94fe5b | ||
|
|
40a2ea6c90 | ||
|
|
7e28f85247 | ||
|
|
64667ea9d0 | ||
|
|
70304dc2a2 | ||
|
|
e0a77b3e46 | ||
|
|
70de023114 | ||
|
|
b5ccdad3dc | ||
|
|
d0af7f439f | ||
|
|
64e38dd843 | ||
|
|
66c59ea1f7 | ||
|
|
fc77b4a55e | ||
|
|
4540fd77e6 | ||
|
|
d415ea6f20 | ||
|
|
ec8f51ba8a | ||
|
|
ad49d2accb | ||
|
|
67311e84d2 | ||
|
|
8f566ec690 | ||
|
|
75f6cbbdd6 | ||
|
|
4401d4209c | ||
|
|
44cfa71358 | ||
|
|
ecde62451c | ||
|
|
d5f22ab100 | ||
|
|
72b1421294 | ||
|
|
04acb7412b | ||
|
|
0327880258 | ||
|
|
6a9f32a284 | ||
|
|
3079bd51f3 | ||
|
|
dffb09b001 | ||
|
|
5e4eba54cc | ||
|
|
84d69ef5d8 | ||
|
|
cd52bf8b7d | ||
|
|
aba697aa99 | ||
|
|
18be522b87 | ||
|
|
49994d1c51 | ||
|
|
f3d617a1c8 | ||
|
|
de5b87c6ad | ||
|
|
f32b76987e | ||
|
|
1be58e02b2 | ||
|
|
8333c575ae | ||
|
|
02d2561d6b | ||
|
|
30b2f55ba1 | ||
|
|
253fa5ef54 | ||
|
|
188a681cb5 | ||
|
|
1fb8b47a9c | ||
|
|
2afdabf9bc | ||
|
|
3a989516d1 | ||
|
|
9e06297d5f | ||
|
|
1789dab4df | ||
|
|
eecb272f93 | ||
|
|
2ed3378556 | ||
|
|
bd9ae4bce7 | ||
|
|
459a688b7a | ||
|
|
30e2360acc | ||
|
|
d8c29cc263 | ||
|
|
7313628cc6 | ||
|
|
033e2623d3 | ||
|
|
2b95f69fa6 | ||
|
|
0ebdb1698f | ||
|
|
50d8359022 | ||
|
|
4bc64e938e | ||
|
|
8f852457ff | ||
|
|
5bd3f0b995 | ||
|
|
e5e5e84112 | ||
|
|
a430ad421b | ||
|
|
58fdd45424 | ||
|
|
85dc0408c2 | ||
|
|
c037067be2 | ||
|
|
4fa48671e0 | ||
|
|
a259571cb0 | ||
|
|
8b2c113614 | ||
|
|
e273ae3123 | ||
|
|
e04c34986e | ||
|
|
ea6d9c93fc | ||
|
|
cea45f43c8 | ||
|
|
d7d2246498 | ||
|
|
e6992e87ee | ||
|
|
c8622bc347 | ||
|
|
76e6657e42 | ||
|
|
de8336092b | ||
|
|
d50c3afebd | ||
|
|
f54bc4238e | ||
|
|
c7320ec7e2 | ||
|
|
a5ea0f59b2 | ||
|
|
3947ee2aae | ||
|
|
0db97d5a24 | ||
|
|
588976ac45 | ||
|
|
6eb68a1218 | ||
|
|
b1e7dc8519 | ||
|
|
c5f170307d | ||
|
|
e8b59b6722 | ||
|
|
ea886b84f2 | ||
|
|
89268e4875 | ||
|
|
8ee06449b7 | ||
|
|
a09055ff31 | ||
|
|
d640086112 | ||
|
|
5037cb03f2 | ||
|
|
085dd338f4 | ||
|
|
5a0366382b | ||
|
|
c4ddb8f14a | ||
|
|
df6c323a64 | ||
|
|
40117ed5dd | ||
|
|
2012bbb119 | ||
|
|
004f882a1d | ||
|
|
7bf636bfc7 | ||
|
|
b8c79154cb | ||
|
|
5cd7214f21 | ||
|
|
4f00760e88 | ||
|
|
660b573d05 | ||
|
|
1d45c45afa | ||
|
|
3693ee3692 | ||
|
|
c36a6067fa | ||
|
|
5325bab0ab | ||
|
|
e283d3587b | ||
|
|
b95cf5bc7b | ||
|
|
c6dfbfd0ec | ||
|
|
62991cfb48 | ||
|
|
8b4b59e9d5 | ||
|
|
303cdc7acd | ||
|
|
3275713aa8 | ||
|
|
08cdf3511f | ||
|
|
f28c4330b4 | ||
|
|
a6569a0a70 | ||
|
|
959bd8dfd4 | ||
|
|
a59aedc43b | ||
|
|
50b6e630d8 | ||
|
|
da25a02e80 | ||
|
|
967fe029c2 | ||
|
|
3582b424b0 | ||
|
|
65e2ff7951 | ||
|
|
ab66211f9b | ||
|
|
8e71c6e5c5 | ||
|
|
504a11bb2e | ||
|
|
f03eccf6c8 | ||
|
|
d0789859a3 | ||
|
|
1b4045d57c | ||
|
|
f406b4bbcf | ||
|
|
d9ced05d25 | ||
|
|
f5708d7db6 | ||
|
|
6dd0ab06d2 | ||
|
|
42220828ce | ||
|
|
4527522acb | ||
|
|
b4c4a46cc6 | ||
|
|
e0d86c134a | ||
|
|
7a44b8bcca | ||
|
|
a707b382b0 | ||
|
|
fff424dbfa | ||
|
|
2870f38bdc | ||
|
|
1956be4dc3 | ||
|
|
e4cf874c5c | ||
|
|
a2ccac97d9 | ||
|
|
917a323c15 | ||
|
|
ddad72fc5f | ||
|
|
b03aca80a1 | ||
|
|
9d526ff098 | ||
|
|
bde9482928 | ||
|
|
07f426aec0 | ||
|
|
3b2f5522fd | ||
|
|
ea89242644 | ||
|
|
da9cb41b3b | ||
|
|
bc9d4fe762 | ||
|
|
ec05e2f0f4 | ||
|
|
fa1a3b8406 | ||
|
|
a3d1ed5129 | ||
|
|
e284dd3afc | ||
|
|
c8cc343784 | ||
|
|
6d15bb67fe | ||
|
|
b60d320622 | ||
|
|
3290563716 | ||
|
|
4c0c6b181b | ||
|
|
10a99aa5ae | ||
|
|
7117399e14 | ||
|
|
6f678a1093 | ||
|
|
bc1271788c | ||
|
|
9d88a27e0a | ||
|
|
2bc3575de8 | ||
|
|
18e9e7f0e1 | ||
|
|
327323e32f | ||
|
|
3c2ad65246 | ||
|
|
069b54057b | ||
|
|
edf7826121 | ||
|
|
be4bbe4430 | ||
|
|
9bf3fd87ac | ||
|
|
11c7d55203 | ||
|
|
170557a422 | ||
|
|
5b0c6f8689 | ||
|
|
17f00f167f | ||
|
|
34b6c4446d | ||
|
|
6600df9be9 | ||
|
|
8f89a01541 | ||
|
|
b59d5db16b | ||
|
|
2e754a5370 | ||
|
|
2f9886efe2 | ||
|
|
71355b0c4c | ||
|
|
1203700d34 | ||
|
|
97a59cf5e4 | ||
|
|
8a3893cd33 | ||
|
|
1fc2b77bfb | ||
|
|
00e5e65176 | ||
|
|
8935233a05 | ||
|
|
c9c4620988 | ||
|
|
2700365101 | ||
|
|
bacdf6ed22 | ||
|
|
30cac002fa | ||
|
|
d818381bcf | ||
|
|
d78424b346 | ||
|
|
1727758479 | ||
|
|
9e0923407e | ||
|
|
79e02ce074 | ||
|
|
b4cb323de4 | ||
|
|
573fa46aac | ||
|
|
31a0de167c | ||
|
|
6c2d4d6b01 | ||
|
|
0ca1a8f28c | ||
|
|
be29f2f0d9 | ||
|
|
c567781bcd | ||
|
|
84c9b97c48 | ||
|
|
2015a50733 | ||
|
|
d839b2fba1 | ||
|
|
3f70c86736 | ||
|
|
aeaf533585 | ||
|
|
5757a88227 | ||
|
|
83de86ca2c | ||
|
|
e2861614c2 | ||
|
|
d14bdcc6c3 | ||
|
|
013a435784 | ||
|
|
cd9bedb526 | ||
|
|
cafd203406 | ||
|
|
2437f8fb16 | ||
|
|
fa5b81b28e | ||
|
|
9bdbf6f51c | ||
|
|
b6a30df808 | ||
|
|
0dc2b9a081 | ||
|
|
29e142361b | ||
|
|
883afa4959 | ||
|
|
b4ea16b6f7 | ||
|
|
9985e98cd3 | ||
|
|
87d1cc13bc | ||
|
|
c7bfd72d2d | ||
|
|
9a88249965 | ||
|
|
6cb75fa26a | ||
|
|
2fd6f9801a | ||
|
|
4902d11614 | ||
|
|
f1c46c28a0 | ||
|
|
5e35915ca3 | ||
|
|
fe6eae7d30 | ||
|
|
fe8a123ead | ||
|
|
110b59d25d | ||
|
|
f8130fa2df | ||
|
|
bd06720416 | ||
|
|
e49cf1fde7 | ||
|
|
db2483b7a5 | ||
|
|
e3b6a09482 | ||
|
|
8798861c99 | ||
|
|
3e39bfd077 | ||
|
|
ad012f8db6 | ||
|
|
e20b32da0c | ||
|
|
2483eb0d67 | ||
|
|
04c627577b | ||
|
|
c51ac34590 | ||
|
|
bcbabc0239 | ||
|
|
ad7ee2c2a3 | ||
|
|
ba96929313 | ||
|
|
be81e88ff8 | ||
|
|
db5863c84f | ||
|
|
ff973e09c4 | ||
|
|
843a762e44 | ||
|
|
fe44298e4e | ||
|
|
c99fd2a10c | ||
|
|
c7b913fff4 | ||
|
|
fe996a6b43 | ||
|
|
5aad05b0ae | ||
|
|
c575b5c243 | ||
|
|
62ea9135b6 | ||
|
|
b25954a750 | ||
|
|
7f53b6d3ce | ||
|
|
751fe3123b | ||
|
|
3bffbe2ca4 | ||
|
|
68675ac365 | ||
|
|
1516c4ea15 | ||
|
|
7a474aa335 | ||
|
|
97da9c2122 | ||
|
|
ebceebbc75 | ||
|
|
b59aaf40d4 | ||
|
|
302dbb5e9d | ||
|
|
13dd9275b8 | ||
|
|
3ef5a42b73 | ||
|
|
b98d337478 | ||
|
|
3f90a33a13 | ||
|
|
39276a90ff | ||
|
|
350d784414 | ||
|
|
665ca9fda3 | ||
|
|
17b821aee6 | ||
|
|
e12f1f6957 | ||
|
|
d36674a297 | ||
|
|
0fd6c9f815 | ||
|
|
0c213ce566 | ||
|
|
be9cbf893b | ||
|
|
f7737a9efd | ||
|
|
a97069e1ed | ||
|
|
62bfb28d21 | ||
|
|
11d3a17e14 | ||
|
|
8c72031b43 | ||
|
|
0d109c77d9 | ||
|
|
85e893d74a | ||
|
|
ac7d51b6f3 | ||
|
|
8acc18b32b | ||
|
|
9fb344bb89 | ||
|
|
84e9ef2f94 | ||
|
|
c08e803a8b | ||
|
|
b8178a7a92 | ||
|
|
4076ee5679 | ||
|
|
f25a9afd5a | ||
|
|
6136afcf3d | ||
|
|
3d278f9ebd | ||
|
|
c445c6d46f | ||
|
|
737fbb5837 | ||
|
|
3a6cc73319 | ||
|
|
00df2c0d0a | ||
|
|
be680b00b6 | ||
|
|
fbd82a8dca | ||
|
|
bd9e49d3e3 | ||
|
|
ef069386e8 | ||
|
|
6e97b41e06 | ||
|
|
2cc6715124 | ||
|
|
1150f2782a | ||
|
|
7f386358d3 | ||
|
|
3212b0db55 | ||
|
|
94893b8c4e | ||
|
|
2afbda53b2 | ||
|
|
60bfb31a19 | ||
|
|
6b66be25a9 | ||
|
|
d1693e0f3d | ||
|
|
7ba6080522 | ||
|
|
e1958270c0 | ||
|
|
5efd2669fa | ||
|
|
c21c14d8de | ||
|
|
770691fa87 | ||
|
|
c53a1f9428 | ||
|
|
919f97cd79 | ||
|
|
2362518f13 | ||
|
|
38ad3ca657 | ||
|
|
7767a4ba74 | ||
|
|
775d28f9c4 | ||
|
|
2f166e2ba3 | ||
|
|
ada8a225ae | ||
|
|
e1559b263c | ||
|
|
d8687bfab0 | ||
|
|
98a1f4bda0 | ||
|
|
8f86a5319f | ||
|
|
4c607bba1c | ||
|
|
1b0d09da13 | ||
|
|
473c9b9ce0 | ||
|
|
25cd2202a7 | ||
|
|
168ccffaf4 | ||
|
|
7d510b11b2 | ||
|
|
e3e038127f | ||
|
|
eaaf51813b | ||
|
|
1da206cb90 | ||
|
|
cd41766e22 | ||
|
|
7cde6f15e7 | ||
|
|
eaf0a6bf09 | ||
|
|
058a8d5b33 | ||
|
|
fa474876e9 | ||
|
|
91b8a832ec | ||
|
|
9a035b1a94 | ||
|
|
07b166baa9 | ||
|
|
1acc6e45d0 | ||
|
|
db8b5a4d0b | ||
|
|
919c530155 | ||
|
|
94e7faa1c1 | ||
|
|
f130c899e5 | ||
|
|
1c0229e1a3 | ||
|
|
39b597ee47 | ||
|
|
a535e66d06 | ||
|
|
70483ba81b | ||
|
|
ef9b7cef1a | ||
|
|
2648067ac6 | ||
|
|
6647702d90 | ||
|
|
7866d42df9 | ||
|
|
da0f266944 | ||
|
|
a2806ad86b | ||
|
|
a98fdf7679 | ||
|
|
a21bff31a5 | ||
|
|
0a9e50ce53 | ||
|
|
2172f60a18 | ||
|
|
2f761f62a6 | ||
|
|
6a4127dc40 | ||
|
|
4901561fec | ||
|
|
68d12ae72f | ||
|
|
01a88e6c89 | ||
|
|
0e43a05d16 | ||
|
|
a670716625 | ||
|
|
f411223fa8 | ||
|
|
c96e2be257 | ||
|
|
d806c86e90 | ||
|
|
5156376df6 | ||
|
|
e714a20ae3 | ||
|
|
c20f8878da | ||
|
|
6ccd1020e3 | ||
|
|
fa03991edd | ||
|
|
5fdedd082b | ||
|
|
d7f4f99f15 | ||
|
|
1295c5ecff | ||
|
|
65c417a357 | ||
|
|
111615bff4 | ||
|
|
ec7930146b | ||
|
|
282f758fd7 | ||
|
|
6b759db0ae | ||
|
|
9ddf17484a | ||
|
|
1580c38a06 | ||
|
|
771cbf6b08 | ||
|
|
f64fac3e17 | ||
|
|
01d13691b3 | ||
|
|
d101e2b3bf | ||
|
|
e248be83f1 | ||
|
|
f5ba67da86 | ||
|
|
da86408431 | ||
|
|
1281867bd4 | ||
|
|
1cc7c7d3aa | ||
|
|
cd276ab959 | ||
|
|
d38e5aa088 | ||
|
|
b2264997d6 | ||
|
|
dce78805a8 | ||
|
|
55d3d642f9 | ||
|
|
841e5436b9 | ||
|
|
0360db1b64 | ||
|
|
3665d64f2b | ||
|
|
0b7a17b2b2 | ||
|
|
b92ba781ba | ||
|
|
c447e456d0 | ||
|
|
9f977d263d | ||
|
|
752a07d406 | ||
|
|
53580d488c | ||
|
|
84591d25a6 | ||
|
|
d67170b87c | ||
|
|
194eecb269 | ||
|
|
db765e9c55 | ||
|
|
dc2c32be54 | ||
|
|
9f01be416a | ||
|
|
fbbb1dd904 | ||
|
|
9b1451aff1 | ||
|
|
e192a5ef44 | ||
|
|
845ed39b8c | ||
|
|
64a11a3446 | ||
|
|
e1126d744f | ||
|
|
db4a91f623 | ||
|
|
4f6972c9cd | ||
|
|
d4b14c2510 | ||
|
|
affe26cfe6 | ||
|
|
33029e35d5 | ||
|
|
398e55f21a | ||
|
|
4b395d50db | ||
|
|
9c19e7b85d | ||
|
|
d0c66181f0 | ||
|
|
66862fddf3 | ||
|
|
189462c474 | ||
|
|
99e663d06c | ||
|
|
609b4810f2 | ||
|
|
36e851b79f | ||
|
|
dec8391d73 | ||
|
|
d004c28436 | ||
|
|
e6d858cbe3 | ||
|
|
d9685149d0 | ||
|
|
993a58a0c4 | ||
|
|
e04d2df953 | ||
|
|
741ff97b02 | ||
|
|
dc6b1dd915 | ||
|
|
e5c65fd523 | ||
|
|
bfdba6257b | ||
|
|
ac8179ec83 | ||
|
|
17b0df3053 | ||
|
|
e6fa8dd92d | ||
|
|
09896c3e3c | ||
|
|
deacd27ac6 | ||
|
|
785633cc3b | ||
|
|
8e93bcc3da | ||
|
|
07635ce579 | ||
|
|
232292fa3e | ||
|
|
b67ca429e9 | ||
|
|
7121fb448a | ||
|
|
887805c5be | ||
|
|
2063a718a5 | ||
|
|
4e53521c59 | ||
|
|
858110179b | ||
|
|
d8879d9085 | ||
|
|
477023d32a | ||
|
|
4b7b28eb87 | ||
|
|
3d282e2a99 | ||
|
|
bb2958620c | ||
|
|
0ff6b7fd70 | ||
|
|
eaf95a6239 | ||
|
|
010dd950b3 | ||
|
|
95c4f4683f | ||
|
|
2c86cc04d5 | ||
|
|
23c61b4077 | ||
|
|
521088aa55 | ||
|
|
482d3c5a77 | ||
|
|
49393d258a | ||
|
|
cc843c16a8 | ||
|
|
f5ebc1d227 | ||
|
|
431178c462 | ||
|
|
a06c101fe2 | ||
|
|
caf67f4e6c | ||
|
|
3b251bc4f5 | ||
|
|
0e5da362cb | ||
|
|
4c9b79a9d2 | ||
|
|
35da09d97a | ||
|
|
0f1407325f | ||
|
|
b5901d0b65 | ||
|
|
4daf8cbcae | ||
|
|
fc58cd535c | ||
|
|
21e5102206 | ||
|
|
ca469b5f7c | ||
|
|
a6f1affefa | ||
|
|
26b749b470 | ||
|
|
d87c4a1cff | ||
|
|
0051adb855 | ||
|
|
3b62bc433e | ||
|
|
15337ad62c | ||
|
|
48ef4f555e | ||
|
|
c16455d752 | ||
|
|
1df55ebf60 | ||
|
|
1a79c6e0f9 | ||
|
|
3ccf28617e | ||
|
|
ae8b8076c5 | ||
|
|
c7925b6f94 | ||
|
|
0e2502fcad | ||
|
|
e9ed339610 | ||
|
|
dfd8e74003 | ||
|
|
90497a5daf | ||
|
|
73f7c3d16d | ||
|
|
8c79d37099 | ||
|
|
591b6e70f6 | ||
|
|
1618568be2 | ||
|
|
436ea15d9a | ||
|
|
fa181a4ada | ||
|
|
866200d018 | ||
|
|
afb914f9d7 | ||
|
|
43918cfcfe | ||
|
|
0e0f3a334e | ||
|
|
711ebf3878 | ||
|
|
6198f9472f | ||
|
|
0fb7d1236a | ||
|
|
580cacede5 | ||
|
|
e4f6825662 | ||
|
|
86bbb4583c | ||
|
|
b9b0e3fcb3 | ||
|
|
c66d581ed2 | ||
|
|
c5da6b2cdd | ||
|
|
7e8fa330b5 | ||
|
|
abb2bfbe9f | ||
|
|
d859aa989e | ||
|
|
29221bc5a9 | ||
|
|
5b611566df | ||
|
|
f93eae1c3c | ||
|
|
717a4906c6 | ||
|
|
a1b13fd346 | ||
|
|
7eb08ddea4 | ||
|
|
acfb61fe42 | ||
|
|
955cde08fd | ||
|
|
65e10c27c2 | ||
|
|
ed2448dbe0 | ||
|
|
644b04c1ac | ||
|
|
9f8941b76f | ||
|
|
7eeee0e777 | ||
|
|
0ea9de8f64 | ||
|
|
5723bcb1a4 | ||
|
|
222ab4d8d6 | ||
|
|
f949d2f588 | ||
|
|
918f74d6c5 | ||
|
|
2faa50c4de | ||
|
|
ae274b2fc9 | ||
|
|
6f5b28a99c | ||
|
|
ce9a2b8162 | ||
|
|
92598d54f5 | ||
|
|
1697d6c92a | ||
|
|
f64607d925 | ||
|
|
255b6f4ccb | ||
|
|
7e3b1bd3ca | ||
|
|
93d5d7295f | ||
|
|
435d2ed6fc | ||
|
|
bb1cb1e081 | ||
|
|
1527e438a1 | ||
|
|
c2b5ed17c2 | ||
|
|
c2540b2828 | ||
|
|
fe4dfdb368 | ||
|
|
39f1411f30 | ||
|
|
ebf80a6455 | ||
|
|
ebeb747686 | ||
|
|
e3400b05ba | ||
|
|
90b24ef734 | ||
|
|
2de0b5e6b0 | ||
|
|
2ddf31ca22 | ||
|
|
b8d2d1cd4b | ||
|
|
fb420d13cc | ||
|
|
55ed1273d9 | ||
|
|
edceb17b71 | ||
|
|
a1e3c09fad | ||
|
|
118da69eb5 | ||
|
|
02a4ab665f | ||
|
|
c8a2e16a1c | ||
|
|
ca012ebf76 | ||
|
|
1cbedb1eb6 | ||
|
|
30c3a8aa76 | ||
|
|
68f8e08506 | ||
|
|
866fe11610 | ||
|
|
f787c57636 | ||
|
|
93b815ecf2 | ||
|
|
fe99890683 | ||
|
|
9ef23aecca | ||
|
|
043fa32aef | ||
|
|
5bdd5d8e54 | ||
|
|
df47f94cf9 | ||
|
|
7b6f168d8c | ||
|
|
cf9a73d539 | ||
|
|
ae6ebfcafd | ||
|
|
52f88abd33 | ||
|
|
95a4b56575 | ||
|
|
1625bbcf19 | ||
|
|
59c8c8a9c5 | ||
|
|
5c335b28b2 | ||
|
|
96ec896179 | ||
|
|
8913ca84d0 | ||
|
|
cdbcac5251 | ||
|
|
1e3985d3b4 | ||
|
|
d1d0f9edf0 | ||
|
|
62dfd9a17b | ||
|
|
d0f587fd55 | ||
|
|
765be03111 | ||
|
|
94efa3028a | ||
|
|
085ddae3b9 | ||
|
|
8232a07437 | ||
|
|
e9122b3453 | ||
|
|
43527302ac | ||
|
|
85e620345c | ||
|
|
8cba6df362 | ||
|
|
1eee23e4e1 | ||
|
|
e66bb7f1ab | ||
|
|
9a44414a8e | ||
|
|
2f16ee4e6e | ||
|
|
acb889a267 | ||
|
|
6334e19730 | ||
|
|
57034ab47d | ||
|
|
f3be4f4c38 | ||
|
|
169eb51b0d | ||
|
|
a3a23eb8dc | ||
|
|
3fadc1cce1 | ||
|
|
029bce9b5b | ||
|
|
9bb8f0537a | ||
|
|
408cc78499 | ||
|
|
045e88038f |
1
.github/pull_request_template.md
vendored
Normal file
1
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
|
||||
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# Session
|
||||
Session.vim
|
||||
Sessionx.vim
|
||||
|
||||
# Temporary
|
||||
.netrwhist
|
||||
*~
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
# Persistent undo
|
||||
[._]*.un~
|
||||
76
CODE_OF_CONDUCT.md
Normal file
76
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at community@prowler.cloud. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
205
LICENSE
205
LICENSE
@@ -1,201 +1,6 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
All CIS based checks in the checks folder are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License.
|
||||
The link to the license terms can be found at
|
||||
https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
Any other piece of code is licensed as Apache License 2.0 as specified in each file. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
201
LICENSE-APACHE-2.0
Normal file
201
LICENSE-APACHE-2.0
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
360
LICENSE-CC-BY-SA-4.0
Normal file
360
LICENSE-CC-BY-SA-4.0
Normal file
@@ -0,0 +1,360 @@
|
||||
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
|
||||
Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-NonCommercial-ShareAlike 4.0 International Public License
|
||||
("Public License"). To the extent this Public License may be
|
||||
interpreted as a contract, You are granted the Licensed Rights in
|
||||
consideration of Your acceptance of these terms and conditions, and the
|
||||
Licensor grants You such rights in consideration of benefits the
|
||||
Licensor receives from making the Licensed Material available under
|
||||
these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-NC-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution, NonCommercial, and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. NonCommercial means not primarily intended for or directed towards
|
||||
commercial advantage or monetary compensation. For purposes of
|
||||
this Public License, the exchange of the Licensed Material for
|
||||
other material subject to Copyright and Similar Rights by digital
|
||||
file-sharing or similar means is NonCommercial provided there is
|
||||
no payment of monetary compensation in connection with the
|
||||
exchange.
|
||||
|
||||
l. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
m. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
n. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part, for NonCommercial purposes only; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material for
|
||||
NonCommercial purposes only.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties, including when
|
||||
the Licensed Material is used other than for NonCommercial
|
||||
purposes.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-NC-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database for NonCommercial purposes
|
||||
only;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
including for purposes of Section 3(b); and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
4
LIST_OF_CHECKS_AND_GROUPS.md
Normal file
4
LIST_OF_CHECKS_AND_GROUPS.md
Normal file
@@ -0,0 +1,4 @@
|
||||
```
|
||||
./prowler -l # to see all available checks and groups.
|
||||
./prowler -L # to see all available groups only.
|
||||
```
|
||||
14
Pipfile
Normal file
14
Pipfile
Normal file
@@ -0,0 +1,14 @@
|
||||
[[source]]
|
||||
name = "pypi"
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
|
||||
[dev-packages]
|
||||
|
||||
[packages]
|
||||
boto3 = ">=1.9.188"
|
||||
ansi2html = ">=1.5.2"
|
||||
detect-secrets = ">=0.12.4"
|
||||
|
||||
[requires]
|
||||
python_version = "3.7"
|
||||
856
README.md
856
README.md
@@ -1,493 +1,461 @@
|
||||
# Prowler: AWS CIS Benchmark Tool
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Description](#description)
|
||||
- [Features](#features)
|
||||
- [Requirements and Installation](#requirements-and-installation)
|
||||
- [Usage](#usage)
|
||||
- [Advanced Usage](#advanced-usage)
|
||||
- [Fix](#fix)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
- [Extras](#extras)
|
||||
- [Forensics Ready Checks](#forensics-ready-checks)
|
||||
- [GDPR Checks](#gdpr-checks)
|
||||
- [HIPAA Checks](#hipaa-checks)
|
||||
- [Add Custom Checks](#add-custom-checks)
|
||||
- [Third Party Integrations](#third-party-integrations)
|
||||
- [Full list of checks and groups](/LIST_OF_CHECKS_AND_GROUPS.md)
|
||||
- [License](#license)
|
||||
|
||||
## Description
|
||||
|
||||
Tool based on AWS-CLI commands for AWS account hardening, following guidelines of the [CIS Amazon Web Services Foundations Benchmark 1.1 ](https://benchmarks.cisecurity.org/tools2/amazon/CIS_Amazon_Web_Services_Foundations_Benchmark_v1.1.0.pdf)
|
||||
Prowler is a command line tool for AWS Security Best Practices Assessment, Auditing, Hardening and Forensics Readiness Tool.
|
||||
|
||||
It covers hardening and security best practices for all regions related to:
|
||||
It follows guidelines of the CIS Amazon Web Services Foundations Benchmark (49 checks) and has 40 additional checks including related to GDPR and HIPAA.
|
||||
|
||||
- Identity and Access Management (24 checks)
|
||||
- Logging (8 checks)
|
||||
- Monitoring (15 checks)
|
||||
- Networking (5 checks)
|
||||
Read more about [CIS Amazon Web Services Foundations Benchmark v1.2.0 - 05-23-2018](https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf)
|
||||
|
||||
For a comprehesive list and resolution look at the guide on the link above.
|
||||
## Features
|
||||
|
||||
It covers hardening and security best practices for all AWS regions related to the next groups:
|
||||
|
||||
- Identity and Access Management (22 checks) [group1]
|
||||
- Logging (9 checks) [group2]
|
||||
- Monitoring (14 checks) [group3]
|
||||
- Networking (4 checks) [group4]
|
||||
- CIS Level 1 [cislevel1]
|
||||
- CIS Level 2 [cislevel2]
|
||||
- Extras (39 checks) *see Extras section* [extras]
|
||||
- Forensics related group of checks [forensics-ready]
|
||||
- GDPR [gdpr] Read more [here](#gdpr-checks)
|
||||
- HIPAA [hipaa] Read more [here](#hipaa-checks)
|
||||
|
||||
|
||||
For a comprehensive list and resolution look at the guide on the link above.
|
||||
|
||||
With Prowler you can:
|
||||
|
||||
- get a colorful or monochrome report
|
||||
- a CSV format report for diff
|
||||
- run specific checks without having to run the entire report
|
||||
- check multiple AWS accounts in parallel
|
||||
|
||||
## Requirements and Installation
|
||||
|
||||
## Requirements
|
||||
This script has been written in bash using AWS-CLI and it works in Linux and OSX.
|
||||
|
||||
- Make sure your AWS-CLI is installed on your workstation, with Python pip already installed:
|
||||
```
|
||||
pip install awscli
|
||||
```
|
||||
Or install it using "brew", "apt", "yum" or manually from https://aws.amazon.com/cli/
|
||||
- Make sure the latest version of AWS-CLI is installed on your workstation, and other components needed, with Python pip already installed:
|
||||
|
||||
```sh
|
||||
pip install awscli ansi2html detect-secrets
|
||||
```
|
||||
|
||||
AWS-CLI can be also installed it using "brew", "apt", "yum" or manually from <https://aws.amazon.com/cli/>, but `ansi2html` and `detect-secrets` has to be installed using `pip`. You will need to install `jq` to get more accuracy in some checks.
|
||||
|
||||
- Make sure jq is installed (example below with "apt" but use a valid package manager for your OS):
|
||||
```sh
|
||||
sudo apt install jq
|
||||
```
|
||||
|
||||
- Previous steps, from your workstation:
|
||||
```
|
||||
git clone https://github.com/Alfresco/prowler
|
||||
cd prowler
|
||||
```
|
||||
|
||||
- Make sure you have properly configured your AWS-CLI with a valid Access Key and Region:
|
||||
```
|
||||
aws configure
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/toniblyx/prowler
|
||||
cd prowler
|
||||
```
|
||||
|
||||
- Make sure your Secret and Access Keys are associated to a user with proper permissions to do all checks. To make sure add SecurityAuditor default policy to your user. Policy ARN is
|
||||
- Make sure you have properly configured your AWS-CLI with a valid Access Key and Region or declare AWS variables properly (or intance profile):
|
||||
|
||||
```sh
|
||||
aws configure
|
||||
```
|
||||
or
|
||||
```sh
|
||||
export AWS_ACCESS_KEY_ID="ASXXXXXXX"
|
||||
export AWS_SECRET_ACCESS_KEY="XXXXXXXXX"
|
||||
export AWS_SESSION_TOKEN="XXXXXXXXX"
|
||||
```
|
||||
|
||||
- Those credentials must be associated to a user or role with proper permissions to do all checks. To make sure add SecurityAuditor default policy to your user. Policy ARN is
|
||||
|
||||
```sh
|
||||
arn:aws:iam::aws:policy/SecurityAudit
|
||||
```
|
||||
|
||||
> Additional permissions needed: to make sure Prowler can scan all services included in the group *Extras*, make sure you attach also the custom policy [prowler-additions-policy.json](https://github.com/toniblyx/prowler/blob/master/iam/prowler-additions-policy.json) to the role you are using.
|
||||
|
||||
## Usage
|
||||
|
||||
1. Run the `prowler` command without options (it will use your environment variable credentials if they exist or will default to using the `~/.aws/credentials` file and run checks over all regions when needed. The default region is us-east-1):
|
||||
|
||||
```sh
|
||||
./prowler
|
||||
```
|
||||
|
||||
Use `-l` to list all available checks and group of checks (sections)
|
||||
|
||||
If you want to avoid installing dependences run it using Docker:
|
||||
|
||||
```sh
|
||||
docker run -ti --rm --name prowler --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_SESSION_TOKEN toniblyx/prowler:latest
|
||||
```
|
||||
|
||||
1. For custom AWS-CLI profile and region, use the following: (it will use your custom profile and run checks over all regions when needed):
|
||||
|
||||
```sh
|
||||
./prowler -p custom-profile -r us-east-1
|
||||
```
|
||||
|
||||
1. For a single check use option `-c`:
|
||||
|
||||
```sh
|
||||
./prowler -c check310
|
||||
```
|
||||
With Docker:
|
||||
```sh
|
||||
docker run -ti --rm --name prowler --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_SESSION_TOKEN toniblyx/prowler:latest "-c check310"
|
||||
```
|
||||
|
||||
or multiple checks separated by comma:
|
||||
```sh
|
||||
./prowler -c check310,check722
|
||||
```
|
||||
or all checks but some of them:
|
||||
```sh
|
||||
./prowler -E check42,check43
|
||||
```
|
||||
|
||||
or for custom profile and region:
|
||||
|
||||
```sh
|
||||
./prowler -p custom-profile -r us-east-1 -c check11
|
||||
```
|
||||
|
||||
or for a group of checks use group name:
|
||||
|
||||
```sh
|
||||
./prowler -g group1 # for iam related checks
|
||||
```
|
||||
or exclude some checks in the group:
|
||||
```sh
|
||||
./prowler -g group4 -E check42,check43
|
||||
```
|
||||
|
||||
Valid check numbers are based on the AWS CIS Benchmark guide, so 1.1 is check11 and 3.10 is check310
|
||||
|
||||
1. If you want to save your report for later analysis:
|
||||
|
||||
```sh
|
||||
./prowler -M mono > prowler-report.txt
|
||||
```
|
||||
|
||||
or if you want a coloured HTML report do:
|
||||
|
||||
```sh
|
||||
pip install ansi2html
|
||||
./prowler | ansi2html -la > report.html
|
||||
```
|
||||
|
||||
or if you want a pipe-delimited report file, do:
|
||||
|
||||
```sh
|
||||
./prowler -M csv > output.psv
|
||||
```
|
||||
or json formatted output using jq, do:
|
||||
|
||||
```sh
|
||||
./prowler -M json > prowler-output.json
|
||||
```
|
||||
|
||||
or save your report in a S3 bucket:
|
||||
|
||||
```sh
|
||||
./prowler -M mono | aws s3 cp - s3://bucket-name/prowler-report.txt
|
||||
```
|
||||
|
||||
1. To perform an assessment based on CIS Profile Definitions you can use cislevel1 or cislevel2 with `-g` flag, more information about this [here, page 8](https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf):
|
||||
|
||||
```sh
|
||||
./prowler -g cislevel1
|
||||
```
|
||||
|
||||
1. If you want to run Prowler to check multiple AWS accounts in parallel (runs up to 4 simultaneously `-P 4`):
|
||||
|
||||
```sh
|
||||
grep -E '^\[([0-9A-Aa-z_-]+)\]' ~/.aws/credentials | tr -d '][' | shuf | \
|
||||
xargs -n 1 -L 1 -I @ -r -P 4 ./prowler -p @ -M csv 2> /dev/null >> all-accounts.csv
|
||||
```
|
||||
|
||||
1. For help use:
|
||||
|
||||
```
|
||||
./prowler -h
|
||||
|
||||
USAGE:
|
||||
prowler [ -p <profile> -r <region> -h ]
|
||||
|
||||
Options:
|
||||
-p <profile> specify your AWS profile to use (i.e.: default)
|
||||
-r <region> specify an AWS region to direct API requests to
|
||||
(i.e.: us-east-1), all regions are checked anyway if the check requires it
|
||||
-c <check_id> specify a check id, to see all available checks use -l option
|
||||
(i.e.: check11 for check 1.1 or extra71 for extra check 71)
|
||||
-g <group_id> specify a group of checks by id, to see all available group of checks use -L
|
||||
(i.e.: check3 for entire section 3, cislevel1 for CIS Level 1 Profile Definitions or forensics-ready)
|
||||
-f <filterregion> specify an AWS region to run checks against
|
||||
(i.e.: us-west-1)
|
||||
-m <maxitems> specify the maximum number of items to return for long-running requests (default: 100)
|
||||
-M <mode> output mode: text (default), mono, json, csv (separator is ,; data is on stdout; progress on stderr)
|
||||
-k keep the credential report
|
||||
-n show check numbers to sort easier
|
||||
(i.e.: 1.01 instead of 1.1)
|
||||
-l list all available checks only (does not perform any check)
|
||||
-L list all groups (does not perform any check)
|
||||
-e exclude group extras
|
||||
-E execute all tests except a list of specified checks separated by comma (i.e. check21,check31)
|
||||
-b do not print Prowler banner
|
||||
-V show version number & exit
|
||||
-s show scoring report
|
||||
-x specify external directory with custom checks (i.e. /my/own/checks, files must start by check)
|
||||
-q suppress info messages and passing test output
|
||||
-A account id for the account where to assume a role, requires -R and -T
|
||||
(i.e.: 123456789012)
|
||||
-R role name to assume in the account, requires -A and -T
|
||||
(i.e.: ProwlerRole)
|
||||
-T session durantion given to that role credentials in seconds, default 1h (3600) recommended 12h, requires -R and -T
|
||||
(i.e.: 43200)
|
||||
-h this help
|
||||
```
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
### Assume Role:
|
||||
|
||||
Prowler uses the AWS CLI underneath so it uses the same authentication methods. However, there are few ways to run Prowler against multiple accounts using IAM Assume Role feature depending on eachg use case. You can just set up your custom profile inside `~/.aws/config` with all needed information about the role to assume then call it with `./prowler -p your-custom-profile`. Additionally you can use `-A 123456789012` and `-R RemoteRoleToAssume` and Prowler will get those temporary credentials using `aws sts assume-role`, set them up as environment variables and run against that given account.
|
||||
|
||||
```
|
||||
arn:aws:iam::aws:policy/SecurityAudit
|
||||
```
|
||||
> In some cases you may need more list or get permissions in some services, look at the Troubleshooting section for a more comprehensive policy if you find issues with the default SecurityAudit policy.
|
||||
|
||||
## How to create a report
|
||||
|
||||
1 - Run the prowler.sh command without options (it will use your default credentials and run checks over all regions when needed, default region is us-east-1):
|
||||
|
||||
```
|
||||
./prowler
|
||||
./prowler -A 123456789012 -R ProwlerRole
|
||||
```
|
||||
|
||||
2 - For custom AWS-CLI profile and region, use the following: (it will use your custom profile and run checks over all regions when needed):
|
||||
> *NOTE 1 about Session Duration*: By default it gets credentials valid for 1 hour (3600 seconds). Depending on the mount of checks you run and the size of your infrastructure, Prowler may require more than 1 hour to finish. Use option `-T <seconds>` to allow up to 12h (43200 seconds). To allow more than 1h you need to modify *"Maximum CLI/API session duration"* for that particular role, read more [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session).
|
||||
|
||||
> *NOTE 2 about Session Duration*: Bear in mind that if you are using roles assumed by role chaining there is a hard limit of 1 hour so consider not using role chaining if possible, read more about that, in foot note 1 below the table [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html).
|
||||
|
||||
For example, if you want to get only the fails in CSV format from all checks regarding RDS without banner from the AWS Account 123456789012 assuming the role RemoteRoleToAssume and set a fixed session duration of 1h:
|
||||
|
||||
```
|
||||
./prowler -p custom-profile -r us-east-1
|
||||
./prowler -A 123456789012 -R RemoteRoleToAssume -T 3600 -b -M cvs -q -g rds
|
||||
```
|
||||
|
||||
3 - For a single check use option -c:
|
||||
### Custom folder for custom checks
|
||||
|
||||
Flag `-x /my/own/checks` will include any check in that particular directory. To see how to write checks see [Add Custom Checks](#add-custom-checks) section.
|
||||
|
||||
### Show or log only FAILs
|
||||
|
||||
In order to remove noise and get only FAIL findings there is a `-q` flag that makes Prowler to show and log only FAILs. It can be combined with any other option.
|
||||
|
||||
```
|
||||
./prowler -c check310
|
||||
```
|
||||
or for custom profile and region
|
||||
```
|
||||
./prowler -p custom-profile -r us-east-1 -c check11
|
||||
```
|
||||
or for a group of checks use group name:
|
||||
```
|
||||
./prowler -c check3
|
||||
./prowler -q -M csv -b
|
||||
```
|
||||
|
||||
Valid check numbers are based on the AWS CIS Benchmark guide, so 1.1 is check11 and 3.10 is check310
|
||||
|
||||
4 - If you want to save your report for later analysis:
|
||||
```
|
||||
./prowler > prowler-report.txt
|
||||
```
|
||||
or if you want a colored HTML report do:
|
||||
```
|
||||
pip install ansi2html
|
||||
./prowler | ansi2html -la > report.html
|
||||
```
|
||||
## How to fix every FAIL
|
||||
|
||||
5 - For help use:
|
||||
|
||||
```
|
||||
./prowler -h
|
||||
|
||||
USAGE:
|
||||
prowler -p <profile> -r <region> [ -h ]
|
||||
Options:
|
||||
-p <profile> specify your AWS profile to use (i.e.: default)
|
||||
-r <region> specify an AWS region to direct API requests to (i.e.: us-east-1)
|
||||
-c <checknum> specify a check number or group from the AWS CIS benchmark (i.e.: check11 for check 1.1 or check3 for entire section 3)
|
||||
-f <filterregion> specify an AWS region to run checks against (i.e.: us-west-1)
|
||||
-m <maxitems> specify the maximum number of items to return for long-running requests (default: 100)
|
||||
-b do not use colors in the output
|
||||
-h this help
|
||||
|
||||
```
|
||||
## How to fix all WARNINGS:
|
||||
Check your report and fix the issues following all specific guidelines per check in https://benchmarks.cisecurity.org/tools2/amazon/CIS_Amazon_Web_Services_Foundations_Benchmark_v1.1.0.pdf
|
||||
Check your report and fix the issues following all specific guidelines per check in <https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf>
|
||||
|
||||
## Screenshots
|
||||
|
||||
- Sample screenshot of report first lines:
|
||||
<img width="1125" alt="screenshot 2016-09-13 16 05 42" src="https://cloud.githubusercontent.com/assets/3985464/18489640/50fe6824-79cc-11e6-8a9c-e788b88a8a6b.png">
|
||||
|
||||
- Sample screnshot of single check for check 3.3:
|
||||
<img width="1006" alt="screenshot 2016-09-14 13 20 46" src="https://cloud.githubusercontent.com/assets/3985464/18522590/a04ca9a6-7a7e-11e6-8730-b545c9204990.png">
|
||||
<img width="1125" alt="screenshot 2016-09-13 16 05 42" src="https://cloud.githubusercontent.com/assets/3985464/18489640/50fe6824-79cc-11e6-8a9c-e788b88a8a6b.png">
|
||||
|
||||
- Sample of a full report:
|
||||
- Sample screenshot of single check for check 3.3:
|
||||
|
||||
```
|
||||
$ ./prowler
|
||||
_
|
||||
_ __ _ __ _____ _| | ___ _ __
|
||||
| '_ \| '__/ _ \ \ /\ / / |/ _ \ '__|
|
||||
| |_) | | | (_) \ V V /| | __/ |
|
||||
| .__/|_| \___/ \_/\_/ |_|\___|_|
|
||||
|_| CIS based AWS Account Hardening Tool
|
||||
|
||||
|
||||
Date: Wed Sep 14 13:30:13 EDT 2016
|
||||
|
||||
This report is being generated using credentials below:
|
||||
|
||||
AWS-CLI Profile: [default] AWS Region: [us-east-1]
|
||||
|
||||
--------------------------------------------------------------------------------------
|
||||
| GetCallerIdentity |
|
||||
+--------------+-------------------------------------------+-------------------------+
|
||||
| Account | Arn | UserId |
|
||||
+--------------+-------------------------------------------+-------------------------+
|
||||
| XXXXXXXXXXXX| arn:aws:iam::XXXXXXXXXXXX:user/toni | XXXXXXXXXXXXXXXXXXXXX |
|
||||
+--------------+-------------------------------------------+-------------------------+
|
||||
|
||||
Colors Code for results: INFORMATIVE, OK (RECOMMENDED VALUE), CRITICAL (FIX REQUIRED)
|
||||
|
||||
|
||||
Generating AWS IAM Credential Report....COMPLETE
|
||||
|
||||
|
||||
1 Identity and Access Management *********************************
|
||||
|
||||
1.1 Avoid the use of the root account (Scored). Last time root account was used
|
||||
(password last used, access_key_1_last_used, access_key_2_last_used):
|
||||
2016-08-11T20:59:27+00:00, N/A, N/A
|
||||
|
||||
1.2 Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)
|
||||
List of users with Password enabled but MFA disabled:
|
||||
toni
|
||||
|
||||
1.3 Ensure credentials unused for 90 days or greater are disabled (Scored)
|
||||
User list:
|
||||
toni
|
||||
|
||||
1.4 Ensure access keys are rotated every 90 days or less (Scored)
|
||||
Users with access key 1 older than 90 days:
|
||||
<root_account>
|
||||
Users with access key 2 older than 90 days:
|
||||
|
||||
1.5 Ensure IAM password policy requires at least one uppercase letter (Scored)
|
||||
FALSE
|
||||
|
||||
1.6 Ensure IAM password policy require at least one lowercase letter (Scored)
|
||||
FALSE
|
||||
|
||||
1.7 Ensure IAM password policy require at least one symbol (Scored)
|
||||
FALSE
|
||||
|
||||
1.8 Ensure IAM password policy require at least one number (Scored)
|
||||
FALSE
|
||||
|
||||
1.9 Ensure IAM password policy requires minimum length of 14 or greater (Scored)
|
||||
FALSE
|
||||
|
||||
1.10 Ensure IAM password policy prevents password reuse (Scored)
|
||||
FALSE
|
||||
|
||||
1.11 Ensure IAM password policy expires passwords within 90 days or less (Scored)
|
||||
FALSE
|
||||
|
||||
1.12 Ensure no root account access key exists (Scored)
|
||||
Found access key 1
|
||||
OK No access key 2 found
|
||||
|
||||
1.13 Ensure hardware MFA is enabled for the root account (Scored)
|
||||
OK
|
||||
|
||||
1.14 Ensure security questions are registered in the AWS account (Not Scored)
|
||||
No command available for check 1.14
|
||||
Login to the AWS Console as root, click on the Account
|
||||
Name -> My Account -> Configure Security Challenge Questions
|
||||
|
||||
1.15 Ensure IAM policies are attached only to groups or roles (Scored)
|
||||
Users with policy attached to them instead to groups: (it may take few seconds...)
|
||||
toni
|
||||
|
||||
|
||||
2 Logging ********************************************************
|
||||
|
||||
2.1 Ensure CloudTrail is enabled in all regions (Scored)
|
||||
FALSE
|
||||
|
||||
2.2 Ensure CloudTrail log file validation is enabled (Scored)
|
||||
FALSE
|
||||
|
||||
2.3 Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)
|
||||
WARNING! CloudTrail bucket doesn't exist!
|
||||
|
||||
2.4 Ensure CloudTrail trails are integrated with CloudWatch Logs (Scored)
|
||||
WARNING! No CloudTrail trails found!
|
||||
|
||||
2.5 Ensure AWS Config is enabled in all regions (Scored)
|
||||
WARNING! Region ap-south-1 has AWS Config disabled or not configured
|
||||
WARNING! Region eu-west-1 has AWS Config disabled or not configured
|
||||
WARNING! Region ap-southeast-1 has AWS Config disabled or not configured
|
||||
WARNING! Region ap-southeast-2 has AWS Config disabled or not configured
|
||||
WARNING! Region eu-central-1 has AWS Config disabled or not configured
|
||||
WARNING! Region ap-northeast-2 has AWS Config disabled or not configured
|
||||
WARNING! Region ap-northeast-1 has AWS Config disabled or not configured
|
||||
WARNING! Region us-east-1 has AWS Config disabled or not configured
|
||||
WARNING! Region sa-east-1 has AWS Config disabled or not configured
|
||||
WARNING! Region us-west-1 has AWS Config disabled or not configured
|
||||
WARNING! Region us-west-2 has AWS Config disabled or not configured
|
||||
|
||||
2.6 Ensure S3 bucket access logging is enabled on the CloudTrail S3 bucket (Scored)
|
||||
WARNING! CloudTrail bucket doesn't exist!
|
||||
|
||||
2.7 Ensure CloudTrail logs are encrypted at rest using KMS CMKs (Scored)
|
||||
WARNING! CloudTrail bucket doesn't exist!
|
||||
|
||||
2.8 Ensure rotation for customer created CMKs is enabled (Scored)
|
||||
Region ap-south-1 doesn't have encryption keys
|
||||
Region eu-west-1 doesn't have encryption keys
|
||||
Region ap-southeast-1 doesn't have encryption keys
|
||||
Region ap-southeast-2 doesn't have encryption keys
|
||||
Region eu-central-1 doesn't have encryption keys
|
||||
Region ap-northeast-2 doesn't have encryption keys
|
||||
Region ap-northeast-1 doesn't have encryption keys
|
||||
WARNING! Key a0e988df-bc84-423f-996c-XXXX in Region us-east-1 is not set to rotate!
|
||||
Region sa-east-1 doesn't have encryption keys
|
||||
Region us-west-1 doesn't have encryption keys
|
||||
Region us-west-2 doesn't have encryption keys
|
||||
|
||||
|
||||
3 Monitoring *****************************************************
|
||||
|
||||
3.1 Ensure a log metric filter and alarm exist for unauthorized API calls (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.2 Ensure a log metric filter and alarm exist for Management Console sign-in without MFA (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.3 Ensure a log metric filter and alarm exist for usage of root account (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.4 Ensure a log metric filter and alarm exist for IAM policy changes (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.5 Ensure a log metric filter and alarm exist for CloudTrail configuration changes (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.6 Ensure a log metric filter and alarm exist for AWS Management Console authentication failures (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.7 Ensure a log metric filter and alarm exist for disabling or scheduled deletion of customer created CMKs (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.8 Ensure a log metric filter and alarm exist for S3 bucket policy changes (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.9 Ensure a log metric filter and alarm exist for AWS Config configuration changes (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.10 Ensure a log metric filter and alarm exist for security group changes (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.11 Ensure a log metric filter and alarm exist for changes to Network Access Control Lists (NACL) (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.12 Ensure a log metric filter and alarm exist for changes to network gateways (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.13 Ensure a log metric filter and alarm exist for route table changes (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.14 Ensure a log metric filter and alarm exist for VPC changes (Scored)
|
||||
WARNING! No CloudWatch group found, no metric filters or alarms associated
|
||||
|
||||
3.15 Ensure security contact information is registered (Scored)
|
||||
No command available for check 3.15
|
||||
Login to the AWS Console, click on My Account
|
||||
Go to Alternate Contacts -> make sure Security section is filled
|
||||
|
||||
3.16 Ensure appropriate subscribers to each SNS topic (Not Scored)
|
||||
Region ap-south-1 doesn't have topics
|
||||
Region eu-west-1 doesn't have topics
|
||||
Region ap-southeast-1 doesn't have topics
|
||||
Region ap-southeast-2 doesn't have topics
|
||||
Region eu-central-1 doesn't have topics
|
||||
Region ap-northeast-2 doesn't have topics
|
||||
Region ap-northeast-1 doesn't have topics
|
||||
Region us-east-1 doesn't have topics
|
||||
Region sa-east-1 doesn't have topics
|
||||
Region us-west-1 doesn't have topics
|
||||
Region us-west-2 doesn't have topics
|
||||
|
||||
|
||||
4 Networking **************************************************
|
||||
|
||||
4.1 Ensure no security groups allow ingress from 0.0.0.0/0 to port 22 (Scored)
|
||||
OK, No Security Groups found in ap-south-1 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in eu-west-1 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in ap-southeast-1 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in ap-southeast-2 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in eu-central-1 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in ap-northeast-2 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in ap-northeast-1 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in us-east-1 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in sa-east-1 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in us-west-1 with port 22 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in us-west-2 with port 22 TCP open to 0.0.0.0/0
|
||||
|
||||
4.2 Ensure no security groups allow ingress from 0.0.0.0/0 to port 3389 (Scored)
|
||||
OK, No Security Groups found in ap-south-1 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in eu-west-1 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in ap-southeast-1 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in ap-southeast-2 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in eu-central-1 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in ap-northeast-2 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in ap-northeast-1 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in us-east-1 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in sa-east-1 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in us-west-1 with port 3389 TCP open to 0.0.0.0/0
|
||||
OK, No Security Groups found in us-west-2 with port 3389 TCP open to 0.0.0.0/0
|
||||
|
||||
4.3 Ensure VPC Flow Logging is Enabled in all Applicable Regions (Scored)
|
||||
WARNING! no VPCFlowLog has been found in Region ap-south-1
|
||||
WARNING! no VPCFlowLog has been found in Region eu-west-1
|
||||
WARNING! no VPCFlowLog has been found in Region ap-southeast-1
|
||||
WARNING! no VPCFlowLog has been found in Region ap-southeast-2
|
||||
WARNING! no VPCFlowLog has been found in Region eu-central-1
|
||||
WARNING! no VPCFlowLog has been found in Region ap-northeast-2
|
||||
WARNING! no VPCFlowLog has been found in Region ap-northeast-1
|
||||
WARNING! no VPCFlowLog has been found in Region us-east-1
|
||||
WARNING! no VPCFlowLog has been found in Region sa-east-1
|
||||
WARNING! no VPCFlowLog has been found in Region us-west-1
|
||||
WARNING! no VPCFlowLog has been found in Region us-west-2
|
||||
|
||||
4.4 Ensure the default security group restricts all traffic (Scored)
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region ap-south-1
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region eu-west-1
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region ap-southeast-1
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region ap-southeast-2
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region eu-central-1
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region ap-northeast-2
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region ap-northeast-1
|
||||
OK, no Default Security Groups open to 0.0.0.0 found in Region us-east-1
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region sa-east-1
|
||||
WARNING! Default Security Groups found that allow 0.0.0.0 IN or OUT traffic in Region us-west-1
|
||||
OK, no Default Security Groups open to 0.0.0.0 found in Region us-west-2
|
||||
|
||||
- For more information and reference:
|
||||
https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
```
|
||||
<img width="1006" alt="screenshot 2016-09-14 13 20 46" src="https://cloud.githubusercontent.com/assets/3985464/18522590/a04ca9a6-7a7e-11e6-8730-b545c9204990.png">
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### STS expired token
|
||||
|
||||
If you are using an STS token for AWS-CLI and your session is expired you probably get this error:
|
||||
|
||||
```
|
||||
A client error (ExpiredToken) occurred when calling the GenerateCredentialReport operation: The security token included in the request is expired
|
||||
```
|
||||
To fix it, please renew your token by authenticating again to the AWS API.
|
||||
|
||||
To fix it, please renew your token by authenticating again to the AWS API, see next section below if you use MFA.
|
||||
|
||||
### Run Prowler with MFA protected credentials
|
||||
|
||||
To run Prowler using a profile that requires MFA you just need to get the session token before hand. Just make sure you use this command:
|
||||
|
||||
```
|
||||
aws --profile <YOUR_AWS_PROFILE> sts get-session-token --duration 129600 --serial-number <ARN_OF_MFA> --token-code <MFA_TOKEN_CODE> --output text
|
||||
```
|
||||
Once you get your token you can export it as environment variable:
|
||||
```
|
||||
export AWS_PROFILE=YOUR_AWS_PROFILE
|
||||
export AWS_SESSION_TOKEN=YOUR_NEW_TOKEN
|
||||
AWS_SECRET_ACCESS_KEY=YOUR_SECRET
|
||||
export AWS_ACCESS_KEY_ID=YOUR_KEY
|
||||
```
|
||||
or set manually up your `~/.aws/credentials` file properly.
|
||||
|
||||
There are some helpfull tools to save time in this process like [aws-mfa-script](https://github.com/asagage/aws-mfa-script) or [aws-cli-mfa](https://github.com/sweharris/aws-cli-mfa).
|
||||
|
||||
### Custom IAM Policy
|
||||
Instead of using default policy SecurityAudit for the account you use for checks you may need to create a custom policy with a few more permissions (get and list, not change!) here you go a good example for a "ProwlerPolicyReadOnly":
|
||||
|
||||
Some new and specific checks require Prowler to inherit more permissions than SecurityAudit to work properly. In addition to the AWS managed policy "SecurityAudit" for the role you use for checks you may need to create a custom policy with a few more permissions (get and list and additional services mostly). Here you go a good example for a "ProwlerReadOnlyPolicy" (see below bootstrap script for set it up):
|
||||
|
||||
[iam/prowler-additions-policy.json](iam/prowler-additions-policy.json)
|
||||
|
||||
> Note: Action `ec2:get*` is included in "ProwlerReadOnlyPolicy" policy above, that includes `get-password-data`, type `aws ec2 get-password-data help` to better understand its implications.
|
||||
|
||||
### Bootstrap Script
|
||||
|
||||
Quick bash script to set up a "prowler" IAM user with "SecurityAudit" group with the required permissions (including "ProwlerReadOnlyPolicy"). To run the script below, you need user with administrative permissions; set the `AWS_DEFAULT_PROFILE` to use that account:
|
||||
|
||||
```sh
|
||||
export AWS_DEFAULT_PROFILE=default
|
||||
export ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' | tr -d '"')
|
||||
aws iam create-group --group-name SecurityAudit
|
||||
aws iam create-policy --policy-name ProwlerReadOnlyPolicy --policy-document file://$(pwd)/iam/prowler-additions-policy.json
|
||||
aws iam attach-group-policy --group-name SecurityAudit --policy-arn arn:aws:iam::aws:policy/SecurityAudit
|
||||
aws iam attach-group-policy --group-name SecurityAudit --policy-arn arn:aws:iam::${ACCOUNT_ID}:policy/ProwlerReadOnlyPolicy
|
||||
aws iam create-user --user-name prowler
|
||||
aws iam add-user-to-group --user-name prowler --group-name SecurityAudit
|
||||
aws iam create-access-key --user-name prowler
|
||||
unset ACCOUNT_ID AWS_DEFAULT_PROFILE
|
||||
```
|
||||
|
||||
The `aws iam create-access-key` command will output the secret access key and the key id; keep these somewhere safe, and add them to `~/.aws/credentials` with an appropriate profile name to use them with prowler. This is the only time they secret key will be shown. If you lose it, you will need to generate a replacement.
|
||||
|
||||
## Extras
|
||||
|
||||
We are adding additional checks to improve the information gather from each account, these checks are out of the scope of the CIS benchmark for AWS but we consider them very helpful to get to know each AWS account set up and find issues on it.
|
||||
|
||||
Some of these checks look for publicly facing resources may not actually be fully public due to other layered controls like S3 Bucket Policies, Security Groups or Network ACLs.
|
||||
|
||||
To list all existing checks please run the command below:
|
||||
|
||||
```
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [{
|
||||
"Action": [
|
||||
"acm:describecertificate",
|
||||
"acm:listcertificates",
|
||||
"autoscaling:describe*",
|
||||
"cloudformation:describestack*",
|
||||
"cloudformation:getstackpolicy",
|
||||
"cloudformation:gettemplate",
|
||||
"cloudformation:liststack*",
|
||||
"cloudfront:get*",
|
||||
"cloudfront:list*",
|
||||
"cloudtrail:describetrails",
|
||||
"cloudtrail:gettrailstatus",
|
||||
"cloudtrail:listtags",
|
||||
"cloudwatch:describe*",
|
||||
"cloudwatchlogs:describeloggroups",
|
||||
"cloudwatchlogs:describemetricfilters",
|
||||
"codecommit:batchgetrepositories",
|
||||
"codecommit:getbranch",
|
||||
"codecommit:getobjectidentifier",
|
||||
"codecommit:getrepository",
|
||||
"codecommit:list*",
|
||||
"codedeploy:batch*",
|
||||
"codedeploy:get*",
|
||||
"codedeploy:list*",
|
||||
"config:deliver*",
|
||||
"config:describe*",
|
||||
"config:get*",
|
||||
"datapipeline:describeobjects",
|
||||
"datapipeline:describepipelines",
|
||||
"datapipeline:evaluateexpression",
|
||||
"datapipeline:getpipelinedefinition",
|
||||
"datapipeline:listpipelines",
|
||||
"datapipeline:queryobjects",
|
||||
"datapipeline:validatepipelinedefinition",
|
||||
"directconnect:describe*",
|
||||
"dynamodb:listtables",
|
||||
"ec2:describe*",
|
||||
"ecs:describe*",
|
||||
"ecs:list*",
|
||||
"elasticache:describe*",
|
||||
"elasticbeanstalk:describe*",
|
||||
"elasticloadbalancing:describe*",
|
||||
"elasticmapreduce:describejobflows",
|
||||
"elasticmapreduce:listclusters",
|
||||
"es:describeelasticsearchdomainconfig",
|
||||
"es:listdomainnames",
|
||||
"firehose:describe*",
|
||||
"firehose:list*",
|
||||
"glacier:listvaults",
|
||||
"iam:generatecredentialreport",
|
||||
"iam:get*",
|
||||
"iam:list*",
|
||||
"kms:describe*",
|
||||
"kms:get*",
|
||||
"kms:list*",
|
||||
"lambda:getpolicy",
|
||||
"lambda:listfunctions",
|
||||
"logs:DescribeMetricFilters",
|
||||
"rds:describe*",
|
||||
"rds:downloaddblogfileportion",
|
||||
"rds:listtagsforresource",
|
||||
"redshift:describe*",
|
||||
"route53:getchange",
|
||||
"route53:getcheckeripranges",
|
||||
"route53:getgeolocations",
|
||||
"route53:gethealthcheck",
|
||||
"route53:gethealthcheckcount",
|
||||
"route53:gethealthchecklastfailurereason",
|
||||
"route53:gethostedzone",
|
||||
"route53:gethostedzonecount",
|
||||
"route53:getreusabledelegationset",
|
||||
"route53:listgeolocations",
|
||||
"route53:listhealthchecks",
|
||||
"route53:listhostedzones",
|
||||
"route53:listhostedzonesbyname",
|
||||
"route53:listresourcerecordsets",
|
||||
"route53:listreusabledelegationsets",
|
||||
"route53:listtagsforresource",
|
||||
"route53:listtagsforresources",
|
||||
"route53domains:getdomaindetail",
|
||||
"route53domains:getoperationdetail",
|
||||
"route53domains:listdomains",
|
||||
"route53domains:listoperations",
|
||||
"route53domains:listtagsfordomain",
|
||||
"s3:getbucket*",
|
||||
"s3:getlifecycleconfiguration",
|
||||
"s3:getobjectacl",
|
||||
"s3:getobjectversionacl",
|
||||
"s3:listallmybuckets",
|
||||
"sdb:domainmetadata",
|
||||
"sdb:listdomains",
|
||||
"ses:getidentitydkimattributes",
|
||||
"ses:getidentityverificationattributes",
|
||||
"ses:listidentities",
|
||||
"ses:listverifiedemailaddresses",
|
||||
"ses:sendemail",
|
||||
"sns:gettopicattributes",
|
||||
"sns:listsubscriptionsbytopic",
|
||||
"sns:listtopics",
|
||||
"sqs:getqueueattributes",
|
||||
"sqs:listqueues",
|
||||
"tag:getresources",
|
||||
"tag:gettagkeys"
|
||||
],
|
||||
"Effect": "Allow",
|
||||
"Resource": "*"
|
||||
}]
|
||||
}
|
||||
./prowler -l
|
||||
```
|
||||
|
||||
>There are some checks not included in that list, they are experimental or checks that takes long to run like `extra759` and `extra760` (search for secrets in Lambda function variables and code).
|
||||
|
||||
To check all extras in one command:
|
||||
|
||||
```sh
|
||||
./prowler -g extras
|
||||
```
|
||||
|
||||
or to run just one of the checks:
|
||||
|
||||
```sh
|
||||
./prowler -c extraNUMBER
|
||||
```
|
||||
|
||||
## Forensics Ready Checks
|
||||
|
||||
With this group of checks, Prowler looks if each service with logging or audit capabilities has them enabled to ensure all needed evidences are recorded and collected for an eventual digital forensic investigation in case of incident. List of checks part of this group (you can also see all groups with `./prowler -L`). The list of checks can be seen in the group file at:
|
||||
|
||||
[groups/group8_forensics](groups/group8_forensics)
|
||||
|
||||
The `forensics-ready` group of checks uses existing and extra checks. To get a forensics readiness report, run this command:
|
||||
|
||||
```sh
|
||||
./prowler -g forensics-ready
|
||||
```
|
||||
|
||||
## GDPR Checks
|
||||
|
||||
With this group of checks, Prowler shows result of checks related to GDPR, more information [here](https://github.com/toniblyx/prowler/issues/189). The list of checks can be seen in the group file at:
|
||||
|
||||
[groups/group9_gdpr](groups/group9_gdpr)
|
||||
|
||||
The `gdpr` group of checks uses existing and extra checks. To get a GDPR report, run this command:
|
||||
|
||||
```sh
|
||||
./prowler -g gdpr
|
||||
```
|
||||
|
||||
## HIPAA Checks
|
||||
|
||||
With this group of checks, Prowler shows results of controls related to the "Security Rule" of the Health Insurance Portability and Accountability Act aka [HIPAA](https://www.hhs.gov/hipaa/for-professionals/security/index.html) as defined in [45 CFR Subpart C - Security Standards for the Protection of Electronic Protected Health Information](https://www.law.cornell.edu/cfr/text/45/part-164/subpart-C) within [PART 160 - GENERAL ADMINISTRATIVE REQUIREMENTS](https://www.law.cornell.edu/cfr/text/45/part-160) and [Subpart A](https://www.law.cornell.edu/cfr/text/45/part-164/subpart-A) and [Subpart C](https://www.law.cornell.edu/cfr/text/45/part-164/subpart-C) of PART 164 - SECURITY AND PRIVACY
|
||||
|
||||
More information on the original PR is [here](https://github.com/toniblyx/prowler/issues/227).
|
||||
|
||||
### Note on Business Associate Addendum's (BAA)
|
||||
Under the HIPAA regulations, cloud service providers (CSPs) such as AWS are considered business associates. The Business Associate Addendum (BAA) is an AWS contract that is required under HIPAA rules to ensure that AWS appropriately safeguards protected health information (PHI). The BAA also serves to clarify and limit, as appropriate, the permissible uses and disclosures of PHI by AWS, based on the relationship between AWS and our customers, and the activities or services being performed by AWS. Customers may use any AWS service in an account designated as a HIPAA account, but they should only process, store, and transmit protected health information (PHI) in the HIPAA-eligible services defined in the Business Associate Addendum (BAA). For the latest list of HIPAA-eligible AWS services, see [HIPAA Eligible Services Reference](https://aws.amazon.com/compliance/hipaa-eligible-services-reference/).
|
||||
|
||||
More information on AWS & HIPAA can be found [here](https://aws.amazon.com/compliance/hipaa-compliance/)
|
||||
|
||||
The list of checks showed by this group is as follows, they will be mostly relevant for Subsections [164.306 Security standards: General rules](https://www.law.cornell.edu/cfr/text/45/164.306) and [164.312 Technical safeguards](https://www.law.cornell.edu/cfr/text/45/164.312). Prowler is only able to make checks in the spirit of the technical requirements outlined in these Subsections, and cannot cover all procedural controls required. They be found in the group file at:
|
||||
|
||||
[groups/group10_hipaa](groups/group10_hipaa)
|
||||
|
||||
The `hipaa` group of checks uses existing and extra checks. To get a HIPAA report, run this command:
|
||||
|
||||
```sh
|
||||
./prowler -g hipaa
|
||||
```
|
||||
|
||||
## Add Custom Checks
|
||||
|
||||
In order to add any new check feel free to create a new extra check in the extras group or other group. To do so, you will need to follow these steps:
|
||||
|
||||
1. Follow structure in file `checks/check_sample`
|
||||
2. Name your check with a number part of an existing group or a new one
|
||||
3. Save changes and run it as `./prowler -c extraNN`
|
||||
4. Send me a pull request! :)
|
||||
|
||||
## Add Custom Groups
|
||||
|
||||
1. Follow structure in file `groups/groupN_sample`
|
||||
1. Name your group with a non existing number
|
||||
1. Save changes and run it as `./prowler -g extraNN`
|
||||
1. Send me a pull request! :)
|
||||
|
||||
- You can also create a group with only the checks that you want to perform in your company, for instance a group named `group9_mycompany` with only the list of checks that you care or your particular compliance applies.
|
||||
|
||||
## Third Party Integrations
|
||||
|
||||
### AWS Security Hub
|
||||
|
||||
There is a blog post about that integration in the AWS Security blog here <https://aws.amazon.com/blogs/security/use-aws-fargate-prowler-send-security-configuration-findings-about-aws-services-security-hub/>
|
||||
|
||||
### Telegram
|
||||
|
||||
Javier Pecete has done an awesome job integrating Prowler with Telegram, you have more details here <https://github.com/i4specete/ServerTelegramBot>
|
||||
|
||||
### Cloud Security Suite
|
||||
|
||||
The guys of SecurityFTW have added Prowler in their Cloud Security Suite along with other cool security tools <https://github.com/SecurityFTW/cs-suite>
|
||||
|
||||
## License
|
||||
|
||||
All CIS based checks in the checks folder are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License.
|
||||
The link to the license terms can be found at
|
||||
<https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode>
|
||||
Any other piece of code is licensed as Apache License 2.0 as specified in each file. You may obtain a copy of the License at
|
||||
<http://www.apache.org/licenses/LICENSE-2.0>
|
||||
|
||||
NOTE: If you are interested in using Prowler for commercial purposes remember that due to the CC4.0 license “The distributors or partners that are interested and using Prowler would need to enroll as CIS SecureSuite Members to incorporate this product, which includes references to CIS resources, in their offering.". Information about CIS pricing for vendors here: <https://www.cisecurity.org/cis-securesuite/pricing-and-categories/product-vendor/>
|
||||
|
||||
**I'm not related anyhow with CIS organization, I just write and maintain Prowler to help companies over the world to make their cloud infrastructure more secure.**
|
||||
|
||||
If you want to contact me visit <https://blyx.com/contact>
|
||||
|
||||
37
checks/check11
Normal file
37
checks/check11
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check11="1.1,1.01"
|
||||
CHECK_TITLE_check11="[check11] Avoid the use of the root account (Scored)"
|
||||
CHECK_SCORED_check11="SCORED"
|
||||
CHECK_TYPE_check11="LEVEL1"
|
||||
CHECK_ALTERNATE_check101="check11"
|
||||
|
||||
check11(){
|
||||
# "Avoid the use of the root account (Scored)."
|
||||
MAX_DAYS=-1
|
||||
last_login_dates=$(cat $TEMP_REPORT_FILE | awk -F, '{ print $1,$5,$11,$16 }' | grep '<root_account>' | cut -d' ' -f2,3,4)
|
||||
|
||||
failures=0
|
||||
for date in $last_login_dates; do
|
||||
if [[ ${date%T*} =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]];then
|
||||
days_not_in_use=$(how_many_days_from_today ${date%T*})
|
||||
if [ "$days_not_in_use" -gt "$MAX_DAYS" ];then
|
||||
failures=1
|
||||
textFail "Root user in the account was last accessed ${MAX_DAYS#-} day ago"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $failures == 0 ]]; then
|
||||
textPass "Root user in the account wasn't accessed in the last ${MAX_DAYS#-} days"
|
||||
fi
|
||||
}
|
||||
29
checks/check110
Normal file
29
checks/check110
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check110="1.10"
|
||||
CHECK_TITLE_check110="[check110] Ensure IAM password policy prevents password reuse: 24 or greater (Scored)"
|
||||
CHECK_SCORED_check110="SCORED"
|
||||
CHECK_TYPE_check110="LEVEL1"
|
||||
CHECK_ALTERNATE_check110="check110"
|
||||
|
||||
check110(){
|
||||
# "Ensure IAM password policy prevents password reuse: 24 or greater (Scored)"
|
||||
COMMAND110=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --query 'PasswordPolicy.PasswordReusePrevention' --output text 2> /dev/null)
|
||||
if [[ $COMMAND110 ]];then
|
||||
if [[ $COMMAND110 -gt "23" ]];then
|
||||
textPass "Password Policy limits reuse"
|
||||
else
|
||||
textFail "Password Policy has weak reuse requirement (lower than 24)"
|
||||
fi
|
||||
else
|
||||
textFail "Password Policy missing reuse requirement"
|
||||
fi
|
||||
}
|
||||
29
checks/check111
Normal file
29
checks/check111
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check111="1.11"
|
||||
CHECK_TITLE_check111="[check111] Ensure IAM password policy expires passwords within 90 days or less (Scored)"
|
||||
CHECK_SCORED_check111="SCORED"
|
||||
CHECK_TYPE_check111="LEVEL1"
|
||||
CHECK_ALTERNATE_check111="check111"
|
||||
|
||||
check111(){
|
||||
# "Ensure IAM password policy expires passwords within 90 days or less (Scored)"
|
||||
COMMAND111=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --query PasswordPolicy.MaxPasswordAge --output text 2> /dev/null)
|
||||
if [[ $COMMAND111 == [0-9]* ]];then
|
||||
if [[ "$COMMAND111" -le "90" ]];then
|
||||
textPass "Password Policy includes expiration (Value: $COMMAND111)"
|
||||
else
|
||||
textFail "Password expiration is set greater than 90 days"
|
||||
fi
|
||||
else
|
||||
textFail "Password expiration is not set"
|
||||
fi
|
||||
}
|
||||
32
checks/check112
Normal file
32
checks/check112
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check112="1.12"
|
||||
CHECK_TITLE_check112="[check112] Ensure no root account access key exists (Scored)"
|
||||
CHECK_SCORED_check112="SCORED"
|
||||
CHECK_TYPE_check112="LEVEL1"
|
||||
CHECK_ALTERNATE_check112="check112"
|
||||
|
||||
check112(){
|
||||
# "Ensure no root account access key exists (Scored)"
|
||||
# ensure the access_key_1_active and access_key_2_active fields are set to FALSE.
|
||||
ROOTKEY1=$(cat $TEMP_REPORT_FILE |grep root_account|awk -F',' '{ print $9 }')
|
||||
ROOTKEY2=$(cat $TEMP_REPORT_FILE |grep root_account|awk -F',' '{ print $14 }')
|
||||
if [ "$ROOTKEY1" == "false" ];then
|
||||
textPass "No access key 1 found for root"
|
||||
else
|
||||
textFail "Found access key 1 for root "
|
||||
fi
|
||||
if [ "$ROOTKEY2" == "false" ];then
|
||||
textPass "No access key 2 found for root"
|
||||
else
|
||||
textFail "Found access key 2 for root "
|
||||
fi
|
||||
}
|
||||
25
checks/check113
Normal file
25
checks/check113
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check113="1.13"
|
||||
CHECK_TITLE_check113="[check113] Ensure MFA is enabled for the root account (Scored)"
|
||||
CHECK_SCORED_check113="SCORED"
|
||||
CHECK_TYPE_check113="LEVEL1"
|
||||
CHECK_ALTERNATE_check113="check113"
|
||||
|
||||
check113(){
|
||||
# "Ensure MFA is enabled for the root account (Scored)"
|
||||
COMMAND113=$($AWSCLI iam get-account-summary $PROFILE_OPT --region $REGION --output json --query 'SummaryMap.AccountMFAEnabled')
|
||||
if [ "$COMMAND113" == "1" ]; then
|
||||
textPass "Virtual MFA is enabled for root"
|
||||
else
|
||||
textFail "MFA is not ENABLED for root account "
|
||||
fi
|
||||
}
|
||||
30
checks/check114
Normal file
30
checks/check114
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check114="1.14"
|
||||
CHECK_TITLE_check114="[check114] Ensure hardware MFA is enabled for the root account (Scored)"
|
||||
CHECK_SCORED_check114="SCORED"
|
||||
CHECK_TYPE_check114="LEVEL2"
|
||||
CHECK_ALTERNATE_check114="check114"
|
||||
|
||||
check114(){
|
||||
# "Ensure hardware MFA is enabled for the root account (Scored)"
|
||||
COMMAND113=$($AWSCLI iam get-account-summary $PROFILE_OPT --region $REGION --output json --query 'SummaryMap.AccountMFAEnabled')
|
||||
if [ "$COMMAND113" == "1" ]; then
|
||||
COMMAND114=$($AWSCLI iam list-virtual-mfa-devices $PROFILE_OPT --region $REGION --output text --assignment-status Assigned --query 'VirtualMFADevices[*].[SerialNumber]' | grep '^arn:aws:iam::[0-9]\{12\}:mfa/root-account-mfa-device$')
|
||||
if [[ "$COMMAND114" ]]; then
|
||||
textFail "Only Virtual MFA is enabled for root"
|
||||
else
|
||||
textPass "Hardware MFA is enabled for root "
|
||||
fi
|
||||
else
|
||||
textFail "MFA is not ENABLED for root account "
|
||||
fi
|
||||
}
|
||||
22
checks/check115
Normal file
22
checks/check115
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check115="1.15"
|
||||
CHECK_TITLE_check115="[check115] Ensure security questions are registered in the AWS account (Not Scored)"
|
||||
CHECK_SCORED_check115="NOT_SCORED"
|
||||
CHECK_TYPE_check115="LEVEL1"
|
||||
CHECK_ALTERNATE_check115="check115"
|
||||
|
||||
check115(){
|
||||
# "Ensure security questions are registered in the AWS account (Not Scored)"
|
||||
textInfo "No command available for check 1.15 "
|
||||
textInfo "Login to the AWS Console as root & click on the Account "
|
||||
textInfo "Name -> My Account -> Configure Security Challenge Questions "
|
||||
}
|
||||
36
checks/check116
Normal file
36
checks/check116
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check116="1.16"
|
||||
CHECK_TITLE_check116="[check116] Ensure IAM policies are attached only to groups or roles (Scored)"
|
||||
CHECK_SCORED_check116="SCORED"
|
||||
CHECK_TYPE_check116="LEVEL1"
|
||||
CHECK_ALTERNATE_check116="check116"
|
||||
|
||||
check116(){
|
||||
# "Ensure IAM policies are attached only to groups or roles (Scored)"
|
||||
LIST_USERS=$($AWSCLI iam list-users --query 'Users[*].UserName' --output text $PROFILE_OPT --region $REGION)
|
||||
C116_NUM_USERS=0
|
||||
for user in $LIST_USERS;do
|
||||
USER_POLICY=$($AWSCLI iam list-attached-user-policies --output text $PROFILE_OPT --region $REGION --user-name $user)
|
||||
if [[ $USER_POLICY ]]; then
|
||||
textFail "$user has managed policy directly attached "
|
||||
C116_NUM_USERS=$(expr $C116_NUM_USERS + 1)
|
||||
fi
|
||||
USER_POLICY=$($AWSCLI iam list-user-policies --output text $PROFILE_OPT --region $REGION --user-name $user)
|
||||
if [[ $USER_POLICY ]]; then
|
||||
textFail "$user has inline policy directly attached "
|
||||
C116_NUM_USERS=$(expr $C116_NUM_USERS + 1)
|
||||
fi
|
||||
done
|
||||
if [[ $C116_NUM_USERS -eq 0 ]]; then
|
||||
textPass "No policies attached to users."
|
||||
fi
|
||||
}
|
||||
22
checks/check117
Normal file
22
checks/check117
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check117="1.17"
|
||||
CHECK_TITLE_check117="[check117] Maintain current contact details (Not Scored)"
|
||||
CHECK_SCORED_check117="NOT_SCORED"
|
||||
CHECK_TYPE_check117="LEVEL1"
|
||||
CHECK_ALTERNATE_check117="check117"
|
||||
|
||||
check117(){
|
||||
# "Maintain current contact details (Scored)"
|
||||
# No command available
|
||||
textInfo "No command available for check 1.17 "
|
||||
textInfo "See section 1.17 on the CIS Benchmark guide for details "
|
||||
}
|
||||
22
checks/check118
Normal file
22
checks/check118
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check118="1.18"
|
||||
CHECK_TITLE_check118="[check118] Ensure security contact information is registered (Not Scored)"
|
||||
CHECK_SCORED_check118="NOT_SCORED"
|
||||
CHECK_TYPE_check118="LEVEL1"
|
||||
CHECK_ALTERNATE_check118="check118"
|
||||
|
||||
check118(){
|
||||
# "Ensure security contact information is registered (Scored)"
|
||||
# No command available
|
||||
textInfo "No command available for check 1.18 "
|
||||
textInfo "See section 1.18 on the CIS Benchmark guide for details "
|
||||
}
|
||||
35
checks/check119
Normal file
35
checks/check119
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check119="1.19"
|
||||
CHECK_TITLE_check119="[check119] Ensure IAM instance roles are used for AWS resource access from instances (Not Scored)"
|
||||
CHECK_SCORED_check119="NOT_SCORED"
|
||||
CHECK_TYPE_check119="LEVEL2"
|
||||
CHECK_ALTERNATE_check119="check119"
|
||||
|
||||
check119(){
|
||||
for regx in $REGIONS; do
|
||||
EC2_DATA=$($AWSCLI ec2 describe-instances $PROFILE_OPT --region $regx --query 'Reservations[].Instances[].[InstanceId, IamInstanceProfile.Arn]')
|
||||
EC2_DATA=$(echo $EC2_DATA | jq '.[]|{InstanceId: .[0], ProfileArn: .[1]}')
|
||||
INSTANCE_LIST=$(echo $EC2_DATA | jq -r '.InstanceId')
|
||||
if [[ $INSTANCE_LIST ]]; then
|
||||
for instance in $INSTANCE_LIST; do
|
||||
PROFILEARN=$(echo $EC2_DATA | jq -r --arg i "$instance" 'select(.InstanceId==$i)|.ProfileArn')
|
||||
if [[ $PROFILEARN == "null" ]]; then
|
||||
textFail "$regx: Instance $instance not associated with an instance role." $regx
|
||||
else
|
||||
textPass "$regx: Instance $instance associated with role ${PROFILEARN##*/}." $regx
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No EC2 instances found" $regx
|
||||
fi
|
||||
done
|
||||
}
|
||||
32
checks/check12
Normal file
32
checks/check12
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check12="1.2,1.02"
|
||||
CHECK_TITLE_check12="[check12] Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)"
|
||||
CHECK_SCORED_check12="SCORED"
|
||||
CHECK_TYPE_check12="LEVEL1"
|
||||
CHECK_ALTERNATE_check102="check12"
|
||||
|
||||
check12(){
|
||||
# "Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)"
|
||||
# List users with password enabled
|
||||
COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED=$(cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$4 }' |grep true | awk '{ print $1 }')
|
||||
COMMAND12=$(
|
||||
for i in $COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED; do
|
||||
cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$8 }' |grep "^$i " |grep false | awk '{ print $1 }'
|
||||
done)
|
||||
if [[ $COMMAND12 ]]; then
|
||||
for u in $COMMAND12; do
|
||||
textFail "User $u has Password enabled but MFA disabled"
|
||||
done
|
||||
else
|
||||
textPass "No users found with Password enabled and MFA disabled"
|
||||
fi
|
||||
}
|
||||
37
checks/check120
Normal file
37
checks/check120
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check120="1.20"
|
||||
CHECK_TITLE_check120="[check120] Ensure a support role has been created to manage incidents with AWS Support (Scored)"
|
||||
CHECK_SCORED_check120="SCORED"
|
||||
CHECK_TYPE_check120="LEVEL1"
|
||||
CHECK_ALTERNATE_check120="check120"
|
||||
|
||||
check120(){
|
||||
# "Ensure a support role has been created to manage incidents with AWS Support (Scored)"
|
||||
SUPPORTPOLICYARN=$($AWSCLI iam list-policies --query "Policies[?PolicyName == 'AWSSupportAccess'].Arn" $PROFILE_OPT --region $REGION --output text)
|
||||
if [[ $SUPPORTPOLICYARN ]];then
|
||||
for policyarn in $SUPPORTPOLICYARN;do
|
||||
POLICYROLES=$($AWSCLI iam list-entities-for-policy --policy-arn $SUPPORTPOLICYARN $PROFILE_OPT --region $REGION --output text | awk -F$'\t' '{ print $3 }')
|
||||
if [[ $POLICYROLES ]];then
|
||||
for name in $POLICYROLES; do
|
||||
textPass "Support Policy attached to $name"
|
||||
done
|
||||
# for user in $(echo "$POLICYUSERS" | grep UserName | cut -d'"' -f4) ; do
|
||||
# textInfo "User $user has support access via $policyarn"
|
||||
# done
|
||||
else
|
||||
textFail "Support Policy not applied to any Role "
|
||||
fi
|
||||
done
|
||||
else
|
||||
textFail "No Support Policy found"
|
||||
fi
|
||||
}
|
||||
40
checks/check121
Normal file
40
checks/check121
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check121="1.21"
|
||||
CHECK_TITLE_check121="[check121] Do not setup access keys during initial user setup for all IAM users that have a console password (Not Scored)"
|
||||
CHECK_SCORED_check121="NOT_SCORED"
|
||||
CHECK_TYPE_check121="LEVEL1"
|
||||
CHECK_ALTERNATE_check121="check121"
|
||||
|
||||
check121(){
|
||||
# "Do not setup access keys during initial user setup for all IAM users that have a console password (Not Scored)"
|
||||
LIST_USERS=$($AWSCLI iam list-users --query 'Users[*].UserName' --output text $PROFILE_OPT --region $REGION)
|
||||
# List of USERS with KEY1 last_used_date as N/A
|
||||
LIST_USERS_KEY1_NA=$(for user in $LIST_USERS; do grep "^${user}," $TEMP_REPORT_FILE|awk -F, '{ print $1,$11 }'|grep N/A |awk '{ print $1 }'; done)
|
||||
LIST_USERS_KEY1_ACTIVE=$(for user in $LIST_USERS_KEY1_NA; do grep "^${user}," $TEMP_REPORT_FILE|awk -F, '{ print $1,$9 }'|grep "true$"|awk '{ print $1 }'|sed 's/[[:blank:]]+/,/g' ; done)
|
||||
if [[ $LIST_USERS_KEY1_ACTIVE ]]; then
|
||||
for user in $LIST_USERS_KEY1_ACTIVE; do
|
||||
textFail "$user has never used Access Key 1"
|
||||
done
|
||||
else
|
||||
textPass "No users found with Access Key 1 never used"
|
||||
fi
|
||||
# List of USERS with KEY2 last_used_date as N/A
|
||||
LIST_USERS_KEY2_NA=$(for user in $LIST_USERS; do grep "^${user}," $TEMP_REPORT_FILE|awk -F, '{ print $1,$16 }'|grep N/A |awk '{ print $1 }' ; done)
|
||||
LIST_USERS_KEY2_ACTIVE=$(for user in $LIST_USERS_KEY2_NA; do grep "^${user}," $TEMP_REPORT_FILE|awk -F, '{ print $1,$14 }'|grep "true$" |awk '{ print $1 }' ; done)
|
||||
if [[ $LIST_USERS_KEY2_ACTIVE ]]; then
|
||||
for user in $LIST_USERS_KEY2_ACTIVE; do
|
||||
textFail "$user has never used Access Key 2"
|
||||
done
|
||||
else
|
||||
textPass "No users found with Access Key 2 never used"
|
||||
fi
|
||||
}
|
||||
41
checks/check122
Normal file
41
checks/check122
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check122="1.22"
|
||||
CHECK_TITLE_check122="[check122] Ensure IAM policies that allow full \"*:*\" administrative privileges are not created (Scored)"
|
||||
CHECK_SCORED_check122="SCORED"
|
||||
CHECK_TYPE_check122="LEVEL1"
|
||||
CHECK_ALTERNATE_check122="check122"
|
||||
|
||||
check122(){
|
||||
# "Ensure IAM policies that allow full \"*:*\" administrative privileges are not created (Scored)"
|
||||
LIST_CUSTOM_POLICIES=$($AWSCLI iam list-policies --output text $PROFILE_OPT --region $REGION --scope Local --query 'Policies[*].[Arn,DefaultVersionId]' | grep -v -e '^None$' | awk -F '\t' '{print $1","$2"\n"}')
|
||||
if [[ $LIST_CUSTOM_POLICIES ]]; then
|
||||
textInfo "Looking for custom policies: (skipping default policies - it may take few seconds...)"
|
||||
for policy in $LIST_CUSTOM_POLICIES; do
|
||||
POLICY_ARN=$(echo $policy | awk -F ',' '{print $1}')
|
||||
POLICY_VERSION=$(echo $policy | awk -F ',' '{print $2}')
|
||||
POLICY_WITH_FULL=$($AWSCLI iam get-policy-version --output text --policy-arn $POLICY_ARN --version-id $POLICY_VERSION --query "[PolicyVersion.Document.Statement] | [] | [?Action!=null] | [?Effect == 'Allow' && Resource == '*' && Action == '*']" $PROFILE_OPT --region $REGION)
|
||||
if [[ $POLICY_WITH_FULL ]]; then
|
||||
POLICIES_ALLOW_LIST="$POLICIES_ALLOW_LIST $POLICY_ARN"
|
||||
fi
|
||||
done
|
||||
if [[ $POLICIES_ALLOW_LIST ]]; then
|
||||
textInfo "List of custom policies: "
|
||||
for policy in $POLICIES_ALLOW_LIST; do
|
||||
textFail "Policy $policy allows \"*:*\""
|
||||
done
|
||||
else
|
||||
textPass "No custom policy found that allow full \"*:*\" administrative privileges"
|
||||
fi
|
||||
else
|
||||
textPass "No custom policies found"
|
||||
fi
|
||||
}
|
||||
39
checks/check13
Normal file
39
checks/check13
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check13="1.3,1.03"
|
||||
CHECK_TITLE_check13="[check13] Ensure credentials unused for 90 days or greater are disabled (Scored)"
|
||||
CHECK_SCORED_check13="SCORED"
|
||||
CHECK_TYPE_check13="LEVEL1"
|
||||
CHECK_ALTERNATE_check103="check13"
|
||||
|
||||
check13(){
|
||||
# "Ensure credentials unused for 90 days or greater are disabled (Scored)"
|
||||
COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED=$(cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$4 }' |grep true | awk '{ print $1 }')
|
||||
# Only check Password last used for users with password enabled
|
||||
if [[ $COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED ]]; then
|
||||
for i in $COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED; do
|
||||
DATEUSED=$($AWSCLI iam list-users --query "Users[?UserName=='$i'].PasswordLastUsed" --output text $PROFILE_OPT --region $REGION | cut -d'T' -f1)
|
||||
if [ "$DATEUSED" == "" ]
|
||||
then
|
||||
textFail "User \"$i\" has not logged in during the last 90 days "
|
||||
else
|
||||
HOWOLDER=$(how_older_from_today $DATEUSED)
|
||||
if [ $HOWOLDER -gt "90" ];then
|
||||
textFail "User \"$i\" has not logged in during the last 90 days "
|
||||
else
|
||||
textPass "User \"$i\" found with credentials used in the last 90 days"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
textPass "No users found with password enabled"
|
||||
fi
|
||||
}
|
||||
59
checks/check14
Normal file
59
checks/check14
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check14="1.4,1.04"
|
||||
CHECK_TITLE_check14="[check14] Ensure access keys are rotated every 90 days or less (Scored)"
|
||||
CHECK_SCORED_check14="SCORED"
|
||||
CHECK_TYPE_check14="LEVEL1"
|
||||
CHECK_ALTERNATE_check104="check14"
|
||||
|
||||
check14(){
|
||||
# "Ensure access keys are rotated every 90 days or less (Scored)" # also checked by Security Monkey
|
||||
LIST_OF_USERS_WITH_ACCESS_KEY1=$(cat $TEMP_REPORT_FILE| awk -F, '{ print $1, $9 }' |grep "\ true" | awk '{ print $1 }')
|
||||
LIST_OF_USERS_WITH_ACCESS_KEY2=$(cat $TEMP_REPORT_FILE| awk -F, '{ print $1, $14 }' |grep "\ true" | awk '{ print $1 }')
|
||||
C14_NUM_USERS1=0
|
||||
C14_NUM_USERS2=0
|
||||
if [[ $LIST_OF_USERS_WITH_ACCESS_KEY1 ]]; then
|
||||
# textFail "Users with access key 1 older than 90 days:"
|
||||
for user in $LIST_OF_USERS_WITH_ACCESS_KEY1; do
|
||||
# check access key 1
|
||||
DATEROTATED1=$(cat $TEMP_REPORT_FILE | grep -v user_creation_time | grep "^${user},"| awk -F, '{ print $10 }' | grep -v "N/A" | awk -F"T" '{ print $1 }')
|
||||
HOWOLDER=$(how_older_from_today $DATEROTATED1)
|
||||
|
||||
if [ $HOWOLDER -gt "90" ];then
|
||||
textFail " $user has not rotated access key1 in over 90 days."
|
||||
C14_NUM_USERS1=$(expr $C14_NUM_USERS1 + 1)
|
||||
fi
|
||||
done
|
||||
if [[ $C14_NUM_USERS1 -eq 0 ]]; then
|
||||
textPass "No users with access key 1 older than 90 days."
|
||||
fi
|
||||
else
|
||||
textPass "No users with access key 1."
|
||||
fi
|
||||
|
||||
if [[ $LIST_OF_USERS_WITH_ACCESS_KEY2 ]]; then
|
||||
# textFail "Users with access key 2 older than 90 days:"
|
||||
for user in $LIST_OF_USERS_WITH_ACCESS_KEY2; do
|
||||
# check access key 2
|
||||
DATEROTATED2=$(cat $TEMP_REPORT_FILE | grep -v user_creation_time | grep "^${user},"| awk -F, '{ print $15 }' | grep -v "N/A" | awk -F"T" '{ print $1 }')
|
||||
HOWOLDER=$(how_older_from_today $DATEROTATED2)
|
||||
if [ $HOWOLDER -gt "90" ];then
|
||||
textFail " $user has not rotated access key2 in over 90 days. "
|
||||
C14_NUM_USERS2=$(expr $C14_NUM_USERS2 + 1)
|
||||
fi
|
||||
done
|
||||
if [[ $C14_NUM_USERS2 -eq 0 ]]; then
|
||||
textPass "No users with access key 2 older than 90 days."
|
||||
fi
|
||||
else
|
||||
textPass "No users with access key 2."
|
||||
fi
|
||||
}
|
||||
25
checks/check15
Normal file
25
checks/check15
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check15="1.5,1.05"
|
||||
CHECK_TITLE_check15="[check15] Ensure IAM password policy requires at least one uppercase letter (Scored)"
|
||||
CHECK_SCORED_check15="SCORED"
|
||||
CHECK_TYPE_check15="LEVEL1"
|
||||
CHECK_ALTERNATE_check105="check15"
|
||||
|
||||
check15(){
|
||||
# "Ensure IAM password policy requires at least one uppercase letter (Scored)"
|
||||
COMMAND15=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireUppercaseCharacters' 2> /dev/null) # must be true
|
||||
if [[ "$COMMAND15" == "true" ]];then
|
||||
textPass "Password Policy requires upper case"
|
||||
else
|
||||
textFail "Password Policy missing upper-case requirement"
|
||||
fi
|
||||
}
|
||||
25
checks/check16
Normal file
25
checks/check16
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check16="1.6,1.06"
|
||||
CHECK_TITLE_check16="[check16] Ensure IAM password policy require at least one lowercase letter (Scored)"
|
||||
CHECK_SCORED_check16="SCORED"
|
||||
CHECK_TYPE_check16="LEVEL1"
|
||||
CHECK_ALTERNATE_check106="check16"
|
||||
|
||||
check16(){
|
||||
# "Ensure IAM password policy require at least one lowercase letter (Scored)"
|
||||
COMMAND16=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireLowercaseCharacters' 2> /dev/null) # must be true
|
||||
if [[ "$COMMAND16" == "true" ]];then
|
||||
textPass "Password Policy requires lower case"
|
||||
else
|
||||
textFail "Password Policy missing lower-case requirement"
|
||||
fi
|
||||
}
|
||||
25
checks/check17
Normal file
25
checks/check17
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check17="1.7,1.07"
|
||||
CHECK_TITLE_check17="[check17] Ensure IAM password policy require at least one symbol (Scored)"
|
||||
CHECK_SCORED_check17="SCORED"
|
||||
CHECK_TYPE_check17="LEVEL1"
|
||||
CHECK_ALTERNATE_check107="check17"
|
||||
|
||||
check17(){
|
||||
# "Ensure IAM password policy require at least one symbol (Scored)"
|
||||
COMMAND17=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireSymbols' 2> /dev/null) # must be true
|
||||
if [[ "$COMMAND17" == "true" ]];then
|
||||
textPass "Password Policy requires symbol"
|
||||
else
|
||||
textFail "Password Policy missing symbol requirement"
|
||||
fi
|
||||
}
|
||||
25
checks/check18
Normal file
25
checks/check18
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check18="1.8,1.08"
|
||||
CHECK_TITLE_check18="[check18] Ensure IAM password policy require at least one number (Scored)"
|
||||
CHECK_SCORED_check18="SCORED"
|
||||
CHECK_TYPE_check18="LEVEL1"
|
||||
CHECK_ALTERNATE_check108="check18"
|
||||
|
||||
check18(){
|
||||
# "Ensure IAM password policy require at least one number (Scored)"
|
||||
COMMAND18=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.RequireNumbers' 2> /dev/null) # must be true
|
||||
if [[ "$COMMAND18" == "true" ]];then
|
||||
textPass "Password Policy requires number"
|
||||
else
|
||||
textFail "Password Policy missing number requirement"
|
||||
fi
|
||||
}
|
||||
25
checks/check19
Normal file
25
checks/check19
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check19="1.9,1.09"
|
||||
CHECK_TITLE_check19="[check19] Ensure IAM password policy requires minimum length of 14 or greater (Scored)"
|
||||
CHECK_SCORED_check19="SCORED"
|
||||
CHECK_TYPE_check19="LEVEL1"
|
||||
CHECK_ALTERNATE_check109="check19"
|
||||
|
||||
check19(){
|
||||
# "Ensure IAM password policy requires minimum length of 14 or greater (Scored)"
|
||||
COMMAND19=$($AWSCLI iam get-account-password-policy $PROFILE_OPT --region $REGION --output json --query 'PasswordPolicy.MinimumPasswordLength' 2> /dev/null)
|
||||
if [[ $COMMAND19 -gt "13" ]];then
|
||||
textPass "Password Policy requires more than 13 characters"
|
||||
else
|
||||
textFail "Password Policy missing or weak length requirement"
|
||||
fi
|
||||
}
|
||||
39
checks/check21
Normal file
39
checks/check21
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check21="2.1,2.01"
|
||||
CHECK_TITLE_check21="[check21] Ensure CloudTrail is enabled in all regions (Scored)"
|
||||
CHECK_SCORED_check21="SCORED"
|
||||
CHECK_TYPE_check21="LEVEL1"
|
||||
CHECK_ALTERNATE_check201="check21"
|
||||
|
||||
check21(){
|
||||
trail_count=0
|
||||
# "Ensure CloudTrail is enabled in all regions (Scored)"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query 'trailList[*].Name' --output text --no-include-shadow-trails)
|
||||
if [[ $LIST_OF_TRAILS ]];then
|
||||
for trail in $LIST_OF_TRAILS;do
|
||||
trail_count=$((trail_count + 1))
|
||||
MULTIREGION_TRAIL_STATUS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query 'trailList[*].IsMultiRegionTrail' --output text --trail-name-list $trail)
|
||||
if [[ "$MULTIREGION_TRAIL_STATUS" == 'False' ]];then
|
||||
textFail "$trail trail in $regx is not enabled in multi region mode"
|
||||
else
|
||||
textPass "$trail trail in $regx is enabled for all regions"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $trail_count == 0 ]]; then
|
||||
textFail "No CloudTrail trails were found in the account"
|
||||
fi
|
||||
}
|
||||
|
||||
33
checks/check22
Normal file
33
checks/check22
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check22="2.2,2.02"
|
||||
CHECK_TITLE_check22="[check22] Ensure CloudTrail log file validation is enabled (Scored)"
|
||||
CHECK_SCORED_check22="SCORED"
|
||||
CHECK_TYPE_check22="LEVEL2"
|
||||
CHECK_ALTERNATE_check202="check22"
|
||||
|
||||
check22(){
|
||||
# "Ensure CloudTrail log file validation is enabled (Scored)"
|
||||
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query 'trailList[*].Name' --output text --no-include-shadow-trails)
|
||||
if [[ $LIST_OF_TRAILS ]];then
|
||||
for trail in $LIST_OF_TRAILS;do
|
||||
LOGFILEVALIDATION_TRAIL_STATUS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query 'trailList[*].LogFileValidationEnabled' --output text --trail-name-list $trail)
|
||||
if [[ "$LOGFILEVALIDATION_TRAIL_STATUS" == 'False' ]];then
|
||||
textFail "$trail trail in $regx has not log file validation enabled"
|
||||
else
|
||||
textPass "$trail trail in $regx has log file validation enabled"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
36
checks/check23
Normal file
36
checks/check23
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check23="2.3,2.03"
|
||||
CHECK_TITLE_check23="[check23] Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)"
|
||||
CHECK_SCORED_check23="SCORED"
|
||||
CHECK_TYPE_check23="LEVEL1"
|
||||
CHECK_ALTERNATE_check203="check23"
|
||||
|
||||
check23(){
|
||||
# "Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)"
|
||||
CLOUDTRAILBUCKET=$($AWSCLI cloudtrail describe-trails --query 'trailList[*].S3BucketName' --output text $PROFILE_OPT --region $REGION)
|
||||
if [[ $CLOUDTRAILBUCKET ]]; then
|
||||
for bucket in $CLOUDTRAILBUCKET;do
|
||||
CLOUDTRAILBUCKET_HASALLPERMISIONS=$($AWSCLI s3api get-bucket-acl --bucket $bucket --query 'Grants[?Grantee.URI==`http://acs.amazonaws.com/groups/global/AllUsers`]' $PROFILE_OPT --region $REGION --output text 2>&1)
|
||||
if [[ $(echo "$CLOUDTRAILBUCKET_HASALLPERMISIONS" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Bucket Acl for $bucket"
|
||||
continue
|
||||
fi
|
||||
if [[ $CLOUDTRAILBUCKET_HASALLPERMISIONS ]]; then
|
||||
textFail "check your $bucket CloudTrail bucket ACL and Policy!"
|
||||
else
|
||||
textPass "Bucket $bucket is set correctly"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textFail "No CloudTrail bucket found!"
|
||||
fi
|
||||
}
|
||||
40
checks/check24
Normal file
40
checks/check24
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check24="2.4,2.04"
|
||||
CHECK_TITLE_check24="[check24] Ensure CloudTrail trails are integrated with CloudWatch Logs (Scored)"
|
||||
CHECK_SCORED_check24="SCORED"
|
||||
CHECK_TYPE_check24="LEVEL1"
|
||||
CHECK_ALTERNATE_check204="check24"
|
||||
|
||||
check24(){
|
||||
# "Ensure CloudTrail trails are integrated with CloudWatch Logs (Scored)"
|
||||
TRAILS_AND_REGIONS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $REGION --query 'trailList[*].{Name:Name, HomeRegion:HomeRegion}' --output text | tr " " ',')
|
||||
if [[ $TRAILS_AND_REGIONS ]];then
|
||||
for reg_trail in $TRAILS_AND_REGIONS;do
|
||||
trail=$(echo $reg_trail | cut -d',' -f2)
|
||||
TRAIL_REGION=$(echo $reg_trail | cut -d',' -f1)
|
||||
LATESTDELIVERY_TIMESTAMP=$($AWSCLI cloudtrail get-trail-status --name $trail $PROFILE_OPT --region $TRAIL_REGION --query 'LatestCloudWatchLogsDeliveryTime' --output text|grep -v None)
|
||||
if [[ ! $LATESTDELIVERY_TIMESTAMP ]];then
|
||||
textFail "$trail trail is not logging in the last 24h or not configured (it is in $TRAIL_REGION)"
|
||||
else
|
||||
LATESTDELIVERY_DATE=$(timestamp_to_date $LATESTDELIVERY_TIMESTAMP)
|
||||
HOWOLDER=$(how_older_from_today $LATESTDELIVERY_DATE)
|
||||
if [ $HOWOLDER -gt "1" ];then
|
||||
textFail "$trail trail is not logging in the last 24h or not configured (it is in $TRAIL_REGION)"
|
||||
else
|
||||
textPass "$trail trail has been logging during the last 24h (it is in $TRAIL_REGION)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
textFail "No CloudTrail trails found!"
|
||||
fi
|
||||
}
|
||||
27
checks/check25
Normal file
27
checks/check25
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check25="2.5,2.05"
|
||||
CHECK_TITLE_check25="[check25] Ensure AWS Config is enabled in all regions (Scored)"
|
||||
CHECK_SCORED_check25="SCORED"
|
||||
CHECK_TYPE_check25="LEVEL1"
|
||||
CHECK_ALTERNATE_check205="check25"
|
||||
|
||||
check25(){
|
||||
# "Ensure AWS Config is enabled in all regions (Scored)"
|
||||
for regx in $REGIONS; do
|
||||
CHECK_AWSCONFIG_STATUS=$($AWSCLI configservice get-status $PROFILE_OPT --region $regx --output json| grep "recorder: ON")
|
||||
if [[ $CHECK_AWSCONFIG_STATUS ]];then
|
||||
textPass "Region $regx has AWS Config recorder: ON" "$regx"
|
||||
else
|
||||
textFail "Region $regx has AWS Config disabled or not configured" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
51
checks/check26
Normal file
51
checks/check26
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check26="2.6,2.06"
|
||||
CHECK_TITLE_check26="[check26] Ensure S3 bucket access logging is enabled on the CloudTrail S3 bucket (Scored)"
|
||||
CHECK_SCORED_check26="SCORED"
|
||||
CHECK_TYPE_check26="LEVEL1"
|
||||
CHECK_ALTERNATE_check206="check26"
|
||||
|
||||
check26(){
|
||||
# "Ensure S3 bucket access logging is enabled on the CloudTrail S3 bucket (Scored)"
|
||||
|
||||
CLOUDTRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region "$REGION" --query 'trailList[*].Name' --output text| tr '\011' '\012' | awk -F: '{print $1}')
|
||||
|
||||
if [[ $CLOUDTRAILS ]]; then
|
||||
for trail in $CLOUDTRAILS; do
|
||||
CLOUDTRAIL_ACCOUNT_ID=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region "$REGION" --query 'trailList[*].TrailARN' --output text | tr '\011' '\012' | grep "$trail" | awk -F: '{ print $5 }' | head -n 1)
|
||||
CLOUDTRAILBUCKET=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $REGION --query 'trailList[*].[Name, S3BucketName]' --output text | tr '\011' ':' | grep "$trail" | awk -F: '{ print $2 }' )
|
||||
|
||||
if [[ $CLOUDTRAILBUCKET ]]; then
|
||||
bucket=$CLOUDTRAILBUCKET
|
||||
if [ "$CLOUDTRAIL_ACCOUNT_ID" == "$ACCOUNT_NUM" ]; then
|
||||
CLOUDTRAILBUCKET_LOGENABLED=$($AWSCLI s3api get-bucket-logging --bucket $bucket $PROFILE_OPT --region $REGION --query 'LoggingEnabled.TargetBucket' --output text 2>&1)
|
||||
if [[ $(echo "$CLOUDTRAILBUCKET_LOGENABLED" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Bucket Logging for $bucket"
|
||||
continue
|
||||
fi
|
||||
if [[ $CLOUDTRAILBUCKET_LOGENABLED != "null" ]]; then
|
||||
textPass "Bucket access logging enabled in CloudTrail S3 bucket $bucket for $trail"
|
||||
else
|
||||
textFail "Bucket access logging is not enabled in CloudTrail S3 bucket $bucket for $trail"
|
||||
fi
|
||||
else
|
||||
textInfo "CloudTrail S3 bucket $bucket for trail $trail is not in current account"
|
||||
fi
|
||||
else
|
||||
textFail "CloudTrail bucket not found!"
|
||||
fi
|
||||
done
|
||||
|
||||
else
|
||||
textFail "No CloudWatch group found and no CloudTrail bucket"
|
||||
fi
|
||||
}
|
||||
30
checks/check27
Normal file
30
checks/check27
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check27="2.7,2.07"
|
||||
CHECK_TITLE_check27="[check27] Ensure CloudTrail logs are encrypted at rest using KMS CMKs (Scored)"
|
||||
CHECK_SCORED_check27="SCORED"
|
||||
CHECK_TYPE_check27="LEVEL2"
|
||||
CHECK_ALTERNATE_check207="check27"
|
||||
|
||||
check27(){
|
||||
# "Ensure CloudTrail logs are encrypted at rest using KMS CMKs (Scored)"
|
||||
$AWSCLI cloudtrail describe-trails --query 'trailList[].[Name,KmsKeyId]' --output text $PROFILE_OPT --region $REGION | while read trail key; do
|
||||
if [[ "$trail" ]] ; then
|
||||
if [[ "$key" != "None" ]] ; then
|
||||
textPass "KMS key found for $trail"
|
||||
else
|
||||
textFail "Encryption is not enabled in your CloudTrail trail $trail (KMS key not found)!"
|
||||
fi
|
||||
else
|
||||
textFail "CloudTrail bucket doesn't exist!"
|
||||
fi
|
||||
done
|
||||
}
|
||||
47
checks/check28
Normal file
47
checks/check28
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check28="2.8,2.08"
|
||||
CHECK_TITLE_check28="[check28] Ensure rotation for customer created CMKs is enabled (Scored)"
|
||||
CHECK_SCORED_check28="SCORED"
|
||||
CHECK_TYPE_check28="LEVEL2"
|
||||
CHECK_ALTERNATE_check208="check28"
|
||||
|
||||
check28(){
|
||||
# "Ensure rotation for customer created CMKs is enabled (Scored)"
|
||||
for regx in $REGIONS; do
|
||||
CHECK_KMS_KEYLIST=$($AWSCLI kms list-keys $PROFILE_OPT --region $regx --output text --query 'Keys[*].KeyId')
|
||||
if [[ $CHECK_KMS_KEYLIST ]];then
|
||||
CHECK_KMS_KEYLIST_NO_DEFAULT=$(
|
||||
for key in $CHECK_KMS_KEYLIST; do
|
||||
$AWSCLI kms describe-key --key-id $key $PROFILE_OPT --region $regx --query 'KeyMetadata.{key:KeyId,state:KeyState,man:KeyManager}' --output text|grep Enabled$|grep -v AWS| awk '{ print $1 }'
|
||||
done )
|
||||
if [[ $CHECK_KMS_KEYLIST_NO_DEFAULT ]]; then
|
||||
for key in $CHECK_KMS_KEYLIST_NO_DEFAULT; do
|
||||
CHECK_KMS_KEY_TYPE=$($AWSCLI kms describe-key --key-id $key $PROFILE_OPT --region $regx --query 'KeyMetadata.Origin' | sed 's/["]//g')
|
||||
if [[ "$CHECK_KMS_KEY_TYPE" == "EXTERNAL" ]];then
|
||||
textPass "$regx: Key $key in Region $regx Customer Uploaded Key Material." "$regx"
|
||||
else
|
||||
CHECK_KMS_KEY_ROTATION=$($AWSCLI kms get-key-rotation-status --key-id $key $PROFILE_OPT --region $regx --output text)
|
||||
if [[ "$CHECK_KMS_KEY_ROTATION" == "True" ]];then
|
||||
textPass "$regx: Key $key is set correctly" "$regx"
|
||||
else
|
||||
textFail "$regx: Key $key is not set to rotate!" "$regx"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: This region doesn't have CUSTOM encryption keys" "$regx"
|
||||
fi
|
||||
else
|
||||
textInfo "$regx: This region doesn't have ANY encryption keys" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
32
checks/check29
Normal file
32
checks/check29
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check29="2.9,2.09"
|
||||
CHECK_TITLE_check29="[check29] Ensure VPC Flow Logging is Enabled in all VPCs (Scored)"
|
||||
CHECK_SCORED_check29="SCORED"
|
||||
CHECK_TYPE_check29="LEVEL2"
|
||||
CHECK_ALTERNATE_check209="check29"
|
||||
|
||||
check29(){
|
||||
# "Ensure VPC Flow Logging is Enabled in all VPCs (Scored)"
|
||||
for regx in $REGIONS; do
|
||||
AVAILABLE_VPC=$($AWSCLI ec2 describe-vpcs $PROFILE_OPT --region $regx --query 'Vpcs[?State==`available`].VpcId' --output text)
|
||||
for vpcx in $AVAILABLE_VPC; do
|
||||
CHECK_FL=$($AWSCLI ec2 describe-flow-logs $PROFILE_OPT --region $regx --filter Name="resource-id",Values="${vpcx}" --query 'FlowLogs[?FlowLogStatus==`ACTIVE`].FlowLogId' --output text)
|
||||
if [[ $CHECK_FL ]];then
|
||||
for FL in $CHECK_FL;do
|
||||
textPass "VPC $vpcx: VPCFlowLog is enabled for LogGroupName: $FL in Region $regx" "$regx"
|
||||
done
|
||||
else
|
||||
textFail "VPC $vpcx: No VPCFlowLog has been found in Region $regx" "$regx"
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
44
checks/check31
Normal file
44
checks/check31
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/MyCloudTrailLG \
|
||||
# --filter-name AWSAuthorizationFailures \
|
||||
# --filter-pattern '{ $.errorCode = "*UnauthorizedOperation" || $.errorCode = "AccessDenied*" }' \
|
||||
# --metric-transformations metricName=AuthorizationFailureCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name "Authorization Failures" \
|
||||
# --alarm-description "Alarm triggered when unauthorized API calls are made" \
|
||||
# --metric-name AuthorizationFailureCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check31="3.1,3.01"
|
||||
CHECK_TITLE_check31="[check31] Ensure a log metric filter and alarm exist for unauthorized API calls (Scored)"
|
||||
CHECK_SCORED_check31="SCORED"
|
||||
CHECK_TYPE_check31="LEVEL1"
|
||||
CHECK_ALTERNATE_check301="check31"
|
||||
|
||||
check31(){
|
||||
check3x '\$\.errorCode\s*=\s*"\*UnauthorizedOperation".+\$\.errorCode\s*=\s*"AccessDenied\*"'
|
||||
}
|
||||
44
checks/check310
Normal file
44
checks/check310
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name SecurityGroupConfigChanges \
|
||||
# --filter-pattern '{ ($.eventName = AuthorizeSecurityGroupIngress) || ($.eventName = AuthorizeSecurityGroupEgress) || ($.eventName = RevokeSecurityGroupIngress) || ($.eventName = RevokeSecurityGroupEgress) || ($.eventName = CreateSecurityGroup) || ($.eventName = DeleteSecurityGroup) }' \
|
||||
# --metric-transformations metricName=SecurityGroupEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name SecurityGroupConfigChangesAlarm \
|
||||
# --alarm-description "Triggered by AWS security group(s) config changes." \
|
||||
# --metric-name SecurityGroupEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check310="3.10"
|
||||
CHECK_TITLE_check310="[check310] Ensure a log metric filter and alarm exist for security group changes (Scored)"
|
||||
CHECK_SCORED_check310="SCORED"
|
||||
CHECK_TYPE_check310="LEVEL2"
|
||||
CHECK_ALTERNATE_check310="check310"
|
||||
|
||||
check310(){
|
||||
check3x '\$\.eventName\s*=\s*AuthorizeSecurityGroupIngress.+\$\.eventName\s*=\s*AuthorizeSecurityGroupEgress.+\$\.eventName\s*=\s*RevokeSecurityGroupIngress.+\$\.eventName\s*=\s*RevokeSecurityGroupEgress.+\$\.eventName\s*=\s*CreateSecurityGroup.+\$\.eventName\s*=\s*DeleteSecurityGroup'
|
||||
}
|
||||
44
checks/check311
Normal file
44
checks/check311
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name NetworkACLConfigChanges \
|
||||
# --filter-pattern '{ ($.eventName = CreateNetworkAcl) || ($.eventName = CreateNetworkAclEntry) || ($.eventName = DeleteNetworkAcl) || ($.eventName = DeleteNetworkAclEntry) || ($.eventName = ReplaceNetworkAclEntry) || ($.eventName = ReplaceNetworkAclAssociation) }' \
|
||||
# --metric-transformations metricName=NetworkAclEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name NetworkACLConfigChangesAlarm \
|
||||
# --alarm-description "Triggered by AWS Network ACL(s) config changes." \
|
||||
# --metric-name NetworkAclEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check311="3.11"
|
||||
CHECK_TITLE_check311="[check311] Ensure a log metric filter and alarm exist for changes to Network Access Control Lists (NACL) (Scored)"
|
||||
CHECK_SCORED_check311="SCORED"
|
||||
CHECK_TYPE_check311="LEVEL2"
|
||||
CHECK_ALTERNATE_check311="check311"
|
||||
|
||||
check311(){
|
||||
check3x '\$\.eventName\s*=\s*CreateNetworkAcl.+\$\.eventName\s*=\s*CreateNetworkAclEntry.+\$\.eventName\s*=\s*DeleteNetworkAcl.+\$\.eventName\s*=\s*DeleteNetworkAclEntry.+\$\.eventName\s*=\s*ReplaceNetworkAclEntry.+\$\.eventName\s*=\s*ReplaceNetworkAclAssociation'
|
||||
}
|
||||
44
checks/check312
Normal file
44
checks/check312
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name VPCGatewayConfigChanges \
|
||||
# --filter-pattern '{ ($.eventName = CreateCustomerGateway) || ($.eventName = DeleteCustomerGateway) || ($.eventName = AttachInternetGateway) || ($.eventName = CreateInternetGateway) || ($.eventName = DeleteInternetGateway) || ($.eventName = DetachInternetGateway) }' \
|
||||
# --metric-transformations metricName=GatewayEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name VPCGatewayConfigChangesAlarm \
|
||||
# --alarm-description "Triggered by VPC Customer/Internet Gateway changes." \
|
||||
# --metric-name GatewayEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check312="3.12"
|
||||
CHECK_TITLE_check312="[check312] Ensure a log metric filter and alarm exist for changes to network gateways (Scored)"
|
||||
CHECK_SCORED_check312="SCORED"
|
||||
CHECK_TYPE_check312="LEVEL1"
|
||||
CHECK_ALTERNATE_check312="check312"
|
||||
|
||||
check312(){
|
||||
check3x '\$\.eventName\s*=\s*CreateCustomerGateway.+\$\.eventName\s*=\s*DeleteCustomerGateway.+\$\.eventName\s*=\s*AttachInternetGateway.+\$\.eventName\s*=\s*CreateInternetGateway.+\$\.eventName\s*=\s*DeleteInternetGateway.+\$\.eventName\s*=\s*DetachInternetGateway'
|
||||
}
|
||||
44
checks/check313
Normal file
44
checks/check313
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name RouteTableConfigChanges \
|
||||
# --filter-pattern '{ ($.eventName = CreateRoute) || ($.eventName = CreateRouteTable) || ($.eventName = ReplaceRoute) || ($.eventName = ReplaceRouteTableAssociation) || ($.eventName = DeleteRouteTable) || ($.eventName = DeleteRoute) || ($.eventName = DisassociateRouteTable) }' \
|
||||
# --metric-transformations metricName=RouteTableEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name RouteTableConfigChangesAlarm \
|
||||
# --alarm-description "Triggered by AWS Route Table config changes." \
|
||||
# --metric-name RouteTableEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check313="3.13"
|
||||
CHECK_TITLE_check313="[check313] Ensure a log metric filter and alarm exist for route table changes (Scored)"
|
||||
CHECK_SCORED_check313="SCORED"
|
||||
CHECK_TYPE_check313="LEVEL1"
|
||||
CHECK_ALTERNATE_check313="check313"
|
||||
|
||||
check313(){
|
||||
check3x '\$\.eventName\s*=\s*CreateRoute.+\$\.eventName\s*=\s*CreateRouteTable.+\$\.eventName\s*=\s*ReplaceRoute.+\$\.eventName\s*=\s*ReplaceRouteTableAssociation.+\$\.eventName\s*=\s*DeleteRouteTable.+\$\.eventName\s*=\s*DeleteRoute.+\$\.eventName\s*=\s*DisassociateRouteTable'
|
||||
}
|
||||
44
checks/check314
Normal file
44
checks/check314
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name VPCNetworkConfigChanges \
|
||||
# --filter-pattern '{ ($.eventName = CreateVpc) || ($.eventName = DeleteVpc) || ($.eventName = ModifyVpcAttribute) || ($.eventName = AcceptVpcPeeringConnection) || ($.eventName = CreateVpcPeeringConnection) || ($.eventName = DeleteVpcPeeringConnection) || ($.eventName = RejectVpcPeeringConnection) || ($.eventName = AttachClassicLinkVpc) || ($.eventName = DetachClassicLinkVpc) || ($.eventName = DisableVpcClassicLink) || ($.eventName = EnableVpcClassicLink) }' \
|
||||
# --metric-transformations metricName=VpcEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name VPCNetworkConfigChangesAlarm \
|
||||
# --alarm-description "Triggered by AWS VPC(s) environment config changes." \
|
||||
# --metric-name VpcEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check314="3.14"
|
||||
CHECK_TITLE_check314="[check314] Ensure a log metric filter and alarm exist for VPC changes (Scored)"
|
||||
CHECK_SCORED_check314="SCORED"
|
||||
CHECK_TYPE_check314="LEVEL1"
|
||||
CHECK_ALTERNATE_check314="check314"
|
||||
|
||||
check314(){
|
||||
check3x '\$\.eventName\s*=\s*CreateVpc.+\$\.eventName\s*=\s*DeleteVpc.+\$\.eventName\s*=\s*ModifyVpcAttribute.+\$\.eventName\s*=\s*AcceptVpcPeeringConnection.+\$\.eventName\s*=\s*CreateVpcPeeringConnection.+\$\.eventName\s*=\s*DeleteVpcPeeringConnection.+\$\.eventName\s*=\s*RejectVpcPeeringConnection.+\$\.eventName\s*=\s*AttachClassicLinkVpc.+\$\.eventName\s*=\s*DetachClassicLinkVpc.+\$\.eventName\s*=\s*DisableVpcClassicLink.+\$\.eventName\s*=\s*EnableVpcClassicLink'
|
||||
}
|
||||
44
checks/check32
Normal file
44
checks/check32
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name ConsoleSignInWithoutMfaCount \
|
||||
# --filter-pattern '{ $.eventName = "ConsoleLogin" && $.additionalEventData.MFAUsed != "Yes" }' \
|
||||
# --metric-transformations metricName=ConsoleSignInWithoutMfaCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name ConsoleSignInWithoutMfaAlarm \
|
||||
# --alarm-description "Triggered by sign-in requests made without MFA." \
|
||||
# --metric-name ConsoleSignInWithoutMfaCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check32="3.2,3.02"
|
||||
CHECK_TITLE_check32="[check32] Ensure a log metric filter and alarm exist for Management Console sign-in without MFA (Scored)"
|
||||
CHECK_SCORED_check32="SCORED"
|
||||
CHECK_TYPE_check32="LEVEL1"
|
||||
CHECK_ALTERNATE_check302="check32"
|
||||
|
||||
check32(){
|
||||
check3x '\$\.eventName\s*=\s*"ConsoleLogin".+\$\.additionalEventData\.MFAUsed\s*!=\s*"Yes"'
|
||||
}
|
||||
44
checks/check33
Normal file
44
checks/check33
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name RootAccountUsage \
|
||||
# --filter-pattern '{ $.userIdentity.type = "Root" && $.userIdentity.invokedBy NOT EXISTS && $.eventType != "AwsServiceEvent" }' \
|
||||
# --metric-transformations metricName=RootAccountUsageEventCount,metricNamespace=CloudTrailMetrics,metricValue=1 \
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name RootAccountUsageAlarm \
|
||||
# --alarm-description "Triggered by AWS Root Account usage." \
|
||||
# --metric-name RootAccountUsageEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check33="3.3,3.03"
|
||||
CHECK_TITLE_check33="[check33] Ensure a log metric filter and alarm exist for usage of root account (Scored)"
|
||||
CHECK_SCORED_check33="SCORED"
|
||||
CHECK_TYPE_check33="LEVEL1"
|
||||
CHECK_ALTERNATE_check303="check33"
|
||||
|
||||
check33(){
|
||||
check3x '\$\.userIdentity\.type\s*=\s*"Root".+\$\.userIdentity\.invokedBy NOT EXISTS.+\$\.eventType\s*!=\s*"AwsServiceEvent"'
|
||||
}
|
||||
44
checks/check34
Normal file
44
checks/check34
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name IAMAuthConfigChanges \
|
||||
# --filter-pattern '{ ($.eventName = DeleteGroupPolicy) || ($.eventName = DeleteRolePolicy) || ($.eventName = DeleteUserPolicy) || ($.eventName = PutGroupPolicy) || ($.eventName = PutRolePolicy) || ($.eventName = PutUserPolicy) || ($.eventName = CreatePolicy) || ($.eventName = DeletePolicy) || ($.eventName = CreatePolicyVersion) || ($.eventName = DeletePolicyVersion) || ($.eventName = AttachRolePolicy) || ($.eventName = DetachRolePolicy) || ($.eventName = AttachUserPolicy) || ($.eventName = DetachUserPolicy) || ($.eventName = AttachGroupPolicy) || ($.eventName = DetachGroupPolicy) }' \
|
||||
# --metric-transformations metricName=IAMPolicyEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name IAMAuthorizationActivityAlarm \
|
||||
# --alarm-description "Triggered by AWS IAM authorization config changes." \
|
||||
# --metric-name IAMPolicyEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check34="3.4,3.04"
|
||||
CHECK_TITLE_check34="[check34] Ensure a log metric filter and alarm exist for IAM policy changes (Scored)"
|
||||
CHECK_SCORED_check34="SCORED"
|
||||
CHECK_TYPE_check34="LEVEL1"
|
||||
CHECK_ALTERNATE_check304="check34"
|
||||
|
||||
check34(){
|
||||
check3x '\$\.eventName\s*=\s*DeleteGroupPolicy.+\$\.eventName\s*=\s*DeleteRolePolicy.+\$\.eventName\s*=\s*DeleteUserPolicy.+\$\.eventName\s*=\s*PutGroupPolicy.+\$\.eventName\s*=\s*PutRolePolicy.+\$\.eventName\s*=\s*PutUserPolicy.+\$\.eventName\s*=\s*CreatePolicy.+\$\.eventName\s*=\s*DeletePolicy.+\$\.eventName\s*=\s*CreatePolicyVersion.+\$\.eventName\s*=\s*DeletePolicyVersion.+\$\.eventName\s*=\s*AttachRolePolicy.+\$\.eventName\s*=\s*DetachRolePolicy.+\$\.eventName\s*=\s*AttachUserPolicy.+\$\.eventName\s*=\s*DetachUserPolicy.+\$\.eventName\s*=\s*AttachGroupPolicy.+\$\.eventName\s*=\s*DetachGroupPolicy'
|
||||
}
|
||||
44
checks/check35
Normal file
44
checks/check35
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/MyCloudTrailLG \
|
||||
# --filter-name AWSCloudTrailChanges \
|
||||
# --filter-pattern '{ ($.eventName = CreateTrail) || ($.eventName = UpdateTrail) || ($.eventName = DeleteTrail) || ($.eventName = StartLogging) || ($.eventName = StopLogging) }' \
|
||||
# --metric-transformations metricName=CloudTrailEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name "CloudTrail Changes" \
|
||||
# --alarm-description "Triggered by AWS CloudTrail configuration changes." \
|
||||
# --metric-name CloudTrailEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check35="3.5,3.05"
|
||||
CHECK_TITLE_check35="[check35] Ensure a log metric filter and alarm exist for CloudTrail configuration changes (Scored)"
|
||||
CHECK_SCORED_check35="SCORED"
|
||||
CHECK_TYPE_check35="LEVEL1"
|
||||
CHECK_ALTERNATE_check305="check35"
|
||||
|
||||
check35(){
|
||||
check3x '\$\.eventName\s*=\s*CreateTrail.+\$\.eventName\s*=\s*UpdateTrail.+\$\.eventName\s*=\s*DeleteTrail.+\$\.eventName\s*=\s*StartLogging.+\$\.eventName\s*=\s*StopLogging'
|
||||
}
|
||||
44
checks/check36
Normal file
44
checks/check36
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/MyCloudTrailLG \
|
||||
# --filter-name AWSConsoleSignInFailures \
|
||||
# --filter-pattern '{ ($.eventName = ConsoleLogin) && ($.errorMessage = "Failed authentication") }' \
|
||||
# --metric-transformations metricName=ConsoleSigninFailureCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name "Console Sign-in Failures" \
|
||||
# --alarm-description "AWS Management Console Sign-in Failure Alarm." \
|
||||
# --metric-name ConsoleSigninFailureCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 3 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check36="3.6,3.06"
|
||||
CHECK_TITLE_check36="[check36] Ensure a log metric filter and alarm exist for AWS Management Console authentication failures (Scored)"
|
||||
CHECK_SCORED_check36="SCORED"
|
||||
CHECK_TYPE_check36="LEVEL2"
|
||||
CHECK_ALTERNATE_check306="check36"
|
||||
|
||||
check36(){
|
||||
check3x '\$\.eventName\s*=\s*ConsoleLogin.+\$\.errorMessage\s*=\s*"Failed authentication"'
|
||||
}
|
||||
44
checks/check37
Normal file
44
checks/check37
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name AWSCMKChanges \
|
||||
# --filter-pattern '{ ($.eventSource = kms.amazonaws.com) && (($.eventName = DisableKey) || ($.eventName = ScheduleKeyDeletion)) }' \
|
||||
# --metric-transformations metricName=CMKEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name AWSCMKChangesAlarm \
|
||||
# --alarm-description "Triggered by AWS CMK changes." \
|
||||
# --metric-name CMKEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check37="3.7,3.07"
|
||||
CHECK_TITLE_check37="[check37] Ensure a log metric filter and alarm exist for disabling or scheduled deletion of customer created CMKs (Scored)"
|
||||
CHECK_SCORED_check37="SCORED"
|
||||
CHECK_TYPE_check37="LEVEL2"
|
||||
CHECK_ALTERNATE_check307="check37"
|
||||
|
||||
check37(){
|
||||
check3x '\$\.eventSource\s*=\s*kms.amazonaws.com.+\$\.eventName\s*=\s*DisableKey.+\$\.eventName\s*=\s*ScheduleKeyDeletion'
|
||||
}
|
||||
44
checks/check38
Normal file
44
checks/check38
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name S3BucketConfigChanges \
|
||||
# --filter-pattern '{ ($.eventSource = s3.amazonaws.com) && (($.eventName = PutBucketAcl) || ($.eventName = PutBucketPolicy) || ($.eventName = PutBucketCors) || ($.eventName = PutBucketLifecycle) || ($.eventName = PutBucketReplication) || ($.eventName = DeleteBucketPolicy) || ($.eventName = DeleteBucketCors) || ($.eventName = DeleteBucketLifecycle) || ($.eventName = DeleteBucketReplication)) }' \
|
||||
# --metric-transformations metricName=S3BucketEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name S3BucketConfigChangesAlarm \
|
||||
# --alarm-description "Triggered by AWS S3 Bucket config changes." \
|
||||
# --metric-name S3BucketEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check38="3.8,3.08"
|
||||
CHECK_TITLE_check38="[check38] Ensure a log metric filter and alarm exist for S3 bucket policy changes (Scored)"
|
||||
CHECK_SCORED_check38="SCORED"
|
||||
CHECK_TYPE_check38="LEVEL1"
|
||||
CHECK_ALTERNATE_check308="check38"
|
||||
|
||||
check38(){
|
||||
check3x '\$\.eventSource\s*=\s*s3.amazonaws.com.+\$\.eventName\s*=\s*PutBucketAcl.+\$\.eventName\s*=\s*PutBucketPolicy.+\$\.eventName\s*=\s*PutBucketCors.+\$\.eventName\s*=\s*PutBucketLifecycle.+\$\.eventName\s*=\s*PutBucketReplication.+\$\.eventName\s*=\s*DeleteBucketPolicy.+\$\.eventName\s*=\s*DeleteBucketCors.+\$\.eventName\s*=\s*DeleteBucketLifecycle.+\$\.eventName\s*=\s*DeleteBucketReplication'
|
||||
}
|
||||
44
checks/check39
Normal file
44
checks/check39
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
#
|
||||
# Remediation:
|
||||
#
|
||||
# https://d1.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
|
||||
#
|
||||
# aws logs put-metric-filter \
|
||||
# --region us-east-1 \
|
||||
# --log-group-name CloudTrail/CloudWatchLogGroup \
|
||||
# --filter-name AWSConfigChanges \
|
||||
# --filter-pattern '{ ($.eventSource = config.amazonaws.com) && (($.eventName = StopConfigurationRecorder)||($.eventName = DeleteDeliveryChannel)||($.eventName = PutDeliveryChannel)||($.eventName = PutConfigurationRecorder)) }' \
|
||||
# --metric-transformations metricName=ConfigEventCount,metricNamespace=CloudTrailMetrics,metricValue=1
|
||||
#
|
||||
# aws cloudwatch put-metric-alarm \
|
||||
# --region us-east-1 \
|
||||
# --alarm-name AWSConfigChangesAlarm \
|
||||
# --alarm-description "Triggered by AWS Config changes." \
|
||||
# --metric-name ConfigEventCount \
|
||||
# --namespace CloudTrailMetrics \
|
||||
# --statistic Sum \
|
||||
# --comparison-operator GreaterThanOrEqualToThreshold \
|
||||
# --evaluation-periods 1 \
|
||||
# --period 300 \
|
||||
# --threshold 1 \
|
||||
# --actions-enabled \
|
||||
# --alarm-actions arn:aws:sns:us-east-1:123456789012:CloudWatchAlarmTopic
|
||||
|
||||
CHECK_ID_check39="3.9,3.09"
|
||||
CHECK_TITLE_check39="[check39] Ensure a log metric filter and alarm exist for AWS Config configuration changes (Scored)"
|
||||
CHECK_SCORED_check39="SCORED"
|
||||
CHECK_TYPE_check39="LEVEL2"
|
||||
CHECK_ALTERNATE_check309="check39"
|
||||
|
||||
check39(){
|
||||
check3x '\$\.eventSource\s*=\s*config.amazonaws.com.+\$\.eventName\s*=\s*StopConfigurationRecorder.+\$\.eventName\s*=\s*DeleteDeliveryChannel.+\$\.eventName\s*=\s*PutDeliveryChannel.+\$\.eventName\s*=\s*PutConfigurationRecorder'
|
||||
}
|
||||
29
checks/check41
Normal file
29
checks/check41
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check41="4.1,4.01"
|
||||
CHECK_TITLE_check41="[check41] Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to port 22 (Scored)"
|
||||
CHECK_SCORED_check41="SCORED"
|
||||
CHECK_TYPE_check41="LEVEL2"
|
||||
CHECK_ALTERNATE_check401="check41"
|
||||
|
||||
check41(){
|
||||
# "Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to port 22 (Scored)"
|
||||
for regx in $REGIONS; do
|
||||
SG_LIST=$($AWSCLI ec2 describe-security-groups --query 'SecurityGroups[?length(IpPermissions[?((FromPort==null && ToPort==null) || (FromPort<=`22` && ToPort>=`22`)) && (contains(IpRanges[].CidrIp, `0.0.0.0/0`) || contains(Ipv6Ranges[].CidrIpv6, `::/0`))]) > `0`].{GroupId:GroupId}' $PROFILE_OPT --region $regx --output text)
|
||||
if [[ $SG_LIST ]];then
|
||||
for SG in $SG_LIST;do
|
||||
textFail "Found Security Group: $SG open to 0.0.0.0/0 in Region $regx" "$regx"
|
||||
done
|
||||
else
|
||||
textPass "No Security Groups found in $regx with port 22 TCP open to 0.0.0.0/0" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
29
checks/check42
Normal file
29
checks/check42
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check42="4.2,4.02"
|
||||
CHECK_TITLE_check42="[check42] Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to port 3389 (Scored)"
|
||||
CHECK_SCORED_check42="SCORED"
|
||||
CHECK_TYPE_check42="LEVEL2"
|
||||
CHECK_ALTERNATE_check402="check42"
|
||||
|
||||
check42(){
|
||||
# "Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to port 3389 (Scored)"
|
||||
for regx in $REGIONS; do
|
||||
SG_LIST=$($AWSCLI ec2 describe-security-groups --query 'SecurityGroups[?length(IpPermissions[?((FromPort==null && ToPort==null) || (FromPort<=`3389` && ToPort>=`3389`)) && (contains(IpRanges[].CidrIp, `0.0.0.0/0`) || contains(Ipv6Ranges[].CidrIpv6, `::/0`))]) > `0`].{GroupId:GroupId}' $PROFILE_OPT --region $regx --output text)
|
||||
if [[ $SG_LIST ]];then
|
||||
for SG in $SG_LIST;do
|
||||
textFail "Found Security Group: $SG open to 0.0.0.0/0 in Region $regx" "$regx"
|
||||
done
|
||||
else
|
||||
textPass "No Security Groups found in $regx with port 3389 TCP open to 0.0.0.0/0" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
30
checks/check43
Normal file
30
checks/check43
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check43="4.3,4.03"
|
||||
CHECK_TITLE_check43="[check43] Ensure the default security group of every VPC restricts all traffic (Scored)"
|
||||
CHECK_SCORED_check43="SCORED"
|
||||
CHECK_TYPE_check43="LEVEL2"
|
||||
CHECK_ALTERNATE_check403="check43"
|
||||
|
||||
check43(){
|
||||
# "Ensure the default security group of every VPC restricts all traffic (Scored)"
|
||||
for regx in $REGIONS; do
|
||||
CHECK_SGDEFAULT_IDS=$($AWSCLI ec2 describe-security-groups $PROFILE_OPT --region $regx --filters Name=group-name,Values='default' --query 'SecurityGroups[*].GroupId[]' --output text)
|
||||
for CHECK_SGDEFAULT_ID in $CHECK_SGDEFAULT_IDS; do
|
||||
CHECK_SGDEFAULT_ID_OPEN=$($AWSCLI ec2 describe-security-groups $PROFILE_OPT --region $regx --group-ids $CHECK_SGDEFAULT_ID --query 'SecurityGroups[*].{IpPermissions:IpPermissions,IpPermissionsEgress:IpPermissionsEgress,GroupId:GroupId}' --output text |egrep '0.0.0.0|\:\:\/0')
|
||||
if [[ $CHECK_SGDEFAULT_ID_OPEN ]];then
|
||||
textFail "Default Security Groups ($CHECK_SGDEFAULT_ID) found that allow 0.0.0.0 IN or OUT traffic in Region $regx" "$regx"
|
||||
else
|
||||
textPass "No Default Security Groups ($CHECK_SGDEFAULT_ID) open to 0.0.0.0 found in Region $regx" "$regx"
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
34
checks/check44
Normal file
34
checks/check44
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
||||
#
|
||||
# This Prowler check is licensed under a
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||
#
|
||||
# You should have received a copy of the license along with this
|
||||
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
CHECK_ID_check44="4.4,4.04"
|
||||
CHECK_TITLE_check44="[check44] Ensure routing tables for VPC peering are \"least access\" (Not Scored)"
|
||||
CHECK_SCORED_check44="NOT_SCORED"
|
||||
CHECK_TYPE_check44="LEVEL2"
|
||||
CHECK_ALTERNATE_check404="check44"
|
||||
|
||||
check44(){
|
||||
# "Ensure routing tables for VPC peering are \"least access\" (Not Scored)"
|
||||
textInfo "Looking for VPC peering in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_VPCS_PEERING_CONNECTIONS=$($AWSCLI ec2 describe-vpc-peering-connections --output text $PROFILE_OPT --region $regx --query 'VpcPeeringConnections[*].VpcPeeringConnectionId'| sort | paste -s -d" " -)
|
||||
if [[ $LIST_OF_VPCS_PEERING_CONNECTIONS ]];then
|
||||
textInfo "$regx: $LIST_OF_VPCS_PEERING_CONNECTIONS - review routing tables" "$regx"
|
||||
#LIST_OF_VPCS=$($AWSCLI ec2 describe-vpcs $PROFILE_OPT --region $regx --query 'Vpcs[*].VpcId' --output text)
|
||||
#aws ec2 describe-route-tables --filter "Name=vpc-id,Values=vpc-0213e864" --query "RouteTables[*].{RouteTableId:RouteTableId, VpcId:VpcId, Routes:Routes, AssociatedSubnets:Associations[*].SubnetId}" $PROFILE_OPT --region $regx
|
||||
# for vpc in $LIST_OF_VPCS; do
|
||||
# VPCS_WITH_PEERING=$($AWSCLI ec2 describe-route-tables --filter "Name=vpc-id,Values=$vpc" $PROFILE_OPT --region $regx --query "RouteTables[*].{RouteTableId:RouteTableId, VpcId:VpcId, Routes:Routes, AssociatedSubnets:Associations[*].SubnetId}" |grep GatewayId|grep pcx-)
|
||||
# done
|
||||
#echo $VPCS_WITH_PEERING
|
||||
else
|
||||
textPass "$regx: No VPC peering found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
48
checks/check_extra71
Normal file
48
checks/check_extra71
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra71="7.1,7.01"
|
||||
CHECK_TITLE_extra71="[extra71] Ensure users of groups with AdministratorAccess policy have MFA tokens enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra71="NOT_SCORED"
|
||||
CHECK_TYPE_extra71="EXTRA"
|
||||
CHECK_ALTERNATE_extra701="extra71"
|
||||
CHECK_ALTERNATE_check71="extra71"
|
||||
CHECK_ALTERNATE_check701="extra71"
|
||||
|
||||
extra71(){
|
||||
# "Ensure users of groups with AdministratorAccess policy have MFA tokens enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
ADMIN_GROUPS=''
|
||||
AWS_GROUPS=$($AWSCLI $PROFILE_OPT iam list-groups --output text --query 'Groups[].GroupName')
|
||||
for grp in $AWS_GROUPS; do
|
||||
# aws --profile onlinetraining iam list-attached-group-policies --group-name Administrators --query 'AttachedPolicies[].PolicyArn' | grep 'arn:aws:iam::aws:policy/AdministratorAccess'
|
||||
# list-attached-group-policies
|
||||
CHECK_ADMIN_GROUP=$($AWSCLI $PROFILE_OPT iam list-attached-group-policies --group-name $grp --output json --query 'AttachedPolicies[].PolicyArn' | grep 'arn:aws:iam::aws:policy/AdministratorAccess')
|
||||
if [[ $CHECK_ADMIN_GROUP ]]; then
|
||||
ADMIN_GROUPS="$ADMIN_GROUPS $grp"
|
||||
textInfo "$grp group provides administrative access"
|
||||
ADMIN_USERS=$($AWSCLI $PROFILE_OPT iam get-group --group-name $grp --output json --query 'Users[].UserName' | grep '"' | cut -d'"' -f2 )
|
||||
for auser in $ADMIN_USERS; do
|
||||
# users in group are Administrators
|
||||
# users
|
||||
# check for user MFA device in credential report
|
||||
USER_MFA_ENABLED=$( cat $TEMP_REPORT_FILE | grep "^$auser," | cut -d',' -f8)
|
||||
if [[ "true" == $USER_MFA_ENABLED ]]; then
|
||||
textPass "$auser / MFA Enabled / admin via group $grp"
|
||||
else
|
||||
textFail "$auser / MFA DISABLED / admin via group $grp"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$grp group provides non-administrative access"
|
||||
fi
|
||||
done
|
||||
}
|
||||
34
checks/check_extra710
Normal file
34
checks/check_extra710
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra710="7.10"
|
||||
CHECK_TITLE_extra710="[extra710] Check for internet facing EC2 Instances (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra710="NOT_SCORED"
|
||||
CHECK_TYPE_extra710="EXTRA"
|
||||
CHECK_ALTERNATE_check710="extra710"
|
||||
|
||||
extra710(){
|
||||
# "Check for internet facing EC2 Instances (Not Scored) (Not part of CIS benchmark)"
|
||||
textInfo "Looking for instances in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_PUBLIC_INSTANCES=$($AWSCLI ec2 describe-instances $PROFILE_OPT --region $regx --query 'Reservations[*].Instances[?PublicIpAddress].[InstanceId,PublicIpAddress]' --output text)
|
||||
if [[ $LIST_OF_PUBLIC_INSTANCES ]];then
|
||||
while read -r instance;do
|
||||
INSTANCE_ID=$(echo $instance | awk '{ print $1; }')
|
||||
PUBLIC_IP=$(echo $instance | awk '{ print $2; }')
|
||||
textFail "$regx: Instance: $INSTANCE_ID at IP: $PUBLIC_IP is internet-facing!" "$regx"
|
||||
done <<< "$LIST_OF_PUBLIC_INSTANCES"
|
||||
else
|
||||
textPass "$regx: no Internet Facing EC2 Instances found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
34
checks/check_extra711
Normal file
34
checks/check_extra711
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra711="7.11"
|
||||
CHECK_TITLE_extra711="[extra711] Check for Publicly Accessible Redshift Clusters (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra711="NOT_SCORED"
|
||||
CHECK_TYPE_extra711="EXTRA"
|
||||
CHECK_ALTERNATE_check711="extra711"
|
||||
|
||||
extra711(){
|
||||
# "Check for Publicly Accessible Redshift Clusters (Not Scored) (Not part of CIS benchmark)"
|
||||
textInfo "Looking for Redshift clusters in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_PUBLIC_REDSHIFT_CLUSTERS=$($AWSCLI redshift describe-clusters $PROFILE_OPT --region $regx --query 'Clusters[?PubliclyAccessible == `true`].[ClusterIdentifier,Endpoint.Address]' --output text)
|
||||
if [[ $LIST_OF_PUBLIC_REDSHIFT_CLUSTERS ]];then
|
||||
while read -r cluster;do
|
||||
CLUSTER_ID=$(echo $cluster | awk '{ print $1; }')
|
||||
CLUSTER_ENDPOINT=$(echo $cluster | awk '{ print $2; }')
|
||||
textFail "$regx: Cluster: $CLUSTER_ID at Endpoint: $CLUSTER_ENDPOINT is publicly accessible!" "$regx"
|
||||
done <<< "$LIST_OF_PUBLIC_REDSHIFT_CLUSTERS"
|
||||
else
|
||||
textPass "$regx: no Publicly Accessible Redshift Clusters found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
29
checks/check_extra712
Normal file
29
checks/check_extra712
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra712="7.12"
|
||||
CHECK_TITLE_extra712="[extra712] Check if Amazon Macie is enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra712="NOT_SCORED"
|
||||
CHECK_TYPE_extra712="EXTRA"
|
||||
CHECK_ALTERNATE_check712="extra712"
|
||||
|
||||
extra712(){
|
||||
# "Check if Amazon Macie is enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
textInfo "No API commands available to check if Macie is enabled,"
|
||||
textInfo "just looking if IAM Macie related permissions exist. "
|
||||
MACIE_IAM_ROLES_CREATED=$($AWSCLI iam list-roles $PROFILE_OPT --query 'Roles[*].Arn'|grep AWSMacieServiceCustomer|wc -l)
|
||||
if [[ $MACIE_IAM_ROLES_CREATED -eq 2 ]];then
|
||||
textPass "Macie related IAM roles exist so it might be enabled. Check it out manually."
|
||||
else
|
||||
textFail "No Macie related IAM roles found. It is most likely not to be enabled"
|
||||
fi
|
||||
}
|
||||
42
checks/check_extra713
Normal file
42
checks/check_extra713
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra713="7.13"
|
||||
CHECK_TITLE_extra713="[extra713] Check if GuardDuty is enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra713="NOT_SCORED"
|
||||
CHECK_TYPE_extra713="EXTRA"
|
||||
CHECK_ALTERNATE_check713="extra713"
|
||||
|
||||
extra713(){
|
||||
# "Check if GuardDuty is enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_GUARDDUTY_DETECTORS=$($AWSCLI guardduty list-detectors $PROFILE_OPT --region $regx --output text --query DetectorIds[*] 2> /dev/null)
|
||||
RESULT=$?
|
||||
if [ $RESULT -eq 0 ];then
|
||||
if [[ $LIST_OF_GUARDDUTY_DETECTORS ]];then
|
||||
while read -r detector;do
|
||||
DETECTOR_ENABLED=$($AWSCLI guardduty get-detector --detector-id $detector $PROFILE_OPT --region $regx --query "Status" --output text|grep ENABLED)
|
||||
if [[ $DETECTOR_ENABLED ]]; then
|
||||
textPass "$regx: GuardDuty detector $detector enabled" "$regx"
|
||||
else
|
||||
textFail "$regx: GuardDuty detector $detector configured but suspended" "$regx"
|
||||
fi
|
||||
done <<< "$LIST_OF_GUARDDUTY_DETECTORS"
|
||||
else
|
||||
textFail "$regx: GuardDuty detector not configured!" "$regx"
|
||||
fi
|
||||
else
|
||||
# if list-detectors return any error
|
||||
textInfo "$regx: GuardDuty not checked" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
34
checks/check_extra714
Normal file
34
checks/check_extra714
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra714="7.14"
|
||||
CHECK_TITLE_extra714="[extra714] Check if CloudFront distributions have logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra714="NOT_SCORED"
|
||||
CHECK_TYPE_extra714="EXTRA"
|
||||
CHECK_ALTERNATE_check714="extra714"
|
||||
|
||||
extra714(){
|
||||
# "Check if CloudFront distributions have logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
LIST_OF_DISTRIBUTIONS=$($AWSCLI cloudfront list-distributions $PROFILE_OPT --query 'DistributionList.Items[].Id' --output text | grep -v "^None")
|
||||
if [[ $LIST_OF_DISTRIBUTIONS ]]; then
|
||||
for dist in $LIST_OF_DISTRIBUTIONS; do
|
||||
LOG_ENABLED=$($AWSCLI cloudfront get-distribution $PROFILE_OPT --id "$dist" --query 'Distribution.DistributionConfig.Logging.Enabled' | grep true)
|
||||
if [[ $LOG_ENABLED ]]; then
|
||||
textPass "CloudFront distribution $dist has logging enabled"
|
||||
else
|
||||
textFail "CloudFront distribution $dist has logging disabled"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "No CloudFront distributions found"
|
||||
fi
|
||||
}
|
||||
41
checks/check_extra715
Normal file
41
checks/check_extra715
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra715="7.15"
|
||||
CHECK_TITLE_extra715="[extra715] Check if Elasticsearch Service domains have logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra715="NOT_SCORED"
|
||||
CHECK_TYPE_extra715="EXTRA"
|
||||
CHECK_ALTERNATE_check715="extra715"
|
||||
|
||||
extra715(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_DOMAINS=$($AWSCLI es list-domain-names $PROFILE_OPT --region $regx --query DomainNames --output text)
|
||||
if [[ $LIST_OF_DOMAINS ]]; then
|
||||
for domain in $LIST_OF_DOMAINS;do
|
||||
SEARCH_SLOWLOG_ENABLED=$($AWSCLI es describe-elasticsearch-domain-config --domain-name $domain $PROFILE_OPT --region $regx --query DomainConfig.LogPublishingOptions.Options.SEARCH_SLOW_LOGS.Enabled --output text |grep -v ^None|grep -v ^False)
|
||||
if [[ $SEARCH_SLOWLOG_ENABLED ]];then
|
||||
textPass "$regx: ElasticSearch Service domain $domain SEARCH_SLOW_LOGS enabled" "$regx"
|
||||
else
|
||||
textFail "$regx: ElasticSearch Service domain $domain SEARCH_SLOW_LOGS disabled!" "$regx"
|
||||
fi
|
||||
INDEX_SLOWLOG_ENABLED=$($AWSCLI es describe-elasticsearch-domain-config --domain-name $domain $PROFILE_OPT --region $regx --query DomainConfig.LogPublishingOptions.Options.INDEX_SLOW_LOGS.Enabled --output text |grep -v ^None|grep -v ^False)
|
||||
if [[ $INDEX_SLOWLOG_ENABLED ]];then
|
||||
textPass "$regx: ElasticSearch Service domain $domain INDEX_SLOW_LOGS enabled" "$regx"
|
||||
else
|
||||
textFail "$regx: ElasticSearch Service domain $domain INDEX_SLOW_LOGS disabled!" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No Elasticsearch Service domain found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
45
checks/check_extra716
Normal file
45
checks/check_extra716
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra716="7.16"
|
||||
CHECK_TITLE_extra716="[extra716] Check if Elasticsearch Service domains allow open access (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra716="NOT_SCORED"
|
||||
CHECK_TYPE_extra716="EXTRA"
|
||||
CHECK_ALTERNATE_check716="extra716"
|
||||
|
||||
extra716(){
|
||||
# "Check if Elasticsearch Service domains allow open access (Not Scored) (Not part of CIS benchmark)"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_DOMAINS=$($AWSCLI es list-domain-names $PROFILE_OPT --region $regx --query DomainNames --output text)
|
||||
if [[ $LIST_OF_DOMAINS ]]; then
|
||||
for domain in $LIST_OF_DOMAINS;do
|
||||
CHECK_IF_MEMBER_OF_VPC=$($AWSCLI es describe-elasticsearch-domain-config --domain-name $domain $PROFILE_OPT --region $regx --query DomainConfig.VPCOptions.Options.VPCId --output text|grep -v ^None)
|
||||
if [[ ! $CHECK_IF_MEMBER_OF_VPC ]];then
|
||||
TEMP_POLICY_FILE=$(mktemp -t prowler-${ACCOUNT_NUM}-es-domain.policy.XXXXXXXXXX)
|
||||
$AWSCLI es describe-elasticsearch-domain-config --domain-name $domain $PROFILE_OPT --region $regx --query DomainConfig.AccessPolicies.Options --output text > $TEMP_POLICY_FILE 2> /dev/null
|
||||
# check if the policy has Principal as *
|
||||
CHECK_ES_DOMAIN_ALLUSERS_POLICY=$(cat $TEMP_POLICY_FILE | jq -r '. | .Statement[] | select(.Effect == "Allow" and (((.Principal|type == "object") and .Principal.AWS == "*") or ((.Principal|type == "string") and .Principal == "*")) and .Condition == null)')
|
||||
if [[ $CHECK_ES_DOMAIN_ALLUSERS_POLICY ]];then
|
||||
textFail "$regx: $domain policy \"may\" allow Anonymous users to perform actions (Principal: \"*\")" "$regx"
|
||||
else
|
||||
textPass "$regx: $domain is not open" "$regx"
|
||||
fi
|
||||
else
|
||||
textPass "$regx: $domain is in a VPC" "$regx"
|
||||
fi
|
||||
rm -f $TEMP_POLICY_FILE
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No Elasticsearch Service domain found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
50
checks/check_extra717
Normal file
50
checks/check_extra717
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra717="7.17"
|
||||
CHECK_TITLE_extra717="[extra717] Check if Elastic Load Balancers have logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra717="NOT_SCORED"
|
||||
CHECK_TYPE_extra717="EXTRA"
|
||||
CHECK_ALTERNATE_check717="extra717"
|
||||
|
||||
extra717(){
|
||||
# "Check if Elastic Load Balancers have logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_ELBS=$($AWSCLI elb describe-load-balancers $PROFILE_OPT --region $regx --query 'LoadBalancerDescriptions[*].LoadBalancerName' --output text|xargs -n1)
|
||||
LIST_OF_ELBSV2=$($AWSCLI elbv2 describe-load-balancers $PROFILE_OPT --region $regx --query 'LoadBalancers[*].LoadBalancerArn' --output text|xargs -n1)
|
||||
if [[ $LIST_OF_ELBS || $LIST_OF_ELBSV2 ]]; then
|
||||
if [[ $LIST_OF_ELBS ]]; then
|
||||
for elb in $LIST_OF_ELBS; do
|
||||
CHECK_ELBS_LOG_ENABLED=$($AWSCLI elb describe-load-balancer-attributes $PROFILE_OPT --region $regx --load-balancer-name $elb --query 'LoadBalancerAttributes.AccessLog.Enabled'|grep "^true")
|
||||
if [[ $CHECK_ELBS_LOG_ENABLED ]]; then
|
||||
textPass "$regx: $elb has access logs to S3 configured" "$regx"
|
||||
else
|
||||
textFail "$regx: $elb has not configured access logs" "$regx"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [[ $LIST_OF_ELBSV2 ]]; then
|
||||
for elbarn in $LIST_OF_ELBSV2; do
|
||||
CHECK_ELBSV2_LOG_ENABLED=$($AWSCLI elbv2 describe-load-balancer-attributes $PROFILE_OPT --region $regx --load-balancer-arn $elbarn --query Attributes[*] --output text|grep "^access_logs.s3.enabled"|cut -f2|grep true)
|
||||
ELBV2_NAME=$(echo $elbarn|cut -d\/ -f3)
|
||||
if [[ $CHECK_ELBSV2_LOG_ENABLED ]]; then
|
||||
textPass "$regx: $ELBV2_NAME has access logs to S3 configured" "$regx"
|
||||
else
|
||||
textFail "$regx: $ELBV2_NAME has not configured access logs" "$regx"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
else
|
||||
textInfo "$regx: No ELBs found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
38
checks/check_extra718
Normal file
38
checks/check_extra718
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra718="7.18"
|
||||
CHECK_TITLE_extra718="[extra718] Check if S3 buckets have server access logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra718="NOT_SCORED"
|
||||
CHECK_TYPE_extra718="EXTRA"
|
||||
CHECK_ALTERNATE_check718="extra718"
|
||||
|
||||
extra718(){
|
||||
# "Check if S3 buckets have server access logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
LIST_OF_BUCKETS=$($AWSCLI s3api list-buckets $PROFILE_OPT --query Buckets[*].Name --output text|xargs -n1)
|
||||
if [[ $LIST_OF_BUCKETS ]]; then
|
||||
for bucket in $LIST_OF_BUCKETS;do
|
||||
BUCKET_SERVER_LOG_ENABLED=$($AWSCLI s3api get-bucket-logging --bucket $bucket $PROFILE_OPT --query [LoggingEnabled] --output text 2>&1)
|
||||
if [[ $(echo "$BUCKET_SERVER_LOG_ENABLED" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Bucket Logging for $bucket"
|
||||
continue
|
||||
fi
|
||||
if [[ $(echo "$BUCKET_SERVER_LOG_ENABLED" | grep "^None$") ]]; then
|
||||
textFail "Bucket $bucket has server access logging disabled!"
|
||||
else
|
||||
textPass "Bucket $bucket has server access logging enabled"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "No S3 Buckets found"
|
||||
fi
|
||||
}
|
||||
34
checks/check_extra719
Normal file
34
checks/check_extra719
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra719="7.19"
|
||||
CHECK_TITLE_extra719="[extra719] Check if Route53 public hosted zones are logging queries to CloudWatch Logs (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra719="NOT_SCORED"
|
||||
CHECK_TYPE_extra719="EXTRA"
|
||||
CHECK_ALTERNATE_check719="extra719"
|
||||
|
||||
extra719(){
|
||||
# You can't create a query logging config for a private hosted zone.
|
||||
LIST_OF_HOSTED_ZONES=$($AWSCLI route53 list-hosted-zones $PROFILE_OPT | jq -r ".HostedZones[] | select(.Config.PrivateZone == false) | .Id")
|
||||
if [[ $LIST_OF_HOSTED_ZONES ]]; then
|
||||
for hostedzoneid in $LIST_OF_HOSTED_ZONES;do
|
||||
HOSTED_ZONE_QUERY_LOG_ENABLED=$($AWSCLI route53 list-query-logging-configs --hosted-zone-id $hostedzoneid $PROFILE_OPT --query QueryLoggingConfigs[*].CloudWatchLogsLogGroupArn --output text|cut -d: -f7)
|
||||
if [[ $HOSTED_ZONE_QUERY_LOG_ENABLED ]];then
|
||||
textPass "Route53 public hosted zone Id $hostedzoneid has query logging enabled in Log Group $HOSTED_ZONE_QUERY_LOG_ENABLED"
|
||||
else
|
||||
textFail "Route53 public hosted zone Id $hostedzoneid has query logging disabled!"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "No Route53 hosted zones found"
|
||||
fi
|
||||
}
|
||||
35
checks/check_extra72
Normal file
35
checks/check_extra72
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra72="7.2,7.02"
|
||||
CHECK_TITLE_extra72="[extra72] Ensure there are no EBS Snapshots set as Public (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra72="NOT_SCORED"
|
||||
CHECK_TYPE_extra72="EXTRA"
|
||||
CHECK_ALTERNATE_extra702="extra72"
|
||||
CHECK_ALTERNATE_check72="extra72"
|
||||
CHECK_ALTERNATE_check702="extra72"
|
||||
|
||||
extra72(){
|
||||
# "Ensure there are no EBS Snapshots set as Public (Not Scored) (Not part of CIS benchmark)"
|
||||
textInfo "Looking for EBS Snapshots in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_EBS_SNAPSHOTS=$($AWSCLI ec2 describe-snapshots $PROFILE_OPT --region $regx --owner-ids $ACCOUNT_NUM --output text --query 'Snapshots[*].{ID:SnapshotId}' --max-items $MAXITEMS | grep -v None 2> /dev/null)
|
||||
for snapshot in $LIST_OF_EBS_SNAPSHOTS; do
|
||||
SNAPSHOT_IS_PUBLIC=$($AWSCLI ec2 describe-snapshot-attribute $PROFILE_OPT --region $regx --output text --snapshot-id $snapshot --attribute createVolumePermission --query "CreateVolumePermissions[?Group=='all']")
|
||||
if [[ $SNAPSHOT_IS_PUBLIC ]];then
|
||||
textFail "$regx: $snapshot is currently Public!" "$regx"
|
||||
else
|
||||
textPass "$regx: $snapshot is not Public" "$regx"
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
57
checks/check_extra720
Normal file
57
checks/check_extra720
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra720="7.20"
|
||||
CHECK_TITLE_extra720="[extra720] Check if Lambda functions invoke API operations are being recorded by CloudTrail (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra720="NOT_SCORED"
|
||||
CHECK_TYPE_extra720="EXTRA"
|
||||
CHECK_ALTERNATE_check720="extra720"
|
||||
|
||||
extra720(){
|
||||
# "Check if Lambda functions invoke API operations are being recorded by CloudTrail (Not Scored) (Not part of CIS benchmark)"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_FUNCTIONS=$($AWSCLI lambda list-functions $PROFILE_OPT --region $regx --query Functions[*].FunctionName --output text)
|
||||
if [[ $LIST_OF_FUNCTIONS ]]; then
|
||||
for lambdafunction in $LIST_OF_FUNCTIONS;do
|
||||
LIST_OF_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query trailList[?HomeRegion==\`$regx\`].Name --output text)
|
||||
if [[ $LIST_OF_TRAILS ]]; then
|
||||
for trail in $LIST_OF_TRAILS; do
|
||||
FUNCTION_ENABLED_IN_TRAIL=$($AWSCLI cloudtrail get-event-selectors $PROFILE_OPT --trail-name $trail --region $regx --query "EventSelectors[*].DataResources[?Type == \`AWS::Lambda::Function\`].Values" --output text |xargs -n1| grep -E "^arn:aws:lambda.*function:$lambdafunction$|^arn:aws:lambda$")
|
||||
if [[ $FUNCTION_ENABLED_IN_TRAIL ]]; then
|
||||
textPass "$regx: Lambda function $lambdafunction enabled in trail $trail" "$regx"
|
||||
else
|
||||
textFail "$regx: Lambda function $lambdafunction NOT enabled in trail $trail" "$regx"
|
||||
fi
|
||||
done
|
||||
# LIST_OF_MULTIREGION_TRAILS=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query "trailList[?IsMultiRegionTrail == \`true\`].Name" --output text)
|
||||
# if [[ $LIST_OF_MULTIREGION_TRAILS ]]; then
|
||||
# for trail in $LIST_OF_MULTIREGION_TRAILS; do
|
||||
# REGION_OF_TRAIL=$($AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query "trailList[?IsMultiRegionTrail == \`true\` && Name == \`$trail\` ].HomeRegion" --output text)
|
||||
# FUNCTION_ENABLED_IN_THIS_REGION=$($AWSCLI cloudtrail get-event-selectors $PROFILE_OPT --trail-name $trail --region $REGION_OF_TRAIL --query "EventSelectors[*].DataResources[?Type == \`AWS::Lambda::Function\`].Values" --output text |xargs -n1| grep -E "^arn:aws:lambda.*function:$lambdafunction$")
|
||||
# if [[ $FUNCTION_ENABLED_IN_THIS_REGION ]]; then
|
||||
# textPass "$regx: Lambda function $lambdafunction enabled in trail $trail" "$regx"
|
||||
# else
|
||||
# textFail "$regx: Lambda function $lambdafunction NOT enabled in trail $trail" "$regx"
|
||||
# fi
|
||||
# done
|
||||
# else
|
||||
# textFail "$regx: Lambda function $lambdafunction is not being recorded!" "$regx"
|
||||
# fi
|
||||
else
|
||||
textFail "$regx: Lambda function $lambdafunction is not being recorded no CloudTrail found!" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No Lambda functions found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
37
checks/check_extra721
Normal file
37
checks/check_extra721
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra721="7.21"
|
||||
CHECK_TITLE_extra721="[extra721] Check if Redshift cluster has audit logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra721="NOT_SCORED"
|
||||
CHECK_TYPE_extra721="EXTRA"
|
||||
CHECK_ALTERNATE_check721="extra721"
|
||||
|
||||
extra721(){
|
||||
# "Check if Redshift cluster has audit logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_REDSHIFT_CLUSTERS=$($AWSCLI redshift describe-clusters $PROFILE_OPT --region $regx --query 'Clusters[*].ClusterIdentifier' --output text)
|
||||
if [[ $LIST_OF_REDSHIFT_CLUSTERS ]]; then
|
||||
for redshiftcluster in $LIST_OF_REDSHIFT_CLUSTERS;do
|
||||
REDSHIFT_LOG_ENABLED=$($AWSCLI redshift describe-logging-status $PROFILE_OPT --region $regx --cluster-identifier $redshiftcluster --query LoggingEnabled --output text | grep True)
|
||||
if [[ $REDSHIFT_LOG_ENABLED ]];then
|
||||
REDSHIFT_LOG_ENABLED_BUCKET=$($AWSCLI redshift describe-logging-status $PROFILE_OPT --region $regx --cluster-identifier $redshiftcluster --query BucketName --output text)
|
||||
textPass "$regx: Redshift cluster $redshiftcluster has audit logging enabled to bucket $REDSHIFT_LOG_ENABLED_BUCKET" "$regx"
|
||||
else
|
||||
textFail "$regx: Redshift cluster $redshiftcluster logging disabled!" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No Redshift cluster configured" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
44
checks/check_extra722
Normal file
44
checks/check_extra722
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra722="7.22"
|
||||
CHECK_TITLE_extra722="[extra722] Check if API Gateway has logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra722="NOT_SCORED"
|
||||
CHECK_TYPE_extra722="EXTRA"
|
||||
CHECK_ALTERNATE_check722="extra722"
|
||||
|
||||
extra722(){
|
||||
# "Check if API Gateway has logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_API_GW=$($AWSCLI apigateway get-rest-apis $PROFILE_OPT --region $regx --query items[*].id --output text)
|
||||
if [[ $LIST_OF_API_GW ]];then
|
||||
for apigwid in $LIST_OF_API_GW;do
|
||||
API_GW_NAME=$($AWSCLI apigateway get-rest-apis $PROFILE_OPT --region $regx --query "items[?id==\`$apigwid\`].name" --output text)
|
||||
CHECK_STAGES_NAME=$($AWSCLI apigateway get-stages $PROFILE_OPT --region $regx --rest-api-id $apigwid --query "item[*].stageName" --output text)
|
||||
if [[ $CHECK_STAGES_NAME ]];then
|
||||
for stagname in $CHECK_STAGES_NAME;do
|
||||
CHECK_STAGE_METHOD_LOGGING=$($AWSCLI apigateway get-stages $PROFILE_OPT --region $regx --rest-api-id $apigwid --query "item[?stageName == \`$stagname\` ].methodSettings" --output text |awk '{ print $6 }' |egrep 'ERROR|INFO')
|
||||
if [[ $CHECK_STAGE_METHOD_LOGGING ]];then
|
||||
textPass "$regx: API Gateway $API_GW_NAME ID $apigwid in $stagname has logging enabled as $CHECK_STAGE_METHOD_LOGGING" "$regx"
|
||||
else
|
||||
textFail "$regx: API Gateway $API_GW_NAME ID $apigwid in $stagname has logging disabled" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textFail "$regx: No Stage name found for $API_GW_NAME" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No API Gateway found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
51
checks/check_extra723
Normal file
51
checks/check_extra723
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra723="7.23"
|
||||
CHECK_TITLE_extra723="[extra723] Check if RDS Snapshots and Cluster Snapshots are public (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra723="NOT_SCORED"
|
||||
CHECK_TYPE_extra723="EXTRA"
|
||||
CHECK_ALTERNATE_check723="extra723"
|
||||
|
||||
extra723(){
|
||||
# "Check if RDS Snapshots are public (Not Scored) (Not part of CIS benchmark)"
|
||||
for regx in $REGIONS; do
|
||||
# RDS snapshots
|
||||
LIST_OF_RDS_SNAPSHOTS=$($AWSCLI rds describe-db-snapshots $PROFILE_OPT --region $regx --query DBSnapshots[*].DBSnapshotIdentifier --output text)
|
||||
if [[ $LIST_OF_RDS_SNAPSHOTS ]]; then
|
||||
for rdssnapshot in $LIST_OF_RDS_SNAPSHOTS;do
|
||||
SNAPSHOT_IS_PUBLIC=$($AWSCLI rds describe-db-snapshot-attributes $PROFILE_OPT --region $regx --db-snapshot-identifier $rdssnapshot --query DBSnapshotAttributesResult.DBSnapshotAttributes[*] --output text|grep ^ATTRIBUTEVALUES|cut -f2|grep all)
|
||||
if [[ $SNAPSHOT_IS_PUBLIC ]];then
|
||||
textFail "$regx: RDS Snapshot $rdssnapshot is public!" "$regx"
|
||||
else
|
||||
textPass "$regx: RDS Snapshot $rdssnapshot is not shared" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No RDS Snapshots found" "$regx"
|
||||
fi
|
||||
# RDS cluster snapshots
|
||||
LIST_OF_RDS_CLUSTER_SNAPSHOTS=$($AWSCLI rds describe-db-cluster-snapshots $PROFILE_OPT --region $regx --query DBClusterSnapshots[*].DBClusterSnapshotIdentifier --output text)
|
||||
if [[ $LIST_OF_RDS_CLUSTER_SNAPSHOTS ]]; then
|
||||
for rdsclustersnapshot in $LIST_OF_RDS_CLUSTER_SNAPSHOTS;do
|
||||
CLUSTER_SNAPSHOT_IS_PUBLIC=$($AWSCLI rds describe-db-cluster-snapshot-attributes $PROFILE_OPT --region $regx --db-cluster-snapshot-identifier $rdsclustersnapshot --query DBClusterSnapshotAttributesResult.DBClusterSnapshotAttributes[*] --output text|grep ^ATTRIBUTEVALUES|cut -f2|grep all)
|
||||
if [[ $CLUSTER_SNAPSHOT_IS_PUBLIC ]];then
|
||||
textFail "$regx: RDS Cluster Snapshot $rdsclustersnapshot is public!" "$regx"
|
||||
else
|
||||
textPass "$regx: RDS Cluster Snapshot $rdsclustersnapshot is not shared" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No RDS Cluster Snapshots found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
38
checks/check_extra724
Normal file
38
checks/check_extra724
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra724="7.24"
|
||||
CHECK_TITLE_extra724="[extra724] Check if ACM certificates have Certificate Transparency logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra724="NOT_SCORED"
|
||||
CHECK_TYPE_extra724="EXTRA"
|
||||
CHECK_ALTERNATE_check724="extra724"
|
||||
|
||||
extra724(){
|
||||
# "Check if ACM certificates have Certificate Transparency logging enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_CERTS=$($AWSCLI acm list-certificates $PROFILE_OPT --region $regx --query CertificateSummaryList[].CertificateArn --output text)
|
||||
if [[ $LIST_OF_CERTS ]];then
|
||||
for cert_arn in $LIST_OF_CERTS;do
|
||||
CT_ENABLED=$($AWSCLI acm describe-certificate $PROFILE_OPT --region $regx --certificate-arn $cert_arn --query Certificate.Options.CertificateTransparencyLoggingPreference --output text)
|
||||
CERT_DOMAIN_NAME=$(aws acm describe-certificate $PROFILE_OPT --region $regx --certificate-arn $cert_arn --query Certificate.DomainName --output text)
|
||||
if [[ $CT_ENABLED == "ENABLED" ]];then
|
||||
textPass "$regx: ACM Certificate $CERT_DOMAIN_NAME has Certificate Transparency logging enabled!" "$regx"
|
||||
else
|
||||
textFail "$regx: ACM Certificate $CERT_DOMAIN_NAME has Certificate Transparency logging disabled!" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No ACM Certificates found" "$regx"
|
||||
fi
|
||||
done
|
||||
textInfo "*Read more about this here: https://aws.amazon.com/blogs/security/how-to-get-ready-for-certificate-transparency/"
|
||||
}
|
||||
63
checks/check_extra725
Normal file
63
checks/check_extra725
Normal file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra725="7.25"
|
||||
CHECK_TITLE_extra725="[extra725] Check if S3 buckets have Object-level logging enabled in CloudTrail (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra725="NOT_SCORED"
|
||||
CHECK_TYPE_extra725="EXTRA"
|
||||
CHECK_ALTERNATE_check725="extra725"
|
||||
|
||||
# per Object-level logging is not configured at Bucket level but at CloudTrail trail level
|
||||
extra725(){
|
||||
# "Check if S3 buckets have Object-level logging enabled in CloudTrail (Not Scored) (Not part of CIS benchmark)"
|
||||
textInfo "Looking for S3 Buckets Object-level logging information in all trails... "
|
||||
|
||||
# create a file with a list of all buckets
|
||||
TEMP_BUCKET_LIST_FILE=$(mktemp -t prowler.bucket-list-XXXXXX)
|
||||
$AWSCLI s3api list-buckets --query 'Buckets[*].{Name:Name}' $PROFILE_OPT --region $REGION --output text > $TEMP_BUCKET_LIST_FILE
|
||||
if [ ! -s $TEMP_BUCKET_LIST_FILE ]; then
|
||||
textInfo "$regx: No S3 buckets found" "$regx"
|
||||
exit
|
||||
fi
|
||||
|
||||
# now create a list with all trails available and their region
|
||||
TEMP_TRAILS_LIST_FILE=$(mktemp -t prowler.trails-list-XXXXXX)
|
||||
for regx in $REGIONS; do
|
||||
$AWSCLI cloudtrail describe-trails $PROFILE_OPT --region $regx --query trailList[?HomeRegion==\`$regx\`].[Name,HomeRegion] --output text >> $TEMP_TRAILS_LIST_FILE
|
||||
done
|
||||
|
||||
# look for buckets being logged per trail and create a list with them
|
||||
TEMP_BUCKETS_LOGGING_LIST_FILE=$(mktemp -t prowler.buckets-logging-list-XXXXXX)
|
||||
while IFS='' read -r LINE || [[ -n "${LINE}" ]]; do
|
||||
TRAIL_REGION=$(echo "${LINE}" | awk '{ print $2 }')
|
||||
TRAIL_NAME=$(echo "${LINE}" | awk '{ print $1 }')
|
||||
BUCKETS_OBJECT_LOGGING_ENABLED=$($AWSCLI cloudtrail get-event-selectors --trail-name "${TRAIL_NAME}" $PROFILE_OPT --region $TRAIL_REGION --query "EventSelectors[*].DataResources[?Type == \`AWS::S3::Object\`].Values" --output text |xargs -n1 |cut -d: -f 6|sed 's/\///g')
|
||||
echo $BUCKETS_OBJECT_LOGGING_ENABLED |tr " " "\n"|sort >> $TEMP_BUCKETS_LOGGING_LIST_FILE
|
||||
if [[ $BUCKETS_OBJECT_LOGGING_ENABLED ]]; then
|
||||
for bucket in $BUCKETS_OBJECT_LOGGING_ENABLED; do
|
||||
textPass "$regx: S3 bucket $bucket has Object-level logging enabled in trail $trail" "$regx"
|
||||
done
|
||||
fi
|
||||
done < $TEMP_TRAILS_LIST_FILE
|
||||
|
||||
# diff to get the ones that are not in any trail then they are not logging
|
||||
BUCKETS_NOT_LOGGING=$(diff $TEMP_BUCKETS_LOGGING_LIST_FILE $TEMP_BUCKET_LIST_FILE | sed -n 's/^> //p')
|
||||
if [[ $BUCKETS_NOT_LOGGING ]]; then
|
||||
for bucket in $BUCKETS_NOT_LOGGING; do
|
||||
textFail "$regx: S3 bucket $bucket has Object-level logging disabled" "$regx"
|
||||
done
|
||||
fi
|
||||
# delete all temp files
|
||||
rm -fr $TEMP_BUCKET_LIST_FILE $TEMP_TRAILS_LIST_FILE $TEMP_BUCKETS_LOGGING_LIST_FILE
|
||||
|
||||
}
|
||||
51
checks/check_extra726
Normal file
51
checks/check_extra726
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra726="7.26"
|
||||
CHECK_TITLE_extra726="[extra726] Check Trusted Advisor for errors and warnings (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra726="NOT_SCORED"
|
||||
CHECK_TYPE_extra726="EXTRA"
|
||||
CHECK_ALTERNATE_check726="extra726"
|
||||
|
||||
extra726(){
|
||||
trap "exit" INT
|
||||
# forcing us-east-1 region only since support only works in that region
|
||||
TA_CHECKS_ID=$($AWSCLI support describe-trusted-advisor-checks --language en $PROFILE_OPT --region us-east-1 --query checks[*].id --output text 2>&1)
|
||||
if [[ $(echo "$TA_CHECKS_ID" | grep SubscriptionRequiredException) ]]; then
|
||||
textInfo "Trusted Advisor requires AWS Premium Support Subscription"
|
||||
return
|
||||
fi
|
||||
|
||||
for checkid in $TA_CHECKS_ID; do
|
||||
TA_CHECKS_NAME=$($AWSCLI support describe-trusted-advisor-checks --language en $PROFILE_OPT --region us-east-1 --query "checks[?id==\`$checkid\`].{name:name}[*]" --output text)
|
||||
QUERY_TA_CHECK_RESULT=$($AWSCLI support describe-trusted-advisor-check-result --check-id $checkid --language en $PROFILE_OPT --region us-east-1 --query 'result.status' --output text)
|
||||
# Possible results - https://docs.aws.amazon.com/cli/latest/reference/support/describe-trusted-advisor-check-result.html
|
||||
case "$QUERY_TA_CHECK_RESULT" in
|
||||
"ok")
|
||||
textPass "Trusted Advisor check $TA_CHECKS_NAME is in ok state $QUERY_TA_CHECK_RESULT"
|
||||
;;
|
||||
"error")
|
||||
textFail "Trusted Advisor check $TA_CHECKS_NAME is in error state $QUERY_TA_CHECK_RESULT"
|
||||
;;
|
||||
"warning")
|
||||
textInfo "Trusted Advisor check $TA_CHECKS_NAME is in warning state $QUERY_TA_CHECK_RESULT"
|
||||
;;
|
||||
"not_available")
|
||||
textInfo "Trusted Advisor check $TA_CHECKS_NAME is in not_available state $QUERY_TA_CHECK_RESULT"
|
||||
;;
|
||||
"*")
|
||||
textFail "Trusted Advisor check $TA_CHECKS_NAME is in unknown state $QUERY_TA_CHECK_RESULT"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
50
checks/check_extra727
Normal file
50
checks/check_extra727
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra727="7.27"
|
||||
CHECK_TITLE_extra727="[extra727] Check if SQS queues have policy set as Public (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra727="NOT_SCORED"
|
||||
CHECK_TYPE_extra727="EXTRA"
|
||||
CHECK_ALTERNATE_check727="extra727"
|
||||
|
||||
extra727(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_SQS=$($AWSCLI sqs list-queues $PROFILE_OPT --region $regx --query QueueUrls --output text |grep -v ^None)
|
||||
if [[ $LIST_SQS ]]; then
|
||||
for queue in $LIST_SQS; do
|
||||
SQS_POLICY=$($AWSCLI sqs get-queue-attributes --queue-url $queue $PROFILE_OPT --region $regx --attribute-names All --query Attributes.Policy)
|
||||
if [[ "$SQS_POLICY" != "null" ]]; then
|
||||
SQS_POLICY_ALLOW_ALL=$(echo $SQS_POLICY \
|
||||
| jq '. | fromjson' | jq '.Statement[] | select(.Effect=="Allow") | select(.Principal=="*" or .Principal.AWS=="*" or .Principal.CanonicalUser=="*")')
|
||||
if [[ $SQS_POLICY_ALLOW_ALL ]]; then
|
||||
SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION=$(echo $SQS_POLICY \
|
||||
| jq '. | fromjson' | jq '.Statement[] | select(.Effect=="Allow") | select(.Principal=="*" or .Principal.AWS=="*" or .Principal.CanonicalUser=="*") | select(has("Condition") | not)')
|
||||
if [[ $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION ]]; then
|
||||
SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS=$(echo $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION \
|
||||
| jq '"[Principal: " + (.Principal|tostring) + " Action: " + (.Action|tostring) + "]"' )
|
||||
textFail "$regx: SQS $queue queue policy with public access: $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS" "$regx"
|
||||
else
|
||||
textInfo "$regx: SQS $queue queue policy with public access but has a Condition" "$regx"
|
||||
fi
|
||||
else
|
||||
textPass "$regx: SQS $queue queue without public access" "$regx"
|
||||
fi
|
||||
else
|
||||
textPass "$regx: SQS $queue queue without policy" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No SQS queues found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
37
checks/check_extra728
Normal file
37
checks/check_extra728
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra728="7.28"
|
||||
CHECK_TITLE_extra728="[extra728] Check if SQS queues have Server Side Encryption enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra728="NOT_SCORED"
|
||||
CHECK_TYPE_extra728="EXTRA"
|
||||
CHECK_ALTERNATE_check728="extra728"
|
||||
|
||||
extra728(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_SQS=$($AWSCLI sqs list-queues $PROFILE_OPT --region $regx --query QueueUrls --output text |grep -v ^None)
|
||||
if [[ $LIST_SQS ]]; then
|
||||
for queue in $LIST_SQS; do
|
||||
# check if the policy has KmsMasterKeyId therefore SSE enabled
|
||||
SSE_ENABLED_QUEUE=$($AWSCLI sqs get-queue-attributes --queue-url $queue $PROFILE_OPT --region $regx --attribute-names All --query Attributes.KmsMasterKeyId --output text|grep -v ^None)
|
||||
if [[ $SSE_ENABLED_QUEUE ]]; then
|
||||
textPass "$regx: SQS queue $queue is using Server Side Encryption" "$regx"
|
||||
else
|
||||
textFail "$regx: SQS queue $queue is not using Server Side Encryption" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No SQS queues found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
37
checks/check_extra729
Normal file
37
checks/check_extra729
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra729="7.29"
|
||||
CHECK_TITLE_extra729="[extra729] Ensure there are no EBS Volumes unencrypted (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra729="NOT_SCORED"
|
||||
CHECK_TYPE_extra729="EXTRA"
|
||||
CHECK_ALTERNATE_check729="extra729"
|
||||
|
||||
extra729(){
|
||||
# "Ensure there are no EBS Volumes unencrypted (Not Scored) (Not part of CIS benchmark)"
|
||||
textInfo "Looking for EBS Volumes in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_EBS_NON_ENC_VOLUMES=$($AWSCLI ec2 describe-volumes $PROFILE_OPT --region $regx --query 'Volumes[?Encrypted==`false`].VolumeId' --output text)
|
||||
if [[ $LIST_OF_EBS_NON_ENC_VOLUMES ]];then
|
||||
for volume in $LIST_OF_EBS_NON_ENC_VOLUMES; do
|
||||
textFail "$regx: $volume is not encrypted!" "$regx"
|
||||
done
|
||||
fi
|
||||
LIST_OF_EBS_ENC_VOLUMES=$($AWSCLI ec2 describe-volumes $PROFILE_OPT --region $regx --query 'Volumes[?Encrypted==`true`].VolumeId' --output text)
|
||||
if [[ $LIST_OF_EBS_ENC_VOLUMES ]];then
|
||||
for volume in $LIST_OF_EBS_ENC_VOLUMES; do
|
||||
textPass "$regx: $volume is encrypted" "$regx"
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
154
checks/check_extra73
Normal file
154
checks/check_extra73
Normal file
@@ -0,0 +1,154 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra73="7.3,7.03"
|
||||
CHECK_TITLE_extra73="[extra73] Ensure there are no S3 buckets open to the Everyone or Any AWS user (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra73="NOT_SCORED"
|
||||
CHECK_TYPE_extra73="EXTRA"
|
||||
CHECK_ALTERNATE_extra703="extra73"
|
||||
CHECK_ALTERNATE_check73="extra73"
|
||||
CHECK_ALTERNATE_check703="extra73"
|
||||
|
||||
# Verified with AWS support that if get-bucket-acl doesn't return a grant
|
||||
# for All and get-bucket-policy-status returns IsPublic false or bad request
|
||||
# (no policy) then the bucket can be considered not public - though
|
||||
# individual objects may still be. If in addition put-public-access-block is
|
||||
# used to set IgnorePublicAcls and RestrictPublicBuckets to true then that
|
||||
# causes Amazon S3 to ignore all public ACLs on a bucket and any objects that
|
||||
# it contains.
|
||||
#
|
||||
# This check does not address legacy ACLs or policies that would give
|
||||
# public access if not blocked at account or bucket level, instead it tries
|
||||
# to reward the use of more broadly restrictive controls with quicker and less
|
||||
# computational intensive checks.
|
||||
#
|
||||
# If we are assembling an inventory then maybe that is not what we want but
|
||||
# for day to day usage that is probably desirable.
|
||||
|
||||
extra73(){
|
||||
textInfo "Looking for open S3 Buckets (ACLs and Policies) in all regions... "
|
||||
|
||||
#
|
||||
# If public ACLs disabled at account level then look no further
|
||||
#
|
||||
ACCOUNT_PUBLIC_ACCESS_BLOCK=$($AWSCLI s3control get-public-access-block $PROFILE_OPT --region $REGION --account-id $ACCOUNT_NUM --output json 2>&1)
|
||||
if [[ $(echo "$ACCOUNT_PUBLIC_ACCESS_BLOCK" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Public Access Block for $bucket"
|
||||
return
|
||||
fi
|
||||
if [[ $(echo "$ACCOUNT_PUBLIC_ACCESS_BLOCK" | grep NoSuchPublicAccessBlockConfiguration) ]]; then
|
||||
ACCOUNTIGNOREPUBLICACLS=""
|
||||
ACCOUNTRESTRICTPUBLICBUCKETS=""
|
||||
else
|
||||
ACCOUNTIGNOREPUBLICACLS=$(echo "$ACCOUNT_PUBLIC_ACCESS_BLOCK" | jq -r '.PublicAccessBlockConfiguration.IgnorePublicAcls')
|
||||
ACCOUNTRESTRICTPUBLICBUCKETS=$(echo "$ACCOUNT_PUBLIC_ACCESS_BLOCK" | jq -r '.PublicAccessBlockConfiguration.RestrictPublicBuckets')
|
||||
fi
|
||||
if [[ $ACCOUNTIGNOREPUBLICACLS == "true" && $ACCOUNTRESTRICTPUBLICBUCKETS == "true" ]]; then
|
||||
textPass "All S3 public access blocked at account level"
|
||||
return
|
||||
fi
|
||||
|
||||
#
|
||||
# Otherwise start to iterate bucket
|
||||
#
|
||||
ALL_BUCKETS_LIST=$($AWSCLI s3api list-buckets --query 'Buckets[*].{Name:Name}' $PROFILE_OPT --output text 2>&1)
|
||||
if [[ $(echo "$ALL_BUCKETS_LIST" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to List Buckets"
|
||||
return
|
||||
fi
|
||||
if [[ "$ALL_BUCKETS_LIST" == "" ]]; then
|
||||
textInfo "No buckets found"
|
||||
return
|
||||
fi
|
||||
|
||||
for bucket in $ALL_BUCKETS_LIST; do
|
||||
|
||||
#
|
||||
# LOCATION - requests referencing buckets created after March 20, 2019
|
||||
# must be made to S3 endpoints in the same region as the bucket was
|
||||
# created.
|
||||
#
|
||||
BUCKET_LOCATION=$($AWSCLI s3api get-bucket-location --bucket $bucket $PROFILE_OPT --output text 2>&1)
|
||||
if [[ $(echo "$BUCKET_LOCATION" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Bucket Location for $bucket"
|
||||
continue
|
||||
fi
|
||||
if [[ "None" == $BUCKET_LOCATION ]]; then
|
||||
BUCKET_LOCATION="us-east-1"
|
||||
fi
|
||||
if [[ "EU" == $BUCKET_LOCATION ]]; then
|
||||
BUCKET_LOCATION="eu-west-1"
|
||||
fi
|
||||
|
||||
#
|
||||
# If public ACLs disabled at bucket level then look no further
|
||||
#
|
||||
BUCKET_PUBLIC_ACCESS_BLOCK=$($AWSCLI s3api get-public-access-block $PROFILE_OPT --region $BUCKET_LOCATION --bucket $bucket --output json 2>&1)
|
||||
if [[ $(echo "$BUCKET_PUBLIC_ACCESS_BLOCK" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Public Access Block for $bucket"
|
||||
continue
|
||||
fi
|
||||
if [[ $(echo "$BUCKET_PUBLIC_ACCESS_BLOCK" | grep NoSuchPublicAccessBlockConfiguration) ]]; then
|
||||
BUCKETIGNOREPUBLICACLS=""
|
||||
BUCKETRESTRICTPUBLICBUCKETS=""
|
||||
else
|
||||
BUCKETIGNOREPUBLICACLS=$(echo "$BUCKET_PUBLIC_ACCESS_BLOCK" | jq -r '.PublicAccessBlockConfiguration.IgnorePublicAcls')
|
||||
BUCKETRESTRICTPUBLICBUCKETS=$(echo "$BUCKET_PUBLIC_ACCESS_BLOCK" | jq -r '.PublicAccessBlockConfiguration.RestrictPublicBuckets')
|
||||
fi
|
||||
if [[ $BUCKETIGNOREPUBLICACLS == "true" && $BUCKETRESTRICTPUBLICBUCKETS == "true" ]]; then
|
||||
textPass "$BUCKET_LOCATION: $bucket bucket is not Public" "$BUCKET_LOCATION"
|
||||
continue
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for public ACL grants
|
||||
#
|
||||
BUCKET_ACL=$($AWSCLI s3api get-bucket-acl $PROFILE_OPT --region $BUCKET_LOCATION --bucket $bucket --output json 2>&1)
|
||||
if [[ $(echo "$BUCKET_ACL" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Bucket Acl for $bucket"
|
||||
continue
|
||||
fi
|
||||
|
||||
ALLUSERS_ACL=$(echo "$BUCKET_ACL" | jq '.Grants[]|select(.Grantee.URI != null)|select(.Grantee.URI | endswith("/AllUsers"))')
|
||||
if [[ $ALLUSERS_ACL != "" ]]; then
|
||||
textFail "$BUCKET_LOCATION: $bucket bucket is Public!" "$BUCKET_LOCATION"
|
||||
continue
|
||||
fi
|
||||
|
||||
AUTHENTICATEDUSERS_ACL=$(echo "$BUCKET_ACL" | jq '.Grants[]|select(.Grantee.URI != null)|select(.Grantee.URI | endswith("/AuthenticatedUsers"))')
|
||||
if [[ $AUTHENTICATEDUSERS_ACL != "" ]]; then
|
||||
textFail "$BUCKET_LOCATION: $bucket bucket is Public!" "$BUCKET_LOCATION"
|
||||
continue
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for public access in policy
|
||||
#
|
||||
BUCKET_POLICY_STATUS=$($AWSCLI s3api get-bucket-policy-status $PROFILE_OPT --region $BUCKET_LOCATION --bucket $bucket --query PolicyStatus.IsPublic --output text 2>&1)
|
||||
if [[ $(echo "$BUCKET_POLICY_STATUS" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Bucket Policy Status for $bucket"
|
||||
continue
|
||||
fi
|
||||
if [[ $(echo "$BUCKET_POLICY_STATUS" | grep NoSuchBucketPolicy) ]]; then
|
||||
BUCKET_POLICY_STATUS="False"
|
||||
fi
|
||||
|
||||
if [[ $BUCKET_POLICY_STATUS != "" && $BUCKET_POLICY_STATUS != "False" ]]; then
|
||||
textFail "$BUCKET_LOCATION: $bucket bucket is Public!" "$BUCKET_LOCATION"
|
||||
continue
|
||||
fi
|
||||
|
||||
textPass "$BUCKET_LOCATION: $bucket bucket is not Public" "$BUCKET_LOCATION"
|
||||
|
||||
done
|
||||
}
|
||||
43
checks/check_extra730
Normal file
43
checks/check_extra730
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
DAYS_TO_EXPIRE_THRESHOLD="7"
|
||||
|
||||
CHECK_ID_extra730="7.30"
|
||||
CHECK_TITLE_extra730="[extra730] Check if ACM Certificates are about to expire in $DAYS_TO_EXPIRE_THRESHOLD days or less (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra730="NOT_SCORED"
|
||||
CHECK_TYPE_extra730="EXTRA"
|
||||
CHECK_ALTERNATE_check730="extra730"
|
||||
|
||||
extra730(){
|
||||
# "Check if ACM Certificates are about to expire in $DAYS_TO_EXPIRE_THRESHOLD days or less"
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_ACM_CERTS=$($AWSCLI acm list-certificates $PROFILE_OPT --region $regx --query 'CertificateSummaryList[].CertificateArn' --output text)
|
||||
if [[ $LIST_OF_ACM_CERTS ]];then
|
||||
for cert in $LIST_OF_ACM_CERTS; do
|
||||
CERT_DATA=$($AWSCLI acm describe-certificate $PROFILE_OPT --region $regx --certificate-arn $cert --query 'Certificate.[DomainName,NotAfter]' --output text)
|
||||
echo "$CERT_DATA" | while read FQDN NOTAFTER; do
|
||||
EXPIRES_DATE=$(timestamp_to_date $NOTAFTER)
|
||||
COUNTER_DAYS=$(how_many_days_from_today $EXPIRES_DATE)
|
||||
if [[ $COUNTER_DAYS -le $DAYS_TO_EXPIRE_THRESHOLD ]]; then
|
||||
textFail "$regx: Certificate for $FQDN is about to expire in $COUNTER_DAYS days!" "$regx"
|
||||
else
|
||||
textPass "$regx: Certificate for $FQDN expires in $COUNTER_DAYS days" "$regx"
|
||||
fi
|
||||
done
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No certificates found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
47
checks/check_extra731
Normal file
47
checks/check_extra731
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra731="7.31"
|
||||
CHECK_TITLE_extra731="[extra731] Check if SNS topics have policy set as Public (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra731="NOT_SCORED"
|
||||
CHECK_TYPE_extra731="EXTRA"
|
||||
CHECK_ALTERNATE_check731="extra731"
|
||||
|
||||
extra731(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_SNS=$($AWSCLI sns list-topics $PROFILE_OPT --region $regx --query Topics --output text |grep -v ^None)
|
||||
if [[ $LIST_SNS ]]; then
|
||||
for topic in $LIST_SNS; do
|
||||
SHORT_TOPIC=$(echo $topic| cut -d: -f6)
|
||||
SNS_POLICY=$($AWSCLI sns get-topic-attributes --topic-arn $topic $PROFILE_OPT --region $regx --query Attributes.Policy 2>/dev/null)
|
||||
SNS_POLICY_ALLOW_ALL=$(echo $SNS_POLICY \
|
||||
| jq '. | fromjson' | jq '.Statement[] | select(.Effect=="Allow") | select(.Principal=="*" or .Principal.AWS=="*" or .Principal.CanonicalUser=="*")')
|
||||
if [[ $SNS_POLICY_ALLOW_ALL ]]; then
|
||||
SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION=$(echo $SNS_POLICY \
|
||||
| jq '. | fromjson' | jq '.Statement[] | select(.Effect=="Allow") | select(.Principal=="*" or .Principal.AWS=="*" or .Principal.CanonicalUser=="*") | select(has("Condition") | not)')
|
||||
if [[ $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION ]]; then
|
||||
SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS=$(echo $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION \
|
||||
| jq '"[Principal: " + (.Principal|tostring) + " Action: " + (.Action|tostring) + "]"' )
|
||||
textFail "$regx: SNS topic $SHORT_TOPIC's policy with public access: $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS" "$SHORT_TOPIC" "$regx"
|
||||
else
|
||||
textPass "$regx: SNS topic $SHORT_TOPIC's policy with public access but has a Condition" "$SHORT_TOPIC" "$regx"
|
||||
fi
|
||||
else
|
||||
textPass "$regx: SNS topic without public access" "$SHORT_TOPIC" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No SNS topic found" "$SHORT_TOPIC" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
34
checks/check_extra732
Normal file
34
checks/check_extra732
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra732="7.32"
|
||||
CHECK_TITLE_extra732="[extra732] Check if Geo restrictions are enabled in CloudFront distributions (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra732="NOT_SCORED"
|
||||
CHECK_TYPE_extra732="EXTRA"
|
||||
CHECK_ALTERNATE_check732="extra732"
|
||||
|
||||
extra732(){
|
||||
LIST_DISTRIBUTIONS=$($AWSCLI cloudfront list-distributions $PROFILE_OPT --query 'DistributionList.Items[*].Id' --output text |grep -v ^None)
|
||||
if [[ $LIST_DISTRIBUTIONS ]]; then
|
||||
for dist in $LIST_DISTRIBUTIONS; do
|
||||
GEO_ENABLED=$($AWSCLI cloudfront get-distribution-config $PROFILE_OPT --id $dist --query DistributionConfig.Restrictions.GeoRestriction.RestrictionType --output text)
|
||||
if [[ $GEO_ENABLED == "none" ]]; then
|
||||
textFail "CloudFront distribution $dist has not Geo restrictions"
|
||||
else
|
||||
textPass "CloudFront distribution $dist has Geo restrictions enabled"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "No CloudFront distributions found"
|
||||
fi
|
||||
}
|
||||
30
checks/check_extra733
Normal file
30
checks/check_extra733
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra733="7.33"
|
||||
CHECK_TITLE_extra733="[extra733] Check if there are SAML Providers then STS can be used (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra733="NOT_SCORED"
|
||||
CHECK_TYPE_extra733="EXTRA"
|
||||
CHECK_ALTERNATE_check733="extra733"
|
||||
|
||||
extra733(){
|
||||
LIST_SAML_PROV=$($AWSCLI iam list-saml-providers $PROFILE_OPT --query 'SAMLProviderList[*].Arn' --output text |grep -v ^None)
|
||||
if [[ $LIST_SAML_PROV ]]; then
|
||||
for provider in $LIST_SAML_PROV; do
|
||||
PROVIDER_NAME=$(echo $provider| cut -d/ -f2)
|
||||
textInfo "SAML Provider $PROVIDER_NAME has been found"
|
||||
done
|
||||
else
|
||||
textInfo "No SAML Provider found, add one and use STS"
|
||||
fi
|
||||
}
|
||||
74
checks/check_extra734
Normal file
74
checks/check_extra734
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra734="7.34"
|
||||
CHECK_TITLE_extra734="[extra734] Check if S3 buckets have default encryption (SSE) enabled or use a bucket policy to enforce it (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra734="NOT_SCORED"
|
||||
CHECK_TYPE_extra734="EXTRA"
|
||||
CHECK_ALTERNATE_check734="extra734"
|
||||
|
||||
extra734(){
|
||||
LIST_OF_BUCKETS=$($AWSCLI s3api list-buckets $PROFILE_OPT --query Buckets[*].Name --output text|xargs -n1)
|
||||
if [[ $LIST_OF_BUCKETS ]]; then
|
||||
for bucket in $LIST_OF_BUCKETS;do
|
||||
|
||||
# For this test to pass one of the following must be present:
|
||||
# - Configure ServerSideEncryptionConfiguration rule for AES256 or aws:kms
|
||||
# OR
|
||||
# - Have bucket policy denying s3:PutObject when s3:x-amz-server-side-encryption is absent
|
||||
|
||||
# query to get if has encryption enabled or not
|
||||
RESULT=$($AWSCLI s3api get-bucket-encryption $PROFILE_OPT --bucket $bucket --query ServerSideEncryptionConfiguration.Rules[].ApplyServerSideEncryptionByDefault[].SSEAlgorithm --output text 2>&1)
|
||||
if [[ $(echo "$RESULT" | grep AccessDenied) ]]; then
|
||||
textFail "Access Denied Trying to Get Encryption for $bucket"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $RESULT == "AES256" || $RESULT == "aws:kms" ]];
|
||||
then
|
||||
textPass "Bucket $bucket is enabled for default encryption with $RESULT"
|
||||
continue
|
||||
fi
|
||||
|
||||
TEMP_SSE_POLICY_FILE=$(mktemp -t prowler-${ACCOUNT_NUM}-${bucket}.policy.XXXXXXXXXX)
|
||||
|
||||
# get bucket policy
|
||||
$AWSCLI s3api get-bucket-policy $PROFILE_OPT --bucket $bucket --output text --query Policy > $TEMP_SSE_POLICY_FILE 2>&1
|
||||
if [[ $(grep AccessDenied $TEMP_SSE_POLICY_FILE) ]]; then
|
||||
textFail "Access Denied Trying to Get Bucket Policy for $bucket"
|
||||
rm -f $TEMP_SSE_POLICY_FILE
|
||||
continue
|
||||
fi
|
||||
if [[ $(grep NoSuchBucketPolicy $TEMP_SSE_POLICY_FILE) ]]; then
|
||||
textFail "No bucket policy for $bucket"
|
||||
rm -f $TEMP_SSE_POLICY_FILE
|
||||
continue
|
||||
fi
|
||||
|
||||
# check if the S3 policy forces SSE s3:x-amz-server-side-encryption:true
|
||||
CHECK_BUCKET_SSE_POLICY_PRESENT=$(cat $TEMP_SSE_POLICY_FILE | jq --arg arn "arn:aws:s3:::${bucket}/*" '.Statement[]|select(.Effect=="Deny" and ((.Principal|type == "object") and .Principal.AWS == "*") or ((.Principal|type == "string") and .Principal == "*") and .Action=="s3:PutObject" and .Resource==$arn and .Condition.StringEquals."s3:x-amz-server-side-encryption" != null)')
|
||||
if [[ $CHECK_BUCKET_SSE_POLICY_PRESENT == "" ]]; then
|
||||
textFail "Bucket $bucket does not enforce encryption!"
|
||||
rm -f $TEMP_SSE_POLICY_FILE
|
||||
continue
|
||||
fi
|
||||
CHECK_BUCKET_SSE_POLICY_VALUE=$(echo "$CHECK_BUCKET_SSE_POLICY_PRESENT" | jq -r '.Condition.StringNotEquals."s3:x-amz-server-side-encryption"')
|
||||
|
||||
textPass "Bucket $bucket has S3 bucket policy to enforce encryption with $CHECK_BUCKET_SSE_POLICY_VALUE"
|
||||
|
||||
rm -f $TEMP_SSE_POLICY_FILE
|
||||
done
|
||||
|
||||
else
|
||||
textInfo "No S3 Buckets found"
|
||||
fi
|
||||
}
|
||||
36
checks/check_extra735
Normal file
36
checks/check_extra735
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra735="7.35"
|
||||
CHECK_TITLE_extra735="[extra735] Check if RDS instances storage is encrypted (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra735="NOT_SCORED"
|
||||
CHECK_TYPE_extra735="EXTRA"
|
||||
CHECK_ALTERNATE_check735="extra735"
|
||||
|
||||
extra735(){
|
||||
textInfo "Looking for RDS Volumes in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_RDS_INSTANCES=$($AWSCLI rds describe-db-instances $PROFILE_OPT --region $regx --query 'DBInstances[*].DBInstanceIdentifier' --output text)
|
||||
if [[ $LIST_OF_RDS_INSTANCES ]];then
|
||||
for rdsinstance in $LIST_OF_RDS_INSTANCES; do
|
||||
IS_ENCRYPTED=$($AWSCLI rds describe-db-instances $PROFILE_OPT --region $regx --db-instance-identifier $rdsinstance --query 'DBInstances[*].StorageEncrypted' --output text)
|
||||
if [[ $IS_ENCRYPTED == "False" ]]; then
|
||||
textFail "$regx: RDS instance $rdsinstance is not encrypted!" "$regx"
|
||||
else
|
||||
textPass "$regx: RDS instance $rdsinstance is encrypted" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No RDS instances found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
36
checks/check_extra736
Normal file
36
checks/check_extra736
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra736="7.36"
|
||||
CHECK_TITLE_extra736="[extra736] Check exposed KMS keys (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra736="NOT_SCORED"
|
||||
CHECK_TYPE_extra736="EXTRA"
|
||||
CHECK_ALTERNATE_check736="extra736"
|
||||
|
||||
extra736(){
|
||||
textInfo "Looking for KMS keys in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_CUSTOMER_KMS_KEYS=$($AWSCLI kms list-aliases $PROFILE_OPT --region $regx --output text |grep -v :alias/aws/ |awk '{ print $4 }')
|
||||
if [[ $LIST_OF_CUSTOMER_KMS_KEYS ]];then
|
||||
for key in $LIST_OF_CUSTOMER_KMS_KEYS; do
|
||||
CHECK_POLICY=$($AWSCLI kms get-key-policy --key-id $key --policy-name default $PROFILE_OPT --region $regx --output text|awk '/Principal/{n=NR+1} n>=NR' |grep AWS\"\ :\ \"\\*\"$)
|
||||
if [[ $CHECK_POLICY ]]; then
|
||||
textFail "$regx: KMS key $key may be publicly accessible!" "$regx"
|
||||
else
|
||||
textPass "$regx: KMS key $key is not exposed to Public" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No KMS keys found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
36
checks/check_extra737
Normal file
36
checks/check_extra737
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra737="7.37"
|
||||
CHECK_TITLE_extra737="[extra737] Check KMS keys with key rotation disabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra737="NOT_SCORED"
|
||||
CHECK_TYPE_extra737="EXTRA"
|
||||
CHECK_ALTERNATE_check737="extra737"
|
||||
|
||||
extra737(){
|
||||
textInfo "Looking for KMS keys in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_CUSTOMER_KMS_KEYS=$($AWSCLI kms list-aliases $PROFILE_OPT --region $regx --output text |grep -v :alias/aws/ |awk '{ print $4 }')
|
||||
if [[ $LIST_OF_CUSTOMER_KMS_KEYS ]];then
|
||||
for key in $LIST_OF_CUSTOMER_KMS_KEYS; do
|
||||
CHECK_ROTATION=$($AWSCLI kms get-key-rotation-status --key-id $key $PROFILE_OPT --region $regx --output text)
|
||||
if [[ $CHECK_ROTATION == "False" ]]; then
|
||||
textFail "$regx: KMS key $key has rotation disabled!" "$regx"
|
||||
else
|
||||
textPass "$regx: KMS key $key has rotation enabled" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No KMS keys found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
35
checks/check_extra738
Normal file
35
checks/check_extra738
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra738="7.38"
|
||||
CHECK_TITLE_extra738="[extra738] Check if CloudFront distributions are set to HTTPS (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra738="NOT_SCORED"
|
||||
CHECK_TYPE_extra738="EXTRA"
|
||||
CHECK_ALTERNATE_check738="extra738"
|
||||
|
||||
extra738(){
|
||||
LIST_OF_DISTRIBUTIONS=$($AWSCLI cloudfront list-distributions --query 'DistributionList.Items[*].Id' $PROFILE_OPT --output text|grep -v ^None)
|
||||
if [[ $LIST_OF_DISTRIBUTIONS ]];then
|
||||
for dist in $LIST_OF_DISTRIBUTIONS; do
|
||||
CHECK_HTTPS_STATUS=$($AWSCLI cloudfront get-distribution --id $dist --query Distribution.DistributionConfig.DefaultCacheBehavior.ViewerProtocolPolicy $PROFILE_OPT --output text)
|
||||
if [[ $CHECK_HTTPS_STATUS == "allow-all" ]]; then
|
||||
textFail "CloudFront distribution $dist viewers can use HTTP or HTTPS!" "$regx"
|
||||
elif [[ $CHECK_HTTPS_STATUS == "redirect-to-https" ]]; then
|
||||
textPass "CloudFront distribution $dist has redirect to HTTPS" "$regx"
|
||||
else
|
||||
textPass "CloudFront distribution $dist has HTTPS only" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "No CloudFront distributions found" "$regx"
|
||||
fi
|
||||
}
|
||||
36
checks/check_extra739
Normal file
36
checks/check_extra739
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra739="7.39"
|
||||
CHECK_TITLE_extra739="[extra739] Check if RDS instances have backup enabled (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra739="NOT_SCORED"
|
||||
CHECK_TYPE_extra739="EXTRA"
|
||||
CHECK_ALTERNATE_check739="extra739"
|
||||
|
||||
extra739(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_RDS_INSTANCES=$($AWSCLI rds describe-db-instances $PROFILE_OPT --region $regx --query 'DBInstances[*].DBInstanceIdentifier' --output text)
|
||||
if [[ $LIST_OF_RDS_INSTANCES ]];then
|
||||
for rdsinstance in $LIST_OF_RDS_INSTANCES; do
|
||||
# if retention is 0 then is disabled
|
||||
BACKUP_RETENTION=$($AWSCLI rds describe-db-instances $PROFILE_OPT --region $regx --db-instance-identifier $rdsinstance --query 'DBInstances[*].BackupRetentionPeriod' --output text)
|
||||
if [[ $BACKUP_RETENTION == "0" ]]; then
|
||||
textFail "$regx: RDS instance $rdsinstance has not backup enabled!" "$regx"
|
||||
else
|
||||
textPass "$regx: RDS instance $rdsinstance has backup enabled with retention period $BACKUP_RETENTION days " "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No RDS instances found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
35
checks/check_extra74
Normal file
35
checks/check_extra74
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra74="7.4,7.04"
|
||||
CHECK_TITLE_extra74="[extra74] Ensure there are no Security Groups without ingress filtering being used (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra74="NOT_SCORED"
|
||||
CHECK_TYPE_extra74="EXTRA"
|
||||
CHECK_ALTERNATE_extra704="extra74"
|
||||
CHECK_ALTERNATE_check74="extra74"
|
||||
CHECK_ALTERNATE_check704="extra74"
|
||||
|
||||
extra74(){
|
||||
# "Ensure there are no Security Groups without ingress filtering being used (Not Scored) (Not part of CIS benchmark)"
|
||||
textInfo "Looking for Security Groups in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_SECURITYGROUPS=$($AWSCLI ec2 describe-security-groups $PROFILE_OPT --region $regx --filters "Name=ip-permission.cidr,Values=0.0.0.0/0" --query "SecurityGroups[].[GroupId]" --output text --max-items $MAXITEMS)
|
||||
for SG_ID in $LIST_OF_SECURITYGROUPS; do
|
||||
SG_NO_INGRESS_FILTER=$($AWSCLI ec2 describe-network-interfaces $PROFILE_OPT --region $regx --filters "Name=group-id,Values=$SG_ID" --query "length(NetworkInterfaces)" --output text)
|
||||
if [[ $SG_NO_INGRESS_FILTER -ne 0 ]];then
|
||||
textFail "$regx: $SG_ID has no ingress filtering and it is being used!" "$regx"
|
||||
else
|
||||
textInfo "$regx: $SG_ID has no ingress filtering but it is not being used" "$regx"
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
36
checks/check_extra740
Normal file
36
checks/check_extra740
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra740="7.40"
|
||||
CHECK_TITLE_extra740="[extra740] Check if EBS snapshots are encrypted (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra740="NOT_SCORED"
|
||||
CHECK_TYPE_extra740="EXTRA"
|
||||
CHECK_ALTERNATE_check740="extra740"
|
||||
|
||||
extra740(){
|
||||
textInfo "Looking for EBS Snapshots in all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_EBS_SNAPSHOTS=$($AWSCLI ec2 describe-snapshots $PROFILE_OPT --region $regx --owner-ids $ACCOUNT_NUM --output text --query 'Snapshots[*].{ID:SnapshotId}' --max-items $MAXITEMS | grep -v None 2> /dev/null)
|
||||
if [[ $LIST_OF_EBS_SNAPSHOTS ]];then
|
||||
for snapshot in $LIST_OF_EBS_SNAPSHOTS; do
|
||||
SNAPSHOT_IS_ENCRYPTED=$($AWSCLI ec2 describe-snapshots $PROFILE_OPT --region $regx --output text --snapshot-id $snapshot --query Snapshots[*].Encrypted|grep False)
|
||||
if [[ $SNAPSHOT_IS_ENCRYPTED ]];then
|
||||
textFail "$regx: $snapshot is currently not encrypted!" "$regx"
|
||||
else
|
||||
textPass "$regx: $snapshot is encrypted" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No EBS Snapshots found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
68
checks/check_extra741
Normal file
68
checks/check_extra741
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2019) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra741="7.41"
|
||||
CHECK_TITLE_extra741="[extra741] Find secrets in EC2 User Data (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra741="NOT_SCORED"
|
||||
CHECK_TYPE_extra741="EXTRA"
|
||||
CHECK_ALTERNATE_check741="extra741"
|
||||
|
||||
extra741(){
|
||||
SECRETS_TEMP_FOLDER="$PROWLER_DIR/secrets-$ACCOUNT_NUM"
|
||||
if [[ ! -d $SECRETS_TEMP_FOLDER ]]; then
|
||||
# this folder is deleted once this check is finished
|
||||
mkdir $SECRETS_TEMP_FOLDER
|
||||
fi
|
||||
|
||||
textInfo "Looking for secrets in EC2 User Data in instances across all regions... (max 100 instances per region use -m to increase it) "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_EC2_INSTANCES=$($AWSCLI ec2 describe-instances $PROFILE_OPT --region $regx --query Reservations[*].Instances[*].InstanceId --output text --max-items $MAXITEMS | grep -v None)
|
||||
if [[ $LIST_OF_EC2_INSTANCES ]];then
|
||||
for instance in $LIST_OF_EC2_INSTANCES; do
|
||||
EC2_USERDATA_FILE="$SECRETS_TEMP_FOLDER/extra741-$instance-userData.decoded"
|
||||
EC2_USERDATA=$($AWSCLI ec2 describe-instance-attribute --attribute userData $PROFILE_OPT --region $regx --instance-id $instance --query UserData.Value --output text| grep -v ^None | decode_report > $EC2_USERDATA_FILE)
|
||||
if [ -s $EC2_USERDATA_FILE ];then
|
||||
FILE_FORMAT_ASCII=$(file -b $EC2_USERDATA_FILE|grep ASCII)
|
||||
# This finds ftp or http URLs with credentials and common keywords
|
||||
# FINDINGS=$(egrep -i '[[:alpha:]]*://[[:alnum:]]*:[[:alnum:]]*@.*/|key|secret|token|pass' $EC2_USERDATA_FILE |wc -l|tr -d '\ ')
|
||||
# New implementation using https://github.com/Yelp/detect-secrets
|
||||
if [[ $FILE_FORMAT_ASCII ]]; then
|
||||
FINDINGS=$(secretsDetector file $EC2_USERDATA_FILE)
|
||||
if [[ $FINDINGS -eq 0 ]]; then
|
||||
textPass "$regx: No secrets found in $instance" "$regx"
|
||||
# delete file if nothing interesting is there
|
||||
rm -f $EC2_USERDATA_FILE
|
||||
else
|
||||
textFail "$regx: Potential secret found in $instance" "$regx"
|
||||
# delete file to not leave trace, user must look at the instance User Data
|
||||
rm -f $EC2_USERDATA_FILE
|
||||
fi
|
||||
else
|
||||
mv $EC2_USERDATA_FILE $EC2_USERDATA_FILE.gz ; gunzip $EC2_USERDATA_FILE.gz
|
||||
FINDINGS=$(secretsDetector file $EC2_USERDATA_FILE)
|
||||
if [[ $FINDINGS -eq 0 ]]; then
|
||||
textPass "$regx: No secrets found in $instance User Data" "$regx"
|
||||
rm -f $EC2_USERDATA_FILE
|
||||
else
|
||||
textFail "$regx: Potential secret found in $instance" "$regx"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
textPass "$regx: No secrets found in $instance User Data or it is empty" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No EC2 instances found" "$regx"
|
||||
fi
|
||||
done
|
||||
rm -rf $SECRETS_TEMP_FOLDER
|
||||
}
|
||||
56
checks/check_extra742
Normal file
56
checks/check_extra742
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2019) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra742="7.42"
|
||||
CHECK_TITLE_extra742="[extra742] Find secrets in CloudFormation outputs (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra742="NOT_SCORED"
|
||||
CHECK_TYPE_extra742="EXTRA"
|
||||
CHECK_ALTERNATE_check742="extra742"
|
||||
|
||||
extra742(){
|
||||
SECRETS_TEMP_FOLDER="$PROWLER_DIR/secrets-$ACCOUNT_NUM"
|
||||
if [[ ! -d $SECRETS_TEMP_FOLDER ]]; then
|
||||
# this folder is deleted once this check is finished
|
||||
mkdir $SECRETS_TEMP_FOLDER
|
||||
fi
|
||||
|
||||
textInfo "Looking for secrets in CloudFormation output across all regions... "
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_CFN_STACKS=$($AWSCLI cloudformation describe-stacks $PROFILE_OPT --region $regx --query Stacks[*].[StackName] --output text)
|
||||
if [[ $LIST_OF_CFN_STACKS ]];then
|
||||
for stack in $LIST_OF_CFN_STACKS; do
|
||||
CFN_OUTPUTS_FILE="$SECRETS_TEMP_FOLDER/extra742-$stack-$regx-outputs.txt"
|
||||
CFN_OUTPUTS=$($AWSCLI $PROFILE_OPT --region $regx cloudformation describe-stacks --query "Stacks[?StackName==\`$stack\`].Outputs[*].[OutputKey,OutputValue]" --output text > $CFN_OUTPUTS_FILE)
|
||||
if [ -s $CFN_OUTPUTS_FILE ];then
|
||||
# This finds ftp or http URLs with credentials and common keywords
|
||||
# FINDINGS=$(egrep -i '[[:alpha:]]*://[[:alnum:]]*:[[:alnum:]]*@.*/|key|secret|token|pass' $CFN_OUTPUTS_FILE |wc -l|tr -d '\ ')
|
||||
# New implementation using https://github.com/Yelp/detect-secrets
|
||||
FINDINGS=$(secretsDetector file $CFN_OUTPUTS_FILE)
|
||||
if [[ $FINDINGS -eq 0 ]]; then
|
||||
textPass "$regx: No secrets found in stack $stack Outputs" "$regx"
|
||||
# delete file if nothing interesting is there
|
||||
rm -f $CFN_OUTPUTS_FILE
|
||||
else
|
||||
textFail "$regx: Potential secret found in stack $stack Outputs" "$regx"
|
||||
# delete file to not leave trace, user must look at the CFN Stack
|
||||
rm -f $CFN_OUTPUTS_FILE
|
||||
fi
|
||||
else
|
||||
textInfo "$regx: CloudFormation stack $stack has no Outputs" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No CloudFormation stacks found" "$regx"
|
||||
fi
|
||||
done
|
||||
rm -rf $SECRETS_TEMP_FOLDER
|
||||
}
|
||||
41
checks/check_extra743
Normal file
41
checks/check_extra743
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2019) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra743="7.43"
|
||||
CHECK_TITLE_extra743="[extra743] Check if API Gateway has client certificate enabled to access your backend endpoint (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra743="NOT_SCORED"
|
||||
CHECK_TYPE_extra743="EXTRA"
|
||||
CHECK_ALTERNATE_check743="extra743"
|
||||
|
||||
extra743(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_REST_APIS=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-rest-apis --query 'items[*].id' --output text)
|
||||
if [[ $LIST_OF_REST_APIS ]];then
|
||||
for api in $LIST_OF_REST_APIS; do
|
||||
API_GW_NAME=$($AWSCLI apigateway get-rest-apis $PROFILE_OPT --region $regx --query "items[?id==\`$api\`].name" --output text)
|
||||
LIST_OF_STAGES=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-stages --rest-api-id $api --query 'item[*].stageName' --output text)
|
||||
if [[ $LIST_OF_STAGES ]]; then
|
||||
for stage in $LIST_OF_STAGES; do
|
||||
CHECK_CERTIFICATE=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-stages --rest-api-id $api --query "item[?stageName==\`$stage\`].clientCertificateId" --output text)
|
||||
if [[ $CHECK_CERTIFICATE ]]; then
|
||||
textPass "$regx: API Gateway $API_GW_NAME ID $api in $stage has client certificate enabled" "$regx"
|
||||
else
|
||||
textFail "$regx: API Gateway $API_GW_NAME ID $api in $stage has not client certificate enabled" "$regx"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No API Gateways found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
41
checks/check_extra744
Normal file
41
checks/check_extra744
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2019) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra744="7.44"
|
||||
CHECK_TITLE_extra744="[extra744] Check if API Gateway has a WAF ACL attached (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra744="NOT_SCORED"
|
||||
CHECK_TYPE_extra744="EXTRA"
|
||||
CHECK_ALTERNATE_check744="extra744"
|
||||
|
||||
extra744(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_REST_APIS=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-rest-apis --query 'items[*].id' --output text)
|
||||
if [[ $LIST_OF_REST_APIS ]];then
|
||||
for api in $LIST_OF_REST_APIS; do
|
||||
API_GW_NAME=$($AWSCLI apigateway get-rest-apis $PROFILE_OPT --region $regx --query "items[?id==\`$api\`].name" --output text)
|
||||
LIST_OF_STAGES=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-stages --rest-api-id $api --query 'item[*].stageName' --output text)
|
||||
if [[ $LIST_OF_STAGES ]]; then
|
||||
for stage in $LIST_OF_STAGES; do
|
||||
CHECK_WAFACL=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-stages --rest-api-id $api --query "item[?stageName==\`$stage\`].webAclArn" --output text)
|
||||
if [[ $CHECK_WAFACL ]]; then
|
||||
textPass "$regx: API Gateway $API_GW_NAME ID $api in $stage has $CHECK_WAFACL WAF ACL attached" "$regx"
|
||||
else
|
||||
textFail "$regx: API Gateway $API_GW_NAME ID $api in $stage has not WAF ACL attached" "$regx"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No API Gateways found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
43
checks/check_extra745
Normal file
43
checks/check_extra745
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2019) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra745="7.45"
|
||||
CHECK_TITLE_extra745="[extra745] Check if API Gateway endpoint is public or private (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra745="NOT_SCORED"
|
||||
CHECK_TYPE_extra745="EXTRA"
|
||||
CHECK_ALTERNATE_check745="extra745"
|
||||
|
||||
extra745(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_REST_APIS=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-rest-apis --query 'items[*].id' --output text)
|
||||
if [[ $LIST_OF_REST_APIS ]];then
|
||||
for api in $LIST_OF_REST_APIS; do
|
||||
API_GW_NAME=$($AWSCLI apigateway get-rest-apis $PROFILE_OPT --region $regx --query "items[?id==\`$api\`].name" --output text)
|
||||
ENDPOINT_CONFIG_TYPE=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-rest-api --rest-api-id $api --query endpointConfiguration.types --output text)
|
||||
if [[ $ENDPOINT_CONFIG_TYPE ]]; then
|
||||
case $ENDPOINT_CONFIG_TYPE in
|
||||
PRIVATE )
|
||||
textPass "$regx: API Gateway $API_GW_NAME ID $api is set as $ENDPOINT_CONFIG_TYPE" "$regx"
|
||||
;;
|
||||
REGIONAL )
|
||||
textFail "$regx: API Gateway $API_GW_NAME ID $api is internet accesible as $ENDPOINT_CONFIG_TYPE" "$regx"
|
||||
;;
|
||||
EDGE )
|
||||
textFail "$regx: API Gateway $API_GW_NAME ID $api is internet accesible as $ENDPOINT_CONFIG_TYPE" "$regx"
|
||||
esac
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No API Gateways found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
36
checks/check_extra746
Normal file
36
checks/check_extra746
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2019) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
CHECK_ID_extra746="7.46"
|
||||
CHECK_TITLE_extra746="[extra746] Check if API Gateway has configured authorizers (Not Scored) (Not part of CIS benchmark)"
|
||||
CHECK_SCORED_extra746="NOT_SCORED"
|
||||
CHECK_TYPE_extra746="EXTRA"
|
||||
CHECK_ALTERNATE_check746="extra746"
|
||||
|
||||
extra746(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_REST_APIS=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-rest-apis --query 'items[*].id' --output text)
|
||||
if [[ $LIST_OF_REST_APIS ]];then
|
||||
for api in $LIST_OF_REST_APIS; do
|
||||
API_GW_NAME=$($AWSCLI apigateway get-rest-apis $PROFILE_OPT --region $regx --query "items[?id==\`$api\`].name" --output text)
|
||||
AUTHORIZER_CONFIGURED=$($AWSCLI $PROFILE_OPT --region $regx apigateway get-authorizers --rest-api-id $api --query items[*].type --output text)
|
||||
if [[ $AUTHORIZER_CONFIGURED ]]; then
|
||||
textPass "$regx: API Gateway $API_GW_NAME ID $api has authorizer configured" "$regx"
|
||||
else
|
||||
textFail "$regx: API Gateway $API_GW_NAME ID $api has not authorizer configured" "$regx"
|
||||
fi
|
||||
done
|
||||
else
|
||||
textInfo "$regx: No API Gateways found" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user