Microsoft SQL Server
TMA-MSSQL2022-7.2
Ensure Asymmetric Key Size is set to 'greater than or equal to 2048' in non-system databases
보통레벨 1자동mssql
설명
Microsoft Best Practices recommend to use at least a 2048-bit encryption algorithm for asymmetric keys. The RSA_2048 encryption algorithm for asymmetric keys in SQL Server is the highest bit-level provided and therefore the most secure available choice (other choices are RSA_512 and RSA_1024).
점검 방법
감사 방식: SQL 쿼리
sql_query
sqlcmd -b -h -1 -W -Q "SET NOCOUNT ON; DECLARE @n int = 0, @k int, @db sysname, @s nvarchar(max); DECLARE c CURSOR LOCAL FAST_FORWARD FOR SELECT name FROM sys.databases WHERE state = 0 AND HAS_DBACCESS(name) = 1 AND database_id > 4; OPEN c; FETCH NEXT FROM c INTO @db; WHILE @@FETCH_STATUS = 0 BEGIN SET @s = N'USE ' + QUOTENAME(@db) + N'; SELECT @k = COUNT(*) FROM (SELECT name FROM sys.asymmetric_keys WHERE key_length < 2048) AS x;'; EXEC sp_executesql @s, N'@k int OUTPUT', @k = @k OUTPUT; SET @n = @n + @k; FETCH NEXT FROM c INTO @db; END; CLOSE c; DEALLOCATE c; SELECT @n;"- 예상 출력
0
조치 방법
조치 방식: 가이드 또는 인프라 패치
Refer to Microsoft SQL Server Books Online ALTER ASYMMETRIC KEY entry: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-asymmetric-key-transact-sql
속성
- 운영 체제
- 모두
- 태그
- cryptomssqlsqlserver-2022
- 참고 자료
- CIS Microsoft SQL Server 2022 Benchmark v1.3.0 - 7.2 Ensure Asymmetric Key Size is set to 'greater than or equal to 2048' in non-system databases
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
shell
tmaegis scan --target mssql