TMAegisBeta
更多 mssql 规则

Microsoft SQL Server

TMA-MSSQL2022-3.1

Ensure 'Server Authentication' Property is set to 'Windows Authentication Mode'

中级别 1自动化mssql

说明

Use Windows Authentication to validate attempted connections. Windows provides a more robust authentication mechanism than SQL Server authentication.

检查方式

审计方法: SQL 查询

sql_query
sqlcmd -b -h -1 -W -Q "SET NOCOUNT ON; SELECT CAST(SERVERPROPERTY('IsIntegratedSecurityOnly') AS int);"
预期输出
1

修复方式

修复方法: 操作指南或基础设施补丁

Perform either the GUI or T-SQL method shown: GUI Method 1. Open SQL Server Management Studio. 2. Open the Object Explorer tab and connect to the target SQL Server instance. 3. Right click the instance name and select Properties. 4. Select the Security page from the left menu. 5. Set the Server authentication setting to Windows Authentication Mode. T-SQL Method Run the following T-SQL in a Query Window: USE [master] GO EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 1 GO Restart the SQL Server service for the change to take effect.

属性

操作系统
任意
标签
authmssqlsqlserver-2022
参考
CIS Microsoft SQL Server 2022 Benchmark v1.3.0 - 3.1 Ensure 'Server Authentication' Property is set to 'Windows Authentication Mode'

检查本机

请在您有权审计的机器上运行此命令。扫描为只读操作。

shell
tmaegis scan --target mssql