修复Diffie-Hellman Key Agreement Protocol 资源管理错误漏洞(CVE-2002-20001)

查看Kexalgorithms-此举操作是确认客户端支持的kexalgorithms

[root@localhost ~]# ssh -Q kex

查看Kexalgorithms-此举操作是确认客户端支持的kexalgorithms

[root@localhost ~]# sshd -T | grep -w kexalgorithms

修复方法

通过修改sshd_config配置文件,屏蔽掉不安全的KexAlgorithjms,其中具体的sshd_config配置参数可以从man文档中查看

通过man文档查看当前openssh版本支持的算法列表和参数用法。

[root@localhost ~]# man sshd_config |grep -A 40 -w KexAlgorithms

未禁用diffie-hellman算法之前,可用正常使用ssh连接登录

[root@localhost ~]# ssh -v -oKexAlgorithms=diffie-hellman-group1-sha1 root@10.105.22.242

使用漏扫可以扫出该漏洞

禁用diffie-hellman算法

[root@localhost ~]# echo "KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521" >> /etc/ssh/sshd_config

[root@localhost ~]# systemctl restart sshd

[root@localhost ~]# sshd -T | grep -w kexalgorithms

再次使用禁用了diffie-hellman算法之后,带上被禁用的密钥算法登录,显示不能正常使用ssh登录

[root@localhost ~]# ssh -v -oKexAlgorithms=diffie-hellman-group1-sha1 root@10.105.22.242

使用奇安信漏扫,已无法扫出,漏洞修复

不加任何加密算法,正常使用ssh也可以登录

  • 3
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Cwillchris

你的鼓励将让我产出更多优质干货

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值