CVE-2002-0645
CVSS7.5
发布时间 :2002-08-12 00:00:00
修订时间 :2008-09-05 16:28:33
NMCOS    

[原文]SQL injection vulnerability in stored procedures for Microsoft SQL Server 2000 and Microsoft Desktop Engine (MSDE) 2000 may allow authenticated users to execute arbitrary commands.


[CNNVD]Microsoft SQL Server 2000复制存储过程远程可插入漏洞(MS02-038)(CNNVD-200208-154)

        
        Microsoft SQL Server 2000是一款由Microsoft公司开发的商业性质大型数据库系统。
        Microsoft SQL Server中的用于复制的存储过程Sp_MScopyscriptfile对用户提交的参数缺少正确的过滤,远程攻击者可以利用这个漏洞以SQL Server Agent Proxy帐户权限在系统上执行任意命令。
        Sp_MScopyscriptfile存储过程可以在SQL服务器复制目录中建立目录,然后拷贝脚本到此木中,这个存储过程包含@scriptfile输入参数,用于要拷贝脚本文件的名称,Sp_MScopyscriptfile存储过程对这个外部提供的参数缺少正确的过滤,远程攻击者可以在这个参数中插入操作系统命令并通过xp_cmdshell执行,如果SQL Server Agent Proxy帐户在系统中存储的情况下,攻击者可以以SQL Server Agent Proxy帐户的权限在系统中执行任意命令,不过默认SQL Server Agent Proxy帐户需要SQL管理员权限激活。
        

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:microsoft:data_engine:2000Microsoft data_engine 2000
cpe:/a:microsoft:sql_server:2000Microsoft SQL Server 2000

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.microsoft.com/technet/security/bulletin/ms02-038.asp
(VENDOR_ADVISORY)  MS  MS02-038

- 漏洞信息

Microsoft SQL Server 2000复制存储过程远程可插入漏洞(MS02-038)
高危 输入验证
2002-08-12 00:00:00 2006-09-01 00:00:00
远程  
        
        Microsoft SQL Server 2000是一款由Microsoft公司开发的商业性质大型数据库系统。
        Microsoft SQL Server中的用于复制的存储过程Sp_MScopyscriptfile对用户提交的参数缺少正确的过滤,远程攻击者可以利用这个漏洞以SQL Server Agent Proxy帐户权限在系统上执行任意命令。
        Sp_MScopyscriptfile存储过程可以在SQL服务器复制目录中建立目录,然后拷贝脚本到此木中,这个存储过程包含@scriptfile输入参数,用于要拷贝脚本文件的名称,Sp_MScopyscriptfile存储过程对这个外部提供的参数缺少正确的过滤,远程攻击者可以在这个参数中插入操作系统命令并通过xp_cmdshell执行,如果SQL Server Agent Proxy帐户在系统中存储的情况下,攻击者可以以SQL Server Agent Proxy帐户的权限在系统中执行任意命令,不过默认SQL Server Agent Proxy帐户需要SQL管理员权限激活。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 如果您已经手工启用了SQL Server Agent Proxy账号的话,您应该立刻禁用此帐号。
        厂商补丁:
        Microsoft
        ---------
        Microsoft已经为此发布了一个安全公告(MS02-038)以及相应补丁:
        MS02-038:Unchecked Buffer in SQL Server 2000 Utilities Could Allow Code Execution(Q316333)
        链接:
        http://www.microsoft.com/technet/security/bulletin/MS02-038.asp

        补丁下载:
         * SQL Server 2000:
        
        http://support.microsoft.com/support/misc/kblookup.asp?id=Q316333

- 漏洞信息

10140
Microsoft SQL Server Stored Procedure Arbitrary Command Execution

- 漏洞描述

Unknown or Incomplete

- 时间线

2002-07-24 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Microsoft SQL Server 2000 sp_MScopyscript SQL Injection Vulnerability
Input Validation Error 5309
Yes No
2002-07-25 12:00:00 2009-07-11 02:56:00
Discovery credited to Cesar Cerrudo <cesarc56@yahoo.com>.

- 受影响的程序版本

Microsoft SQL Server 2000 Desktop Engine
+ Akiva WebBoard 6.1
+ Microsoft Access 2000
+ Microsoft Application Center 2000
+ Microsoft BizTalk Server 2000 Developer Edition
+ Microsoft BizTalk Server 2000 Enterprise Edition
+ Microsoft BizTalk Server 2000 Standard Edition
+ Microsoft BizTalk Server 2002 Developer Edition
+ Microsoft BizTalk Server 2002 Enterprise Edition
+ Microsoft Office 2000
+ Microsoft Project Central Server
+ Microsoft SharePoint Team Services from Microsoft
+ Microsoft Visio 2000 Enterprise Edition
+ Microsoft Visio Enterprise Network Tools
+ Microsoft Visual FoxPro 6.0
+ Microsoft Visual Studio 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
+ SmartMax Software MailMax 5.0
+ Veritas Software Backup Exec for Windows Servers 9.0
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 2000 SP3

- 不受影响的程序版本

Microsoft SQL Server 2000 SP3

- 漏洞讨论

The Microsoft SQL Server 2000 sp_MScopyscript stored procedure does not sufficiently validate input before passing it to the xp_cmdshell extended stored procedure. An attacker with the ability to execute a query or pass malicious input to a query may be able to execute operating system commands via xp_cmdshell with the privileges of the SQL Server.

The sp_MScopyscript stored procedure may be executed by the 'public' role by default, so it is possible that a database user with privileges may potentially exploit this issue.

The Microsoft SQL Server must be configured to function as a distributor for this issue to be exploited. Certain other conditions must be satisfied for exploitation to succeed, such as the SQL Server running in the context of a domain user.

** This issue was also documented as BID 5546. That entry has now been deprecated in favor of the original report.

- 漏洞利用

The following example was submitted:

By supplying a malformed @scriptfile parameter an attacker can run arbitrary
commands:

use master
declare @cmd nvarchar(4000)
exec sp_MScopyscriptfile N'c:\autoexec.bat" c:\cp.txt&amp;echo hello &gt;
c:\ccc.bbb &amp; echo "hello',@cmd OUTPUT
print @cmd

The above query will copy the autoexec.bat file to cp.txt but also echo hello to a file called ccc.bbb.

- 解决方案

Fixes available:


Microsoft SQL Server 2000

Microsoft SQL Server 2000 SP1

Microsoft SQL Server 2000 Desktop Engine

Microsoft SQL Server 2000 SP2

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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