SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |    Help    |   

SecurityTracker
Archives


Welcome to SecurityTracker!
 
Click to Sign Up
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com

Sign Up!





Category:  Application (Database)  >  Microsoft SQL Server Vendors:  Microsoft
Microsoft SQL Server Buffer Overflow in Database Consistency Checker May Let Remote Authenticated Users Execute Arbitrary Code with the Privileges of the Database Service
SecurityTracker Alert ID:  1004830
CVE Reference:  CVE-2002-0644 ,  CVE-2002-0645   (Links to External Site)
Date:  Jul 25 2002
Impact:  Denial of service via local system, Denial of service via network, Execution of arbitrary code via local system, Execution of arbitrary code via network, User access via local system, User access via network
Fix Available:  Yes   Vendor Confirmed:  Yes  
Version(s): 2000
Description:  Microsoft reported that a buffer overflow may allow a local user or remote authenticated user to execute arbitrary code with the privileges of the database service. Also, an input validation flaw in two stored procedures may allow a local user or remote authenticated user to execute arbitrary operating system commands.

A buffer overflow was reported in the processing of user-supplied input in some Database Consistency Checkers (DBCCs) used for database maintenance. A local user or remote authenticated user with 'db_owner' or 'db_ddladmin' privileges could cause arbitrary code to be executed in the security context of the SQL Server service. By default, this is usually a Domain User account. This could give the user complete control over the database but not over the operating system itself. The user could also cause the SQL service to crash.

An SQL injection flaw in two stored procedures used for database replication may allow certain users to execute operating system commands on the server. Due to a permissions error, one of the stored procedures can be run by any local or remote authenticated user. According to the report, this vulnerability can only be exploited if the administrator has enabled the SQL Server Agent Proxy account. By default, this account is disabled. The operating system commands would be executed with the privileges of the SQL Server Agent Proxy account (by default, these are Domain User privileges).

Microsoft reports that SQL Server 7.0 is not affected.

Microsoft credits Cesar Cerrudo for reporting this issue.

Impact:  A local user or remote authenticated user could cause the database service to crash or could execute arbitrary code with the privileges of the database service. A local user or remote authenticated user could execute arbitrary operating system commands with the privileges of the SQL Server Agent Proxy account.
Solution:  Microsoft has released a cumulative patch, available at:

http://support.microsoft.com/support/misc/kblookup.asp?id=Q316333

This patch can only be installed on systems running SQL Server 2000 SP2. The fix will reportedly will be included in SQL Server 2000 SP3. This cumulative patch supersedes the cumulative patch described in Microsoft Security Bulletin MS02-034. However, Microsoft warns that this patch, by itself, is not enough to secure a SQL Server installation. Please see the original Microsoft advisory (available at the Vendor URL) for some important caveats regarding areas that this cumulative patch does not cover.

Microsoft plans to issue Knowledge Base article Q316333 regarding this issue, to be available shortly at the Microsoft Online Support web site:

http://search.support.microsoft.com/kb/c.asp?SD=SO&LN=EN-US

Vendor URL:  www.microsoft.com/technet/security/bulletin/MS02-038.asp (Links to External Site)
Cause:  Boundary error, Input validation error
Underlying OS:  Windows (2000), Windows (XP)
Reported By:  secnotif@microsoft.com
Message History:   This archive entry has one or more follow-up message(s) listed below.
Aug 22 2002 (A User Reports Additional Overflows That Are Fixed) Re: Microsoft SQL Server Buffer Overflow in Database Consistency Checker May Let Remote Authenticated Users Execute Arbitrary Code with the Privileges of the Database Service   ("Mark Litchfield" <mark@ngssoftware.com>)
A user has provided additional information.



 Source Message Contents

Date:  Wed, 24 Jul 2002 19:08:55 -0700
From:  secnotif@microsoft.com
Subject:  Microsoft Security Bulletin MS02-038: Cumulative Patch for SQL Server 2000 Service Pack 2 (Q316333)

 

-----BEGIN PGP SIGNED MESSAGE-----

- ----------------------------------------------------------------------
Title:      Cumulative Patch for SQL Server 2000 Service Pack 2 
            (Q316333)
Date:       24 July 2002
Software:   Microsoft SQL Server 2000, Microsoft Desktop Engine 
            (MSDE) 2000
Impact:     Two vulnerabilities, both of which could enable an 
            attacker to run code on the server.
Max Risk:   Moderate
Bulletin:   MS02-038

Microsoft encourages customers to review the Security Bulletin at: 
http://www.microsoft.com/technet/security/bulletin/MS02-038.asp.
- ----------------------------------------------------------------------

Issue:
======
This patch eliminates two newly discovered vulnerabilities affecting 
SQL Server 2000 and MSDE 2000:
 
 - A buffer overrun vulnerability that occurs in several Database 
   Consistency Checkers (DBCCs) that ship as part of SQL Server 2000.
   DBCCs are command console utilities that allow maintenance and 
   other operations to be performed on a SQL Server. While many of 
   these are executable only by sysadmin, some are executable by 
   members of the db_owner and db_ddladmin roles as well. In the most
   serious case, exploiting this vulnerability would enable an 
   attacker to run code in the context of the SQL Server service, 
   thereby giving the attacker complete control over all databases 
   on the server.
 
 - A SQL injection vulnerability that occurs in two stored 
   procedures used in database replication. One of these can only be 
   run by users who have been assigned the db_owner role; the other, 
   due to a permissions error, could be run by any user who could log
   onto the server interactively. Exploiting the vulnerability could 
   enable an attacker to run operating system commands on the server,
   but is subject to significant mitigating factors as discussed 
   below.

Mitigating Factors:
====================
Buffer Overrun Vulnerability in Database Consistency Checkers:
 
 - Both the db_owner and db_ddladmin roles carry with them 
   significant privileges, and only should be granted to trusted 
   users.
 
 - This allows the user to escalate privileges to the level of the 
   service account. And this escalation would be minimal if best 
   practices were followed and SQL were installed as a normal domain 
   account.
 
SQL Injection Vulnerability in Replication Stored Procedures:
 
 - Exploiting the vulnerability would, at a minimum, require that 
   the attacker have the ability to log onto the server 
   interactively. However, best practices strongly militate against 
   giving such permissions to untrusted users.
 
 - Simply being able to run the affected stored procedures would not 
   enable an attacker to exploit the vulnerability. As discussed in 
   the FAQ, the vulnerability could only be exploited if the 
   administrator had previously enabled the SQL Server Agent Proxy 
   account. By default, this account is disabled.
 
 - Even when enabled, the SQL Server Agent Proxy account has by 
   default only the privileges associated with a domain user. If 
   administrators follow best practices, it is likely that any user
   who could exploit the vulnerability would already have this level 
   of privilege.

Risk Rating:
============
 - Internet systems: Moderate
 - Intranet systems: Moderate
 - Client systems:   None

Patch Availability:
===================
 - A patch is available to fix this vulnerability. Please read the 
   Security Bulletin at
   http://www.microsoft.com/technet/security/bulletin/ms02-038.asp
   for information on obtaining this patch.

Acknowledgment:
===============
 - Cesar Cerrudo

- ---------------------------------------------------------------------

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.

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.1

iQEVAwUBPT80d40ZSRQxA/UrAQGmUwf/T/2sIhvrwxbeQOxZxxyllnUo70DyScuW
zafKqyiMtpeQd9vilQdzvOke+ywyFUENZalxwCrTlrmfmKDTP928oOR08a4vXZKa
s6eASOM9LhpGsbXx+tYiu/hxfdJmGHzXnsKIKVeBSdwFloUT3DdcmFtBMOP8REg0
mrVsyv41nnSqtwOKJq0AxIn3f/cTK4FVfmUBUfDpkByAgvNfy6gFsO5avuRplX9v
fWdksv+BdgVCf03IqPOXerj8UkNOW+oKpmSfx66Q+bpB9YbhWazJmU2fKs9Vth20
yw3XB9O7ou3264d4UcJPoHmWcvMFNuWrJfhGmGzlvSnLIp/IFZgMOg==
=Fi4E
-----END PGP SIGNATURE-----


*******************************************************************

You have received this e-mail bulletin because of your subscription to the Microsoft Product Security
Notification Service. For more information on this service, please visit http://www.microsoft.com/technet/security/notify.asp. To verify the digital signature on this bulletin, please download our PGP key at http://www.microsoft
.com/technet/security/notify.asp. To unsubscribe from the Microsoft Security Notification Service, please visit the Microsoft Profile C
enter at http://register.microsoft.com/regsys/pic.asp If you do not wish to use Microsoft Passport, you can unsubscribe from the Microsoft Security Notific
ation Service via email as described below: Send an email to unsubscribe to the Service by following these steps: a. Send an e-mail to securrem@microsoft.com. The subject line and the message body are not used to pr
ocess the subscription request, and can be anything you like. b. Send the e-mail. c. You will receive a response, asking you to verify that you really want to cancel your subscription
. Compose a reply, and put "OK" in the message body. (Without the quotes). Send the reply. d. You will receive an e-mail telling you that your name has been removed from the subscriber list. For security-related information about Microsoft products, please visit the Microsoft Security Adviso
r web site at http://www.microsoft.com/security.


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us   |    Help

Copyright 2002, SecurityGlobal.net LLC