我們的安全團隊要求我們在一些執行 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)
---
即使您得到相同的模糊指示“New (NONE),Cipher is (NONE)”,請注意 SSL 握手為 7 個位元組。如果您運行資料包捕獲,您將看到連接如下:
客戶:用戶端問候 (SSLv3)
伺服器:警報(等級:致命,描述:握手失敗)
這已經是你所能得到的最殘障的了。
我懷疑 nmap 對 Tomcat 的報告有所不同,因為 Tomcat 回來了一套更豐富的協議。也許在提出 SSL3 時 Tomcat 就提供了 TLS1,而不是立即拒絕 SSL3。我正在嘗試收集一個基於 Tomcat 的主機進行測試,看看幕後發生了什麼。