TMAegisBeta
linux için daha fazla kural

Linux distributions

TMA-ALMA9-1.6.4

Ensure system wide crypto policy disables cbc for ssh

OrtaDüzey 1Otomatiklinux

Açıklama

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

Nasıl denetlenir

Denetim yöntemi: Kabuk komutu

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep -Pi -- '"'"'^\h*cipher\h*=\h*([^#\n\r]+)?-CBC\b'"'"' /etc/crypto-' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- policies/state/CURRENT.pol || { echo step1: missing policies/state/CURRENT.pol; return 1; }; o=$(bash -c 'grep -Pi -- '"'"'^\h*cipher@(lib|open)ssh(-server|-client)?\h*=\h*([^#\n\r]+)?- CBC\b'"'"' /etc/crypto-policies/state/CURRENT.pol' 2>/dev/null); [ -z "$o" ] || { echo "step2: $o" | head -c 300; return 1; }; }; if alt0; then echo compliant; fi
Beklenen çıktı
compliant

Nasıl düzeltilir

Düzeltme yöntemi: Kılavuz veya altyapı yaması

Create or edit a file in /etc/crypto-policies/policies/modules/ ending in .pmod and add or modify one of the following lines: cipher@SSH = -*-CBC # Disables the CBC cipher for SSH Example: # printf '%s\n' "# 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>:<CRYPTO_SUBPOLICY3> Example: # update-crypto-policies --set DEFAULT:NO-SHA1:NO-WEAKMAC:NO-SSHCBC Run the following command to reboot the system to make you…

Özellikler

İşletim sistemleri
almalinux-9
Etiketler
cis-convertedlinux
Referans
CIS AlmaLinux OS 9 Benchmark v3.0.0 - 1.6.4

Bu ana makineyi denetle

Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.

shell
tmaegis scan --target linux