__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Cumulative Patch for Microsoft SQL Server [Microsoft Security Bulletin MS03-031] July 24, 2003 20:00 GMT Number N-125 [REVISED 16 Jun 2005] ______________________________________________________________________________ PROBLEM: There are three newly discovered vulnerabilities: 1) Named Piped Hijacking - A flaw exists in the checking method for the named pipe that could allow an attacker local to the system running SQL Server to hijack (gain control of) the named pipe during another client's authenticated logon password. 2) Named Pipe Denial of Service - It is possible for an unauthenticated user who is local to the intranet to send a very large packet to a specific named pipe on which the system running SQL Server is listening and cause it to become unresponsive. 3) SQL Server Buffer Overrun - A flaw exists in a specific Windows function that may allow an authenticated user—with direct access to log on to the system running SQL Server—the ability create a specially crafted packet that, when sent to the listening local procedure call (LPC) port of the system, could cause a buffer overrun. SOFTWARE: * Microsoft SQL Server 7.0 * Microsoft Data Engine (MSDE) 1.0 * Microsoft SQL Server 2000 * Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) * Microsoft SQL Server 2000 Desktop Engine (Windows) DAMAGE: 1) Named Pipe Hijacking - This vulnerability would allow the attacker to gain control of the named pipe at the same permission level as the user who is attempting to connect. If the user who is attempting to connect remotely has a higher level of permissions than the attacker, the attacker will assume those rights when the named pipe is compromised. 2) Named Pipe Denial of Service - This vulnerability would not allow an attacker to run arbitrary code or elevate their permissions, but it may still be possible for a denial of service condition to exist that would require that the server be restarted to restore functionality. 3) SQL Server Buffer Overrun - This could allow a user with limited permissions on the system to elevate their permissions to the level of the SQL Server service account, or cause arbitrary code to run. SOLUTION: Apply patch as stated in Microsoft's bulletin. ______________________________________________________________________________ VULNERABILITY The risk is MEDIUM. These are the mitigating factors: ASSESSMENT: 1) Named Pipe Hijacking - To exploit this flaw, the attacker would need to be an authenticated user local to the system. This vulnerability provides no way for an attacker to remotely usurp control over the named pipe. 2) Named Pipe Denial of Service - To exploit this flaw the attacker would require access to the local intranet. Restarting the SQL Server will reinstate normal operations. This flaw provides no method by which an attacker can gain access to the system or information contained in the database. 3) SQL Server Buffer Overrun - To exploit this flaw, the attacker would need to be an authenticated user local to the system. This vulnerability cannot be remotely exploited. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/n-125.shtml ORIGINAL BULLETIN: http://www.microsoft.com/technet/treeview/ default.asp?url=/technet/security/bulletin/MS03-031.asp ADDITIONAL LINK: Microsoft Security Bulletin MS02-035 http://www.microsoft.com/technet/security/Bulletin/MS02-035.mspx ______________________________________________________________________________ REVISION HISTORY: 06/16/2005 - revised to add a link to Microsoft Security Bulletin MS02-035. [***** Start Microsoft Security Bulletin MS03-031 *****] Microsoft Security Bulletin MS03-031 Cumulative Patch for Microsoft SQL Server (815495) Originally posted: July 23, 2003 Summary Who should read this bulletin: System administrators using Microsoft® SQL Server™ 7.0, SQL Server 2000, Microsoft Data Engine (MSDE) 1.0, Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) and SQL Server 2000 Desktop Engine (Windows). Impact of vulnerability: Run code of attacker's choice Maximum Severity Rating: Important Recommendation: System administrators should apply the security patch to affected systems. Affected Software: * Microsoft SQL Server 7.0 * Microsoft Data Engine (MSDE) 1.0 * Microsoft SQL Server 2000 * Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) * Microsoft SQL Server 2000 Desktop Engine (Windows) Technical details Technical description: This is a cumulative patch that includes the functionality of all previously released patches for SQL Server 7.0, SQL Server 2000, MSDE 1.0, and MSDE 2000. In addition, it eliminates three newly discovered vulnerabilities. * Named Pipe Hijacking Upon system startup, SQL Server creates and listens on a specific named pipe for incoming connections to the server. A named pipe is a specifically named one-way or two-way channel for communication between a pipe server and one or more pipe clients. The named pipe is checked for verification of which connection attempts can log on to the system running SQL Server to execute queries against data that is stored on the server. A flaw exists in the checking method for the named pipe that could allow an attacker local to the system running SQL Server to hijack (gain control of) the named pipe during another client's authenticated logon password. This would allow the attacker to gain control of the named pipe at the same permission level as the user who is attempting to connect. If the user who is attempting to connect remotely has a higher level of permissions than the attacker, the attacker will assume those rights when the named pipe is compromised. * Named Pipe Denial of Service In the same named pipes scenario that is mentioned in the "Named Pipe Hijacking" section of this bulletin, it is possible for an unauthenticated user who is local to the intranet to send a very large packet to a specific named pipe on which the system running SQL Server is listening and cause it to become unresponsive. This vulnerability would not allow an attacker to run arbitrary code or elevate their permissions, but it may still be possible for a denial of service condition to exist that would require that the server be restarted to restore functionality. * SQL Server Buffer Overrun A flaw exists in a specific Windows function that may allow an authenticated user—with direct access to log on to the system running SQL Server—the ability create a specially crafted packet that, when sent to the listening local procedure call (LPC) port of the system, could cause a buffer overrun. If successfully exploited, this could allow a user with limited permissions on the system to elevate their permissions to the level of the SQL Server service account, or cause arbitrary code to run. Mitigating factors: Named Pipe Hijacking: * To exploit this flaw, the attacker would need to be an authenticated user local to the system. * This vulnerability provides no way for an attacker to remotely usurp control over the named pipe. Named Pipe Denial of Service: * Although it is unnecessary that the attacker be authenticated, to exploit this flaw the attacker would require access to the local intranet. * Restarting the SQL Server will reinstate normal operations * This flaw provides no method by which an attacker can gain access to the system or information contained in the database. SQL Server Buffer Overrun: * To exploit this flaw, the attacker would need to be an authenticated user local to the system. * This vulnerability cannot be remotely exploited. Severity Rating: SQL 7.0 MSDE 1.0 SQL 2000 MSDE 2000 MSDE (Windows) Aggregate Severity of all Vulnerabilities Named Pipe Hijacking Important Important Important Important Important Important +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Named Pipe Denial of Service Important Important Important Important Important Important +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SQL Server Buffer Overrun Important Important Important Important Important Important +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The above assessment is based on the types of systems affected by the vulnerability, their typical deployment patterns, and the effect that exploiting the vulnerability would have on them. Vulnerability identifier: * Named Pipe HijackingCAN-2003-0230 * Named Pipe Denial of ServiceCAN-2003-0231 * SQL Server Buffer OverrunCAN-2003-0232 Tested Versions: Microsoft tested SQL Server 7.0, MSDE 1.0, SQL Server 2000 SP3, SP3a, MSDE 2000 SP3 and MSDE (Windows) to assess whether they are affected by this vulnerability. Previous versions are no longer supported, and may or may not be affected by these vulnerabilities. Patch availability Download locations for this patch * Microsoft SQL Server 7.0 * Microsoft SQL 2000 32-bit Edition * Microsoft SQL 2000 64-bit Edition Additional information about this patch Installation platforms: This patch can be installed on systems running: * The SQL Server 7.0 patch can be installed on systems running SQL Server 7.0 Service Pack 4. Additionally, the SQL Server 7.0 patch can be installed on systems running MSDE 1.0 SP 4. * The SQL Server 2000 patch can be installed on systems running Service Pack 3 or Service Pack 3a. Additionally, the SQL Server 2000 patch can be installed on systems running MSDE 2000 SP3. * Windows Server 2003 users should obtain the patch for SQL Server Desktop Engine from Windows Update. Inclusion in future service packs: The fix for this issue will be included in SQL Server 2000 Service Pack 4 and Windows Server 2003 Service Pack 1. Reboot needed: If the file(s) being updated by the patch are in use when the patch is installed, you may be prompted to reboot. In most cases, a reboot will not be necessary. Patch can be uninstalled: Yes. Microsoft Knowledge Base article 330391 provides instructions for this. Superseded patches: This patch supersedes the SQL 2000 SP2 and SQL 7.0 SP 4 version of the patch provided in Microsoft Security Bulletin MS02-061, which was itself a cumulative patch. MS02-061 fixes are already included in SQL 2000 SP3 and SP3a. Verifying patch installation: * SQL Server 7.0: To ensure you have the fix installed properly, verify the individual files by consulting the date/time stamp of the files listed in the file manifest in Microsoft Knowledge Base article at 815495 * SQL Server 2000: To ensure you have the fix installed properly, verify the individual files by consulting the date/time stamp of the files listed in the file manifest in Microsoft Knowledge Base article 815495 Caveats: * The fix included in this security patch may cause non-administrative client connections to a system running SQL Server 7.0 that is running on Windows NT 4.0 Server or on Windows NT 4.0 Server, Terminal Services Edition to fail. Microsoft Knowledge Base article 823492 addresses this problem in detail as well as provides a fix for this specific problem. * If you are running Microsoft Windows NT Server 4.0 Server Service Pack 6, you must apply the hotfix that is described in 258437 before applying this patch. Q258437 is now available for public download. See the Knowledge base article for more information. * This patch does not include the functionality of the Killpwd tool that is provided in Microsoft Security Bulletin MS02-035. * The patch does not supersede any previously released patches for MDAC or OLAP under SQL Server 2000. At this writing, these patches include the ones discussed in: * Microsoft Security Bulletin MS00-092 * Microsoft Security Bulletin MS02-041 * Microsoft Security Bulletin MS02-030 * Microsoft Security Bulletin MS02-040 Localization: Localized versions of this patch are available at the locations discussed in “Patch Availability”. Obtaining other security patches: Patches for other security issues are available from the following locations: * Security patches are available from the Microsoft Download Center, and can be most easily found by doing a keyword search for "security_patch". * Patches for consumer platforms are available from the WindowsUpdate web site Other information: Acknowledgments Microsoft thanks Andreas Junstream of @Stake for reporting this issue to us and working with us to protect customers. Support: * Microsoft Knowledge Base article 815495 discusses this issue and will be available approximately 24 hours after the release of this bulletin. Knowledge Base articles can be found on the Microsoft Online Support web site. * Technical support is available from Microsoft Product Support Services. There is no charge for support calls associated with security patches. Security Resources: The Microsoft TechNet Security Web Site provides additional information about security in Microsoft products. Disclaimer: The information provided in the Microsoft Knowledge Base is provided "as is" without warranty of any kind. Microsoft disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Microsoft Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Microsoft Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply. Revisions: V1.0 July 23, 2003: Bulletin Created. [***** End Microsoft Security Bulletin MS03-031 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of Microsoft Corporation for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Capability, is the computer security incident response team for the U.S. Department of Energy (DOE) and the emergency backup response team for the National Institutes of Health (NIH). CIAC is located at the Lawrence Livermore National Laboratory in Livermore, California. CIAC is also a founding member of FIRST, the Forum of Incident Response and Security Teams, a global organization established to foster cooperation and coordination among computer security teams worldwide. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be contacted at: Voice: +1 925-422-8193 (7x24) FAX: +1 925-423-8002 STU-III: +1 925-423-2604 E-mail: ciac@ciac.org Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ Anonymous FTP: ftp.ciac.org PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities receive CIAC bulletins. If you are not part of these communities, please contact your agency's response team to report incidents. Your agency's team will coordinate with CIAC. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained via WWW at http://www.first.org/. This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC) N-115: Buffer Overrun in Microsoft Windows Could Lead to Data Corruption N-116: Flaw in Microsoft Windows Message Handling through Utility Manager Could Enable Privilege Elevation N-117: Microsoft RPC Interface Buffer Overrun Vulnerability N-118: Cisco IOS Interface Blocked by IPv4 Packet N-119: Microsoft Internet Security and Acceleration (ISA) Server Error Pages Could Allow Cross-Site Scripting Attack N-120: Unchecked Buffer in Microsoft Windows Shell Could Enable System Compromise N-121: Red Hat Updated Mozilla Packages Fix Security Vulnerability N-122: Red Hat Updated 2.4 Kernel Fixes Vulnerabilities N-123: SGI Login Vulnerabilities N-124: Sun Solaris 8 LDAP Clients May Log the Proxy Agent User's Password as Clear Text