Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | File Selection May Lead to Command Execution (GM#015-IE) |
|---|---|
| Date: | Tue, 19 Apr 2005 17:30:39 +0200 |
GreyMagic Security Advisory GM#015-IE ===================================== By GreyMagic Software. 19 Apr 2005. Available in HTML format at http://www.greymagic.com/security/advisories/gm015-ie/. Topic: File Selection May Lead to Command Execution. Discovery date: 18 Jan 2005. Affected applications: ====================== * Windows Explorer on Windows 2000 Professional. * Windows Explorer on Windows 2000 Server. * Windows Explorer on Windows 2000 Advanced Server. Note that any other application that uses the Web View DLL under Windows 2000 is affected as well. Introduction: ============= Windows Explorer is used to navigate through the Windows file system by default. Windows Explorer includes a preview pane (Web view), which displays information on some types of files when they become selected. The preview pane is enabled by default on all Windows 2000 systems. The preview pane is implemented via an HTML resource file (in webvw.dll), which examines the currently selected file, reads its metadata and displays useful information about it. Such information includes the file's size, attributes, modification date, author and more. Discussion: =========== When the preview pane outputs the document's author name, it checks whether the name resembles an email address, and if so, transforms it into a 'mailto:' link in the pane. The transformation into a link does not filter potentially dangerous characters and makes it possible to inject attributes into the link, which enables execution of arbitrary script commands. Script commands that are injected in this manner will execute as soon as the malicious file is selected in Windows Explorer and will be executed in a trusted context, which means they will have the ability to perform any action the currently logged on user can perform. This includes reading, deleting and writing files, as well as executing arbitrary commands. Notice that the malicious file does not need to be executed in order to activate the exploit, double-clicking is not required. The exploitation takes place as soon as the file is selected. The code below is an excerpt from one of the vulnerable resources. In this instance 'safeData' has not been filtered properly, and may contain the apostrophe (') character, allowing for attribute termination in the resulting HTML: text += "<p>" + title + ": <a href='mailto:" + safeData + "'>" + safeData + "</a>"; Exploit: ======== When setting the author field of a file (for example, a Word document) to the following value: a@b' style='background-image:url(javascript:alert("Successful injection!"))' Windows Explorer will display a message box as soon as the file is selected. This vulnerability can also be exploited by directing the user to an attacker controlled SMB share, the user will then need to select the file in order to activate the exploit. Demonstration: ============== GreyMagic has put together three proof-of-concept demonstrations: * Simple: As shown in the exploit section, displays a simple message box when selected. * Copy me: Automatically copies itself to the same folder when selected. * Bo Selecta: Constantly renames itself when selected. They may be accessed at http://security.greymagic.com/security/advisories/gm015-ie/ Solution: ========= Until a patch becomes available, disable the Web View by going to: Tools -> Folder Options -> Select 'Use Windows classic folders'. Tested on: ========== Windows Explorer / Windows 2000 Professional. Windows Explorer / Windows 2000 Server. Windows Explorer / Windows 2000 Advanced Server. Disclaimer: =========== The information in this security advisory and any of its demonstrations is provided "as is" without warranty of any kind. Vulnerability details are provided strictly for educational and defensive purposes. 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 ) 2005 GreyMagic Software. -- NTBugtraq Editor's Note: Most viruses these days use spoofed email addresses. As such, using an Anti-Virus product which automatically notifies the perceived sender of a message it believes is infected may well cause more harm than good. Someone who did not actually send you a virus may receive the notification and scramble their support staff to find an infection which never existed in the first place. Suggest such notifications be disabled by whomever is responsible for your AV, or at least that the idea is considered. --
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [Full-disclosure] - Argeniss - Oracle exploits and workarounds, Cesar |
|---|---|
| Next by Date: | MS05-019 Breaks VPN, Darryl J Roberts |
| Previous by Thread: | [Full-disclosure] - Argeniss - Oracle exploits and workarounds, Cesar |
| Next by Thread: | MS05-019 Breaks VPN, Darryl J Roberts |
| Indexes: | [Date] [Thread] [Top] [All Lists] |