【Server CBC Mode Ciphers Enabled】SSH服务默认是支持CBC模式加密算法的。这可能会导致攻击者从密文中恢复出明文信息。
步骤一:
vi /etc/ssh/sshd_config
最后一行添加如下内容
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,arcfour
Macs hmac-sha1,hmac-ripemd160
步骤二:
systemctl restart sshd.service
发现修复 Server CBC Mode Ciphers Enabled后,再次用Nessus扫描,又暴露出这个漏洞SSH Weak Algorithms Supported漏洞。
该漏洞同样修改sshd_config中指定强加密算法即可。
步骤一:
删除之前设置的
vi /etc/ssh/sshd_config
最后一行添加如下内容
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
MACs hmac-sha1,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com
步骤二:
systemctl restart sshd.service
这么改完之后就扫不出这两个漏洞了。