前言:因项目须要验收进行安全检测,某安全公司检测到sshd的加密漏洞以下
SSH Server CBC Mode Ciphers Enabled
Warning:重启后注意检查sshd的状态
概要、描述、解决方法以下:
https://www.tenable.com/plugins/nessus/70658
1.修改加密方式vim
[root@localhost ~] vim /etc/ssh/sshd_config 注释相关字段 # Ciphers and keying 在末尾添加加密方式 Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,arcfour Macs hmac-sha1,hmac-ripemd160
2.保存后重启服务安全
[root@localhost ~]# systemctl restart sshd
3.ssh验证ssh
[root@localhost ~]# ssh -vv -oCiphers=aes128-cbc,3des-cbc,blowfish-cbc 目标IP [root@localhost ~]# ssh -vv -oMACs=hmac-md5 目标IP
4.nmap验证ide
nmap --script ssh2-enum-algos -sV -p 22 目标IP
结果加密
Unable to negotiate with 127.0.0.1 port 22: no matching cipher found. Their offer: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,arcfour