如何解决Diffie-Hellman Key Agreement Protocol资源管理错误漏洞(CVE-2002-20001)
资源管理错误漏洞(CVE-2002-20001)修复
项目在等保漏洞扫描时扫描出来了“资源管理错误漏洞”,实操修复
Diffie-Hellman Key Agreement Protocol是一种密钥协商协议。
它最初在 Diffie 和 Hellman 关于公钥密码学的开创性论文中有所描述。
该密钥协商协议允许 Alice 和 Bob 交换公钥值,并根据这些值和他们自己对应的私钥的知识,安全地计算共享密钥K,从而实现进一步的安全通信。
仅知道交换的公钥值,窃听者无法计算共享密钥。
Diffie-Hellman Key Agreement Protocol 存在安全漏洞,远程攻击者可以发送实际上不是公钥的任意数字,并触发服务器端DHE模幂计算。

1.查看服务端支持的kexalgorithms
echo "kexalgorithms -diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256" >> /etc/ssh/sshd_config
2.写入配置文件相关配置
echo "kexalgorithms -diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256" >> /etc/ssh/sshd_config
不建议上边这样写,sshd服务可能会因为语法错误起不来,导致ssh连接不上服务器,建议使用下边写法配置
echo "kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521" >> /etc/ssh/sshd_config
3.重启sshd
systemctl restart sshd
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
Apache Hive 通用调优featch抓取机制 mr本地模式
这篇文章主要为大家介绍了Apache Hive 通用调优featch抓取机制 mr本地模式详解,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪2022-08-08


最新评论