32108 : Mozilla Multiple Products Blocked Popup Arbitrary File Access
Printer | http://osvdb.org/32108 | Email This | Edit Vulnerability

Views This Week

2

Views All Time

113

Info

Last Modified

7 months ago

Percent Complete

100%

Disclosure

Feb 05, 2007

Discovery

Unknown

Dates

Exploit

Feb 05, 2007

Solution

Unknown

Description

Mozilla Firefox contains a flaw that may allow user-assisted remote attackers to obtain sensitive information. The issue is triggered when the victim visits a malicious web page and manually allows a blocked popup, which causes normal URL permission checks to be bypassed. This permits the attacker to bypass security zone restrictions and read arbitrary files on the system, resulting in a loss of confidentiality.

Classification

Location: Remote/Network Access Required
Attack Type: Input Manipulation
Impact: Loss of Confidentiality
Exploit: Exploit Available
Disclosure: OSVDB Verified

Technical

Although Firefox does not allow Internet-originating websites to access the file:// namespace, a user choosing to manually allow a blocked popup causes the normal URL permission checks to be bypassed. If the attacker fools the browser to parse a chosen HTML document stored on the local filesystem, this document could read other local files with the use of XMLHttpRequest() and relay this information to a remote server. This issue is due to Firefox treating all file:/// URLs as having the same origin.

This exploit can be used in conjunction with other weaknesses in Firefox to make it possible for an attacker to execute arbitrary script code with elevated privileges. An attacker could plant a predictably named file with exploit code on the target system. A weaknesses that allows for this is present in Firefox's nsExternalAppHandler::SetUpTempFile that is used to generate "unpredictable" file names. It uses the stdlib linear congruential srand/rand weak pseudorandom number generator, that makes use of the current time to generate "random" numbers.

=====================================================
Possible Attack Scenario (Michał Zalewski)
=====================================================
1) Have user click on a link on a malicious page. The link would point to "evil.cgi", and have onClick handler set to function foo(). This function would acquire current system time, and use setTimeout to invoke window.open("p2.html?" + curtime,"new",""); in 100 ms. The aforementioned cgi script would return:

Content-type: text/html
Content-disposition: attachment; filename="foo.html"
<html><body><script>
x = new XMLHttpRequest;
x.open("GET", "file:///c:/BOOT.ini", false);
x.send(null);
alert("The script attempted to read your C:/BOOT.ini:\n\n" + x.responseText);
</script>

2) After user clicks the link, a download prompt will appear, and a copy of evil.cgi output would be saved in - for example - C:\WINDOWS\TEMP\c3o89nr7.htm. The download prompt will be immediately hidden under the newly created p2.html window (this, by default, bypasses popup blocker. because the window is created in response to user action).

3) The page currently displayed on top, p2.html, instructs the user to accept the popup to open a movie player or whatnot; since unsolicited popups are an annoyance, not a security risk, even an educated user is likely to comply. To create a popup warning, a script embedded on the page calls: window.open('file:///c:/windows/temp/xxxxxxx.htm','new2',''), with a name calculated by repeating a procedure implemented in SetUpTempFile() with a seed calculated by the server based on reported system time (p2.html?time).

4) When the user opens that particular popup, attacker-supplied HTML file is loaded and executed with local file read privileges (in the aforementioned example, the contents of BOOT.ini file would be reported back to the victim).

Solution

Upgrade to the following versions of the affected products as they have been reported to fix this vulnerability.
Mozilla Firefox: version 1.5.0.10 or higher
Mozilla Firefox 2: version 2.0.0.2 or higher
An upgrade is required as there are no known workarounds.

Products

Mozilla Organization
Watch-list
Firefox
Watch-list
2.0.0.2
1.5.0.10
0.8
0.9
0.9.1
0.9.2
0.9.3
0.10
0.10.1
1.0
1.0.1
1.0.2
1.0.3
1.0.4
1.0.5
1.0.6
1.0.7
1.0.8
1.5
1.5.0.1
1.5.0.2
1.5.0.3
1.5.0.4
1.5.0.5
1.5.0.6
1.5.0.7
1.5.0.9
2.0
1.5.0.8
2.0.0.1
1.0 rc1
1.0 RC2
1.1a1
1.1a2
1.4
1.4.1
1.5 RC1
1.5 rc2
1.5 RC3
1.5.0.1 RC1
2.0a1
2.0a2
2.0a3
2.0b1
2.0b2
2.0 RC 1
2.0 RC 2
2.0 RC 3
1.5.0.11
2.0.0.3

References

Tools & Filters

Nessus

24701 24707 24708 24735 24753 24771 24774 24800 25318 27118 27119 27439 27440 28021 28022 29359

Credit

  • Micha&#322; Zalewski - lcamtufBrand New Doo Doocoredump.cx - http://lcamtuf.coredump.cx/

Blogs

None found at this time

Comments

No Comments.

DONATE NOW!

User Status

Quick Searches

Advertisements

The database information may change without any notice. Use of the information constitutes acceptance for use in an AS IS condition, and there are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the copyright holder or distributor (OSVDB or OSF) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

© Copyright 2008 Open Source Vulnerability Database (OSVDB), All Rights Reserved.
Privacy Statement - Terms of Use