发布时间 :2002-09-24 00:00:00
修订时间 :2016-10-17 22:23:16

[原文]Microsoft SQL Server 2000 SP2, when configured as a distributor, allows attackers to execute arbitrary code via the @scriptfile parameter to the sp_MScopyscript stored procedure.

[CNNVD]Microsoft SQL Server漏洞(CNNVD-200209-045)

        Microsoft SQL Server 2000 SP2版本在配置为分配器存在漏洞。攻击者借助sp_Mscopyscript预存程序的@scriptfile参数执行任意代码。

- CVSS (基础分值)

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

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


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


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  BUGTRAQ  20020822 Arbitrary Command Execution on Distributor SQL Server 2000 machines (#NISR22002002A)

- 漏洞信息

Microsoft SQL Server漏洞
高危 未知
2002-09-24 00:00:00 2006-09-01 00:00:00
        Microsoft SQL Server 2000 SP2版本在配置为分配器存在漏洞。攻击者借助sp_Mscopyscript预存程序的@scriptfile参数执行任意代码。

- 公告与补丁


- 漏洞信息 (21651)

Microsoft SQL Server 2000 sp_MScopyscript SQL Injection Vulnerability (EDBID:21651)
windows remote
2002-07-25 Verified
0 Cesar Cerrudo
N/A [点击下载]

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.

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

use master
declare @cmd nvarchar(4000)
exec sp_MScopyscriptfile N'c:\autoexec.bat" c:\cp.txt&echo hello >
c:\ccc.bbb & 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.		

- 漏洞信息

Microsoft SQL Server sp_MScopyscript Procedure scriptfile Parameter Arbitrary Code Execution
Loss of Integrity

- 漏洞描述

- 时间线

2002-07-24 Unknow
2002-07-24 Unknow

- 解决方案


Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete