Linux distributions
TMA-ROCKY10-1.6.4
Ensure system wide crypto policy disables cbc for ssh
Opis
Cypher Block Chaining (CBC) is an algorithm that uses a block cipher.
Kako se proverava
Metod provere: Komanda ljuske
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- Očekivani izlaz
compliant
Kako se ispravlja
Metod ispravke: Smernica ili zakrpa infrastrukture
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. • CBC can be turned off globally by using the argument cipher opposed to cipher@SSH • Multiple subpolicies may be assigned to a policy as a colon separated list. e.g. DEFAULT:NO-SHA1:NO-SSHCBC • Subpolicies: o Not included in the update-crypto-policies --set command will not be applied to the system wide crypto policy. o must exist before they can be applied to the system wide crypto policy. o .pmod file filenames must be in all upper case, upper case, e.g. NO- SSHCBC.pmod, or the…
Svojstva
- Operativni sistemi
- rocky-10
- Oznake
- cis-convertedlinux
- Referenca
- CIS Rocky Linux 10 Benchmark v1.0.0 - 1.6.4
Proverite ovaj računar
Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.
tmaegis scan --target linux