Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

OpenSSL DROWN(溺亡)漏洞的檢測與修復方法

一、漏洞描述:如今流行的服務器與客戶端使用 TLS 加密,SSL 與 TLS 協議保障用戶上網、購物、即時通信而不被第三方讀取。DROWN(溺亡)漏洞允許攻擊者破壞這套加密體系,通過「中間人劫持攻擊」讀取或竊取敏感通信,包括密碼、信用卡帳號、商業機密、金融數據等。

二、漏洞影響:大部分支持 SSLv2 的服務器都會受此漏洞影響,比如啟用了 ssl、tls 加密的 web 服務器、郵件服務器等。

三、檢測方法:可使用檢測工具進行檢查。

四、修復方法:確保你的私鑰不適用於其它支持 SSLv2 的服務(包括 web、smtp、imap、pop 等),並禁止服務器端的 SSLv2 支持。若使用 OpenSSL,請參考官方修復指南:

https://www.openssl.org/blog/blog/2016/03/01/an-openssl-users-guide-to-drown/

若是 nginx 服務器,直接在 nginx.conf 配置文件中去掉 ssl_protocols 裡的 SSLv2 支持即可。

示例(使用 public_drown_scanner 進行檢測):

[root@yn_vm_dev46 public_drown_scanner]# yum install python-virtualenv

[root@yn_vm_dev46 public_drown_scanner]# virtualenv drown

New python executable in drown/bin/python

Installing Setuptools……done.

Installing Pip……done.

[root@yn_vm_dev46 public_drown_scanner]# cd drown/

[root@yn_vm_dev46 drown]# ls

bin include lib lib64

[root@yn_vm_dev46 drown]# . ./bin/activate

(drown)[root@yn_vm_dev46 drown]#

(drown)[root@yn_vm_dev46 drown]# pip install enum pycrypto scapy pyasn1 scapy-ssl_tls

檢測目標(存在漏洞時):

(drown)[root@yn_vm_dev46 drown]# python /root/public_drown_scanner/scanner.py www.com 443

Testing www.com on port 443

www.com: Server is vulnerable, with cipher RC2_128_CBC_EXPORT40_WITH_MD5

www.com: Server is vulnerable, with cipher RC4_128_EXPORT40_WITH_MD5

www.com: Case 7; Symmetric key did not successfully verify on server finished message

www.com: Server is NOT vulnerable with cipher RC4_128_WITH_MD5, Message: 7: no tls

www.com: Server is vulnerable, with cipher DES_64_CBC_WITH_MD5

修復後再次檢測(不再存在漏洞):

(drown)[root@yn_vm_dev46 drown]# python /root/public_drown_scanner/scanner.py www.com 443

Testing www.com on port 443

www.com: Case 3b; Connection reset by peer when waiting for server hello

www.com: Server is NOT vulnerable with cipher RC2_128_CBC_EXPORT40_WITH_MD5, Message: 3b: no tls

www.com: Case 3b; Connection reset by peer when waiting for server hello

www.com: Server is NOT vulnerable with cipher RC4_128_EXPORT40_WITH_MD5, Message: 3b: no tls

www.com: Case 3b; Connection reset by peer when waiting for server hello

www.com: Server is NOT vulnerable with cipher RC4_128_WITH_MD5, Message: 3b: no tls

www.com: Case 3b; Connection reset by peer when waiting for server hello

www.com: Server is NOT vulnerable with cipher DES_64_CBC_WITH_MD5, Message: 3b: no tls

Copyright © Linux教程網 All Rights Reserved