TMA-MSSQL2022-2.12
Ensure 'Hide Instance' option is set to 'Yes' for Production SQL Server instances
Mô tả
Non-clustered SQL Server instances within production environments should be designated as hidden to prevent advertisement by the SQL Server Browser service. Designating production SQL Server instances as hidden leads to a more secure installation because they cannot be enumerated. However, clustered instances may break if this option is selected.
Cách kiểm tra
Phương pháp kiểm tra: Truy vấn SQL
sqlcmd -b -h -1 -W -Q "SET NOCOUNT ON; DECLARE @v int; EXEC master.sys.xp_instance_regread @rootkey = N'HKEY_LOCAL_MACHINE', @key = N'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer\SuperSocketNetLib', @value_name = N'HideInstance', @value = @v OUTPUT; SELECT ISNULL(@v, 0);"- Đầ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. In SQL Server 2022 Configuration Manager, expand SQL Server Network Configuration, right-click Protocols for <InstanceName>, and then select Properties. 2. On the Flags tab, in the Hide Instance box, select Yes, and then click OK to close the dialog box. The change takes effect immediately for new connections. T-SQL Method Execute the following T-SQL to remediate: EXEC master.sys.xp_instance_regwrite @rootkey = N'HKEY_LOCAL_MACHINE', @key = N'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer\SuperSocketNetLib', @value_name = N'HideInstance', @type = N'REG_DWORD', @value = 1;
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- mssqlsqlserver-2022
- Tham chiếu
- CIS Microsoft SQL Server 2022 Benchmark v1.3.0 - 2.12 Ensure 'Hide Instance' option is set to 'Yes' for Production SQL Server instances
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.
tmaegis scan --target mssql