SQL Server security
The SQL Server security module checks the security posture of every SQL Server instance against the CIS Benchmark and Microsoft guidance: risky logins and settings, privileged role changes, failed logins, auditing, encryption and leftover users. It only detects. What it finds is a finding with its evidence and a suggested action for a database administrator to follow in a change window; Excubius never changes the instance.
What it monitors
| Area | Checks | Why it matters |
|---|---|---|
| Logins | The sa login enabled, found even when renamed; failed logins per minute from the error log | sa is the first target of brute force; a burst of failed logins is an attack or a broken service credential |
| Configuration | xp_cmdshell or OLE Automation enabled; CLR, remote access, ad hoc distributed queries, Database Mail XPs, startup procedures and cross-database ownership chaining | Each one widens what an attacker can do from inside the engine, up to running operating system commands |
| Privileges | Any change in sysadmin, securityadmin or serveradmin; linked servers that connect as sa, a sysadmin login or a catch-all self credential | Unreviewed privilege grants, and linked servers that hand those rights to anyone who can query them |
| Audit and encryption | A server audit defined and running; full backups not encrypted, with the TDE state as evidence | Without an audit, login and role changes leave no trace; a stolen backup file is a stolen database |
| Hygiene | Database users without a login | Leftovers of restores that may be remapped to the wrong login |
Findings feed the database area of the security score. A change in role membership is an event: it is reviewed and resolved by hand, not fixed. How findings, accepted risks and the score work: Security posture.
Every check, with its rule, cause and action, is in the reference for SQL Server security checks.
Before you begin
-
The SQL Server monitoring login. The module uses the same read-only login as the SQL Server module, created with the script in Prerequisites for availability groups. Nothing more is granted for security checks.
Permission Used for VIEW SERVER STATEServer state, the error log ( sp_readerrorlog), audit status, database encryption keysVIEW ANY DEFINITIONLogins, server roles, linked server login mappings, audits CONNECT ANY DATABASEOrphaned users in every database. Without it, the check covers only the databases where the login has a user SELECTonmsdb.dbo.backupsetBackup encryption -
The security modules are on. A super administrator switches on the feature
securityin Settings › Instance. It covers this module, identity security and cloud security, the Security posture page and the score.
Add a resource
There is no separate resource. With the feature on, the security checks are added to every SQL Server instance you add, next to the checks of the SQL Server module. See SQL Server.
Instances added before the feature was switched on get the missing default checks when an editor calls POST /api/v1/resources/{id}/checks with an empty check_ids list. A check you do not want on an instance is switched off on that instance's Checks tab.