|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2020 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing the default values for some check modules. |
|
8 """ |
|
9 |
|
10 SecurityDefaults = { |
|
11 # generalHardcodedTmp.py |
|
12 "hardcoded_tmp_directories": ["/tmp", "/var/tmp", "/dev/shm", "~/tmp"], |
|
13 # secok |
|
14 |
|
15 # insecureHashlibNew.py |
|
16 "insecure_hashes": ['md4', 'md5', 'sha', 'sha1'], |
|
17 |
|
18 # injectionShell.py |
|
19 # injectionWildcard.py |
|
20 "shell_injection_subprocess": [ |
|
21 'subprocess.Popen', |
|
22 'subprocess.call', |
|
23 'subprocess.check_call', |
|
24 'subprocess.check_output', |
|
25 'subprocess.run'], |
|
26 |
|
27 # injectionShell.py |
|
28 # injectionWildcard.py |
|
29 "shell_injection_shell": [ |
|
30 'os.system', |
|
31 'os.popen', |
|
32 'os.popen2', |
|
33 'os.popen3', |
|
34 'os.popen4', |
|
35 'popen2.popen2', |
|
36 'popen2.popen3', |
|
37 'popen2.popen4', |
|
38 'popen2.Popen3', |
|
39 'popen2.Popen4', |
|
40 'commands.getoutput', |
|
41 'commands.getstatusoutput'], |
|
42 |
|
43 # injectionShell.py |
|
44 "shell_injection_noshell": [ |
|
45 'os.execl', |
|
46 'os.execle', |
|
47 'os.execlp', |
|
48 'os.execlpe', |
|
49 'os.execv', |
|
50 'os.execve', |
|
51 'os.execvp', |
|
52 'os.execvpe', |
|
53 'os.spawnl', |
|
54 'os.spawnle', |
|
55 'os.spawnlp', |
|
56 'os.spawnlpe', |
|
57 'os.spawnv', |
|
58 'os.spawnve', |
|
59 'os.spawnvp', |
|
60 'os.spawnvpe', |
|
61 'os.startfile'], |
|
62 |
|
63 # insecureSslTls.py |
|
64 "insecure_ssl_protocol_versions": [ |
|
65 'PROTOCOL_SSLv2', |
|
66 'SSLv2_METHOD', |
|
67 'SSLv23_METHOD', |
|
68 'PROTOCOL_SSLv3', |
|
69 'PROTOCOL_TLSv1', |
|
70 'SSLv3_METHOD', |
|
71 'TLSv1_METHOD'], |
|
72 |
|
73 # tryExcept.py |
|
74 "check_typed_exception": False, |
|
75 |
|
76 # weakCryptographicKey.py |
|
77 "weak_key_size_dsa_high": 1024, |
|
78 "weak_key_size_dsa_medium": 2048, |
|
79 "weak_key_size_rsa_high": 1024, |
|
80 "weak_key_size_rsa_medium": 2048, |
|
81 "weak_key_size_ec_high": 160, |
|
82 "weak_key_size_ec_medium": 224, |
|
83 |
|
84 } |