Amit Klein's security corner - 127.0.0.1 http://securitygalore.com/site3/taxonomy/term/9 en The localhosed attack (stealing IE localhost cookies) http://securitygalore.com/site3/localhosed <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>This <a href="/files/localhosed.pdf" target="_blank">extended advisory</a> describes a vulnerability in Microsoft Internet Explorer 11/10/9/8/7 (on Windows Vista and above). The vulnerability allows stealing cookies for local machine domains/IP addresses. Additionally, the local IP address used by IE to communicate to the Internet is exposed (even if behind a NAT or a SOCKS proxy). On Windows XP, IE 8-6 are vulnerable to the IP exposure vulnerability only.</p> <p>Having an HTTP (web) server listening locally on a Windows machine is not too rare, due to a multitude of software installations that do just that, e.g. for administration/control panel. Googling for e.g. Windows “ht​tp://localhost” yields almost 1 million hits. There’s no need to name names, but it suffices to say that there are major players from many software types, from virtual machines, to analytics, and of course content management systems.</p> <p>Of course, such setup may be susceptible to a plain and simple CSRF attack. However, stealing the cookies has several advantages over CSRF:</p> <ol><li>If the server employs anti-CSRF code, having the session cookies (in combination with DNS rebinding) can, in some cases (depending on the exact nature of the anti-CSRF technique) work around this protection.</li> <li>Session cookies (in combination with DNS rebinding) can enable reading data off sensitive pages.</li> <li>Cookies may contain sensitive information in and out of themselves.</li> </ol><p>The attack method can only steal cookies sent with HTTP requests (not HTTPS). Fortunately for the attacker, a web server bound to a local address is unlikely to use SSL.</p> <p>As for local IP address disclosure, this can be used to map an organization behind a NAT, or as a SOCKS proxy piercing (i.e. exposing the real IP address of a client “hiding” behind a SOCKS proxy).</p> <p>The impact of the cookie stealing attacks is summarized in the below table:</p> <table border="1" cellpadding="0" cellspacing="0"><tbody><tr><td style="width:160px;"> <p> </p> </td> <td style="width:160px;"> <p><strong>New window</strong></p> </td> <td style="width:160px;"> <p><strong>Frame</strong></p> </td> <td style="width:160px;"> <p><strong>Self navigation</strong></p> </td> </tr><tr><td style="width:160px;"> <p>Browser affected</p> </td> <td style="width:160px;"> <p>All IE versions on Windows Vista and above</p> </td> <td style="width:160px;"> <p>All IE versions on Windows Vista and above</p> </td> <td style="width:160px;"> <p>IE11</p> </td> </tr><tr><td style="width:160px;"> <p>User interaction?</p> </td> <td style="width:160px;"> <p>Yes (one click)</p> </td> <td style="width:160px;"> <p>No</p> </td> <td style="width:160px;"> <p>No</p> </td> </tr><tr><td style="width:160px;"> <p>Host scope</p> </td> <td style="width:160px;"> <p>Internet, Local Intranet</p> </td> <td style="width:160px;"> <p>Internet</p> </td> <td style="width:160px;"> <p>Local Intranet</p> </td> </tr><tr><td style="width:160px;"> <p>Cookie type</p> </td> <td style="width:160px;"> <p>persistent, session</p> </td> <td style="width:160px;"> <p>session (and any cookies assigned with P3P acceptable compact policy)</p> </td> <td style="width:160px;"> <p>persistent, session</p> </td> </tr><tr><td style="width:160px;"> <p>UAC mode supported</p> </td> <td style="width:160px;"> <p>(all)</p> </td> <td style="width:160px;"> <p>(all – if UAC is off, the scope can also cover Local Intranet, and there, persistent cookies can be stolen as well)</p> </td> <td style="width:160px;"> <p>On (default)</p> </td> </tr><tr><td style="width:160px;"> <p>SmartScreen mode supported</p> </td> <td style="width:160px;"> <p>Medium (default) or below</p> </td> <td style="width:160px;"> <p>(all)</p> </td> <td style="width:160px;"> <p>(all)</p> </td> </tr></tbody></table><p> </p> <p>Full details <a href="/files/localhosed.pdf" target="_blank">here</a>.</p> <p> </p> <p> </p> </div></div></div><div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"><h3 class="field-label">Tags: </h3><ul class="links"><li class="taxonomy-term-reference-0" rel="dc:subject"><a href="/site3/taxonomy/term/6" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">IE</a></li><li class="taxonomy-term-reference-1" rel="dc:subject"><a href="/site3/taxonomy/term/7" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">cookies</a></li><li class="taxonomy-term-reference-2" rel="dc:subject"><a href="/site3/taxonomy/term/8" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">localhost</a></li><li class="taxonomy-term-reference-3" rel="dc:subject"><a href="/site3/taxonomy/term/9" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">127.0.0.1</a></li><li class="taxonomy-term-reference-4" rel="dc:subject"><a href="/site3/taxonomy/term/10" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Internet Explorer</a></li><li class="taxonomy-term-reference-5" rel="dc:subject"><a href="/site3/taxonomy/term/11" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">NAT</a></li><li class="taxonomy-term-reference-6" rel="dc:subject"><a href="/site3/taxonomy/term/12" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">SOCKS</a></li><li class="taxonomy-term-reference-7" rel="dc:subject"><a href="/site3/taxonomy/term/1" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">FTP</a></li><li class="taxonomy-term-reference-8" rel="dc:subject"><a href="/site3/taxonomy/term/13" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">proxy</a></li><li class="taxonomy-term-reference-9" rel="dc:subject"><a href="/site3/taxonomy/term/14" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">proxy piercing</a></li><li class="taxonomy-term-reference-10" rel="dc:subject"><a href="/site3/taxonomy/term/15" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">PORT</a></li></ul></div> Sun, 21 Jun 2015 18:40:09 +0000 amit 16 at http://securitygalore.com/site3 http://securitygalore.com/site3/localhosed#comments