Vulnerability Note VU#865940
Microsoft Internet Explorer does not properly evaluate "application/hta" MIME type referenced by DATA attribute of OBJECT element
Overview
Microsoft Internet Explorer (IE) will execute an HTML Application (HTA) referenced by the DATA attribute of an OBJECT element if the Content-Type header returned by the web server is set to "application/hta". An attacker could exploit this vulnerability to execute arbitrary code with the privileges of the user running IE.
Note: (2003-10-04) The patch provided by MS03-040 addresses two attack vectors that were not resolved by MS03-032.
Description
1. The OBJECT element
Instead of accepting the server-supplied Content-Type header as recommended in RFC 2616, IE uses a rather complicated method to determine the MIME type of a file referenced by a URI. In many cases, IE will download and parse a file as part of the MIME type determination process. This check is unable to differentiate between HTA and HTML files since both files are essentially text files that contain HTML code. As a result, IE accepts the MIME Content-Type provided by the server. 4. The problem When accessing an HTA file directly, IE prompts the user to download or run the file. However, when an HTA file is referenced by the DATA attribute of an OBJECT element, and the web server returns the Content-Type header set to "application/hta", IE may execute the HTA file directly, without user intervention. The HTML used to reference the HTA file can be created in at least three ways:
Any program that uses the WebBrowser ActiveX control or the IE HTML rendering engine (MSHTML) may be affected by this vulnerability. Outlook and Outlook Express are affected, however, recent versions of these programs open mail in the Restricted Sites Zone where ActiveX controls and plug-ins and Active scripting are disabled by default. This vulnerability is documented in an advisory from eEye Digital Security and Microsoft Security Bulletins MS03-032 and MS03-040. The CERT/CC has received reports of this vulnerability being exploited to install backdoors and DDoS tools, read AIM credentials from the registry, install porn dialers, and modify DNS settings (QHosts). See Incident Note IN-2003-04 for further information. |
Impact
By convincing a victim to view an HTML document (web page, HTML email), a remote attacker could execute arbitrary code with the privileges of the victim. |
Solution
Apply patch |
Block Content-Type headers Use an application layer firewall, HTTP proxy, or similar technology to block or modify HTTP Content-Type headers with the value "application/hta". This technique may not work for encrypted HTTP connections and it may break applications that require the "application/hta" Content-Type header. Block mshta.exe Use a host-based firewall to deny network access to the HTA host: %SystemRoot%\system32\mshta.exe. Examining network traces of known attack vectors, it seems that the exploit HTML/HTA code is accessed three times, twice by IE and once by mshta.exe. The HTA is instantiated at some point before the third access attempt. Blocking mshta.exe prevents the third access attempt, which appears prevent the exploit code from being loaded into the HTA. There may be other attack vectors that circumvent this workaround. For example, a vulnerability that allowed data in the browser cache to be loaded into the HTA could remove the need for mshta.exe to access the network. This technique may break applications that require HTAs to access the network. Also, specific host-based firewalls may or may not properly block mshta.exe from accessing the network. Maintain updated antivirus software Antivirus 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 on antivirus software to defend against this vulnerability. The CERT/CC maintains a partial list of antivirus vendors. |
Systems Affected (Learn More)
| Vendor | Status | Date Notified | Date Updated |
|---|---|---|---|
| Microsoft Corporation | Affected | 25 Aug 2003 | 05 Oct 2003 |
CVSS Metrics (Learn More)
| Group | Score | Vector |
|---|---|---|
| Base | N/A | N/A |
| Temporal | N/A | N/A |
| Environmental | N/A | N/A |
References
- http://www.cert.org/incident_notes/IN-2003-04.html
- http://www.cert.org/tech_tips/securing_browser/
- http://www.kb.cert.org/vuls/id/865940
- http://www.eeye.com/html/Research/Advisories/AD20030820.html
- http://www.microsoft.com/technet/security/bulletin/MS03-032.asp
- http://support.microsoft.com/default.aspx?scid=kb;en-us;822925
- http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.asp
- http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/object.asp
- http://msdn.microsoft.com/workshop/author/hta/overview/htaoverview.asp
- http://msdn.microsoft.com/workshop/author/hta/reference/objects/hta.asp
- http://msdn.microsoft.com/workshop/author/om/doc_object.asp
- http://msdn.microsoft.com/workshop/author/databind/data_binding.asp
- http://www.ietf.org/rfc/rfc2616.txt
- http://www.secunia.com/advisories/9580/
- http://www.securityfocus.com/archive/1/334459
- http://xforce.iss.net/xforce/xfdb/12960
- http://lists.netsys.com/pipermail/full-disclosure/2003-September/009639.html
- http://lists.netsys.com/pipermail/full-disclosure/2003-September/009665.html
- http://lists.netsys.com/pipermail/full-disclosure/2003-September/009671.html
- http://greymagic.com/adv/gm001-ie/
- http://securityresponse.symantec.com/avcenter/venc/data/backdoor.coreflood.dr.html
- http://securityresponse1.symantec.com/sarc/sarc.nsf/html/backdoor.coreflood.html
- http://securityresponse.symantec.com/avcenter/venc/data/download.aduent.trojan.html
- http://www.symantec.com/avcenter/venc/data/trojan.qhosts.html
- http://www.ntbugtraq.com/default.asp?pid=36&sid=1&A2=ind0310&L=ntbugtraq&F=P&S=&P=2603
- http://www.ntbugtraq.com/default.asp?pid=36&sid=1&A2=ind0309&L=ntbugtraq&F=P&S=&P=784
- http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0838
- http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0809
- http://pivx.com/larholm/unpatched/
Credit
Microsoft credits eEye Digital Security for reporting this vulnerability. Information used in this document came from eEye, Microsoft, and http_equiv.
This document was written by Art Manion.
Other Information
- CVE IDs: CVE-2003-0532
- CERT Advisory: CA-2003-22
- Date Public: 20 Aug 2003
- Date First Published: 25 Aug 2003
- Date Last Updated: 29 Jul 2009
- Severity Metric: 56.70
- Document Revision: 134
Feedback
If you have feedback, comments, or additional information about this vulnerability, please send us email.