落伍者站长论坛's Archiver

懂技术的痞子 发表于 2005-4-20 09:08

[技术文章]SQL SERVER里的xp_cmdshell如何删除

从网建转过来的

在查询里执行


[code]
if exists (select * from
dbo.sysobjects where id=object_id(N'[dbo].[xp_cmdshell]')and
OBJECTPROPERTY(id,N'IsExtendedProc')=1)

exec sp_dropextendedproc N'[dbo].[xp_cmdshell]'

GO
[/code]

原帖地址:[url]http://www.im286.com/viewthread.php?tid=878133&extra=page%3D2[/url]

多姿多彩 发表于 2005-8-8 08:11

那就帮你顶一下吧!

renothing 发表于 2005-8-8 10:27

要是被入侵了,获得了SA权限,。执行
[code]Exec master.dbo.addextendedproc 'xp_cmdshell', 'xplog70.dll'; select count(*) from master.dbo.sysobjects where xtype='X' and name='xp_cmdshell'[/code]
或者
传个xplog70.dll,用SQLTOOLS.EXE自带的文件上传功能可以轻松实现了,把xplog70.dll文件传到

对方的c:\winnt\system32下,(不行的话,需传到对方的MSSQL目录里)在执行数据库命令:

[code]Exec master.dbo.addextendedproc 'xp_cmdshell', 'c:\winnt\system32\xplog70.dll'[/code]
这个又怎么办呢~

华哥 发表于 2005-8-8 10:48

在去掉扩展存储过程xp_cmdshell之前,一定要查看是用的哪个DLL文件:
sp_helpextendedproc xp_cmdshell


打开企业管理器里的查询分析器.
输入运行 sp_dropextendedproc 'xp_cmdshell' 即可

通过下面语句恢复
EXEC sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll'

renothing 发表于 2005-8-8 10:54

[quote]原帖由 [i]华哥[/i] 于 2005-8-8 10:48 发表
在去掉扩展存储过程xp_cmdshell之前,一定要查看是用的哪个DLL文件:
sp_helpextendedproc xp_cmdshell


打开企业管理器里的查询分析器.
输入运行 sp_dropextendedproc 'xp_cmdshell' 即可

通过下面语 ... [/quote]
还是没搞懂,可否详细解答:(:(

黑天 发表于 2005-12-8 00:19

装SQL2000就知道了

华哥 发表于 2005-12-8 13:14

我的站内有更详细的说明.

签名里.

renqing 发表于 2007-2-14 20:15

不错

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.