Microsoft SQL Server
TMA-MSSQL2022-3.8
Ensure only the default permissions specified by Microsoft are granted to the public server role
설명
public is a special fixed server role containing all logins. Unlike other fixed server roles, permissions can be changed for the public role. In keeping with the principle of least privileges, the public server role should not be used to grant permissions at the server scope as these would be inherited by all users. Every SQL Server login belongs to the public role and cannot be removed from this role. Therefore, any permissions granted to this role will be available to all logins unless they have been explicitly denied to specific logins or user-defined server roles.
점검 방법
감사 방식: SQL 쿼리
sqlcmd -b -h -1 -W -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM master.sys.server_permissions WHERE (grantee_principal_id = SUSER_SID(N'public') AND state_desc LIKE 'GRANT%') AND NOT (state_desc = 'GRANT' AND permission_name = 'VIEW ANY DATABASE' AND class_desc = 'SERVER') AND NOT (state_desc = 'GRANT' AND permission_name = 'CONNECT' AND class_desc = 'ENDPOINT' AND major_id IN (2,3,4,5));"- 예상 출력
0
조치 방법
조치 방식: 가이드 또는 인프라 패치
1. Add the extraneous permissions found in the Audit query results to the specific logins to user-defined server roles which require the access. 2. Revoke the <permission_name> from the public role as shown below USE [master] GO REVOKE <permission_name> FROM public; GO
속성
- 운영 체제
- 모두
- 태그
- access-controliammssqlsqlserver-2022
- 참고 자료
- CIS Microsoft SQL Server 2022 Benchmark v1.3.0 - 3.8 Ensure only the default permissions specified by Microsoft are granted to the public server role
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
tmaegis scan --target mssql