ãã³ãã³åç»ã«https(SSL)æ¥ç¶ã§ããªãã£ã件
çºç«¯ã¨ãã¦ã¯ãææã®OpenSSLã®ãã¼ã¸ã§ã³ãããããåé¡ãçºçããããã«ãªã£ããï¼1.0.0->1.0.1)
ããã¨ã¯å¥ã«ãèªåã®å人ãµã¼ãã¼ãäºç®æã§ãåé¡ã確èªã§ããã®ã§ããªã«ãããã®ã ã¨æãã
è¿½è¨ 20140413
ãã¹ããã©ã¯ãã£ã¹ããµã¸ã§ã¹ããããè¨äºã§ã¯ãªãã£ãã®ã§ããã以å¤ã¨ãã¯ãã¤ãã¦ãã¾ã£ãã®ã§ãä¸å¿ã
æ¸ãããã£ãäº
ã»ä»åãªã¼ããã´ã·ã¨ã¼ã·ã§ã³ãåé¡ãããã£ã½ãã£ãï¼ãããæ¸ãããã£ãï¼
ã»æ°è»½ã«ããã±ã¼ã¸ã¢ãããã¼ãããã¨ãæåãå¤ãã£ã¦æ²ãã¿ã«ãããªãããã¦ã³ã°ã¬ã¼ããããã¨ãã¦ãæ»ããªããã¨ããã£ã¦ãããã¯ã·ã§ã³ã³ã¼ãã調æ»ããç´ããã¡ã«ãªãäºããã£ã¦ã¤ããããæ»ããããã«æ°ãä»ãããï¼ãããæ¸ãããã£ãï¼
ç¹ã«è¿½è¨ãã¦ããããã®ã¯ä»¥ä¸
ã»ä¾ã§SSLv3æå®ããã®ã¯ä½ãæå³ã¯ãªã
ã»ä»ãªããTLSv1(PHPãªãtls://ï¼ãããã
ãªãã±
ã»SSLv2ã¯ããããæå¦ããã¦ããï¼ããã¯ã¾ãå½ç¶æããï¼
ä»ã§ã¯ããTLSãµãã¼ããã¦ãªããµã¼ãã¼ããããªã*1
æ¤è¨¼ç°å¢
å人ãµã¼ãã¼ãã®ï¼ããããã®VPSãæ¥ç¶ã§ããã
$ cat /etc/redhat-release CentOS release 6.5 (Final) $ openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 $ rpm -qa |grep openssl openssl-1.0.1e-16.el6_5.7.x86_64
å人ãµã¼ãã¼ãã®ï¼ãVultrãæ¥ç¶ã§ããã
ããï¼ã¨åãæ§æã
å人ãµã¼ãã¼ãã®ï¼ããããã®VPSãæ¥ç¶ã§ãã
$ cat /etc/redhat-release CentOS release 5.10 (Final) $ openssl version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 $ rpm -qa |grep openssl openssl-0.9.8e-27.el5_10.1
å
ã«æ¸ãã¦ããããç´è¿ã®HeartBleedã§ã®ããã±ã¼ã¸ã¢ãããã¼ãã¨ã¯é¢ä¿ããªãã£ããï¼ãã¦ã³ã°ã¬ã¼ããã¦ããæ¥ç¶ã§ããªãã£ãï¼
ä¾
åç´ã« https://secure.nicovideo.jp ã«æ¥ç¶ãã«ãããã¨ã§ç¢ºãããããã
# wget https://secure.nicovideo.jp --2014-04-11 21:10:28-- https://secure.nicovideo.jp/ secure.nicovideo.jp ãDNSã«åããããã¦ãã¾ã... 202.248.110.180 secure.nicovideo.jp|202.248.110.180|:443 ã«æ¥ç¶ãã¦ãã¾ã... æ¥ç¶ãã¾ããã SSL ã«ããæ¥ç¶ã確ç«ã§ãã¾ããã
失æã¾ã§çµæ§å¾ ã¤ãã¿ã¤ã ã¢ã¦ãããã¦ããããã ãOpenSSL 0.9ç³»ã1.0.0ç³»ã§ã¯ãã®ç¾è±¡ã¯çºçããªã模æ§ã
ããããwgetã®secure-protocolã§ãSSLv3ãæå®ãã¦ããã¨éãã
ï¼è¿½è¨ãã¾ãããããã¾ãªããTLSv1ãã®ã»ããè¯ãã§ããã*2ï¼
# wget --secure-protocol=SSLv3 https://secure.nicovideo.jp/ --2014-04-11 22:04:44-- https://secure.nicovideo.jp/ secure.nicovideo.jp ãDNSã«åããããã¦ãã¾ã... 202.248.110.180 secure.nicovideo.jp|202.248.110.180|:443 ã«æ¥ç¶ãã¦ãã¾ã... æ¥ç¶ãã¾ããã HTTP ã«ããæ¥ç¶è¦æ±ãéä¿¡ãã¾ãããå¿çãå¾ ã£ã¦ãã¾ã... 302 Found å ´æ: https://secure.nicovideo.jp/secure/ [ç¶ã] ï¼ä»¥ä¸ç¥ï¼
secure-protocolã¯ããã¤ãæå®ã§ããããTLSv1ãSSLv3ã¯åé¡ç¡ããSSLv2ã§ã¨ã©ã¼ãautoã¯åè¿°ã®ã¿ã¤ã ã¢ã¦ãçãªã¨ã©ã¼ã«ãªã£ãã
ä¾ï¼
ããã¯PHPã®stream_socket_clientã§ãåæ§ã§ããã以ä¸ã³ã¼ããåä½ããªãã
<?php $socket = stream_socket_client("ssl://secure.nicovideo.jp" . ':' . "443", $errno, $errstr, (int) 10, STREAM_CLIENT_CONNECT); if (!$socket) { echo "error!"; } -- # php test.php PHP Warning: stream_socket_client(): SSL: crypto enabling timeout in /root/tmp/test.php on line 6 PHP Warning: stream_socket_client(): Failed to enable crypto in /root/tmp/test.php on line 6 PHP Warning: stream_socket_client(): unable to connect to ssl://secure.nicovideo.jp:443 (Unknown error) in /root/tmp/test.php on line 6
以ä¸ã®ããã«sslv3ãæå®ããã¨åãã
ï¼è¿½è¨ãã¾ãããããã¾ãªããtls://ãã®ã»ããè¯ãã§ããã*3ï¼
<?php $socket = stream_socket_client("sslv3://secure.nicovideo.jp" . ':' . "443", $errno, $errstr, (int) 10, STREAM_CLIENT_CONNECT); if (!$socket) { echo "error!"; }
ãã®ã»ãã«ãwgetåæ§ã«æå®ã§ãããã®ãããããsslã¯wgetã®autoç¸å½ã£ã½ãã¿ã¤ã ã¢ã¦ãå¾
ã¡ã«ãªããsslv2ã¯åæ§ã«ã¨ã©ã¼ã«ãªã£ãã
ã¾ã¨ã
ç¹ã«ã¾ã¨ãããããªãã¨ã¯ãªãããSSLã§æ¥ç¶ã§ããªãã¨ãã¯ãSSL/TLSã®ãã¼ã¸ã§ã³ãããã¦ã¿ãã®ãããã¨ãããã¾ãã
çªå¤ã¾ã¨ã
ãããã£ãããããããªããã¨ã¯ãã¾ã«çºçããã®ã§ãrpmãã¢ããã°ã¬ã¼ãããã¨ãã¯ãç¾å¨ã®rpmã®ãã¼ã¸ã§ã³IDããã¡ãã¨æ¸ãæ®ãã¦ãããã
ããã«ããã®éå»ãã¼ã¸ã§ã³ã®RPMãæ¬å½ã«å
¥æã§ãããï¼downgradeãªã©ã§å¼ãããï¼ï¼ããã¡ãã¨ç¢ºèªãã¦ãããããªãã¨ããã¤ã¯æã«å
¥ããªãã¨ãããè¨ãäºãããã®ã§æ°ãã¤ãã¾ãããã