Windows BUILTIN groups


Job details

Name: Windows BUILTIN groups
Platform: Sqlserver
Category: Security
Premium package: Security and compliance package
Description: Checks that Windows BUILTIN groups are not SQL Logins.
Long description: Checks that Windows BUILTIN groups are not SQL Logins. These groups should not be used for any level of access into a SQL Server Database Engine instance.
Version: 1.2
Default schedule: 32 1 1 *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & eng_inst_priv = 0 & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
return status 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when Windows BUILTIN groups is a SQL Login.
disable login NO If set to “YES“ the alert will disable the login by running “ALTER LOGIN [login_name] DISABLE“.
history threshold 365 The maximum number of days to keep statistics for in the historic tables.

Job Summary

SELECT pr.[name], pe.[permission_name], pe.[state_desc]
FROM sys.server_principals pr
JOIN sys.server_permissions pe
ON pr.principal_id = pe.grantee_principal_id
WHERE pr.name like 'BUILTIN%'

Job Implementation Details

Job Dependencies

The job includes dependencies on certain database objects that are crucial for the execution of the job:

Scheduled and Triggers

The job operates on a default schedule which is set to execute once per day, ensuring daily checks on the Windows BUILTIN groups configurations for any unauthorized changes or configurations.

Security and Compliance

Presentation and Reporting

By maintaining these monitoring and constraint checks, the job plays an integral role in safeguarding against possible security risks associated with improper privilege grants to critical system-level groups.