STIGQter STIGQter: STIG Summary: Microsoft SQL Server 2022 Instance Security Technical Implementation Guide Version: 1 Release: 4 Benchmark Date: 01 Apr 2026:

SQL Server must generate audit records when successful and unsuccessful logons or connection attempts occur.

DISA Rule

SV-271375r1111093_rule

Vulnerability Number

V-271375

Group Title

SRG-APP-000503-DB-000350

Rule Version

SQLI-22-014800

Severity

CAT II

CCI(s)

Weight

10

Fix Recommendation

Add the required events to the server audit specification to audit denied actions.

Refer to the supplemental file "SQL2022Audit.sql" script.

Reference: https://learn.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-database-engine?

Alternatively, enable "Both failed and successful logins".

1. In SQL Management Studio, right-click on the instance.
2. Select "Properties".
3. Select "Security" on the left side.
4. Select "Both failed and successful logins".
5. Click "OK".

Check Contents

Review the SQL configuration to verify that audit records are produced when denied actions occur.

To determine if an audit is configured, execute the following script:
SELECT name AS 'Audit Name',
status_desc AS 'Audit Status',
audit_file_path AS 'Current Audit File'
FROM sys.dm_server_audit_status

If no records are returned, this is a finding.

Execute the following to verify the events below are included in the server audit specification:
SUCCESSFUL_LOGIN_GROUP
FAILED_LOGIN_GROUP

SELECT a.name AS 'AuditName',
s.name AS 'SpecName',
d.audit_action_name AS 'ActionName',
d.audited_result AS 'Result'
FROM sys.server_audit_specifications s
JOIN sys.server_audits a ON s.audit_guid = a.audit_guid
JOIN sys.server_audit_specification_details d ON s.server_specification_id = d.server_specification_id
WHERE a.is_state_enabled = 1
AND d.audit_action_name IN (
'SUCCESSFUL_LOGIN_GROUP',
'FAILED_LOGIN_GROUP'
)
Order by d.audit_action_name

If the identified groups are not returned, this is a finding.

Alternatively:

1. In SQL Management Studio, right-click on the instance.
2. Select "Properties".
3. Select "Security" on the left side.
4. Check the setting for "Login auditing".

If "Both failed and successful logins" is not selected, this is a finding.

Vulnerability Number

V-271375

Documentable

False

Rule Version

SQLI-22-014800

Severity Override Guidance

Review the SQL configuration to verify that audit records are produced when denied actions occur.

To determine if an audit is configured, execute the following script:
SELECT name AS 'Audit Name',
status_desc AS 'Audit Status',
audit_file_path AS 'Current Audit File'
FROM sys.dm_server_audit_status

If no records are returned, this is a finding.

Execute the following to verify the events below are included in the server audit specification:
SUCCESSFUL_LOGIN_GROUP
FAILED_LOGIN_GROUP

SELECT a.name AS 'AuditName',
s.name AS 'SpecName',
d.audit_action_name AS 'ActionName',
d.audited_result AS 'Result'
FROM sys.server_audit_specifications s
JOIN sys.server_audits a ON s.audit_guid = a.audit_guid
JOIN sys.server_audit_specification_details d ON s.server_specification_id = d.server_specification_id
WHERE a.is_state_enabled = 1
AND d.audit_action_name IN (
'SUCCESSFUL_LOGIN_GROUP',
'FAILED_LOGIN_GROUP'
)
Order by d.audit_action_name

If the identified groups are not returned, this is a finding.

Alternatively:

1. In SQL Management Studio, right-click on the instance.
2. Select "Properties".
3. Select "Security" on the left side.
4. Check the setting for "Login auditing".

If "Both failed and successful logins" is not selected, this is a finding.

Check Content Reference

M

Target Key

5677