copyright
|
disclaimer
|
privacy
|
contact
HOME
About
AusCERT
Membership
Contact Us
PKI Services
Training
Publications
Sec. Bulletins
Conferences
News & Media
Services
Web Log
Site Map
Site Help
Member login
Login »
Become a member »
Home
»
Security Bul...
»
Security Bul...
»
AusCERT Update
» AU-2007.0018 -- AusCERT Update - [Win] - Multiple ve...
AU-2007.0018 -- AusCERT Update - [Win] - Multiple vendors may be affected by Windows URI handler vulnerability
Date:
20 July 2007
References
:
AA-2006.0035
AL-2007.0084
ESB-2007.0536
AL-2007.0091
ESB-2007.0576
Click here for printable version
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 AusCERT Update AU-2007.0018 - [Win] Multiple vendors may be affected by Windows URI handler vulnerability 20 July 2007 AusCERT Update Summary ---------------------- Product: Multiple applications installing custom URI handlers Publisher: iDefense Operating System: Windows Impact: Execute Arbitrary Code/Commands Access: Remote/Unauthenticated CVE Names: CVE-2007-3670 Ref: AL-2007.0084 AA-2006.0035 ESB-2007.0536 Original Bulletin: http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=565 Comment: The issue reported in AusCERT Alert AL-2007.0084 for the Firefox URI handler accessed through Internet Explorer is more general, and may exist for other applications that register custom URI handlers with Windows without selectively disabling any dangerous command line options when passed a URI. Microsoft has now updated the documentation for the URI feature to clarify that the URI is percent-decoded before being passed to the application. The same class of vulnerability was noted previously in AusCERT advisory AA-2006.0035, for the two URI handlers installed by WinSCP 3.8.1. - --------------------------BEGIN INCLUDED TEXT-------------------- Multiple Vendor Multiple Product URI Handler Input Validation Vulnerability iDefense Security Advisory 07.19.07 http://labs.idefense.com/intelligence/vulnerabilities/ Jul 19, 2007 I. BACKGROUND Microsoft Internet Explorer and Mozilla Firefox are the two most popular web browsers. Many people have both products installed since it is very difficult to remove Internet Explorer from a Windows system. Additionally, people are unlikely to remove Internet Explorer due to the need to use it for some sites which will not work with other browsers. II. DESCRIPTION Remote exploitation of an input handling vulnerability within multiple browsers on the Microsoft Windows platform allows code execution as the local user. This vulnerability is due to interaction between programs. The most commonly used Microsoft Windows URL protocol handling code doesn't provide a way for the URI handling application to distinguish the end of one argument from the start of another. The problem is caused by the fact that browsers do not pct-encode certain characters in some URIs, which does not comply with the behavior that RFC3986 (also known as IETF STD 66) requires. As a result, a specially constructed link could be interpreted as multiple arguments by a URI protocol handler. III. ANALYSIS Exploitation of this vulnerability allows an attacker to execute arbitrary commands as the current user. To exploit this vulnerability, an attacker must persuade their target into visiting a website containing a maliciously constructed link. This vulnerability does not allow for code execution directly. Instead it relies on the URI handling application to contain methods by which code execution is obtainable. Even if no such methods exist, it may still be possible to pass additional command line parameters that execute unintended actions. The target user must have an application installed which accepts command line options after the URI passed to the protocol handler, such as versions of Firefox before 2.0.0.5. When opening a URL, typically it is started with a command line such as: [path/to/handler.exe] -url "%1" In this case, the "%1" is replaced with the source URL. If the URL contains a double-quote character followed by a space, the quoting will be closed, and the rest of the source URL will be treated as new arguments. On June 14, 2007 Microsoft stated to us that this behavior is documented, referencing ( http://msdn2.microsoft.com/en-us/library/aa767914.aspx). At this time, the document contained an example handler for the 'note:' protocol to explain how to create URL handlers. It contained this type of vulnerability. The documentation did state that the "handler passes the complete URL string to the application", but did not explicitly state that multiple arguments could be injected, and that the URI would be percent-decoded. If the example handler from the documentation was added, calc.exe would be launched when opening a page that contained the following HTML: [iframe src='note:"|calc.exe '] As this document was written to inform developers how to construct these handlers, it is very likely many applications which implement URL handlers are also affected. Microsoft has updated the document around July 17, 2007. It has replaced the 'note:' handler with a new handler example, 'alert:', which launches a sample application that lists the command line arguments the URL handler passed to it. IV. DETECTION iDefense has confirmed the existence of this vulnerability using the following products on the Windows XP SP2 operating system. Mozilla Organization; Firefox and Thunderbird 2.0.0.4 Microsoft Corp.; Internet Explorer 7 Previous versions of each application may also be affected. Other applications which access websites with an embedded browser control are also affected. While this vulnerability is due to various applications incorrectly escaping URIs, the way code execution occurs is via helper applications. V. WORKAROUND The following keys are examples of URL Protocol handlers. Removing the 'shell' sub-keys of dangerous URI handlers will reduce exposure to this class of vulnerability. For example: HKEY_CLASSES_ROOT\FirefoxURL\shell HKEY_CLASSES_ROOT\Thunderbird.Url.mailto\shell HKEY_CLASSES_ROOT\Thunderbird.Url.news\shell HKEY_CLASSES_ROOT\mailto\shell HKEY_CLASSES_ROOT\news\shell Some functionality will be reduced after removing these keys. Certain applications regenerate their protocol handlers automatically; consider applying a 'Deny' to 'Everyone' to the handler key (the key above without the '\shell' component). To find other protocol handlers, search the registry for the value name "URL Protocol". The 'NoScript' add-on for Firefox will prevent Firefox being used to execute arbitrary code with this vulnerability. This is a 3rd party extension which allows the user to choose which sites can execute JavaScript. Turning off the rendering of HTML within mail applications will mitigate exposure to this type of vulnerability via an e-mail attack. In Thunderbird, under the 'View' menu, select 'Message Body As' and select 'Plain Text'. VI. VENDOR RESPONSE Microsoft stated this is "documented behavior" in June 2007, but in mid-July 2007 updated the contents of the page describing how to construct a URL handler. They now include a security note that this type of exposure may occur, and describe in detail the steps taken. A link to this page is shown in the sources and referenced in the analysis. Mozilla has changed its handling of URLs in Firefox 2.0.0.5. Thunderbird 2.0.0.5 is not yet available for download, but will reportedly also change its handling. Directly downloadable vendor updates for this report are accessible via the iDefense Intelligence Web portal ( https://ialert.iDefense.com) and the iDefense Intelligence XML Web service. Information about non-directly downloadable vendor updates can be found by clicking the URLs shown. VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2007-3670 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org/), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 06/13/2007 Initial vendor notification 06/13/2007 Initial Microsoft response 06/13/2007 Initial Mozilla response 06/14/2007 Microsoft states defined behavior 07/17/2007 Microsoft updates MSDN article 07/17/2007 Mozilla releases Firefox 2.0.0.5 07/19/2007 Public disclosure IX. CREDIT This vulnerability was discovered by Greg MacManus of iDefense labs. Get paid for vulnerability research http://labs.idefense.com/methodology/vulnerability/vcp.php Free tools, research and upcoming events http://labs.idefense.com/ X. LEGAL NOTICES Copyright © 2007 iDefense, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDefense. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please e-mail customerservice@idefense.com for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information. - --------------------------END INCLUDED TEXT-------------------- You have received this e-mail bulletin as a result of your organisation's registration with AusCERT. The mailing list you are subscribed to is maintained within your organisation, so if you do not wish to continue receiving these bulletins you should contact your local IT manager. If you do not know who that is, please send an email to auscert@auscert.org.au and we will forward your request to the appropriate person. NOTE: Third Party Rights This security bulletin is provided as a service to AusCERT's members. As AusCERT did not write the document quoted above, AusCERT has had no control over its content. The decision to follow or act on information or advice contained in this security bulletin is the responsibility of each user or organisation, and should be considered in accordance with your organisation's site policies and procedures. AusCERT takes no responsibility for consequences which may arise from following or acting on information or advice contained in this security bulletin. NOTE: This is only the original release of the security bulletin. It may not be updated when updates to the original are made. If downloading at a later date, it is recommended that the bulletin is retrieved directly from the author's website to ensure that the information is still current. Contact information for the authors of the original document is included in the Security Bulletin above. If you have any questions or need further information, please contact them directly. Previous advisories and external security bulletins can be retrieved from: http://www.auscert.org.au/render.html?cid=1980 If you believe that your computer system has been compromised or attacked in any way, we encourage you to let us know by completing the secure National IT Incident Reporting Form at: http://www.auscert.org.au/render.html?it=3192 =========================================================================== Australian Computer Emergency Response Team The University of Queensland Brisbane Qld 4072 Internet Email: auscert@auscert.org.au Facsimile: (07) 3365 7031 Telephone: (07) 3365 4417 (International: +61 7 3365 4417) AusCERT personnel answer during Queensland business hours which are GMT+10:00 (AEST). On call after hours for member emergencies only. =========================================================================== -----BEGIN PGP SIGNATURE----- Comment: http://www.auscert.org.au/render.html?it=1967 iQCVAwUBRqBfkih9+71yA2DNAQIxUwQAmJcQdGAu8Gdf16mhVCAHS02Y5UD1ULds VQjcvz7UPlum9CF7+s1VxY2+JADkcNhatMAyN5AGP7X7QJEQDUI+x8kcvQKUZ9FF J8vkkJasYBYK7/LEI67B3iWgSh/eBAcrVsxUaq5OoC+DGdCMz3R5C8/ij9AujzIh LcPzW7KFVT8= =alJj -----END PGP SIGNATURE-----
Comments? Click here
http://www.auscert.org.au/render.html?cid=1979&it=7879