TMAegisBeta
Mais regras para linux

Linux distributions

TMA-ROCKY8-1.6.2

Ensure system wide crypto policy disables sha1 hash and signature support

MédiaNível 1Automatizadalinux

Descrição

SHA-1 (Secure Hash Algorithm) is a cryptographic hash function that produces a 160 bit hash value.

Como é verificado

Método de auditoria: Comando shell

shell
alt0() { o=$(bash -c 'gawk -F= '"'"'($1~/^\s*(hash|sign)\s*$/ && $2~/SHA1/ && $2!~/^\s*\- \s*([^#\n\r]+)?SHA1/){print}'"'"' /etc/crypto-policies/state/CURRENT.pol' 2>/dev/null); [ -z "$o" ] || { echo "step1: $o" | head -c 300; return 1; }; command -v grep >/dev/null 2>&1 || { echo "step2: grep not installed"; return 1; }; o=$(bash -c 'grep -Psi -- '"'"'^\h*sha1_in_certs\h*=\h*'"'"' /etc/crypto-' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- policies/state/CURRENT.pol || { echo step2: missing policies/state/CURRENT.pol; return 1; }; }; if alt0; then echo compliant; fi
Saída esperada
compliant

Como é corrigido

Método de correção: Orientação ou patch de infraestrutura

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: 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- SHA1.pmod, or they will not be read by the update-crypto-policies -- set command. Create or edit a file…

Propriedades

Sistemas operacionais
rocky-8
Tags
cis-convertedlinux
Referência
CIS Rocky Linux 8 Benchmark v3.0.0 - 1.6.2

Verificar este host

Execute isto em uma máquina que você tenha permissão para auditar. A varredura é somente leitura.

shell
tmaegis scan --target linux