__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Center ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Microsoft SQL Query Method Vulnerability June 13, 2001 18:00 GMT Number L-095 ______________________________________________________________________________ PROBLEM: A problem exists in the client connection termination to the SQL server. Access to the cached administrators 'sa' session is possible. PLATFORM: Microsoft SQL Server 2000 and SQL Server 7.0 NOTE: The server is only vulnerable if it is configured to use 'mixed mode'. Microsoft recommends against using this mode. DAMAGE: Any user reactivating the cached 'sa' session would gain full system privileges. This would give the user the capability of running code of their choice and have full control of the server. SOLUTION: Apply the patch provided by Microsoft. ______________________________________________________________________________ VULNERABILITY The risk is LOW, as there are several mitigating factors, ASSESSMENT: including one of timing the access to the system. ______________________________________________________________________________ [****** Begin Microsoft Bulletin ******] - ---------------------------------------------------------------------- Title: SQL Query Method Enables Cached Administrator Connection to be Reused Date: 12 June 2001 Software: Microsoft SQL Server 2000 and SQL Server 7.0 Impact: Privilege elevation Bulletin: MS01-032 Microsoft encourages customers to review the Security Bulletin at: http://www.microsoft.com/technet/security/bulletin/MS01-032.asp. - ---------------------------------------------------------------------- Issue: ====== When a client connection to a SQL Server is terminated, it remains cached for a short period of time for performance reasons. One SQL query method contains a flaw that has the effect of making it possible for one user's query to reuse a cached connection that belonged to the sa account. Exploiting this vulnerability would enable an attacker to execute the query using the administrator's security context. This would give her the ability to take any desired action on the database; moreover, it would give her the ability to run extended stored procedures, thereby giving her the opportunity to run code of her choice and assume de facto control of the server itself. Mitigating Factors: ==================== - The vulnerability only affects servers configured to use Mixed mode. Microsoft strongly recommends against using Mixed Mode, and recommends using Windows Authentication mode instead. Customers who have configured their servers to use Windows Authentication mode are not affected by this vulnerability. - Terminated connections are only cached for a short period. The attacker would need to time her attack in order to occur during the period when an administrator's connection was in the cache. - The query method at issue here can only be executed by an authenticated user. Not only would this limit the number of users who could exploit the vulnerability, it also would allow the action to be audited. Patch Availability: =================== - A patch is available to fix this vulnerability. Please read the Security Bulletin http://www.microsoft.com/technet/security/bulletin/ms01-032.asp for information on obtaining this patch. - --------------------------------------------------------------------- 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. [****** End Microsoft Bulletin ******] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of Microsoft for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Center, 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) L-085: Cisco Content Service Switch FTP Vulnerability L-086: Cisco Multiple Vulnerabilities in CBOS L-087: Microsoft Internet Explorer Flaws in Certificate Validation L-088: Cisco IOS Reload after Scanning Vulnerability L-089: Windows Unchecked Buffer in Media Player .ASX Processor L-090: Cisco 11000 Series Switch, Web Management Vulnerability L-091: Microsoft Exchange Server Outlook Web Access Flaw L-092: Microsoft Predictable Name Pipes In Telnet L-093: HP-UX kmmodreg Vulnerability L-094: BIND Inadvertent Local Exposure of HMAC-MD5 (TSIG) Keys