Check: ASQL-00-013400
Microsoft Azure SQL Database STIG:
ASQL-00-013400
(in versions v1 r2 through v1 r1)
Title
Azure SQL DB must generate audit records when unsuccessful attempts to add privileges/permissions occur. (Cat II impact)
Discussion
Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected. In an Azure SQL Database environment, adding permissions is typically done via the GRANT command, or, in the negative, the DENY command. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Check Content
Review Azure SQL Database configuration to verify that audit records are produced when unsuccessful attempts to add privileges/permissions occur. To determine if an audit is configured, execute the following script. Run this TSQL command to determine if SQL Auditing AuditActionGroups are configured: SELECT DISTINCT sd.audit_action_name FROM sys.database_audit_specification_details sd JOIN sys.database_audit_specifications s ON s.database_specification_id = sd.database_specification_id WHERE (name = 'SqlDbAuditing_ServerAuditSpec' /*Server Audit*/ OR name = 'SqlDbAuditing_AuditSpec') /*Database Audit*/ AND s.is_state_enabled = 1 ORDER BY sd.audit_action_name If no values exist for AuditActionGroup, this is a finding. Verify the following AuditActionGroup(s) are configured: DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP If any listed AuditActionGroups do not exist in the configuration, this is a finding.
Fix Text
Deploy an Azure SQL Database audit. Refer to the supplemental file "AzureSQLDatabaseAudit.txt" PowerShell script. Reference: https://docs.microsoft.com/en-us/powershell/module/az.sql/set-azsqlserveraudit">https://docs.microsoft.com/en-us/powershell/module/az.sql/set-azsqlserveraudit
Additional Identifiers
Rule ID: SV-255355r879866_rule
Vulnerability ID: V-255355
Group Title: SRG-APP-000495-DB-000327
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-000172 |
The information system generates audit records for the events defined in AU-2 d. with the content defined in AU-3. |
Controls
Number | Title |
---|---|
AU-12 |
Audit Generation |