XMLHttpRequestãªãã¸ã§ã¯ãã使ã£ãTRACEã¡ã½ããéä¿¡ã®ãã©ã¦ã¶å¯¾å¿ç¶æ³ã確èªãã¦ã¿ã
HTTPã®TRACEã¡ã½ãããæªç¨ããå¤ãæ»æææ³ã«ãCross Site Tracing(XST)ãã¨ãããã®ãããã¾ãããã®æ»æææ³ãæªç¨ããã¨ã第ä¸è ã Cross Site Scriptingï¼XSSï¼ã®èå¼±æ§ãåå¨ããWeb ãµã¤ãã¨ãã©ã¦ã¶ã®éã§ããåãããã HTTP ãªã¯ã¨ã¹ãã»ããããåå¾ã§ãã¦ãã¾ãã¾ãããã®ææ³ã¯ä¸è¬çã« HTTP ãªã¯ã¨ã¹ãã»ãããã«å«ã¾ãã Authorization ãããã Cookie ãããã奪åããããã«æªç¨ãããããã§ããã
XST ã§ã¯ä¸è¬çã« JavaScript ã§XMLHttpRequest ãªãã¸ã§ã¯ããæªç¨ããããã§ãããææ°ã®ãã©ã¦ã¶ã§ã XMLHttpRequest ãªãã¸ã§ã¯ã㧠TRACE ã¡ã½ããã® HTTP ãªã¯ã¨ã¹ããéä¿¡ã§ããã®ã§ãããããã¨ããã®ããW3C ã® XMLHttpRequest ãªãã¸ã§ã¯ãã«é¢ãã Working Draft*1 ã§ã¯ããTRACEã¡ã½ããã§ãã£ãå ´åãã»ãã¥ãªãã£ä¾å¤ãçºçãããå¦çãä¸æ¢ãã¹ã(should)ã§ããã*2ã¨ã®è¨è¿°ãããã¾ãããã®ãã¨ãããç¾ç¶ã®ãã©ã¦ã¶ã§ã¯ XMLHttpRequest ãªãã¸ã§ã¯ãã使ã£ã¦ TRACE ã¡ã½ãããéããªãã®ã§ã¯ï¼ã¨èãã¾ãããããã§ãææ°ã®ä¸»è¦ 5 ãã©ã¦ã¶ï¼Internet Explorer, Mozilla Firefox, Opera, Safari for Windows, Google Chromeï¼ã§ XMLHttpRequest ãªãã¸ã§ã¯ãã使ã£ã TRACE ã¡ã½ããã® HTTP ãªã¯ã¨ã¹ããéä¿¡ã§ããã確èªãã¦ã¿ã¾ããã
çµè«
ä¸»è¦ 5 ãã©ã¦ã¶ã§ã¯ãXMLHttpRequest ãªãã¸ã§ã¯ãã使ã£ã TRACE ã¡ã½ããã® HTTP ãªã¯ã¨ã¹ããéä¿¡ã§ãã¾ããã§ããï¼ãã®æ¥è¨å·çæç¹ï¼ãå°ãªãã¨ã JavaScript + XMLHttpRequest ãªãã¸ã§ã¯ããæªç¨ãã XST ã¯ãç¾å¨ã¯ããããæåãã¥ããææ³ã¨ãªã£ã¦ããããã§ãã*3ãXST ãçºè¦ãããã®ã 2003 å¹´ 1 æé ã§ããããã§ã« 7 年以ä¸ãçµéãã¦ãã¾ãããã®æéã«ãã©ã¦ã¶ããã¡ãã¨å¯¾çããããã¦ããã¨è¨ãããã§ãããéå»ã«ã³ã³ã»ããã¨ãã¦çºè¡¨ãããããå®å®³ãèµ·ãããã¨ããªããç¾å¨ã§ã¯æç«ããªãæ»æææ³ã¯ä»ã«ãå¤ããã§ãã
次ç¯ãã確èªæ¹æ³ã確èªçµæãã¾ã¨ãã¦ãã¾ããèå³ã®ããæ¹ã®ã¿ã©ããã
ä¸»è¦ 5 ãã©ã¦ã¶ã®å¯¾å¿ç¶æ³ã®ç¢ºèª
確èªæ¹æ³
VMware Serverä¸ã§åä½ãã¦ãã Ubuntu 8.04ï¼IP: 192.168.0.250ï¼ ã«ä»¥ä¸ã® HTML ãã¡ã¤ã«ãç¨æããä¸»è¦ 5 ãã©ã¦ã¶ã§ãã® HTML ãã¡ã¤ã«ãé²è¦§ãã¾ããããã® HTML ãã¡ã¤ã«ãé²è¦§ãã[CLICK] ãã¿ã³ãã¯ãªãã¯ããTRACE ã¡ã½ãããéä¿¡ãããã確èªãã¾ãããæ£å¸¸ã«éä¿¡ãããã°ãHTTP ã¬ã¹ãã³ã¹ããã¤ã¢ãã°ã¦ã¤ã³ãã¦ã§ç¢ºèªã§ããã¨ããç°¡åãªä»çµã¿ã§ãã
<html> <head> <title>xmlHttpRequest Test -TRACE- </title> <script type="text/javascript"> function a(){ var xmlHttp = new XMLHttpRequest; xmlHttp.open("TRACE", "http://192.168.0.250/",false); xmlHttp.send(); xmlDoc=xmlHttp.responseText; alert(xmlDoc); } </script> <body> <input type="button" name="b" value="CLICK" onclick="a();"> </body> </html>
ã¡ãªã¿ã«ã"TRACE" ã "GET" ã«å¤æ´ããæé ã©ããå®è¡ããã¨ã以ä¸ã®ããã«ãªãã¾ããï½ttp://192.168.0.250/ ã®å
容ããã¤ã¢ãã°ã¦ã¤ã³ãã¦ã«è¡¨ç¤ºããã¾ããã
確èªçµæ
ä¸»è¦ 5 ãã©ã¦ã¶ã®ç¢ºèªæ¹æ³ãå®æ½ããçµæã以ä¸ã®è¡¨ã«ã¾ã¨ãã¾ããã大ä½ã®ãã©ã¦ã¶ã§ã¯ã確èªæ¹æ³ãå®æ½ããã¨ãJavaScript å®è¡æã«ã¨ã©ã¼ãçºçãã¾ããä¸»è¦ 5 ãã©ã¦ã¶ãã¹ã¦ã§ XMLHttpRequest ãªãã¸ã§ã¯ãã使ã£ã TRACE ã¡ã½ããã® HTTP ãªã¯ã¨ã¹ããéä¿¡ã§ããªããã¨ãåããã¾ãã
ãã©ã¦ã¶ | ãã¼ã¸ã§ã³ | çµæ |
---|---|---|
Internet Explorer | 8.0.6001.18702 | éä¿¡ã§ããªã |
Mozilla Firefox | 3.6.6 | éä¿¡ã§ããªã |
Opera | 10.60 | éä¿¡ã§ããªã |
Safari for Windows | 5.0 | éä¿¡ã§ããªã |
Google Chrome | 5.0.375.99 | éä¿¡ã§ããªã |
åãã©ã¦ã¶ã«ããã¦ã確èªæ¹æ³ãå®æ½ããéã«çããã¨ã©ã¼ã以ä¸ã«ã¾ã¨ãã¾ãã
â Internet Explorer
ãªããéå» Internet Explorer ã§ã¯ "TRACE" ã "\nTRACE" ã«å¤æ´ãããã¨ã§ãTRACE ã¡ã½ãããéä¿¡ã§ããããã§ããï¼åèæ
å ±ãåç
§ï¼ãç¾å¨ã¯ä¿®æ£ããã¦ããããã§ããå®éã« "TRACE" ã "\nTRACE" ã«å¤æ´ãã¦ç¢ºèªãã¦ã¿ã¾ããããä¸å³ã¨åãçµæã¨ãªãã¾ããã
â Opera
â Safari for Windows
Safari ã§ã¯åæè¨å®ã§éçºã¡ãã¥ã¼ã表示ããã¦ãã¾ãããã¨ã©ã¼ã³ã³ã½ã¼ã«ã確èªããããã«ã¯ã[è¨å®]ã¡ãã¥ã¼ãã[詳細]ã¿ãã®[ã¡ãã¥ã¼ãã¼ã«"éçº"ã¡ãã¥ã¼ã表示]ãæå¹ã«ãã¦ããå¿
è¦ãããã¾ãã
åèæ å ±
- WhiteHat Security - Whitepaper - Cross-Site Tracing (XST)
- Cross Site Tracing | 鳩丸ぐろっさり (用語集)
- エラーメッセージの危険性:Webアプリケーションに潜むセキュリティホール(4) - @IT
- ãâBasicèªè¨¼ã®IDã¨ãã¹ã¯ã¼ããæ¼ããããXSTï¼Cross-Site Tracingï¼ã
- Wizard Bible vol.34 (2007,6,12)
- ãâ第1ç« : XHRã®ãªãã¼ã¹ã¨ã³ã¸ãã¢ãªã³ã°ã
- Cross-site tracing - Wikipedia
*1:the 19 November 2009 Last Call Working Draft
*2:Working Draft の「4.6.1 The open() method」ã® 4. ãåç §
*3:ãã©ã¦ã¶ã®æååãã§ãã¯ãåé¿ã㦠TRACE ã¡ã½ããéä¿¡ãå¯è½ã¨ããåé¿ææ³ã®å¯è½æ§ãã¾ã Java Applet ã Flash çãæªç¨ããæ¹æ³ã®å¯è½æ§ãããããã100% æåããªãã¨ã¯è¨ãã¾ãã