|
|
44eea6 |
From 8bf82a98ae80879d2b1800ae0d5bc19b6c5cab3c Mon Sep 17 00:00:00 2001
|
|
|
44eea6 |
From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= <matyc@redhat.com>
|
|
|
44eea6 |
Date: Thu, 14 Nov 2019 18:04:39 +0100
|
|
|
44eea6 |
Subject: [PATCH 1/2] Fix RHEL7 rules sshd_use_strong_macs and
|
|
|
44eea6 |
sshd_use_strong_ciphers.
|
|
|
44eea6 |
|
|
|
44eea6 |
- Implemented Bash remediations according to rule description.
|
|
|
44eea6 |
- Synced sshd_use_strong_ciphers OVAL according with the rule description.
|
|
|
44eea6 |
---
|
|
|
44eea6 |
.../ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh | 3 +++
|
|
|
44eea6 |
.../ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml | 2 +-
|
|
|
44eea6 |
.../ssh/ssh_server/sshd_use_strong_macs/bash/shared.sh | 4 ++++
|
|
|
44eea6 |
3 files changed, 8 insertions(+), 1 deletion(-)
|
|
|
44eea6 |
create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh
|
|
|
44eea6 |
create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_use_strong_macs/bash/shared.sh
|
|
|
44eea6 |
|
|
|
44eea6 |
diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh
|
|
|
44eea6 |
new file mode 100644
|
|
|
44eea6 |
index 0000000000..69c1f3eead
|
|
|
44eea6 |
--- /dev/null
|
|
|
44eea6 |
+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh
|
|
|
44eea6 |
@@ -0,0 +1,3 @@
|
|
|
44eea6 |
+# platform = multi_platform_all
|
|
|
44eea6 |
+
|
|
|
44eea6 |
+{{{ bash_sshd_config_set(parameter="Ciphers", value="aes128-ctr,aes192-ctr,aes256-ctr,chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr") }}}
|
|
|
44eea6 |
diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml
|
|
|
44eea6 |
index 3adae19c5a..0b20f775ce 100644
|
|
|
44eea6 |
--- a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml
|
|
|
44eea6 |
+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml
|
|
|
44eea6 |
@@ -1 +1 @@
|
|
|
44eea6 |
-{{{ oval_sshd_config(parameter="Ciphers", value="((chacha20-poly1305@openssh\.com|aes256-gcm@openssh\.com|aes128-gcm@openssh\.com|aes256-ctr|aes128-ctr),?)") }}}
|
|
|
44eea6 |
+{{{ oval_sshd_config(parameter="Ciphers", value="((aes128-ctr|aes192-ctr|aes256-ctr|chacha20-poly1305@openssh\.com|aes256-gcm@openssh\.com|aes128-gcm@openssh\.com|aes256-ctr|aes128-ctr),?)") }}}
|
|
|
44eea6 |
diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_macs/bash/shared.sh b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_macs/bash/shared.sh
|
|
|
44eea6 |
new file mode 100644
|
|
|
44eea6 |
index 0000000000..f77be04a1b
|
|
|
44eea6 |
--- /dev/null
|
|
|
44eea6 |
+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_macs/bash/shared.sh
|
|
|
44eea6 |
@@ -0,0 +1,4 @@
|
|
|
44eea6 |
+# platform = multi_platform_all
|
|
|
44eea6 |
+
|
|
|
44eea6 |
+{{{ bash_sshd_config_set(parameter="MACs", value="hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160") }}}
|
|
|
44eea6 |
+
|
|
|
44eea6 |
|
|
|
44eea6 |
From 32c5bdbfc532d36bae5aaf0e0510b8516373598e Mon Sep 17 00:00:00 2001
|
|
|
44eea6 |
From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= <matyc@redhat.com>
|
|
|
44eea6 |
Date: Fri, 15 Nov 2019 14:44:25 +0100
|
|
|
44eea6 |
Subject: [PATCH 2/2] Fixed sshd_use_strong_ciphers.
|
|
|
44eea6 |
|
|
|
44eea6 |
- Fixed ciphers rule description metadata and bash remediation - removed duplicate ciphers.
|
|
|
44eea6 |
- Fixed ciphers rule OVAL.
|
|
|
44eea6 |
---
|
|
|
44eea6 |
.../ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh | 2 +-
|
|
|
44eea6 |
.../ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml | 2 +-
|
|
|
44eea6 |
.../ssh/ssh_server/sshd_use_strong_ciphers/rule.yml | 3 +--
|
|
|
44eea6 |
7 files changed, 23 insertions(+), 4 deletions(-)
|
|
|
44eea6 |
|
|
|
44eea6 |
diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh
|
|
|
44eea6 |
index 69c1f3eead..d30e534064 100644
|
|
|
44eea6 |
--- a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh
|
|
|
44eea6 |
+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/bash/shared.sh
|
|
|
44eea6 |
@@ -1,3 +1,3 @@
|
|
|
44eea6 |
# platform = multi_platform_all
|
|
|
44eea6 |
|
|
|
44eea6 |
-{{{ bash_sshd_config_set(parameter="Ciphers", value="aes128-ctr,aes192-ctr,aes256-ctr,chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr") }}}
|
|
|
44eea6 |
+{{{ bash_sshd_config_set(parameter="Ciphers", value="aes128-ctr,aes192-ctr,aes256-ctr,chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com") }}}
|
|
|
44eea6 |
diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml
|
|
|
44eea6 |
index 0b20f775ce..474cb49979 100644
|
|
|
44eea6 |
--- a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml
|
|
|
44eea6 |
+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/oval/shared.xml
|
|
|
44eea6 |
@@ -1 +1 @@
|
|
|
44eea6 |
-{{{ oval_sshd_config(parameter="Ciphers", value="((aes128-ctr|aes192-ctr|aes256-ctr|chacha20-poly1305@openssh\.com|aes256-gcm@openssh\.com|aes128-gcm@openssh\.com|aes256-ctr|aes128-ctr),?)") }}}
|
|
|
44eea6 |
+{{{ oval_sshd_config(parameter="Ciphers", value="((aes128-ctr|aes192-ctr|aes256-ctr|chacha20-poly1305@openssh\.com|aes256-gcm@openssh\.com|aes128-gcm@openssh\.com),?)+") }}}
|
|
|
44eea6 |
diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/rule.yml b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/rule.yml
|
|
|
44eea6 |
index d4b61cedb9..90e11c0d99 100644
|
|
|
44eea6 |
--- a/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/rule.yml
|
|
|
44eea6 |
+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_strong_ciphers/rule.yml
|
|
|
44eea6 |
@@ -9,8 +9,7 @@ description: |-
|
|
|
44eea6 |
Counter (CTR) mode is also preferred over cipher-block chaining (CBC) mode.
|
|
|
44eea6 |
The following line in <tt>/etc/ssh/sshd_config</tt>
|
|
|
44eea6 |
demonstrates use of those ciphers:
|
|
|
44eea6 |
- Ciphers aes128-ctr,aes192-ctr,aes256-ctr
|
|
|
44eea6 |
- chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr
|
|
|
44eea6 |
+ Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
|
|
44eea6 |
The man page <tt>sshd_config(5)</tt> contains a list of supported ciphers.
|
|
|
44eea6 |
|
|
|
44eea6 |
rationale: |-
|