Linux

关注公众号 jb51net

关闭
首页 > 网站技巧 > 服务器 > Linux > Diffie-Hellman Key Agreement Protocol资源管理错误漏洞

如何解决Diffie-Hellman Key Agreement Protocol资源管理错误漏洞(CVE-2002-20001)

作者:朱衣点头戈子衫

文章主要介绍了资源管理错误漏洞的修复项目,特别提到Diffie-HellmanKeyAgreementProtocol是一种密钥协商协议,该协议存在安全漏洞,文章建议在配置文件中正确写入kexalgorithms,避免语法错误导致sshd服务无法启动,从而无法通过SSH连接服务器

资源管理错误漏洞(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

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。

您可能感兴趣的文章:
阅读全文