Operating System:

[WIN]

Published:

16 August 2002

Protect yourself against future threats.

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

===========================================================================
             AUSCERT External Security Bulletin Redistribution

           ESB-2002.442 -- Microsoft Security Bulletin MS02-043
                 Cumulative Patch for SQL Server (Q316333)
                              16 August 2002

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:                SQL Server 7.0
                        SQL Server 2000
Vendor:                 Microsoft
Operating System:       Windows
Impact:                 Administrator Compromise
Access Required:        Remote

- --------------------------BEGIN INCLUDED TEXT--------------------

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

- - -
- - ---------------------------------------------------------------------
Title:    Cumulative Patch for SQL Server (Q316333)
Date:     14 August, 2002
Software: Microsoft SQL Server
Impact:   Elevation of privilege
Max Risk:   Moderate
Bulletin:   MS02-043

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

- - -
- - ---------------------------------------------------------------------
Issue:
======
This is a cumulative patch that includes the functionality of all 
previously released patches for SQL Server 7.0 and SQL Server 2000.
In addition, it eliminates a newly discovered vulnerability.

SQL Server 7.0 and SQL Server 2000 provide for extended stored 
procedures, which are external routines written in programming 
languages such as C or C#. 

These procedures appear as normal stored procedures to users and can 
be invoked and executed just like normal stored procedures. By 
default, SQL Server 7.0 and SQL Server 2000 ship with a number of 
extended stored procedures which are used for various helper
functions.

Some of the Microsoft-provided extended stored procedures that have
the ability to reconnect to the database as the SQL Server service
account have a flaw in common - namely, they have weak permissions 
that can  allow nonprivileged users to execute them. Because these 
extended stored procedures can be made to run with administrator 
privileges on the database, it is thus possible for a nonprivileged
user to run stored procedures on the database with administrator 
privileges.

An attacker could exploit this vulnerability in one of two ways. The 
attacker could attempt to load and execute a database query that
calls one of the affected extended store procedures. Alternately, 
if a web-site or other database front-end were configured to access 
and process arbitrary queries, it could be possible for the attacker
to provide inputs that would cause the query to call one of the
functions in question with the appropriate malformed parameters. 

Mitigating Factors:
====================
- - - The effect of exploiting the vulnerability would depend on the 
  specific configuration of the SQL Server service. SQL Server 
  can be configured to run in a security context chosen by the 
  administrator. By default, this context is as a domain user. If 
  the rule of least privilege has been followed, it would minimize
  the amount of damage an attacker could achieve.
- - - The vector for exploiting this vulnerability could be blocked by 
  following best practices. Specifically, untrusted users should not
  be able to load and execute queries of their choice on a database 
  server. In addition, publicly accessible database queries should 
  filter all inputs prior to processing.

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

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

Acknowledgment:
===============
- - - David Litchfield of Next Generation Security Software Ltd. for
reporting these issues.
- - - Chip Andrews of www.sqlsecurity.com and Timothy Mullen for
reporting additional information on these issues.

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

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

iQEVAwUBPVwcJI0ZSRQxA/UrAQEMwAgAhclhpjhvNdKzeOgzPUUnjfcGslazdcRd
B7nnW0ORcQ7pmjal1ccZRa2ZX6PBeQJ3TwUOV0jbcY0v/KFtyhteQnd8Js48hKdY
lod5xDMu4Oor5uQIFvSMy/moLO8IUwcyF6poDT0aUSIRq6O+PNbwlIO1lLcI0rnM
BBRc3whzx/PEfzeOh2CEuiG3H8FnCXJmtAqnRCla6T8PRCwkSOQOHd3+khChnzNq
eB3d6DffwS6UUQYR5QdhovHxXuHBaKxVsY5wOfLhrg1LODVdb6H89FXM44+y1UrP
7iW+xhY4OUIATmnlZnrJbGz7j2qMwnb5tzj+dSYTb+pOnL9Rz0wQqQ==
=x31u
- -----END PGP SIGNATURE-----

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content.  The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/Information/advisories.html

If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Teams).

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business 
                hours which are GMT+10:00 (AEST).  On call after hours 
                for member emergencies only.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key

iQCVAwUBPVz+TSh9+71yA2DNAQGDmwP/TBfPWaLZlgS2XZPw8LTq+BqkcoSIQGRe
lmP2Fg5RQUrHwfmaJeY0YsqV2/2Etvi5S1GtlLuj8+VY5e+6AgPCHymvgmaIy1NC
Ays77xvWiNUyK7yizA0lblTL8ACPF5f4/3J7Dfwyh2MtM4M9QIa6sEbl8Au8Wilo
u/upm2+JHM0=
=E+C0
-----END PGP SIGNATURE-----