SSH 弱密钥交换算法已启用

编程入门 行业动态 更新时间:2024-10-24 12:32:43

一、SSH 弱密钥交换算法已启用

描述
远程 SSH 服务器被配置为允许被认为是弱的密钥交换算法。

这是基于 IETF 草案文档 Key Exchange (KEX) Method Updates and Recommendations for Secure Shell (SSH) draft-ietf-curdle-ssh-kex-sha2-20。 第 4 节列出了关于不应该和绝不能启用的密钥交换算法的指南。 这包括:

diffie-hellman-group-exchange-sha1

diffie-hellman-group1-sha1

gss-gex-sha1-*

gss-group1-sha1-*

gss-group14-sha1-*

rsa1024-sha1

请注意,此插件仅检查 SSH 服务器的选项,而不检查易受攻击的软件版本。
解决方案
联系供应商或查阅产品文档以禁用弱算法。

SSH 服务器 CBC 模式密码已启用:
描述
SSH服务配置,以支持Cipher Block Chaining(CBC)加密。 这可能允许攻击中恢复的明文信息从密文。

注意,这个插件只会检查选项的SSH服务器和不检查脆弱的软件版本。

二、解决方案:

进入ssh配置文件:

vi /etc/ssh/sshd_config

找到原来的弱加密算法注释,添加如下加密算法:

Ciphers aes128-ctr,aes192-ctr,aes256-ctr

在后面注释原来的MACs添加一行如下命令:

MACs hmac-sha1,umac-64@openssh,hmac-ripemd160

删除kex_algorithms中的以下弱加密算法

diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1

最后重启ssh服务

service sshd restart

三、检测验证方法:

使用nmap工具:

nmap --script ssh2-enum-algos -sV -p22 <ip>
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.4 (protocol 2.0)
| ssh2-enum-algos: 
|   kex_algorithms: (4)
|       diffie-hellman-group14-sha1
|       ecdh-sha2-nistp384
|       ecdh-sha2-nistp521
|       curve25519-sha256@libssh
|   server_host_key_algorithms: (5)
|       ssh-rsa
|       rsa-sha2-512
|       rsa-sha2-256
|       ecdsa-sha2-nistp256
|       ssh-ed25519
|   encryption_algorithms: (3)
|       aes128-ctr
|       aes192-ctr
|       aes256-ctr
|   mac_algorithms: (3)
|       hmac-sha1
|       umac-64@openssh
|       hmac-ripemd160
|   compression_algorithms: (2)
|       none
|_      zlib@openssh

没有出现CBC,diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1等弱加密算法则成功

更多推荐

SSH 弱密钥交换算法已启用

本文发布于:2023-06-11 03:29:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1378750.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:密钥   算法   SSH

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!