Skip to content

Commit e776b55

Browse files
committed
Introduce rule crypto_sub_policy_weak_macs
The rule crypto_sub_policy_weak_macs implements the approach for disabling MACs using a custom crypto policy sub module as requested in requirement 1.6.3 in CIS Benchmark for RHEL 8 version 4.0.0.
1 parent 8de7bff commit e776b55

File tree

8 files changed

+49
-7
lines changed

8 files changed

+49
-7
lines changed

components/crypto-policies.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ rules:
1212
- configure_openssl_crypto_policy
1313
- configure_openssl_tls_crypto_policy
1414
- configure_ssh_crypto_policy
15+
- crypto_sub_policy_sshd_ciphers
16+
- crypto_sub_policy_sshd_macs
17+
- crypto_sub_policy_sshd_cbc
18+
- crypto_sub_policy_weak_macs
1519
- harden_openssl_crypto_policy
1620
- harden_ssh_client_crypto_policy
1721
- harden_sshd_ciphers_openssh_conf_crypto_policy

controls/cis_rhel8.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,12 +565,9 @@ controls:
565565
levels:
566566
- l1_server
567567
- l1_workstation
568-
status: pending
569-
notes: |-
570-
It is necessary a new rule to ensure a module disabling weak MACs in
571-
/etc/crypto-policies/policies/modules/ so it can be used by update-crypto-policies command.
572-
related_rules:
573-
- configure_crypto_policy
568+
status: automated
569+
rules:
570+
- crypto_sub_policy_weak_macs
574571

575572
- id: 1.7.1
576573
title: Ensure message of the day is configured properly (Automated)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
documentation_complete: true
2+
3+
title: Implement Custom Crypto Policy to Disable Weak MAC Algorithms
4+
5+
{{% set module_name = "NO-WEAKMAC" %}}
6+
{{% set key = "mac" %}}
7+
{{% set value = "-*-128*" %}}
8+
9+
description: |-
10+
Create a custom crypto policy module to disable weak MACs.
11+
{{{ describe_crypto_sub_policy(module_name, key, value) }}}
12+
13+
rationale: |-
14+
Message Authentication Codes (MACs) are cryptographic mechanisms used to verify the
15+
integrity and authenticity of data transmitted over SSH connections. Weak MACs
16+
that are used for authentication to the cryptographic module cannot be relied upon to
17+
provide integrity, and system data may be compromised. Implementing a custom crypto
18+
policy that disables weak MAC algorithms helps ensure that only strong, proven
19+
cryptographic algorithms are used to protect system data.
20+
21+
severity: medium
22+
23+
identifiers:
24+
cce@rhel8: CCE-86958-6
25+
26+
references:
27+
28+
ocil_clause: 'the custom crypto policy module to disable weak MACs does not exist'
29+
30+
ocil: |-
31+
{{{ ocil_crypto_sub_policy(module_name, key, value) }}}
32+
33+
template:
34+
name: crypto_sub_policy
35+
vars:
36+
module_name: {{{ module_name }}}
37+
key: {{{ key }}}
38+
value: {{{ value }}}

shared/references/cce-redhat-avail.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ CCE-86935-4
172172
CCE-86936-2
173173
CCE-86937-0
174174
CCE-86955-2
175-
CCE-86958-6
176175
CCE-86959-4
177176
CCE-86963-6
178177
CCE-86965-1

tests/data/profile_stability/rhel8/cis.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ coredump_disable_storage
112112
crypto_sub_policy_sshd_cbc
113113
crypto_sub_policy_sshd_ciphers
114114
crypto_sub_policy_sshd_macs
115+
crypto_sub_policy_weak_macs
115116
dconf_db_up_to_date
116117
dconf_gnome_banner_enabled
117118
dconf_gnome_disable_automount

tests/data/profile_stability/rhel8/cis_server_l1.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ coredump_disable_storage
4747
crypto_sub_policy_sshd_cbc
4848
crypto_sub_policy_sshd_ciphers
4949
crypto_sub_policy_sshd_macs
50+
crypto_sub_policy_weak_macs
5051
dconf_db_up_to_date
5152
dconf_gnome_banner_enabled
5253
dconf_gnome_disable_automount

tests/data/profile_stability/rhel8/cis_workstation_l1.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ coredump_disable_storage
4747
crypto_sub_policy_sshd_cbc
4848
crypto_sub_policy_sshd_ciphers
4949
crypto_sub_policy_sshd_macs
50+
crypto_sub_policy_weak_macs
5051
dconf_db_up_to_date
5152
dconf_gnome_banner_enabled
5253
dconf_gnome_disable_automount

tests/data/profile_stability/rhel8/cis_workstation_l2.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ coredump_disable_storage
112112
crypto_sub_policy_sshd_cbc
113113
crypto_sub_policy_sshd_ciphers
114114
crypto_sub_policy_sshd_macs
115+
crypto_sub_policy_weak_macs
115116
dconf_db_up_to_date
116117
dconf_gnome_banner_enabled
117118
dconf_gnome_disable_automount

0 commit comments

Comments
 (0)