TMAegisBeta
更多 mssql 規則

Microsoft SQL Server

TMA-MSSQL2022-2.13

Ensure the 'sa' Login Account is set to 'Disabled'

高等級 1自動化mssql

說明

The sa account is a widely known and often widely used SQL Server account with sysadmin privileges. This is the original login created during installation and always has the principal_id=1 and sid=0x01. Enforcing this control reduces the probability of an attacker executing brute force attacks against a well-known principal.

檢查方式

稽核方法: SQL 查詢

sql_query
sqlcmd -b -h -1 -W -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.server_principals WHERE sid = 0x01 AND is_disabled = 0;"
預期輸出
0

修補方式

修補方法: 操作指南或基礎設施修補檔

Execute the following T-SQL query: USE [master] GO DECLARE @tsql nvarchar(max) SET @tsql = 'ALTER LOGIN ' + SUSER_NAME(0x01) + ' DISABLE' EXEC (@tsql) GO

屬性

作業系統
不限
標籤
loggingmssqlsqlserver-2022
參考資料
CIS Microsoft SQL Server 2022 Benchmark v1.3.0 - 2.13 Ensure the 'sa' Login Account is set to 'Disabled'

檢查此主機

請在您有權稽核的機器上執行此指令。掃描為唯讀操作。

shell
tmaegis scan --target mssql