Overview
The HHCtrl ActiveX control has a serious vulnerability that allows remote intruders to execute arbitrary code, if the intruder can cause a compiled help file (CHM) to be stored "locally." Microsoft has released a security bulletin and a patch for this vulnerability, but the patch does not address all circumstances under which the vulnerability can be exploited. This document discusses some of the additional ways in which this vulnerability can be exploited. Some common circumstances under which this vulnerability can be exploited are addressed by the Microsoft patch; others are not. Read this document carefully with your network configuration in mind to determine if you need to take any action. In recent discussions with the CERT/CC, Microsoft has indicated they do not plan to alter the patch.
Description
The Microsoft Windows HTML help facility (part of Internet Explorer) is able to execute arbitrary programs through an embedded "shortcut" in a compiled HTML file. This allows the help system to start wizards and other programs as part of the help facility. Unfortunately, it also makes it unsafe for users to open help files obtained from untrusted sources. An attacker who can construct a malicious help file and place it in a location accessible by the victim may be able to cause this help file to be loaded and the embedded shortcuts executed without interaction from the victim. A malicious web site author may cause a compiled HTML help file to be opened through the Active Scripting showHelp call in Internet Explorer. Help files may also be opened in other environments that support Active Scripting, such as email messages in Outlook.
In recent discussions with the CERT/CC, Microsoft has not indicated any intention of changing the help system's behavior. Therefore, to be completely protected from exploitation of this vulnerability, users must eliminate one or more of the preconditions listed above. It is reasonable for a user to expect that simply visiting a web page is a safe activity, so eliminating the first precondition is difficult. Disabling Active Scripting or the execution of ActiveX controls prevents the vulnerability from being exploited, but it also prevents the normal operation of these features and is likely to affect the appearance and functionality of web pages. Removing the "safe for initialization" or "safe for scripting" attributes of the HHCtrl causes warning dialogs to be generated in a number of circumstances where they may not be expected. How an Attacker May Create "Local" Files Although you may believe it is difficult or impossible for an intruder to place a file in a predictable location that is accessible to you, in fact, several common practices allow intruders to do just this. While preventing an attacker from downloading files on the local system without warning is a valuable security practice, it is not sufficient as the single line of defense against the execution of malicious code. The CERT/CC recommends adopting one of several more conservative solutions, including disabling ActiveX controls or Active Scripting. More information on these solutions are included in the Solution section of this document. If a site relies solely on limiting the attacker's ability to make malicious code accessible to the victim, the following activities are not safe:
In addition, multiple cross domain security vulnerabilities (VU#162097, VU#244729, VU#400577, VU#462451, VU#585123, VU#598147, VU#711843, VU#728563, VU#739376) could allow untrusted script to execute in the Local Machine Zone. Script in the Local Machine Zone can programmatically create an HHCtrl object and use the shortcut command to execute arbitrary local programs. Several other vulnerabilities provide the ability to download arbitrary files to the victim's system. These vulnerabilities allow attackers to meet the "local" CHM file precondition. |
Impact
By using the showHelp Active Scripting call in conjunction with shortcuts embedded in a malicious help file, attackers are able to execute programs and ActiveX controls of their choice. Since exploitation of the vulnerability requires an attacker to place a compiled help file (CHM) in a location accessible to the victim, it is usually trivial to include a malicious executable as well. In this situation, the attacker can take any action that the victim can. |
Solution
Update HTML Help.
|
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. 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. Disable Active Scripting and/or ActiveX controls in the Internet Zone. One way to prevent the exploitation of this vulnerability is to limit the functionality available to attackers through thesecurity zone feature of Internet Explorer. The CERT/CC recommends this solution as a way to protect against thevulnerability while retaining as much functionality as possible in the help system. A security zone is a set of security settings applied to a web page based on the site the web paged originated from. By default, all sites are in the Internet Zone, and disabling functionality in this zone can protect you from attackers at all sites not associated with another zone. You may also need to reduce the settings in the Local Intranet Zone, if you do not trust all web sites within your DNS domain. In fact, the risk of exploitation by an inside attacker may be greater, since the ability to create a file accessible by you may be easier within a local area network. One or more of the following options must be changed in the appropriate zones to protect against the vulnerability: The Active Scripting option Disabling Active Scripting is perhaps the best solution since it prevents the vulnerability from being exploited and doesn't present the user with warning dialogs. Setting this option to "Prompt" is not recommended, because the warning dialog will incorrectly imply that the action is safe, when in fact it is not. The Run ActiveX controls and plug-ins option Disabling the execution of ActiveX controls is an option that protects against this vulnerability, but it also prevents plug-ins from executing normally. Since plug-ins for common applications such as Adobe Acrobat are included in this same category, setting the option to "Disable" results in significantly reduced functionality. For similar reasons, setting this option to "Prompt" is not recommended, because it is not always clear what the safe response should be. An excellent solution (but perhaps requiring more administrative effort) is to set this option to "Administrator approved". In this setting, only those ActiveX controls approved by the administrator (using the Internet Explorer Administration Kit) will be executed. If the administrator includes most controls but specifically excludes the HHCtrl control, there is an attractive balance between security and functionality. For more information regarding this option, see http://www.microsoft.com/Windows/ieak/en/support/faq/default.asp The Script ActiveX controls marked safe for scripting option Disabling the scripting of ActiveX controls marked "safe for scripting" protects against this vulnerability but limits the normal operation of many controls used over the Internet. Setting this option to "Prompt" generates a warning dialog that is not strongly enough worded to reflect the danger inherent in the HHCtrl control. If all three of these options are set to "Enable", which is the default in the Internet Zone, this vulnerability may be exploited. Improving the security settings of any of these three options will at least cause a warning dialog to appear and may prevent the exploit entirely. Steps for changing your security zone settings for Internet Explorer 5 on Windows NT 4.0 are:
Security zones can also be used to enable Active Scripting and ActiveX controls at specific sites where you wish to retain this functionality. To place a site in the Trusted Sites Zone using Internet Explorer 5.0 on Windows NT 4.0,
Disable or Restrict the Shortcut and WinHelp commands. The patch from Security Bulletin MS02-055 (Q323255), Internet Explorer 6 Service Pack 1, and Windows XP Service Pack 1 provide the ability to disable the Shortcut and WinHelp commands or or restrict their operation to specified directories. See Microsoft Knowledge Base Article 810687 for details. The "My Computer" Zone In addition to the four zones that are ordinarily visible, there is a fifth zone called the "My Computer" zone which is not ordinarily visible. Files on the local system are in the "My Computer" zone. You can examine and modify the settings in the "My Computer" through the registry. For more information, see http://support.microsoft.com/support/kb/articles/Q182/5/69.ASP The "My Computer" zone may also be managed through the Internet Explorer Administration Kit (IEAK). The CERT/CC does not recommend modifications to the "My Computer" zone unless you have unusual security requirements and a thorough understanding of the ramifications, including the potential for loss of functionality. Note, however, that if there is a vulnerability or condition that allows an attacker to create a file locally (such as through Eudora, for example) then this file will be subject to the security settings of the "My Computer" zone. Active Scripts on a web page or in a mail message will continue to be subject to the security settings of the zone where the web page or mail client resides. In this case, disabling Active Scripting in untrusted locations, including the Internet Zone, provides the best defense. Change the attributes of the HHCtrl ActiveX control. Because the HHCtrl control is central to the exploitation of this vulnerability, removing either the "safe for scripting" or the "safe for initialization" attribute in the registry corrects the problem. Unfortunately, removing these attributes prevents some features of the help system from operating normally, even if the help file is opened through some other application. Implementing this solution will allow other ActiveX controls to function, including those referenced in Internet web pages. If you are unable to implement one of the solutions mentioned earlier, or you are willing to sacrifice help system features for more complete ActiveX functionality, then you may wish to consider this solution. This solution will provide warning dialogs when users open help files -- both malicious and benign help files. To mark the HHCtrl ActiveX control as not "safe for scripting", remove this registry key: HKEY_CLASSES_ROOT\CLSID\ {ADB880A6-D8FF-11CF-9377-00AA003B7A11}\ Implemented Categories\ {7DD95801-9882-11CF-9FA9-00AA006C42C4} To mark the HHCtrl ActiveX control as not "safe for initialization", remove this registry key: HKEY_CLASSES_ROOT\CLSID\ {ADB880A6-D8FF-11CF-9377-00AA003B7A11}\ Implemented Categories\ {7DD95802-9882-11CF-9FA9-00AA006C42C4} Spaces in the keys listed above were added to improve HTML formatting and are not in the actual registry keys. Only one of the two changes need to be made in order to prevent the exploitation of this vulnerability. Either of these changes will result in additional warning dialogs when a user opens compiled help files with references to the HHCtrl control, even if the help file is part of legitimate locally installed software. Avoid accessing filesystems writable by untrusted users. Because of the difficulty in implementing this solution correctly, the CERT/CC does not recommend relying on this solution. You may want to consider this solution only if you can implement it easily or if you have no other viable choices. Care should be taken with any mechanism that might allow an untrusted user to download or otherwise cause a file to be accessible to the victim. This includes, but is not limited to, network-based file sharing mechanisms (AFS, DFS, Netware, NFS, Windows shares) and mail delivery programs that automatically extract attachments. Also, if you choose to implement this solution, you need to be especially vigilant in your monitoring of security resources for information about new vulnerabilities that allow attackers to download files to your system. The impact of these vulnerabilities will be greater than if you had selected one of the solutions recommended above. |
Vendor Information
CVSS Metrics
Group | Score | Vector |
---|---|---|
Base | ||
Temporal | ||
Environmental |
References
- http://www.microsoft.com/technet/security/bulletin/ms00-037.asp
- http://www.microsoft.com/technet/security/bulletin/fq00-037.asp
- http://www.microsoft.com/technet/support/kb.asp?ID=259166
- http://msdn.microsoft.com/library/tools/htmlhelp/chm/hh1start.htm
- http://www.securityfocus.com/bid/1033
- http://www.microsoft.com/technet/security/bulletin/MS03-004.asp
- http://support.microsoft.com/default.aspx?scid=kb;EN-US;810847
- http://support.microsoft.com/?kbid=811630
- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconshortcutov.asp
- http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showhelp.asp
- http://support.microsoft.com/?kbid=810687
Acknowledgements
Thanks to Georgi Guninski, who originally discovered this vulnerability and who also provided input used in the development of this document.
Cory Cohen was the primary author of this document, with some text by Shawn Hernan. Updated by Art Manion.
Other Information
CVE IDs: | CVE-2000-0201 |
CERT Advisory: | CA-2000-12 |
Severity Metric: | 40.50 |
Date Public: | 2000-03-01 |
Date First Published: | 2000-09-26 |
Date Last Updated: | 2004-04-12 19:33 UTC |
Document Revision: | 22 |