TMAegis
Другие правила для cos

TMA-COS-5.1.15

Ensure only strong Key Exchange algorithms are used

СреднийУровень 1Автоматическаяcos

Описание

Key exchange is any method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received Key exchange methods that are considered weak should be removed. A key exchange method may be weak because too few bits are used, or the hashing algorithm is considered too weak. Using weak algorithms could expose connections to man-in-the- middle attacks

Как проверяется

Метод проверки: Команда оболочки

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; command -v sshd >/dev/null 2>&1 || { echo "step1: sshd not installed"; return 1; }; o=$(bash -c 'sshd -T | grep kexalgorithms' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- 'Weak Key Exchange Algorithms:' || { echo step1: missing 'Weak Key Exchange Algorithms:'; return 1; }; printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- diffie-hellman-group1-sha1 || { echo step1: missing diffie-hellman-group1-sha1; return 1; }; printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- diffie-hellman-group14-sha1 || { echo step1: missing diffie-hellman-group14-sha1; return 1; }; printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- diffie-hellman-group-exchange-sha1 || { echo step1: missing diffie-hellman-group-exchange-sha1; return 1; }; }; if alt0; then echo compliant; fi
Ожидаемый вывод
compliant

Как исправляется

Метод исправления: Рекомендация или патч инфраструктуры

Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma separated list of the site approved key exchange algorithms Example: KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman- group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18- sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie- hellman-group-exchange-sha256

Свойства

Операционные системы
Любая
Теги
container-optimized-oscoscrypto
Источник
CIS Google Container-Optimized OS Benchmark v1.2.0 - 5.1.15 Ensure only strong Key Exchange algorithms are used

Проверить этот хост

Выполните команду на компьютере, аудит которого вам разрешён. Сканирование работает только на чтение.

shell
tmaegis scan --target cos