Alert: Microsoft Security Bulletin - MS02-038

From: Russ (Russ.Cooper@RC.ON.CA)
Date: 07/25/02


Date:         Wed, 24 Jul 2002 20:00:25 -0400
From: Russ <Russ.Cooper@RC.ON.CA>
To: NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM

http://www.microsoft.com/technet/security/bulletin/MS02-038.asp

Unchecked Buffer in SQL Server 2000 Utilities Could Allow Code Execution (Q316333)

Originally posted: July 24, 2002

Summary

Who should read this bulletin: System administrators using Microsoft® SQL Server(tm) 2000 and Microsoft Desktop Engine 2000.

Impact of vulnerability: Two vulnerabilities, both of which could enable an attacker to run code on the server.

Maximum Severity Rating: Moderate

Recommendation: System administrators should consider installing the patch.

Affected Software:
- Microsoft SQL Server 2000.
- Microsoft Desktop Engine (MSDE) 2000

Technical description:

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.

Vulnerability identifiers:
- Buffer overrun vulnerability in Database Consistency Checkers: CAN-2001-0644
- SQL injection vulnerability in replication stored procedures: CAN-2001-0645

This email is sent to NTBugtraq automatically as a service to my subscribers. Since its programmatically created, and since its been a long time since anyone paid actual money for my programming skills, it may or may not look that good...;-]

I can only hope that the information it does contain can be read well enough to serve its purpose.

Cheers,
Russ - Surgeon General of TruSecure Corporation/NTBugtraq Editor



Relevant Pages

  • Re: New SQL Server Threat - Advisory 961040
    ... SP3 also addresses the issue for SQL Server 2005 Express Edition? ... This vulnerability is addressed in SP3 of SQL 2005, ...
    (microsoft.public.sqlserver.security)
  • [NT] SQL Server 2000 Buffer Overflows and SQL Injection Vulnerabilities
    ... allow maintenance and other operations to be performed on a SQL Server, ... fixed database role can run this command. ... Buffer Overrun Vulnerability in Database Consistency Checkers: ... privileges, and only should be granted to trusted users. ...
    (Securiteam)
  • [NT] Cumulative Patch for SQL Server
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... released patches for SQL Server 2000. ... * A buffer overrun vulnerability in a procedure used to encrypt SQL ... An attacker who was able to successfully ...
    (Securiteam)
  • [NT] Another Cumulative Patch for SQL Server Released
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... previously released patches for SQL Server 7.0, SQL Server 2000, and ... malformed login request to an affected server, an attacker could either ... * A buffer overrun vulnerability that occurs in one of the Database ...
    (Securiteam)
  • Re: Access 2007->SQL Server2005 "connection was forcibly closed",G
    ... I moved every table I was able to move to the SQL ... closed connections - but all of these errors are in the version which used ... the SQL Server 2000 and everything worked ... communication between ODBC (OLEDB and Native Client, ...
    (microsoft.public.sqlserver.connect)