|
| 1 | +documentation_complete: true |
| 2 | + |
| 3 | +title: Implement Custom Crypto Policy Modules for CIS Benchmark for Red Hat Enterprise Linux 8 |
| 4 | + |
| 5 | +{{% set sub_policies = [ |
| 6 | + { |
| 7 | + "module_name": "NO-SSHCBC", |
| 8 | + "key": "cipher@SSH", |
| 9 | + "value": "-*-CBC" |
| 10 | + }, |
| 11 | + { |
| 12 | + "module_name": "NO-SSHWEAKCIPHERS", |
| 13 | + "key": "cipher@SSH", |
| 14 | + "value": "-3DES-CBC -AES-128-CBC -AES-192-CBC -AES-256-CBC -CHACHA20-POLY1305" |
| 15 | + }, |
| 16 | + { |
| 17 | + "module_name": "NO-SSHWEAKMACS", |
| 18 | + "key": "mac@SSH", |
| 19 | + "value": "-HMAC-MD5* -UMAC-64* -UMAC-128*" |
| 20 | + }, |
| 21 | + { |
| 22 | + "module_name": "NO-WEAKMAC", |
| 23 | + "key": "mac", |
| 24 | + "value": "-*-128*" |
| 25 | + }, |
| 26 | +] %}} |
| 27 | + |
| 28 | +description: |- |
| 29 | + Create a custom crypto policy module to enforce the use of strong ciphers and MACs in SSHD, disable CBC mode ciphers in SSHD and disable the use of weak MACs globally. |
| 30 | + {{% for sub_policy in sub_policies %}} |
| 31 | + {{{ describe_crypto_sub_policy(sub_policy.module_name, sub_policy.key, sub_policy.value) }}} |
| 32 | + {{% endfor %}} |
| 33 | + Then, set the system wide crypto policy to use the custom policy. |
| 34 | + <pre> |
| 35 | + $ sudo update-crypto-policies --set DEFAULT:NO-SHA1:NO-SSHCBC:NO-SSHWEAKCIPHERS:NO-SSHWEAKMACS:NO-WEAKMAC |
| 36 | + </pre> |
| 37 | +
|
| 38 | +rationale: |- |
| 39 | + CBC mode ciphers are vulnerable to certain attacks, such as the BEAST attack. |
| 40 | + Disabling CBC mode ciphers helps protect against these attacks and ensures that only |
| 41 | + strong, proven cryptographic algorithms are used to protect SSH communications. |
| 42 | + Weak ciphers that are used for authentication to the cryptographic module cannot be |
| 43 | + relied upon to provide confidentiality or integrity, and system data may be compromised. |
| 44 | + Message Authentication Codes (MACs) are cryptographic mechanisms used to verify the |
| 45 | + integrity and authenticity of data transmitted over SSH connections. Weak MACs that |
| 46 | + are used for authentication to the cryptographic module cannot be relied upon to |
| 47 | + provide integrity, and system data may be compromised. Implementing a custom crypto |
| 48 | + policy that disables weak MAC algorithms helps ensure that only strong, proven |
| 49 | + cryptographic algorithms are used to protect SSH communications. |
| 50 | +
|
| 51 | +severity: medium |
| 52 | + |
| 53 | +identifiers: |
| 54 | + cce@rhel8: CCE-86707-7 |
| 55 | + |
| 56 | +ocil_clause: 'the custom crypto policy modules do not exist' |
| 57 | + |
| 58 | +ocil: |- |
| 59 | + {{% for sub_policy in sub_policies %}} |
| 60 | + {{{ ocil_crypto_sub_policy(sub_policy.module_name, sub_policy.key, sub_policy.value) }}} |
| 61 | + {{% endfor %}} |
| 62 | +
|
| 63 | +template: |
| 64 | + name: crypto_sub_policies |
| 65 | + vars: |
| 66 | + base_policy: "DEFAULT:NO-SHA1" |
| 67 | + sub_policies: {{{ sub_policies }}} |
0 commit comments