1.6.6 Ensure system wide crypto policy disables EtM for ssh

Information

Encrypt-then-MAC (EtM) - The ciphertext is generated by encrypting the plaintext and then appending a MAC of the encrypted plaintext

ssh_etm - Controls if OpenSSH EtM (encrypt-then-mac) extension is allowed.

Terrapin is a prefix truncation attack targeting the SSH protocol.

Note: If CVE-2023-48795 (Terrapin SSH Attack) has been addressed this recommendation is not applicable.

There is an effective attack against SSH's use of Cypher-Block-Chaining (CBC) with Encrypt-then-MAC as referenced in CVE-2023-48795

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

Note:

- The commands below are written for the included DEFAULT system-wide crypto policy. If another policy is in use and follows local site policy, replace DEFAULT with the name of your system-wide crypto policy.
- Multiple subpolicies may be assigned to a policy as a colon separated list. e.g. DEFAULT:NO-SHA1:NO-SSHCBC
- Subpolicies:

- Not included in the update-crypto-policies --set command will not be applied to the system wide crypto policy.
- must exist before they can be applied to the system wide crypto policy.
- .pmod file filenames must be in all upper case, upper case, e.g. NO-SSHCHACHA20.pmod, or they will not be read by the update-crypto-policies --set command.

- IF - CVE-2023-48795 has been addressed, and it meets local site policy, this recommendation is not applicable.

Create or edit a file in /etc/crypto-policies/policies/modules/ ending in .pmod and add or modify the following line:

ssh_etm = 0 # This disables EtM for openSSH and libssh

Example:

# printf '%s\n' "# This is a subpolicy to disable Encrypt then MAC" "# for the SSH protocol (libssh and OpenSSH)" "ssh_etm = 0" >> /etc/crypto-policies/policies/modules/NO-SSHETM.pmod

Run the following command to update the system-wide cryptographic policy

# update-crypto-policies --set <CRYPTO_POLICY>:<CRYPTO_SUBPOLICY1>:<CRYPTO_SUBPOLICY2>:<CRYPTO_SUBPOLICY3>

Example:

# update-crypto-policies --set DEFAULT:NO-SHA1:NO-WEAKMAC:NO-SSHCBC:NO-SSHCHACHA20:NO-SSHETM

Run the following command to reboot the system to make your cryptographic settings effective for already running services and applications:

# reboot

See Also

https://workbench.cisecurity.org/benchmarks/23602

Item Details

Category: ACCESS CONTROL, IDENTIFICATION AND AUTHENTICATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|AC-17(2), 800-53|IA-5, 800-53|IA-5(1), 800-53|SC-8, 800-53|SC-8(1), CSCv7|14.4

Plugin: Unix

Control ID: c7dde8ee004076d159739484029023c70e251f60ac2e814f240b97d2c2aed4c6