N-008: Microsoft Elevation of Privilege in SQL Server Web Tasks Privacy and Legal Notice

CIAC INFORMATION BULLETIN

N-008: Microsoft Elevation of Privilege in SQL Server Web Tasks

[Microsoft Security Bulletin MS02-061]

October 17, 2002 20:00 GMT
[REVISED 16 Jun 2005]

PROBLEM: There are a number of flaws in the webtask functionality that may allow an attacker to gain control of the database by elevating their privileges.
PLATFORM:
  • Microsoft SQL Server 7.0
  • Microsoft Data Engine (MSDE) 1.0
  • Microsoft SQL Server 2000
  • Microsoft Desktop Engine (MSDE) 2000
DAMAGE: By exploiting this vulnerability, an attacker can elevate his or her privileges and add themselves to the SYSADMIN group.
SOLUTION: Apply appropriate patch based on Microsoft's bulletin.

VULNERABILITY
ASSESSMENT:
The risk is MEDIUM. An attacker must be authenticated as a user of the SQL server, however by exploiting this vulnerability an attacker may choose to run OS commands or add themselves to the SYSADMIN group.

LINKS:  
  CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/n-008.shtml
  ORIGINAL BULLETIN: http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/MS02-061.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 MS02-061 *****]

Microsoft Security Bulletin MS02-061 

Elevation of Privilege in SQL Server Web Tasks (Q316333)
Originally posted: October 16, 2002

Summary
Who should read this bulletin: System administrators using Microsoft® SQL 
Server™ 7.0, SQL Server 2000, Microsoft Data Engine (MSDE) 1.0, and 
Microsoft Desktop Engine (MSDE) 2000. 

Impact of vulnerability: Elevation of privilege 

Maximum Severity Rating: Critical 

Recommendation: System administrators should apply the patch to affected systems. 

Affected Software: 

 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, and Microsoft Data Engine 
(MSDE) 1.0, Microsoft Desktop Engine (MSDE) 2000. In addition, it eliminates 
one newly discovered vulnerability. 

SQL Server 7.0 and 2000 provide stored procedures which is a collection of Transact-SQL 
statements stored under a name and processed as a group. One stored procedure, an 
extended stored procedure and weak permissions on a table combine to allow a low 
privileged user the ability to run, delete, insert or update web tasks. 

An attacker who is able to authenticate to a SQL server could delete, insert or update 
all the web tasks created by other users. In addition, the attacker could run already 
created web tasks in the context of the creator of the web task. This typically runs 
in the context of the SQL Server Agent service account. 

Mitigating factors: 


Severity Rating:
Internet Servers Intranet Servers Client Systems SQL Server 7.0 (Including MSDE 1.0) Critical Critical None SQL Server 2000 (Including MSDE 2000) Critical Critical None 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. This issue received a critical rating because an authenticated user could connect to a SQL Server and insert, delete or update web tasks. Vulnerability identifier: CAN-2002-1145 Tested Versions: Microsoft tested SQL Server 7.0 and SQL Server 2000 (and their associated versions of MSDE) to assess whether they are affected by these vulnerabilities. Previous versions are no longer supported, and may or may not be affected by these vulnerabilities. Patch availability Download locations for this patch Additional information about this patch Installation platforms: Inclusion in future service packs: The fix for this issue will be included in SQL Server 2000 Service Pack 3. Reboot needed: No. However, it might be necessary to restart the SQL Server service. Patch can be uninstalled: No. Superseded patches: This patch supersedes the one provided in Microsoft Security Bulletin MS02-056, which was itself a cumulative patch. Verifying patch installation: Caveats: 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: Other information: Acknowledgments Microsoft thanks David Litchfield of Next Generation Security Software Ltd. for reporting this issue to us and working with us to protect customers. We would also like to thank Martin Rakhmanoff (jimmers@yandex.ru) for contributing to the investigation. Support: 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: [***** End Microsoft Security Bulletin MS02-061 *****]

CIAC wishes to acknowledge the contributions of Microsoft Corporation and Next Generation Security Software Ltd for the information contained in this bulletin.
CIAC services are available to DOE, DOE Contractors, and the NIH. CIAC can be contacted at:
    Voice:          +1 925-422-8193 (7 x 24)
    FAX:            +1 925-423-8002
    STU-III:        +1 925-423-2604
    E-mail:          ciac@ciac.org
    World Wide Web:  http://www.ciac.org/
    Anonymous FTP:   ftp.ciac.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.
UCRL-MI-119788
[Privacy and Legal Notice]