当前位置:   article > 正文

SSH 弱密钥交换算法已启用_ssh服务器cbc模式密码已启用

ssh服务器cbc模式密码已启用

一、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.com,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>
  1. PORT STATE SERVICE VERSION
  2. 22/tcp open ssh OpenSSH 7.4 (protocol 2.0)
  3. | ssh2-enum-algos:
  4. | kex_algorithms: (4)
  5. | diffie-hellman-group14-sha1
  6. | ecdh-sha2-nistp384
  7. | ecdh-sha2-nistp521
  8. | curve25519-sha256@libssh.org
  9. | server_host_key_algorithms: (5)
  10. | ssh-rsa
  11. | rsa-sha2-512
  12. | rsa-sha2-256
  13. | ecdsa-sha2-nistp256
  14. | ssh-ed25519
  15. | encryption_algorithms: (3)
  16. | aes128-ctr
  17. | aes192-ctr
  18. | aes256-ctr
  19. | mac_algorithms: (3)
  20. | hmac-sha1
  21. | umac-64@openssh.com
  22. | hmac-ripemd160
  23. | compression_algorithms: (2)
  24. | none
  25. |_ zlib@openssh.com

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/486831
推荐阅读
相关标签
  

闽ICP备14008679号