Microsoft SQL Server
TMA-MSSQL-3.1
Ensure 'Server Authentication' Property is set to 'Windows Authentication Mode'
說明
Use Windows Authentication to validate attempted connections. 1 = Windows Authentication mode, 0 = mixed mode. Default: Windows Authentication Mode Runs one sqlcmd query with its defaults (Windows authentication to the local default instance); set SQLCMDSERVER, SQLCMDUSER and SQLCMDPASSWORD for another instance or SQL authentication. Needs VIEW SERVER STATE / sysadmin-level read access.
檢查方式
稽核方法: SQL 查詢
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.
屬性
- 作業系統
- 不限
- 標籤
- mssqldatabaseauthentication
- 參考資料
- CIS Microsoft SQL Server 2025 Benchmark v1.0.0 - 3.1 Ensure 'Server Authentication' Property is set to 'Windows Authentication Mode'
檢查此主機
請在您有權稽核的機器上執行此指令。掃描為唯讀操作。
tmaegis scan --target mssql