TMAegis
Thêm quy tắc cho mssql

TMA-MSSQL2022-3.1

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

Trung bìnhCấp 1Tự độngmssql

Mô tả

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

Cách kiểm tra

Phương pháp kiểm tra: Truy vấn SQL

sql_query
sqlcmd -b -h -1 -W -Q "SET NOCOUNT ON; SELECT CAST(SERVERPROPERTY('IsIntegratedSecurityOnly') AS int);"
Đầu ra mong đợi
1

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

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.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
authmssqlsqlserver-2022
Tham chiếu
CIS Microsoft SQL Server 2022 Benchmark v1.3.0 - 3.1 Ensure 'Server Authentication' Property is set to 'Windows Authentication Mode'

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target mssql