Microsoft SQL Server Webtasks privilege elevation

October 17th, 2002

NGSSoftware Insight Security Research Advisory

Name: Microsoft SQL Server Webtasks privilege elevation

Systems: Microsoft SQL Server 2000 and 7

Severity: High Risk

Vendor URL: http://www.microsoft.com/

Author: David Litchfield (david@ngssoftware.com)

Advisory URL: http://www.ngssoftware.com/advisories/mssql-webtasks.txt

Date: 17th October 2002

Advisory number: #NISR17102002

Description

***********

Using a number of flaws in the webtask functionality of Microsoft SQL Server

an attacker may gain control of the database by elevating their privileges.

Details

*******

The xp_runwebtask stored procedure fails to set permissions properly when

executed and runs with the privileges of the SQL Server. xp_runwebtask can

be executed by ‘PUBLIC’.

The permissions of the table that stores webtasks, namely

msdb.dbo.mswebtasks, are set loosely allowing ‘PUBLIC’ to INSERT, UPDATE,

DELETE and SELECT.

By updating a webtask owned by the database owner and then running it

through xp_runwebtask an attacker may elevate their privileges. In terms of

exploitation an attacker may choose to run OS commands or add themselves to

the SYSADMIN group.

Fix Information

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

NGSSoftware alerted Microsoft to these problems on the 23rd of August.

Microsoft has released a patch that addresses these issues. For more details

please see

http://www.microsoft.com/technet/treeview/?url=/technet/security/bulletin/MS

02-061.asp

A check and fix for these problems already exists in NGSSQUirreL, an

advanced SQL Server security management tool, of which more information

is available from the NGSSite: http://www.nextgenss.com/.

Section Navigation


SC Awards 2008


SC Magazine Awards 2008

NGSSoftware wins 'Best Security Company'.

ITA 2008


2008 International Trade Awards

NGSSoftware named as South-East England regional winners at the 2008 International Trade Awards.

SLBA 2008


South London Business Awards 2008

David Litchfield named as 'Entrepreneur of the Year' at the South London Business Awards 2008.

Latest Vacancies

Experienced CLAS consultant

NGSSoftware are seeking an experienced CLAS consultant capable of writing Security Targets and Evaluation Work Plans for CTAS.

Please send us your CV or resume.

NGS Offices

NGS have offices located in London & St Andrews (UK) and Sydney (Australia).

NGS Consulting

Why do companies around the world – and around the corner – turn to NGS?

Discover what we could do for your business »

NGS Security Training

Find out why we have provided training to some of the world's most security conscious organisations.

Learn from the best!

We regularly present and speak at international security conferences throughout the world.

OWASP AppSec Europe 2008

AusCERT 2008

ITWeb Security Summit

Customer Testimonials

Read what some of our satisfied customers are saying about us.

NGS Publications

Web Application Hacker's Handbook

Oracle Hacker's Handbook

Database Hacker's Handbook

The Shellcoder's Handbook

SQL Server Security

Configuring IPCop Firewalls


CHECK