Webã»ãã¥ãªãã£ã«é¢å¿ã®ãã人ã¯ãPOODLEãšåŒã°ãããã1ã€ã®SSLã®è匱æ§ãæ¢ã«èªèããŠããŸãã ãã®è匱æ§ã®è©³çŽ°ãšãæ»æè ãä¿è·ãããŠãããšæããããŠãŒã¶ãŒããŒã¿ãååŸããæ¹æ³ã詳现ã«èª¿ã¹ãMail.Ru GroupããŒã ããã®ç£ãã©ã®ããã«åŠçãããã«ã€ããŠã説æããŸãã
POODLEã䜿çšããã¡ã«ããºã ã®å æ¬çãªèª¬æã¯ã ãã®POODLEãã€ãïŒSSL 3.0ãã©ãŒã«ããã¯ã®ãšã¯ã¹ããã€ãã«ãããŸãã 以äžã«ããã®èšäºã®ç¿»èš³ã瀺ããŸãã
æªæã®ããç¬ã®æŽ»åã®è©³çŽ°ã«ããŸãèå³ããªã人ã«ã¯ãPOODLEãSSL 3ã®è匱æ§ã§ããããšãæãåºããŠãã ãããSSL3ã¯ã2çªç®ã®10ãçãæ®ã£ããããã³ã«ã®å€ãããŒãžã§ã³ã§ãã è匱æ§ã«å¯ŸåŠããã«ã¯2ã€ã®æ¹æ³ããããŸãã
- ãµãŒããŒã«ãTLSçµç±ã§æ¥ç¶ã§ããªãå Žåã®ãã³ãã·ã§ã€ã¯ããã»ã¹äžã®SSL3ãžã®ããŒã«ããã¯ãçŠæ¢ããããããé©çšããŸãã ãã£ããã¯ããããããµãŒããŒãšã¯ã©ã€ã¢ã³ãã«ããå Žåã«ã®ã¿ããã®æ¹æ³ãæ©èœããããšã§ãã çŸåšãããã¯Google ChromeïŒ2014幎2æããïŒã§ã®ã¿å®è£ ãããŠããã次ã®Firefoxã®ã¢ããããŒãã§èšç»ãããŠããŸãã ãŠãŒã¶ãŒã®å®å šãããçšåºŠç¢ºä¿ããããšã¯ããŠãŒã¶ãŒèªèº«ã«ããã£ãŠããããšãããããŸãã
- ãµãŒããŒã§SSL 3ãç¡å¹ã«ããŸããããã§çµããã§ãã ã·ã³ãã«ã§ãšã¬ã¬ã³ãã§ãããããããã1ã€ã ãã§ãã ã»ãšãã©ã®ãã©ãŠã¶ãŒã¯TLSããŒãžã§ã³1.0以éã䜿çšããŸãããInternet ExplorerããŒãžã§ã³6ãšåŒã°ããéå»ã®éºç£ãææŸãæºåãã§ããŠããªã人ã ããŸã äžçäžã«ããŸãããããã¯åã«ããã©ã«ãæ§æã®ãããã³ã«ã®æ°ããããŒãžã§ã³ããµããŒãããŠããŸããã
çµ±èšã«ãããšãIE6ãä»ããŠã0.2ïŒ ã®ãŠãŒã¶ãŒãMail.Ru Mailã«ã¢ã¯ã»ã¹ããŠããŸãã 絶察çãªæå³ã§ã¯ããã¯ããã»ã©å°ããªæ°åã§ã¯ãããŸããããå®å šæ§ã¯äœãããéèŠã ãšèããŠããŸãã ãã®ãããã¡ãŒã«ãã¯ã©ãŠããã«ã¬ã³ããŒãèªèšŒã»ã³ã¿ãŒãããã³æ¥åçšã®Mail.Ruã§SSL3ãä»ããŠã¯ã©ã€ã¢ã³ãã«æ¥ç¶ããæ©èœãç¡å¹ã«ããŸããã
IE6ãŠãŒã¶ãŒã®å Žåãããã¯Mail.Ru Mailãããã³ãã®POODLEãšæŠãæ¹æ³ãéžæããä»ã®ãµãŒãã¹ãå©çšã§ããªããªãããšãæå³ããŸãã Habrã®èŠèŽè ã®äžã«IE6ã®ãã©ãã¯ãŒãå€ãããšã¯ãŸããããŸããããææ°ã®ãã¯ãããžãŒã«ããŸã芪ãããªã芪relativeãå人ããã©ãŠã¶ãæŽæ°ããããšã確èªããããšããå§ãããŸãã
è匱æ§ããä¿è·ããããã®æåã®æ¹æ³ãéžæãããµãŒãã¹ã®å Žåãããã§ãšããšå®æçã«èªåæŽæ°ããChromeãŠãŒã¶ãŒã§ããã°ãä¿è·ãããŠããŸãã ä»ã®ãã©ãŠã¶ã䜿çšããå Žåã¯ãå°ãªããšããããªãã¯Wi-Fiã«ã¢ã¯ã»ã¹ããå Žåã¯ããã®å Žåã¯è匱ã§ãããããæ°ããChromeã䜿çšããããšããå§ãããŸãã ãªãã§ïŒ ããã¯ã以äžã®ç¿»èš³ã§èŠã€ããããšãã§ããŸãã
SSL 3.0 [RFC6101]ã¯æ代é ãã®å®å šã§ãªããããã³ã«ã§ãã å®éã®åé¡ã®ã»ãšãã©ã解決ããéã«ãåŸç¶ãããã³ã«ã§ããTLS 1.0 [RFC2246]ãTLS 1.1 [RFC4346]ãããã³TLS 1.2 [RFC5246]ã«çœ®ãæããããŸããããå€ãã·ã¹ãã ãšã®çžäºäœçšã®ããã«SSL 3.0ãšã®åŸæ¹äºææ§ãä¿æããŠããŸãã ããã«ããããµãŒããŒã«æ°ããããŒãžã§ã³ã®ãããã³ã«ãå°å ¥ããéã®ã¯ã©ã€ã¢ã³ãããã€ã¹ã®åé¡ãåé¿ã§ããŸãã
ãã ããã¯ã©ã€ã¢ã³ããšãµãŒããŒã®äž¡æ¹ãTLSããµããŒãããŠããå Žåã§ããå€ãã®ã¯ã©ã€ã¢ã³ãã¯å€ããããã³ã«ã䜿çšããŠãµãŒããŒäºææ§ã®ãã°ã«å¯ŸåŠãããããSSL 3.0ã®ã»ãã¥ãªãã£ã¬ãã«ã¯äŸç¶ãšããŠåé¡ã§ãã ãããŠãæ»æè ããã®ç¶æ³ãæªçšããSSL 3.0ãããã³ã«ãã¯ã©ãã¯ããæ¹æ³ã«ã€ããŠèª¬æããããšæããŸãã POODLEæ»æïŒããŠã³ã°ã¬ãŒããããã¬ã¬ã·ãŒæå·åã®ããã£ã³ã°OracleïŒã«ã€ããŠè©±ããŠãããããããšãã°ãã»ãã¥ã¢HTTPã¯ãããŒãŸãã¯HTTPèªèšŒããããŒã®ã³ã³ãã³ããååããããšãå¯èœã§ãã
ãŸãããã®ãããªæ»æã«èããããã«ãã¯ã©ã€ã¢ã³ããšãµãŒããŒã§å®è¡ããã¢ã¯ã·ã§ã³ãæšå¥šããŸãã åã«SSL 3.0ãç¡å¹ã«ããããšãäºææ§ã®çç±ããé©åã§ãªãå ŽåãTLSã®æ¢åã®ããŒãžã§ã³ã§ã¯TLS_FALLBACK_SCSVã䜿çšããå¿ èŠããããŸãã
POODLEè匱æ§ã®èª¬æ
ãµãŒããŒã®å€ãããŒãžã§ã³ãšã®äºææ§ã確ä¿ããããã«ãå€ãã®TLSã¯ã©ã€ã¢ã³ãã¯ããŠã³ã°ã¬ãŒããã³ã¹ã䜿çšããŸããæåã«ãææ°ããŒãžã§ã³ã®ãããã³ã«ã䜿çšããŠéä¿¡ã確ç«ããããšããŸãã æ¥ç¶ã確ç«ãããªãå Žåãæ°ãããããã³ã«ã䜿çšãããŸãããå€ããããã³ã«ã䜿çšãããŸãã äž¡åœäºè ããµããŒãããéåžžã®ããŒãžã§ã³æ±ºå®æé ïŒããšãã°ãã¯ã©ã€ã¢ã³ããTLS 1.2ãä»ããŠã¢ã¯ã»ã¹ãããµãŒããŒãTLS 1.0ã«åŸã£ãŠå¿çããïŒãšã¯å¯Ÿç §çã«ãäžèšã®ã¹ããŒã ã¯ãããã¯ãŒã¯ãšã©ãŒãŸãã¯æªæã®ããã¢ã¯ã·ã§ã³ã«ããéå§ã§ããŸãã ã¯ã©ã€ã¢ã³ããšãµãŒããŒéã®ãããã¯ãŒã¯ãå¶åŸ¡ããæ»æè ãä»å ¥ãããããã³ã«ããŒãžã§ã³TLS 1.0以äžãšã®æ¥ç¶ã劚害ãããšãã¯ã©ã€ã¢ã³ãèªèº«ãSSL 3.0ã®äœ¿çšã«åãæ¿ãããŸãããã®ãããã³ã«ã¯ãRC4ã¹ããªãŒã æå·åããŸãã¯CBCã¢ãŒãã§ã®ãããã¯æå·åã䜿çšããŸãã RC4ã®äž»ãªåé¡ã¯ãªãã»ããã®ååšã§ããåãããŒã¿ïŒãã¹ã¯ãŒããHTTP Cookieãªã©ïŒãéä¿¡ããããã«äœ¿çšãããæ¥ç¶ãšæå·åã¹ããªãŒã ãå€ãã»ã©ã解èªã«åœ¹ç«ã€ãã©ãã£ãã¯ããããå€ãã®æ å ±ãæœåºã§ããŸãã 以äžã«ãSSL 3.0ã䜿çšããŠCBCæå·åã«å¯Ÿããå¹æçãªæ»æãçµã¿åãããæ¹æ³ã瀺ããŸãïŒæ»æè ãã¯ã©ã€ã¢ã³ããšãµãŒããŒéã®ãããã¯ãŒã¯äº€æãå€æŽã§ããå ŽåïŒã åæã«ãBEASTãLucky 13ã®è匱æ§ãšã¯ç°ãªããããã§ã¯åé¿çã¯ãããŸããã å®å šã§ãªãSSL 3.0ãããã³ã«ã®ã¿ã䜿çšããŠããããã匷åãªæå·åã確ä¿ããããã䜿çšã¯é¿ããŠãã ããã
SSL 3.0ã§ã®CBCæå·åã®æãæ·±å»ãªåé¡ã¯ãããã£ã³ã°ãä»»æã§ããïŒæåŸã®ãã€ããé€ãïŒãMACïŒã¡ãã»ãŒãžèªèšŒã³ãŒãïŒã«é©çšãããªãããšã§ãã SSL 3.0ã§ã¯ãã¡ãã»ãŒãžã¯æåã«MACã䜿çšããŠçœ²åããã次ã«ããã£ã³ã°ã§è£å®ããããã®åŸãããã¯æå·ã§æå·åãããããã埩å·åäžã«è¿œå ã®æŽåæ§ãå®å šã«ç¢ºèªããããšã¯ã§ããŸããã 1ãLãã€ãïŒLã¯ãã€ãåäœã®ãããã¯ãµã€ãºïŒã®ããã£ã³ã°ã䜿çšããŠãæå·åã®åã«æŽæ°ã®ãããã¯æ°ãååŸããŸãã ïŒæå·åã®åã«ïŒL-1ã®ä»»æã®ãã€ããšããã«ç¶ãL-1ã®å€ãæã€1ãã€ãã§æ§æãããããã£ã³ã°ãããã¯å šäœãããå Žåãä¿è·ãçªç Žããã®ãæãç°¡åã§ãã çä¿¡æå·åã¬ã³ãŒãC 1 ... C nãåŠçããã«ã¯ãåæåãã¯ãã«C0ãæå®ãããŠããå ŽåïŒåC iã¯1ãããã¯ïŒãåä¿¡åŽã¯æåã«P 1 ... P nãP i = D K ïŒC i ïŒâC i-ãšããŠæ±ºå®ããŸã1 ïŒD Kã¯ãã»ãã·ã§ã³ããŒKã䜿çšãã1ãããã¯ã®åŸ©å·åãè¡šããŸãïŒã 次ã«ãã¡ãã»ãŒãžã®æåŸã®ããã£ã³ã°ãæ€èšŒããã³åé€ãããæåŸã«MAC眲åãæ€èšŒããã³åé€ãããŸãã
æåŸã®ãããã¯C nãå®å šã«ããã£ã³ã°ã§ãããæ»æè ãC nãåãã¹ããªãŒã ã®ä»¥åã®æå·åããããããã¯C iã«çœ®ãæããå ŽåãD K ïŒC i ïŒâC n-1ã§ããã°ãã¡ãã»ãŒãžã¯åãå ¥ããããŸãã L-1ã®æåŸã®ãã€ãããã以å€ã®å Žåã¯ããããæåŠãããŸããããã«ãããããã£ã³ã°Oracleã®æ»æãå¯èœã«ãªããŸãã
ã©ãã®æ¡ä»¶ä»¥å€ã§ã¯ãæ»æè ãBEASTæ»æææ³ã䜿çšããŠSecure HTTP Cookieã埩å·åããå ŽåãSSL 3.0ã®åŒ±ç¹ãMITMæ»æã§äœ¿çšã§ããŸãã POODLEæ»æãå®è¡ããã«ã¯ã次ã®ãã®ãå¿ èŠã§ãã
- www.evil.comã§JS-ãå®è¡ããŠã被害è ã®ãã©ãŠã¶ãŒãHTTPSèŠæ±ãå«ãCookieãhttps://example.comã« éä¿¡ããããã«ããŸã
- example.comãå€æŽãããã¬ã³ãŒããåãå ¥ããå¯èœæ§ãååã«å€§ãããªãããã«ãSSLã¬ã³ãŒããã€ã³ã¿ãŒã»ããããŠå€æŽããŸã ã ãã®å Žåãæ»æè ã¯Cookieãã1ãã€ãã解èªã§ããŸã
åãããã¯Cã«16ãã€ã-C [0] ... C [15]ãå«ãŸããŠãããšããŸãã ãŸããCookieã®ãµã€ãºãèªèãããšä»®å®ããŸãïŒä»¥äžã§ã¯ãCookieã®ãµã€ãºãç¥ããã«æ»æãè¡ãæ¹æ³ã瀺ããŸãïŒã SSL 3.0ã®MACãµã€ãºã¯éåžž20ãã€ããªã®ã§ãCBCã¬ã€ã€ãŒã®äžã®ãæå·åãããPOSTãã¯æ¬¡ã®ããã«ãªããŸãã
POST / ãã¹ CookieïŒ åå=å€ ... \ r \ n \ r \ n æ¬æ Ç20 ãã€ã MACÇ ããã£ã³ã°
æ»æè ã¯ãªã¯ãšã¹ãã®ãã¹ãšæ¬æãå¶åŸ¡ããããã次ã®2ã€ã®æ¡ä»¶ãæºãããªã¯ãšã¹ããéå§ã§ããŸãã
- ããã£ã³ã°ã¯ãããã¯å šäœãåããŸãïŒC nã§æå·åïŒ
- ãŸã ç¥ãããŠããªãæåã®Cookieãã€ããã以åã®ãããã¯ã®æåŸã«çœ®ãæããããŸãïŒC iã§æå·åãããŸãïŒ
次ã«ãæ»æè ã¯C nãC iã«çœ®ãæãããã®å€æŽãããã¬ã³ãŒãããµãŒããŒã«ãªãã€ã¬ã¯ãããŸãã
ã»ãšãã©ã®å ŽåããµãŒããŒã¯ãããåãå ¥ãããæ»æè ã¯æ°ãããªã¯ãšã¹ããéä¿¡ããŸãã æã ïŒããã256åã®è©Šè¡ããšã«ïŒãµãŒããŒã¯å€æŽãããã¬ã³ãŒããåãå ¥ããæ»æè ã¯D k ïŒC i ïŒ[15]âC n-1 [15] = 15ããããã£ãŠP i [15] = 15âC n -1 [15]âC i-1 [15]ã ããã«ããã以åã¯äžæã§ãã£ãCookieã®æåã®ãã€ããéããŸãã æ»æè ã¯æ¬¡ã®ãã€ãã«ç§»åããåæã«ãªã¯ãšã¹ãã®ãã¹ãšæ¬æã®ãµã€ãºãå€æŽããŠããªã¯ãšã¹ãã®ãµã€ãºã¯å€ãããªãããããããŒã®å Žæã¯ç§»åããããã«ããŸãã ããã¯ãCookieãå®å šã«åŸ©å·åããããŸã§è¡ãããŸãã äºæ³ãããåèšã¯ãŒã¯ããŒãã¯ã1ãã€ãããã256 SSL 3.0èŠæ±ã§ãã
ããã£ã³ã°ã¯ãã€ããŒãã®æ£ç¢ºãªãµã€ãºãé ããããCookieã®ãµã€ãºã¯ããã«ã¯ããããŸããã ãããããªã¯ãšã¹ãGET /ãGET / AãGET / AAã...ã«ãããæ»æè ã¯ãããã¯ã®å¢çãèšç®ã§ããŸãã ã¢ããªã³ã®ãµã€ãºããããã£ãŠCookieã®ãµã€ãºã調ã¹ãã«ã¯ãæ倧16åã®ãã®ãããªã¯ãšãªã§ååã§ãã
æšå¥šäºé
äžèšã®æ»æã«ã¯SSL 3.0ãä»ããæ¥ç¶ãå¿ èŠã§ãããããã¯ã©ã€ã¢ã³ããŸãã¯ãµãŒããŒïŒãŸãã¯äž¡åŽïŒã§æ¥ç¶ãç¡å¹ã«ãããšããã©ãã«ãå®å šã«åé¿ã§ããŸãã å°ãªããšãäžæ¹ãSSL 3.0ã®ã¿ããµããŒãããŠããå Žåãè¬ã¯ç¡åã§ãããå®å šã§ãªãæå·åãé¿ããããã«æ·±å»ãªæŽæ°ãå¿ èŠã§ãã SSL 3.0ã®ã¿ããµããŒããããŠãããããã³ã«ã§ã¯ãªããç¡å¹ã«ãªã£ãŠããªãå ŽåãããŠã³ã°ã¬ãŒããã³ã¹ïŒãµãŒããŒãšã®äºææ§ã®ããã«ã¯ã©ã€ã¢ã³ããäžäœããŒãžã§ã³ã«åãæ¿ããïŒã§æ»æãå¯èœã§ããå€ãã·ã¹ãã ã§å®æçã«äœæ¥ããå¿ èŠãããå ŽåãSSL 3.0ãç¡å¹ã«ããããšã¯å®çšçã§ã¯ãããŸããã TLS_FALLBACK_SCSVã¡ã«ããºã ã¯ãç°ãªããããã³ã«ããŒãžã§ã³ã®äžè¬çãªåé¡ã解決ããŸããããã¯ãSSL 3.0äºææ§ããµããŒãããã·ã¹ãã ã«ãšã£ãŠç¹ã«éèŠã§ãããšèããŠããŸãã 以äžã«ãTLS_FALLBACK_SCSVã®æäœã¢ã«ãŽãªãºã ã瀺ããŸãã
ããŠã³ã°ã¬ãŒããã³ã¹ã䜿çšããTLSã¯ã©ã€ã¢ã³ãã¯ãåããŠã³ã°ã¬ãŒããããã³ã«ããŒãžã§ã³äžã«ClientHello.cipher_suitesã«å€0x56ã0x00ãå«ããå¿ èŠããããŸãã ãã®å€ã¯ãããŠã³ã°ã¬ãŒãæ»æãçºçããå ŽåãæŽæ°ããããµãŒããŒãæ¥ç¶ã®ç¢ºç«ãæåŠã§ããä¿¡å·ãšããŠæ©èœããŸãã ã¯ã©ã€ã¢ã³ãã¯ãåžžã«æ¬¡ã®äžäœããŒãžã§ã³ã«ã¢ããã°ã¬ãŒãããå¿ èŠããããŸãïŒããšãã°ãTLS 1.2ã§éå§ããå ŽåãTLS 1.1ãTLS 1.0ãSSL 3.0ã®é ã«è©ŠããŠãã ããïŒã TLS_FALLBACK_SCSVã®å ŽåãããŒãžã§ã³ãã¹ããããããšæ¥ç¶ã倱æããããšããããŸãã
TLSãµãŒããŒã¯ãçä¿¡æ¥ç¶ã§ClientHello.cipher_suitesã®0x56ã0x00ãæ€åºãããå ŽåãClientHello.cipher_versionããµãŒããŒã§ãµããŒããããŠããæé«ã®ãããã³ã«ããŒãžã§ã³ãšæ¯èŒããŸãã ãµãŒããŒãã¯ã©ã€ã¢ã³ããããé«ãããŒãžã§ã³ããµããŒãããŠããå Žåãæ¥ç¶ã¯ãšã©ãŒã§äžæããŸãã
ãã®ãããªTLS_FALLBACK_SCSVã®äœ¿çšã«ãããSSL 3.0ã¯å€ãã·ã¹ãã ã§äœæ¥ããå Žåã«ã®ã¿äœ¿çšããããšãã確信ãåŸãããŸããæ»æè ã¯ãããã³ã«ã®ããŠã³ã°ã¬ãŒããéå§ã§ããªããªããŸãã äž¡åŽãSSL 3.0ãèš±å¯ããŠããããäžæ¹ãTLS_FALLBACK_SCSVããµããŒãããŠããªãå Žåãæ»æã¯äŸç¶ãšããŠå¯èœã§ãã
åç §è³æ
- [BEAST] T. DuongãJãRizzoïŒâ Here Come TheâNinjasã â 2011ã
- [draft-ietf-tls-downgrade-scsv-00] B.MöllerãA. LangleyïŒããããã³ã«ããŠã³ã°ã¬ãŒãæ»æãé²ãããã®TLSãã©ãŒã«ããã¯ã·ã°ããªã³ã°æå·ã¹ã€ãŒãå€ïŒSCSVïŒããInternet-Draft draft-ietf-tls-downgrade-scsv -00ã2014 ã
- [Lucky13] NJ AlFardanãKGãã¿ãŒãœã³ïŒã Lucky ThirteenïŒBreaking the TLS and DTLS Record Protocols ããIEEE Symposium on Security and Privacyã2013幎ã
- [RC4biases] NJ AlFardanãDJ BernsteinãKG PatersonãBãPoetteringãJCN SchuldtïŒã TLSããã³WPAã§ã®RC4ã®ã»ãã¥ãªãã£ã«ã€ã㊠ããUSENIX Security Symposiumã2013幎ã
- [RFC2246] T.ãã£ãŒã¯ã¹ãCã ã¢ã¬ã³ïŒãTLSãããã³ã«ããŒãžã§ã³1.0ãã RFC2246 ã1998幎ã
- [RFC4346] T. DierksãEãRescorlaïŒããã©ã³ã¹ããŒãå±€ã»ãã¥ãªãã£ïŒTLSïŒãããã³ã«ããŒãžã§ã³1.1ãã RFC4346ã2006 ã
- [RFC5246] T. DierksãEãRescorlaïŒããã©ã³ã¹ããŒãå±€ã»ãã¥ãªãã£ïŒTLSïŒãããã³ã«ããŒãžã§ã³1.2ãã RFC5246 ã2008幎ã
- [RFC6101] A.ãã©ã€ã¢ãŒãPãã«ãŒã«ãã³ãPã KocherïŒãSecure Sockets LayerïŒSSLïŒProtocol Version 3.0ãã RFC6101ã1996 ïŒ2011幎ã«Historic RFCãšããŠå ¬éïŒã
- [tlscbc] B.MöllerïŒãSSL / TLSã§ã®CBCæå·ã¹ã€ãŒãã®ã»ãã¥ãªãã£ïŒåé¡ãšå¯Ÿçãã http ïŒ//www.openssl.org/~bodo/tlscbc.txtã2004幎ã