Client 跟 Server 溝通時,正常來說要使用最新的版本 (TLS v1.0 , 1.1 , 1.2),但假如溝通不上,就會用較舊的 SSLv3 版本,此時通了就會身陷此漏洞,更有機會被中間人攻擊

SSL 與 TLS
TLS : Transport Layer Security (1999年公布了 TLS標準文件)
SSL : Secure Sockets Layer (TLS 前身,TLS 較新)

就 WIKI 說明

2014年10月,Google發布在SSL 3.0中發現設計缺陷,建議禁用此一協議。Google在自己公司相關產品中陸續禁止回溯相容,強制使用TLS協議。計劃於11月25日發布的Firefox 34中,Mozilla 將徹底禁掉 SSL 3.0。

它也就是最近發生的 CVE-2014-3566 SSLv3 Poodle 漏洞,這個漏泂會被解密出明文資料

防止方式

Mozilla Firefox 瀏覽器

透過 about:config 將 security.tls.version.min 設定為 1

firefox disable sslv3

Google Chrome 瀏覽器

利用捷徑,在後面加上 –ssl-version-min=tls1

chrome disable sslv3

IE 瀏覽器

網際網路選項 > 進階

ie disable sslv3

以上是 Client 端的保護之道

測試是否已有防護了
瀏覽,它會跟你說是不是安全的
https://www.poodletest.com/
https://www.howsmyssl.com/

如果你有架 Server 服務

Apache:

SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256 SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE RSA-AES128-SHA:RC4-SHA:!aNULL:!MD5:!DSS"

Postfix:

smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3

Dovecot:

ssl_protocols = !SSLv2 !SSLv3

Courier-imap (imapd-ssl)

IMAPDSSLSTART=NO
IMAPDSTARTTLS=YES
IMAP_TLS_REQUIRED=1
TLS_PROTOCOL=TLS1
TLS_STARTTLS_PROTOCOL=TLS1
TLS_CIPHER_LIST="<take those from the Mozilla TLS Server guide!>"

MySQL

確認 MySQL 的 ssl_cipher_list 沒有被列在以下指令顯示的 SSLv3 cipher

openssl ciphers -v 'DEFAULT' | awk '/SSLv3 Kx=(RSA|DH|DH(512))/ { print $1 }'

驗證 MySQL cipher


mysql $@ -se "SHOW STATUS LIKE 'Ssl_cipher_list'" | sed 's/:/n/g' | sed 's/Ssl_cipher_listss//g' |
while read sspec;
do SPEC=openssl ciphers -v "$sspec" 2>/dev/null | grep -v SSLv3 | awk '{print $1}';
[[ "$sspec" == "$SPEC" ]] && mysql –ssl-cipher=$sspec -e QUIT 2>/dev/null && echo "$sspec OK";
done
 再 sh XXXX -u root -p

Windows IIS

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
"Enabled"=dword:00000000


# 其它 Weak Ciphers
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\DES 56/56]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\NULL]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 40/128]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 56/128]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
"Enabled"=dword:00000000

reg add "HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server" /v Enabled /t REG_DWORD /d 0 /f

又或者你的 Server  的 Iptables 有支援 u32 的話

iptables -I OUTPUT 1 \
  -p tcp \! -f --dport 443 \
  -m state --state ESTABLISHED -m u32 --u32 \
  "0>>22&0x3C@ 12>>26&0x3C@ 0 & 0xFFFFFF00=0x16030000 && \
   0>>22&0x3C@ 12>>26&0x3C@ 2 & 0xFF=0x01 && \
   0>>22&0x3C@ 12>>26&0x3C@ 7 & 0xFFFF=0x0300" \
  -j LOG --log-prefix "SSLv3 Client Hello detected: " # or -j DROP ...

iptables -I OUTPUT 1 \
  -p tcp \! -f --dport 443 \
  -m state --state ESTABLISHED -m u32 --u32 \
  "0>>22&0x3C@ 12>>26&0x3C@ 0 & 0xFFFFFF00=0x16030000 && \
   0>>22&0x3C@ 12>>26&0x3C@ 2 & 0xFF=0x01 && \
   0>>22&0x3C@ 12>>26&0x3C@ 7 & 0xFFFF=0x0300" \
  -j DROP

再這樣子關下去,SSL 都不能用了,應該說是舊的瀏覽器沒幾個可用的

WIKI 記錄著那些 cipher 是安全的,那些是 INSECURE

最後可用 SSL Labs 掃一下

其它參考
http://www.cnnetsec.com/2137.html
https://blog.g3rt.nl/take-down-sslv3-using-iptables.html
http://askubuntu.com/questions/537196/how-do-i-patch-workaround-sslv3-poodle-vulnerability-cve-2014-3566
http://planet.mysql.com/entry/?id=2022096

Related posts 相關文章
用 DNSSEC 是為了安全,但如果憑證過期了怎麼辦
More...
使用 dehydrated 安裝 Let’s Encrypt SSL 憑證
More...
使用 certbot 安裝 Let’s Encrypt SSL 憑證
More...
安裝 Let’s Encrypt SSL 憑證的工具
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。