1.6.3 Ensure system wide crypto policy disables cbc for ssh

Information

Cypher Block Chaining (CBC) is an algorithm that uses a block cipher.

A vulnerability exists in SSH messages that employ CBC mode that may allow an attacker to recover plaintext from a block of ciphertext. If exploited, this attack can potentially allow an attacker to recover up to 32 bits of plaintext from an arbitrary block of ciphertext from a connection secured using the SSH protocol.

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
- Any subpolicy not included in the update-crypto-policies --set command will not be applied to the system wide crypto policy.
- Subpolicies must exist before they can be applied to the system wide crypto policy.

Create or edit a file in /etc/crypto-policies/policies/modules/ ending inpmod and add or modify one of the the following lines:

cipher@SSH = -*-CBC # Disables the CBC cipher for SSH

-OR-

cipher = -*-CBC # Disables the CBC cipher

Example:

# echo -e "# This is a subpolicy to disable all CBC mode ciphers
# for the SSH protocol (libssh and OpenSSH)
cipher@SSH = -*-CBC" > /etc/crypto-policies/policies/modules/NO-SSHCBC.pmod

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

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

Example:

update-crypto-policies --set DEFAULT:NO-SHA1:NO-SSHCBC

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

# reboot

Impact:

CBC ciphers might be the only common cyphers when connecting to older SSH clients and servers

See Also

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

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: 3bd9d5bc6629cece72b35234df573db6cfb1dfe440f034fadea3ef5b678318a5