US-CERT publishes information on a wide variety of vulnerabilities.

Vulnerability Note VU#713878
http://www.kb.cert.org/vuls/id/713878

Microsoft Internet Explorer does not properly validate source of redirected frame

Overview

Microsoft Internet Explorer (IE) does not adequately validate the security context of a frame that has been redirected by a web server. An attacker could exploit this vulnerability to evaluate script in different security domains. By causing script to be evaluated in the Local Machine Zone, the attacker could execute arbitrary code with the privileges of the user running IE.

I. Description

The Cross-Domain Security Model

IE uses a cross-domain security model to maintain separation between browser frames from different sources. This model is designed to prevent code in one domain from accessing data in a different domain. The Local Machine Zone is "...an implicit zone for content that exists on the local computer. The content found on the user's computer, except for content that Internet Explorer caches on the local system, is treated with a high level of trust." The determination of what zone and/or domain a URL exists in and what actions can be performed in that zone is made by the Internet Security Manager Object.

HTTP Redirection

A web server can respond to an HTTP request with a 300-series status code indicating that a requested resource exists under a different URI. In the 300 response, the server indicates the different URI in the Location field of the HTTP headers. An attacker can configure a web server to send a delayed 300 response specifying a URI that points to a resource on the client's system, in the Local Machine Zone. Such a response might include the following lines:
HTTP/1.1 302 Object moved
Location: URL_:ms-its_:C:\\Windows\Help\ieshared.chm::/webzine.htm


(Modified to avoid anti-virus detection.)

Note that this vulnerability does not rely on the use of ITS protocol handlers or CHM files. The Location field can be set to any local HTML resource.

Modal Dialogs

The showModalDialog method creates "...a modal dialog box that displays the specified HTML document." It is important to note that a modal dialog box "...retains the input focus while open" and that "The user cannot switch windows until the dialog box is closed." A modal dialog box can be closed programmatically by script running in the HTML document that provides the content for the dialog box.

The Problem

IE is vulnerable to a cross-domain violation that seems to involve a race condition, frames, and possibly the execScript method. When the location of the content of a frame is changed with an HTTP redirect response, a modal dialog box that was called from the frame before the redirect will return a cached reference to the frame's original domain. IE then incorrectly considers the cached domain instead of the redirected domain when determining the security domain of the modal dialog box. Also, since the contents of the frame have been changed by the redirect, it is possible to set the location object of the frame. By redirecting to a local resource, controlling the timing of the redirect, and setting the frame's location to a javascript: protocol URI, an attacker can execute script in the security context of the Local Machine Zone.

Functional exploit code is publicly available, and there are reports of incidents involving this vulnerability (Scob, Download.Ject, Toofeer, Berbew).

Any program that hosts the WebBrowser ActiveX control or used the IE HTML rendering engine (MSHTML) may be affected by this vulnerability.

II. Impact

By convincing a victim to view an HTML document (web page, HTML email), an attacker could execute script in a different security domain than the one containing the attacker's document. By causing script to be run in the Local Machine Zone, the attacker could execute arbitrary code with the privileges of the user running IE.

III. Solution

Until a complete solution is available, consider the following workarounds.

Disable Active scripting and ActiveX

Disabling Active scripting and ActiveX controls in the Internet Zone (or any zone used by an attacker) appears to prevent exploitation of this vulnerability. Disabling Active scripting and ActiveX controls in the Local Machine Zone will prevent widely used payload delivery techniques from functioning. Instructions for disabling Active scripting in the Internet Zone can be found in the CERT/CC Malicious Web Scripts FAQ. See Microsoft Knowledge Base Article 833633 for information about securing the Local Machine Zone. Also, Service Pack 2 for Windows XP (currently in beta release) includes these and other security enhancements for IE.

Apply the Outlook Email Security Update

Another way to effectively disable Active scripting in Outlook is to install the Outlook Email Security Update. The update configures Outlook to open email messages in the Restricted Sites Zone, where Active scripting is disabled by default. In addition, the update provides further protection against malicious code that attempts to propagate via Outlook. The Outlook Email Security Update is available for Outlook 98 and Outlook 2000. The functionality of the Outlook Email Security Update is included in Outlook 2002 and Outlook Express 6. Outlook 2003 includes these and other security enhancements.

Read and send email in plain text format

Outlook 2003, Outlook 2002 SP1, and Outlook 6 SP1 can be configured to view email messages in text format. Consider the security of fellow Internet users and send email in plain text format when possible. Note that reading and sending email in plain text will not necessarily prevent exploitation of this vulnerability.

Maintain updated anti-virus software

Anti-virus software with updated virus definitions may identify and prevent some exploit attempts. Variations of exploits or attack vectors may not be detected. Do not rely solely on anti-virus software to defend against this vulnerability. US-CERT maintains a partial list of anti-virus vendors.

Do not follow unsolicited links

Do not click on unsolicited URLs received in email, instant messages, web forums, or internet relay chat (IRC) channels. While this is generally good security practice, following this behavior will not prevent exploitation of this vulnerability in all cases, particularly if a trusted site has been compromised or allows cross-site scripting.

Use a different web browser

There are a number of significant vulnerabilities in technologies relating to the IE domain/zone security model, the DHTML object model, MIME type determination, and ActiveX. It is possible to reduce exposure to these vulnerabilities by using a different web browser, especially when browsing untrusted sites. Such a decision may, however, reduce the functionality of sites that require IE-specific features such as DHTML, VBScript, and ActiveX. Note that using a different web browser will not remove IE from a Windows system, and other programs may invoke IE, the WebBrowser ActiveX control, or the HTML rendering engine (MSHTML).
Systems Affected


VendorStatusDate Updated
Microsoft CorporationVulnerable10-Jun-2004

References

http://www.us-cert.gov/cas/techalerts/TA04-163A.html
http://www.us-cert.gov/cas/techalerts/TA04-184A.html
http://62.131.86.111/analysis.htm
http://archives.neohapsis.com/archives/fulldisclosure/2004-06/0104.html
http://archives.neohapsis.com/archives/fulldisclosure/2004-06/0031.html
http://secunia.com/advisories/11793/
http://www.microsoft.com/technet/prodtechnol/winxppro/sp2preview.mspx
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/execscript.asp
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmodaldialog.asp
http://www.microsoft.com/windows/ie/using/howto/security/settings.mspx
http://www.microsoft.com/security/incident/settings.mspx
http://support.microsoft.com/default.aspx?scid=833633
http://support.microsoft.com/default.aspx?kbid=182569
http://www.microsoft.com/security/incident/download_ject.mspx
http://isc.sans.org/diary.php?date=2004-06-25
http://www.securityfocus.com/bid/10473
http://xforce.iss.net/xforce/xfdb/16361

Credit

Public incidents related to this vulnerability were reported by Rafel Ivgi. Thanks to Jelmer for further research and analysis.

This document was written by Art Manion.
Other Information

Date Public06/03/2004
Date First Published06/09/2004 11:30:20 AM
Date Last Updated07/14/2004
CERT Advisory
CVE NameCAN-2004-0549
Metric64.80
Document Revision60

US-CERT publishes information on a wide variety of vulnerabilities.
-------------------------------------------------------------------
John Maynard  ([EMAIL PROTECTED])
PO Box 600, Cowes VIC  3922  Australia
-------------------------------------------------------------------


------------------------------------------------------ - You are subscribed to the mailing list [EMAIL PROTECTED] - To unsubscribe, email [EMAIL PROTECTED] and put in the message body 'unsubscribe insights-l' (ell, not one (1)) See: http://nsw.uca.org.au/insights-l-information.htm ------------------------------------------------------

Reply via email to