我们的安全团队要求我们在运行 Apache 的某些服务器上完全禁用 SSLv3。我已使用 ssl.conf 文件中的 SSLProtocol 条目(如 SSLProtocol ALL -SSLv2 -SSLv3)和各种 SSLCipherSuite 条目尝试完全禁用此功能,但无济于事。我仍然得到以下作为 nmap 的示例输出
Starting Nmap 6.47 ( http://nmap.org ) at 2015-03-01 16:49 Mountain Standard Time
Nmap scan report for ...
Host is up (0.0045s latency).
PORT STATE SERVICE
443/tcp open https
| ssl-enum-ciphers:
| SSLv3: No supported ciphers found <----
| TLSv1.0:
| ciphers:
| TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_256_CBC_SHA - strong
| TLS_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_RSA_WITH_AES_256_CBC_SHA - strong
| TLS_RSA_WITH_RC4_128_SHA - strong
| compressors:
| NULL
|_ least strength: strong
例如,在运行 Tomcat 的服务器上,我们找不到 SSLv3 的踪迹,如下例所示
Starting Nmap 6.47 ( http://nmap.org ) at 2015-03-01 16:54 Mountain Standard Time
Nmap scan report for...
Host is up (0.0022s latency).
PORT STATE SERVICE
443/tcp open https
| ssl-enum-ciphers:
| TLSv1.0:
| ciphers:
| TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_ECDHE_RSA_WITH_RC4_128_SHA - strong
| TLS_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_RSA_WITH_RC4_128_MD5 - strong
| TLS_RSA_WITH_RC4_128_SHA - strong
| compressors:
| NULL
| TLSv1.1:
| ciphers:
| TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_ECDHE_RSA_WITH_RC4_128_SHA - strong
| TLS_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_RSA_WITH_RC4_128_MD5 - strong
| TLS_RSA_WITH_RC4_128_SHA - strong
| compressors:
| NULL
| TLSv1.2:
| ciphers:
| TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - strong
| TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 - strong
| TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - strong
| TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - strong
| TLS_ECDHE_RSA_WITH_RC4_128_SHA - strong
| TLS_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_RSA_WITH_AES_128_CBC_SHA256 - strong
| TLS_RSA_WITH_AES_128_GCM_SHA256 - strong
| TLS_RSA_WITH_RC4_128_MD5 - strong
| TLS_RSA_WITH_RC4_128_SHA - strong
| compressors:
| NULL
|_ least strength: strong
有人能够在 Apache 中完全禁用 SSLv3 吗?有没有办法在 Apache 中完全禁用 SSLv3?谢谢您的时间
答案1
您已禁用 SSLv3,但 nmap 的报告有点马虎。我刚刚针对我的服务器进行了测试,以查看发生了什么。
使用 nmap,我得到了相同的消息,暗示 SSLv3 存在但没有密码。但如果您尝试以下命令行,并且看到“SSL 警报编号 40”(向右滚动!),则 SSLv3 已完全禁用:
$ openssl s_client -connect www.example.com:443 -ssl3
CONNECTED(00000003)
140159193097888:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1262:SSL alert number 40
140159193097888:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:598:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : SSLv3
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1425297962
Timeout : 7200 (sec)
Verify return code: 0 (ok)
---
即使您得到同样模糊的指示“新(无),密码是(无)”,请注意 SSL 握手是 7 个字节。如果您运行数据包捕获,您将看到连接就是这样:
客户:客户端问候 (SSLv3)
服务器:警报(级别:严重,描述:握手失败)
这已经是你能达到的最严重的残疾了。
我怀疑 nmap 报告 Tomcat 的方式不同,因为 Tomcat 返回了一组更丰富的协议。也许 Tomcat 在提出 SSL3 时提供了 TLS1,而不是断然拒绝 SSL3。我正在尝试收集一个基于 Tomcat 的主机进行测试,以查看幕后发生了什么。