Title: The DBMS must notify appropriate individuals when accounts are created.
Vulnerability ID: V-32596
IA Controls: None
Description: Once an attacker establishes initial access to a system, they often attempt to create a persistent method of re-establishing access. One way to accomplish this is for the attacker to simply create a new account.
Notification of account creation is one method and best practice for mitigating this risk. A comprehensive account management process will ensure an audit trail which documents the creation of application user accounts and notifies administrators and/or application owners exist. Such a process greatly reduces the risk that accounts will be surreptitiously created and provides logging that can be used for forensic purposes.
To address the multitude of policy based access requirements, many application developers choose to integrate their applications with enterprise level authentication/access mechanisms that meet or exceed access control policy requirements. This type of integration allows the application developer to off-load those access control functions and focus on core application features and functionality.
Examples of enterprise level authentication/access mechanisms include, but are not limited to, Active Directory and LDAP.
The DBMS must support the requirement to notify appropriate individuals upon account creation.
Check Text: Check DBMS settings to determine whether it will notify appropriate individuals when accounts are created. If the DBMS does not notify appropriate individuals when accounts are created, this is a finding.
Fix Text: Configure the DBMS settings to notify appropriate individuals when accounts are created.[divider]
SQl server does not automatically inform if an account is created. SQL Audit, and Policy Manager can be used to alert if an account is created.
It is also possible to use a server level trigger to send an alert when the create_user event is triggered.
Using this code you can setup a server level trigger to send an email when a user is created.
alter TRIGGER tr_DDL_CreateUserAlert
ON ALL SERVER
declare @results varchar(max), @whodunnit varchar(255)
SET @results =
SET @whodunnit = 'USER created on '+@@SERVERNAME+' in database '+(SELECT EVENTDATA().value('(/EVENT_INSTANCE/DatabaseName)','varchar(255)')) +' by '+SUSER_NAME()
/* use sp_sendmail on a configured system to send the alert of a new user*/
EXEC msdb.dbo.sp_send_dbmail @profile_name = ',put your SQL email profile name here>',
@recipients = '<put your email here>',
@subject = @whodunnit,
@body = @results,
@exclude_query_output = 1 -- Hides the mail queued message