SQL Server 安全风险分析

1、 查看SQL SERVER中的所有用户:(SQL 2000或2005都可用)
Select * from sysusers;
在这里插入图片描述
2、 查看SQL SERVER服务器中所有空密码的用户:(2000/2005通用)
select name,password from syslogins where password is null;
在这里插入图片描述
3、 设置mssql只能windows本地账户登陆:
在这里插入图片描述
在这里插入图片描述

4、 设置数据库日志审核:
右击数据库,打开数据库属性,选择安全性,将安全性中的审计级别调成全部。在这里插入图片描述
在这里插入图片描述

5、 进行网络协议加密:
在这里插入图片描述

6、 查看数据库信息和版本:

Select @@version;

7、 判断当前数据库是否存在xp_cmdshell;

select count(*) from master.dbo.sysobjects where xtype=‘x’ and
name=‘xp_cmdshell’;

如果返回结果非0,代表该服务器商存在xp_cmdshell;

8、 启用服务器上的xp_cmdshell:

Exec sp_configure ‘show advanced options’,1;
Reconfigure;
Exec sp_configure ‘xp_cmdshell’,1;
Reconfigure;

9、 使用xp_cmdshell进行过程存储的命令执行:在这里插入图片描述

10、 添加xp_cmdshell:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_27180763/article/details/123682352
今日推荐