MS SQL Server 2014 Instance Security Technical Implementation Guide
Pick two releases to diff their requirements.
Open a previous version of this STIG.
- RMF Control
- AC-10
- Severity
- M
- CCI
- CCI-000054
- Version
- SQL4-00-000100
- Vuln IDs
-
- V-67757
- Rule IDs
-
- SV-82247r1_rule
Checks: C-68323r1_chk
Review the system documentation to determine whether any limits have been defined. If not, this is a finding. If one limit has been defined but is not applied to all users, including privileged administrative accounts, this is a finding. If multiple limits have been defined, to accommodate different types of user, verify that together they cover all users. If not, this is a finding. If a mechanism other than a logon trigger is used, verify its correct operation by the appropriate means. If it does not work correctly, this is a finding. Otherwise, determine if a logon trigger exists: EITHER, in SQL Server Management Studio's Object Explorer tree: Expand [SQL Server Instance] >> Security >> Server Objects >> Triggers OR run the query: SELECT * FROM master.sys.server_triggers; If no triggers are listed, this is a finding. If triggers are listed, identify the one(s) limiting the number of concurrent sessions per user. If none are found, this is a finding. If they are present but disabled, this is a finding. Examine the trigger source code for logical correctness and for compliance with the documented limit(s). If errors or variances exist, this is a finding. Verify that the system does execute the trigger(s) each time a user session is established. If it does not operate correctly for all types of user, this is a finding.
Fix: F-73871r1_fix
Establish the limit(s) appropriate to the type(s) of user account accessing the SQL Server instance, and record them in the system documentation. Implement one or more logon triggers to enforce the limit(s), without exposing the dynamic management views to general users.
- RMF Control
- AC-2
- Severity
- M
- CCI
- CCI-000015
- Version
- SQL4-00-030300
- Vuln IDs
-
- V-67759
- Rule IDs
-
- SV-82249r1_rule
Checks: C-68325r1_chk
Determine whether SQL Server is configured to use only Windows authentication. In the Object Explorer in SQL Server Management Studio (SSMS), right-click on the server instance; select Properties. Select the Security page. If Windows Authentication Mode is selected, this is not a finding. Alternatively, in a query interface such as the SSMS Transact-SQL editor, run the statement: EXECUTE xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode'; If the returned value in the "Data" column is 1, this is not a finding. Mixed mode (both SQL Server authentication and Windows authentication) is in use. If the need for mixed mode has not been documented and approved, this is a finding. From the documentation, obtain the list of accounts authorized to be managed by SQL Server. Determine the accounts (SQL Logins) actually managed by SQL Server. Run the statement: SELECT name FROM sys.sql_logins WHERE type_desc = 'SQL_LOGIN' AND is_disabled = 0; If any accounts listed by the query are not listed in the documentation, this is a finding.
Fix: F-73873r1_fix
If mixed mode is required, document the need and justification; describe the measures taken to ensure the use of SQL Server authentication is kept to a minimum; describe the measures taken to safeguard passwords; list or describe the SQL Logins used; obtain official approval. If mixed mode is not required, disable it as follows: In the SSMS Object Explorer, right-click on the server instance; select Properties. Select the Security page. Click on the radio button for Windows Authentication Mode. Click on "OK." Restart the SQL Server instance. Alternatively, run the statement: EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 1; Restart the SQL Server instance. For each account being managed by SQL Server but not requiring it, drop or disable the SQL Login. Replace it with an appropriately configured account, as needed. To drop or disable a Login in the SSMS Object Explorer: Navigate to <server name> >> Security >> Logins. Right-click on the Login name; click on Delete or Disable. To drop or disable a Login by using a query: USE master; DROP LOGIN <login name>; ALTER LOGIN <login name> DISABLE; Dropping a Login does not delete the equivalent database User(s). There may be more than one database containing a User mapped to the Login. Drop the User(s) unless still needed.. To drop a User in the SSMS Object Explorer: Navigate to <server name> >> Databases >> <database name> >> Security >> Users. Right-click on the User name; click on Delete. To drop a User via a query: USE <database name>; DROP USER <user name>;
- RMF Control
- AC-3
- Severity
- M
- CCI
- CCI-000213
- Version
- SQL4-00-002010
- Vuln IDs
-
- V-67761
- Rule IDs
-
- SV-82251r1_rule
Checks: C-68327r1_chk
Review the system documentation to determine the required levels of protection for DBMS server securables, by type of login. Review the permissions actually in place on the server. The server permission functions and views provided in the supplemental file Permissions.sql can help with this. If the actual permissions do not match the documented requirements, this is a finding.
Fix: F-73875r1_fix
Use GRANT, REVOKE, DENY, ALTER SERVER ROLE … ADD MEMBER … and/or ALTER SERVER ROLE …. DROP MEMBER statements to add and remove permissions on server-level securables, bringing them into line with the documented requirements.
- RMF Control
- AU-10
- Severity
- M
- CCI
- CCI-000166
- Version
- SQL4-00-023700
- Vuln IDs
-
- V-67763
- Rule IDs
-
- SV-82253r1_rule
Checks: C-68329r1_chk
Obtain the list of authorized SQL Server accounts in the system documentation. If accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding. The key is individual accountability. If this can be traced, this is not a finding. If accounts are determined to be shared, determine if they are directly accessible to end users. If so, this is a finding. Review contents of audit logs, traces and data tables to confirm that the identity of the individual user performing the action is captured. If shared identifiers are found, and not accompanied by individual identifiers, this is a finding. Note: Privileged installation accounts may be required to be accessed by the DBA or other administrators for system maintenance. In these cases, each use of the account must be logged in some manner to assign accountability for any actions taken during the use of the account.
Fix: F-73877r1_fix
Remove user-accessible shared accounts and use individual userids. Build/configure applications to ensure successful individual authentication prior to shared account access. Ensure each user's identity is received and used in audit data in all relevant circumstances. Design, develop, and implement a method to log use of any account to which more than one person has access. Restrict interactive access to shared accounts to the fewest persons possible.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- SQL4-00-011300
- Vuln IDs
-
- V-67765
- Rule IDs
-
- SV-82255r1_rule
Checks: C-68331r1_chk
If SQL Server Trace is not in use for audit purposes, this is not a finding. Obtain the list of approved audit maintainers from the system documentation. Review the server roles and individual logins that have the following permissions, all of which enable the ability to create and maintain audit definitions (the views and functions provided in the supplemental fine Permissions.sql can assist in this): ALTER TRACE CREATE TRACE EVENT NOTIFICATION The functions and views provided in the supplemental file Permissions.sql can assist in this review. In the following, "STIG" stands for the schema where you have deployed these views and functions. To see which logins and server roles have been granted these permissions: SELECT * FROM STIG.server_permissions P WHERE P.[Permission] IN ( 'ALTER TRACE', 'CREATE TRACE EVENT NOTIFICATION' ); To see what logins and server roles inherit these permissions from the server roles reported by the previous query, repeat the following for each one: SELECT * FROM STIG.members_of_server_role(<server role name>); To see all the permissions in effect for a server principal (server role or login): SELECT * FROM STIG.server_effective_permissions(<principal name>); If designated personnel are not able to configure auditable events, this is a finding. If unapproved personnel are able to configure auditable events, this is a finding.
Fix: F-73879r1_fix
Create a server role specifically for audit maintainers, and give it permission to maintain traces, without granting it unnecessary permissions: USE master; GO CREATE SERVER ROLE SERVER_AUDIT_MAINTAINERS; GO GRANT ALTER TRACE TO SERVER_AUDIT_MAINTAINERS; -- Next line only if required: GRANT CREATE TRACE EVENT NOTIFICATION TO SERVER_AUDIT_MAINTAINERS; GO (The role name used here is an example; other names may be used.) Use REVOKE and/or DENY and/or ALTER SERVER ROLE ... DROP MEMBER ... statements to remove the ALTER TRACE and CREATE TRACE EVENT NOTIFICATION permissions from all logins. Then, for each authorized login, run the statement: ALTER SERVER ROLE SERVER_AUDIT_MAINTAINERS ADD MEMBER <login name>; GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- SQL4-00-011310
- Vuln IDs
-
- V-67767
- Rule IDs
-
- SV-82257r1_rule
Checks: C-68333r1_chk
If SQL Server Audit is not in use, this is not a finding. Obtain the list of approved audit maintainers from the system documentation. Review the server roles and individual logins that have the following permissions, all of which enable the ability to create and maintain audit definitions (the views and functions provided in the supplemental fine Permissions.sql can assist in this): ALTER ANY SERVER AUDIT CONTROL SERVER ALTER ANY DATABASE CREATE ANY DATABASE The functions and views provided in the supplemental file Permissions.sql can assist in this review. In the following, "STIG" stands for the schema where you have deployed these views and functions. To see which logins and server roles have been granted these permissions: SELECT * FROM STIG.server_permissions P WHERE P.[Permission] IN ( 'ALTER ANY SERVER AUDIT', 'CONTROL SERVER', 'ALTER ANY DATABASE', 'CREATE ANY DATABASE' ); To see what logins and server roles inherit these permissions from the server roles reported by the previous query, repeat the following for each one: SELECT * FROM STIG.members_of_server_role(<server role name>); To see all the permissions in effect for a server principal (server role or login): SELECT * FROM STIG.server_effective_permissions(<principal name>); If designated personnel are not able to configure auditable events, this is a finding. If unapproved personnel are able to configure auditable events, this is a finding.
Fix: F-73881r1_fix
Create a server role specifically for audit maintainers, and give it permission to maintain audits, without granting it unnecessary permissions: USE master; GO CREATE SERVER ROLE SERVER_AUDIT_MAINTAINERS; GO GRANT ALTER ANY SERVER AUDIT TO SERVER_AUDIT_MAINTAINERS; GO (The role name used here is an example; other names may be used.) Use REVOKE and/or DENY and/or ALTER SERVER ROLE ... DROP MEMBER ... statements to remove the ALTER ANY SERVER AUDIT permission from all logins. Then, for each authorized login, run the statement: ALTER SERVER ROLE SERVER_AUDIT_MAINTAINERS ADD MEMBER <login name>; GO Use REVOKE and/or DENY and/or ALTER SERVER ROLE ... DROP MEMBER ... statements to remove CONTROL SERVER, ALTER ANY DATABASE and CREATE ANY DATABASE permissions from logins that do not need them.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-011410
- Vuln IDs
-
- V-67769
- Rule IDs
-
- SV-82259r1_rule
Checks: C-68335r1_chk
If SQL Server Trace is in use for audit purposes, and SQL Server Audit is not in use, this is not a finding. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses the broad, server-level audit action group SCHEMA_OBJECT_ACCESS_GROUP for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following to verify that all SELECT actions on the permissions-related system views, and any locally-defined permissions tables, are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name = 'SCHEMA_OBJECT_ACCESS_GROUP'; If no row is returned, this is a finding. If the audited_result column is not "SUCCESS" or "SUCCESS AND FAILURE", this is a finding.
Fix: F-73883r1_fix
Design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (SCHEMA_OBJECT_ACCESS_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-030410
- Vuln IDs
-
- V-67771
- Rule IDs
-
- SV-82261r1_rule
Checks: C-68337r1_chk
If SQL Server Trace is in use for audit purposes, and SQL Server Audit is not in use, this is not a finding. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses the broad, server-level audit action group SCHEMA_OBJECT_ACCESS_GROUP for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following to verify that all SELECT actions on the permissions-related system views, and any locally-defined permissions tables, are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name = 'SCHEMA_OBJECT_ACCESS_GROUP'; GO If no row is returned, this is a finding. If the audited_result column is not "FAILURE" or "SUCCESS AND FAILURE", this is a finding.
Fix: F-73885r1_fix
Design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (SCHEMA_OBJECT_ACCESS_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000131
- Version
- SQL4-00-011900
- Vuln IDs
-
- V-67773
- Rule IDs
-
- SV-82263r1_rule
Checks: C-68339r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Audit is in use, the event time and date are always captured: this is not a finding. If SQL Server Trace is in use for audit purposes, verify that for all events it captures the start and (where relevant) end time. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: WITH EC AS (SELECT eventid, columnid FROM sys.fn_trace_geteventinfo(2)), E AS (SELECT DISTINCT eventid FROM EC) SELECT E.eventid, CASE WHEN EC14.columnid IS NULL THEN 'Start Time (14) missing' ELSE '14 OK' END AS field14, CASE WHEN EC15.columnid IS NULL THEN 'End Time (15) missing' ELSE '15 OK' END AS field15 FROM E E LEFT OUTER JOIN EC EC14 ON EC14.eventid = E.eventid AND EC14.columnid = 14 LEFT OUTER JOIN EC EC15 ON EC15.eventid = E.eventid AND EC15.columnid = 15 WHERE EC14.columnid IS NULL OR EC15.columnid IS NULL; If the resulting list indicates any field specifications are missing, this is a finding.
Fix: F-73887r1_fix
Design and deploy a SQL Server Audit or a Trace that captures Start Time and (where relevant) End Time for all auditable events. The script provided in the supplemental file Trace.sql can be used to create a trace. The script provided in the supplemental file Audit.sql can be used to create an audit..
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000132
- Version
- SQL4-00-012000
- Vuln IDs
-
- V-67775
- Rule IDs
-
- SV-82265r1_rule
Checks: C-68341r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Audit is in use, the server instance, database, schema, and object names are each automatically captured when applicable; this is not a finding. If SQL Server Trace is in use for audit purposes, verify that for all events it captures the server name, database name, object type, object name and object owner (each where relevant). From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: WITH EC AS (SELECT eventid, columnid FROM sys.fn_trace_geteventinfo(2)), E AS (SELECT DISTINCT eventid FROM EC) SELECT E.eventid, CASE WHEN EC26.columnid IS NULL THEN 'Server Name (26) missing' ELSE '26 OK' END AS field26, CASE WHEN EC35.columnid IS NULL THEN 'Database Name (35) missing' ELSE '35 OK' END AS field35, CASE WHEN EC28.columnid IS NULL THEN 'Object Type (28) missing' ELSE '28 OK' END AS field28, CASE WHEN EC34.columnid IS NULL THEN 'Object Name (34) missing' ELSE '34 OK' END AS field34, CASE WHEN EC37.columnid IS NULL THEN 'Object Owner (37) missing' ELSE '34 OK' END AS field37 FROM E E LEFT OUTER JOIN EC EC26 ON EC26.eventid = E.eventid AND EC26.columnid = 26 LEFT OUTER JOIN EC EC35 ON EC35.eventid = E.eventid AND EC35.columnid = 35 LEFT OUTER JOIN EC EC28 ON EC28.eventid = E.eventid AND EC28.columnid = 28 LEFT OUTER JOIN EC EC34 ON EC34.eventid = E.eventid AND EC34.columnid = 34 LEFT OUTER JOIN EC EC37 ON EC37.eventid = E.eventid AND EC37.columnid = 37 WHERE EC26.columnid IS NULL OR EC35.columnid IS NULL OR EC28.columnid IS NULL OR EC34.columnid IS NULL OR EC37.columnid IS NULL; If the resulting list indicates any field specifications are missing, this is a finding.
Fix: F-73889r1_fix
Design and deploy a SQL Server Audit or Trace that captures the server name, database name, object type, object name and object owner (each where relevant) for all auditable events. The script provided in the supplemental file Trace.sql can be used to create a trace. The script provided in the supplemental file Audit.sql can be used to create an audit..
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000133
- Version
- SQL4-00-012100
- Vuln IDs
-
- V-67777
- Rule IDs
-
- SV-82267r1_rule
Checks: C-68343r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Audit is in use, this is not a finding. If SQL Server Trace is in use for audit purposes, verify that for all events it captures the NT User Name, NT Domain Name, Host Name, Client Process ID, Application Name, Login Name, SPID, DB User Name, and Login SID (each where relevant). From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: WITH EC AS (SELECT eventid, columnid FROM sys.fn_trace_geteventinfo(2)), E AS (SELECT DISTINCT eventid FROM EC) SELECT E.eventid, CASE WHEN EC6.columnid IS NULL THEN 'NT User Name (6) missing' ELSE '6 OK' END AS field26, CASE WHEN EC7.columnid IS NULL THEN 'NT Domain Name (7) missing' ELSE '7 OK' END AS field7, CASE WHEN EC8.columnid IS NULL THEN 'Host Name (8) missing' ELSE '8 OK' END AS field8, CASE WHEN EC9.columnid IS NULL THEN 'Client Process ID (9) missing' ELSE '9 OK' END AS field9, CASE WHEN EC10.columnid IS NULL THEN 'Application Name (10) missing' ELSE '10 OK' END AS field10, CASE WHEN EC11.columnid IS NULL THEN 'Login Name (11) missing' ELSE '11 OK' END AS field11, CASE WHEN EC12.columnid IS NULL THEN 'SPID (12) missing' ELSE '12 OK' END AS field12, CASE WHEN EC40.columnid IS NULL THEN 'DB User Name (40) missing' ELSE '40 OK' END AS field40, CASE WHEN EC41.columnid IS NULL THEN 'Login SID (41) missing' ELSE '41 OK' END AS field41 FROM E E LEFT OUTER JOIN EC EC6 ON EC6.eventid = E.eventid AND EC6.columnid = 6 LEFT OUTER JOIN EC EC7 ON EC7.eventid = E.eventid AND EC7.columnid = 7 LEFT OUTER JOIN EC EC8 ON EC8.eventid = E.eventid AND EC8.columnid = 8 LEFT OUTER JOIN EC EC9 ON EC9.eventid = E.eventid AND EC9.columnid = 9 LEFT OUTER JOIN EC EC10 ON EC10.eventid = E.eventid AND EC10.columnid = 10 LEFT OUTER JOIN EC EC11 ON EC11.eventid = E.eventid AND EC11.columnid = 11 LEFT OUTER JOIN EC EC12 ON EC12.eventid = E.eventid AND EC12.columnid = 12 LEFT OUTER JOIN EC EC40 ON EC40.eventid = E.eventid AND EC40.columnid = 40 LEFT OUTER JOIN EC EC41 ON EC41.eventid = E.eventid AND EC41.columnid = 41 WHERE EC6.columnid IS NULL OR EC7.columnid IS NULL OR EC8.columnid IS NULL OR EC9.columnid IS NULL OR EC10.columnid IS NULL OR EC11.columnid IS NULL OR EC12.columnid IS NULL OR EC40.columnid IS NULL OR EC41.columnid IS NULL; If the resulting list indicates any field specifications are missing, this is a finding. If SQL Server Audit is in use, check to see that all audit records include enough information to establish the sources of the events; if not, this is a finding.
Fix: F-73891r1_fix
Design and deploy a SQL Server Audit or Trace that captures the NT User Name, NT Domain Name, Host Name, Client Process ID, Application Name, Login Name, SPID, DB User Name, and Login SID (each where relevant) for all auditable events. The script provided in the supplemental file Trace.sql can be used to create a trace. If SQL Server Audit is intended to be in use, design and deploy an Audit that captures all auditable events. The code provided in the supplemental file Audit.sql can be used as the basis for creating an Audit.
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000134
- Version
- SQL4-00-012200
- Vuln IDs
-
- V-67779
- Rule IDs
-
- SV-82269r1_rule
Checks: C-68345r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Audit is in use, the Succeeded column is populated for all relevant events: this is not a finding. If SQL Server Trace is in use for audit purposes, verify that for all events it captures the Success flag (successful use of permissions), State and Error number (each where relevant). From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: WITH EC AS (SELECT eventid, columnid FROM sys.fn_trace_geteventinfo(2)), E AS (SELECT DISTINCT eventid FROM EC) SELECT E.eventid, CASE WHEN EC23.columnid IS NULL THEN 'Success (successful use of permissions) (23) missing' ELSE '23 OK' END AS field23, CASE WHEN EC30.columnid IS NULL THEN 'State (30) missing' ELSE '30 OK' END AS field30, CASE WHEN EC31.columnid IS NULL THEN 'Error (31) missing' ELSE '31 OK' END AS field31 FROM E E LEFT OUTER JOIN EC EC23 ON EC23.eventid = E.eventid AND EC23.columnid = 23 LEFT OUTER JOIN EC EC30 ON EC30.eventid = E.eventid AND EC30.columnid = 30 LEFT OUTER JOIN EC EC31 ON EC31.eventid = E.eventid AND EC31.columnid = 31 WHERE EC23.columnid IS NULL OR EC30.columnid IS NULL OR EC31.columnid IS NULL; If the resulting list indicates any field specifications are missing, this is a finding.
Fix: F-73893r1_fix
If Trace is in use for audit purposes, design and deploy a Trace that captures the NT User Name, NT Domain Name, Host Name, Login Name, DB User Name and Login SID (each where relevant) for all auditable events. The script provided in the supplemental file Trace.sql can be used to create a trace. If SQL Server Audit is intended to be in use, design and deploy an Audit that captures all auditable events. The code provided in the supplemental file Audit.sql can be used as the basis for creating an Audit.
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-001487
- Version
- SQL4-00-012300
- Vuln IDs
-
- V-67781
- Rule IDs
-
- SV-82271r1_rule
Checks: C-68349r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Audit is in use, the Principal Name columns are populated for all relevant events: this is not a finding. If SQL Server Trace is in use for audit purposes, verify that for all events it captures the NT User Name, NT Domain Name, Host Name, Login Name, DB User Name and Login SID (each where relevant). From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: WITH EC AS (SELECT eventid, columnid FROM sys.fn_trace_geteventinfo(2)), E AS (SELECT DISTINCT eventid FROM EC) SELECT E.eventid, CASE WHEN EC6.columnid IS NULL THEN 'NT User Name (6) missing' ELSE '6 OK' END AS field26, CASE WHEN EC7.columnid IS NULL THEN 'NT Domain Name (7) missing' ELSE '7 OK' END AS field7, CASE WHEN EC8.columnid IS NULL THEN 'Host Name (8) missing' ELSE '8 OK' END AS field8, CASE WHEN EC11.columnid IS NULL THEN 'Login Name (11) missing' ELSE '11 OK' END AS field11, CASE WHEN EC40.columnid IS NULL THEN 'DB User Name (40) missing' ELSE '40 OK' END AS field40, CASE WHEN EC41.columnid IS NULL THEN 'Login SID (41) missing' ELSE '41 OK' END AS field41 FROM E E LEFT OUTER JOIN EC EC6 ON EC6.eventid = E.eventid AND EC6.columnid = 6 LEFT OUTER JOIN EC EC7 ON EC7.eventid = E.eventid AND EC7.columnid = 7 LEFT OUTER JOIN EC EC8 ON EC8.eventid = E.eventid AND EC8.columnid = 8 LEFT OUTER JOIN EC EC11 ON EC11.eventid = E.eventid AND EC11.columnid = 11 LEFT OUTER JOIN EC EC40 ON EC40.eventid = E.eventid AND EC40.columnid = 40 LEFT OUTER JOIN EC EC41 ON EC41.eventid = E.eventid AND EC41.columnid = 41 WHERE EC6.columnid IS NULL OR EC7.columnid IS NULL OR EC8.columnid IS NULL OR EC11.columnid IS NULL OR EC40.columnid IS NULL OR EC41.columnid IS NULL; If the resulting list indicates any field specifications are missing, this is a finding.
Fix: F-73897r1_fix
If Trace is in use for audit purposes, design and deploy a Trace that captures the NT User Name, NT Domain Name, Host Name, Login Name, DB User Name and Login SID (each where relevant) for all auditable events. The script provided in the supplemental file Trace.sql can be used to create a trace. If SQL Server Audit is intended to be in use, design and deploy an Audit that captures all auditable events. The code provided in the supplemental file Audit.sql can be used as the basis for creating an Audit.
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- SQL4-00-012400
- Vuln IDs
-
- V-67783
- Rule IDs
-
- SV-82273r1_rule
Checks: C-68351r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. Review system documentation to determine whether SQL Server is required to audit any events, and any fields, in addition to those in the standard audit or audit-oriented trace. If there are none specified, this is not a finding. If SQL Server Trace is in use for audit purposes, review the audit-oriented trace definition script(s) to identify any events and/or fields that are required but not in the script. If any such are identified, this is a finding. If SQL Server Audit is in use, compare the audit specification(s) with the documented requirements. If any such requirement is not satisfied by the audit specification(s) (or by supplemental, locally-deployed mechanisms), this is a finding.
Fix: F-73899r1_fix
If Trace is in use for audit purposes, where SQL Server's trace facilities can provide the necessary data, define and enable a trace that captures all organization-defined auditable events and fields. The script provided in the supplemental file Trace.sql can be used for this, after appropriate editing. Where SQL Server's trace facilities cannot provide the necessary data, designate the event code(s) that will be used (Microsoft provides codes 82 through 91 for this purpose), design and deploy triggers that will recognize the events and invoke sp_trace_generateevent to populate the trace with the necessary information. Add a block of sp_trace_setevent calls to the trace script for each event code designated for this purpose. If SQL Server Audit is in use, design and deploy an Audit that captures all auditable events and data items. The script provided in the supplemental file Audit.sql can be used as the basis for this. Supplement the standard audit data as necessary, using database audit specifications, Extended Events and/or triggers.
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000140
- Version
- SQL4-00-013000
- Vuln IDs
-
- V-67785
- Rule IDs
-
- SV-82275r1_rule
Checks: C-68353r2_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If the system documentation indicates that availability takes precedence over audit trail completeness, this is not applicable (NA). If SQL Server Trace is in use for audit purposes, run the statement: SELECT * FROM sys.traces; In the results of the SELECT, identify the row representing the trace used for audit purposes. Examine the values in that row. If is_shutdown = 0, this is a finding. If SQL Server Audit is in use, review the defined server audits by running the statement: SELECT * FROM sys.server_audits; By observing the [name] and [is_state_enabled] columns, identify the row or rows in use. If the [on_failure_desc] is "SHUTDOWN SERVER INSTANCE" on this/these row(s), this is not a finding. Otherwise, this is a finding.
Fix: F-73901r2_fix
If Trace is in use for audit purposes, redefine the trace, with @options = 6. The script provided in the supplemental file Trace.sql can be used to do this. If SQL Server Audit is in use, configure SQL Server Audit to shut SQL Server down upon audit failure, to include running out of space for audit logs. Run this T-SQL script for each identified audit: ALTER SERVER AUDIT <server_audit_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT <server_audit_name> WITH (ON_FAILURE = SHUTDOWN); GO ALTER SERVER AUDIT <server_audit_name> WITH (STATE = ON); GO The audit defined in the supplemental file Audit.sql includes this setting.
- RMF Control
- AU-5
- Severity
- H
- CCI
- CCI-000140
- Version
- SQL4-00-030600
- Vuln IDs
-
- V-67787
- Rule IDs
-
- SV-82277r1_rule
Checks: C-68355r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If the system documentation indicates that availability takes precedence over audit trail completeness, this is not applicable (NA). If SQL Server Trace is in use for audit purposes, run the statement: SELECT * FROM sys.traces; In the results of the SELECT, identify the row representing the trace used for audit purposes. Examine the values in that row. If is_rollover = 1 or is_shutdown = 0, this is a finding. If SQL Server Audit is in use, review the defined server audits by running the statement: SELECT * FROM sys.server_audits; By observing the [name] and [is_state_enabled] columns, identify the row or rows in use. If the [on_failure_desc] is "SHUTDOWN SERVER INSTANCE" on this/these row(s), this is not a finding. Otherwise, this is a finding.
Fix: F-73903r1_fix
If Trace is in use for audit purposes, redefine the trace, with @options = 2. Modify the script provided in the supplemental file Trace.sql to do this. If SQL Server Audit is in use, configure SQL Server Audit to shut SQL Server down upon audit failure, to include running out of space for audit logs. Run this T-SQL script for each identified audit: ALTER SERVER AUDIT <server_audit_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT <server_audit_name> WITH (ON_FAILURE = CONTINUE); GO ALTER SERVER AUDIT <server_audit_name> WITH (STATE = ON); GO The audit defined in the supplemental file Audit.sql does not include this setting, and will need to be modified before use.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- SQL4-00-013600
- Vuln IDs
-
- V-67789
- Rule IDs
-
- SV-82279r1_rule
Checks: C-68357r1_chk
Obtain the SQL Server audit file location(s) by running the following SQL script: SELECT DISTINCT LEFT(path, (LEN(path) - CHARINDEX('\',REVERSE(path)) + 1)) AS "Audit Path" FROM sys.traces UNION SELECT log_file_path AS "Audit Path" FROM sys.server_file_audits For each audit, the path column will give the location of the file. Verify that all audit files have the correct permissions by doing the following for each audit file: Navigate to audit folder location(s) using a command prompt or Windows Explorer. Right-click the file/folder, click Properties. On the Security tab, verify that at most the following permissions are applied: Administrator(read) Users (none) Audit Administrator (Full Control) Auditors group (Read) SQL Server Service SID OR Service Account (Full Control) [Notes 1, 2] SQL Server SQL Agent Service SID OR Service Account, if SQL Server Agent is in use. (Read, Execute, Write) [Notes 1, 2] If any less restrictive permissions are present (and not specifically justified and approved), this is a finding. ----- Note 1: It is highly advisable to use a separate account for each service. When installing SQL Server in single-server mode, you can opt to have these provisioned for you. These automatically-generated accounts are referred to as virtual accounts. Each virtual account has an equivalent Service SID, with the same name. The installer also creates an equivalent SQL Server login, also with the same name. Applying folder and file permissions to Service SIDs, rather than to domain accounts or local computer accounts, provides tighter control, because these permissions are available only to the specific service when it is running, and not in any other context. (However, when using failover clustering, a domain account must be specified at installation, rather than a virtual account.) For more on this topic, see http://msdn.microsoft.com/en-us/library/ms143504(v=sql.120).aspx. Note 2: Tips for adding a service SID/virtual account to a folder's permission list. 1) In Windows Explorer, right-click on the folder and select "Properties." 2) Select the "Security" tab 3) Click "Edit" 4) Click "Add" 5) Click "Locations" 6) Select the computer name 7) Search for the name 7.a) SQL Server Service 7.a.i) Type "NT SERVICE\MSSQL" and click "Check Names". (What you have just typed in is the first 16 characters of the name. At least one character must follow "NT SERVICE\"; you will be presented with a list of all matches. If you have typed in the full, correct name, step 7.a.ii is bypassed.) 7.a.ii) Select the "MSSQL$<instance name>" user and click OK 7.b) SQL Agent Service 7.b.i) Type "NT SERVICE\SQL" and click "Check Names" 7.b.ii) Select the "SQLAgent$<instance name>" user and click OK 8) Click OK 9) Permission like a normal user from here
Fix: F-73905r1_fix
Modify audit file permissions to meet the requirement to protect against unauthorized access. Navigate to audit folder location(s) using a command prompt or Windows Explorer. Right-click on the file, click Properties. On the Security tab, modify the security permissions to: Administrator(read) Users (none) Audit Administrator(Full Control) Auditors group (Read) SQL Server Service SID OR Service Account (Full Control) [Notes 1, 2] SQL Server SQL Agent Service SID OR Service Account, if SQL Server Agent is in use. (Read, Execute, Write) [Notes 1, 2] ----- Note 1: It is highly advisable to use a separate account for each service. When installing SQL Server in single-server mode, you can opt to have these provisioned for you. These automatically-generated accounts are referred to as virtual accounts. Each virtual account has an equivalent Service SID, with the same name. The installer also creates an equivalent SQL Server login, also with the same name. Applying folder and file permissions to Service SIDs, rather than to domain accounts or local computer accounts, provides tighter control, because these permissions are available only to the specific service when it is running, and not in any other context. (However, when using failover clustering, a domain account must be specified at installation, rather than a virtual account.) For more on this topic, see http://msdn.microsoft.com/en-us/library/ms143504(v=sql.120).aspx. Note 2: Tips for adding a service SID/virtual account to a folder's permission list. 1) In Windows Explorer, right-click on the folder and select "Properties." 2) Select the "Security" tab 3) Click "Edit" 4) Click "Add" 5) Click "Locations" 6) Select the computer name 7) Search for the name 7.a) SQL Server Service 7.a.i) Type "NT SERVICE\MSSQL" and click "Check Names". (What you have just typed in is the first 16 characters of the name. At least one character must follow "NT SERVICE\"; you will be presented with a list of all matches. If you have typed in the full, correct name, step 7.a.ii is bypassed.) 7.a.ii) Select the "MSSQL$<instance name>" user and click OK 7.b) SQL Agent Service 7.b.i) Type "NT SERVICE\SQL" and click "Check Names" 7.b.ii) Select the "SQLAgent$<instance name>" user and click OK 8) Click OK 9) Permission like a normal user from here
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000163
- Version
- SQL4-00-013700
- Vuln IDs
-
- V-67791
- Rule IDs
-
- SV-82281r1_rule
Checks: C-68359r1_chk
Obtain the SQL Server audit file location(s) by running the following SQL script: SELECT DISTINCT LEFT(path, (LEN(path) - CHARINDEX('\',REVERSE(path)) + 1)) AS "Audit Path" FROM sys.traces UNION SELECT log_file_path AS "Audit Path" FROM sys.server_file_audits For each audit, the Audit Path column will give the location of the file. Verify that all audit files have the correct permissions by doing the following for each audit file: Navigate to audit folder location(s) using a command prompt or Windows Explorer. The following instructions assume Windows Explorer is used. Right-click the file/folder, click Properties. On the Security tab, verify that at most the following permissions are applied: Administrator(read) Users (none) Audit Administrator (Full Control) Auditors group (Read) SQL Server Service SID OR Service Account (Full Control) [Notes 1, 2] SQL Server SQL Agent Service SID OR Service Account, if SQL Server Agent is in use. (Read, Execute, Write) [Notes 1, 2] If any less restrictive permissions are present (and not specifically justified and approved), this is a finding. If Trace is in use, SQL Server creates each trace file with a standard set of permissions, overriding the folder permissions. It grants full control to OWNER RIGHTS, Administrators and <SQL Server Instance name>. Since this is not configurable, this is not a finding. ----- Note 1: It is highly advisable to use a separate account for each service. When installing SQL Server in single-server mode, you can opt to have these provisioned for you. These automatically-generated accounts are referred to as virtual accounts. Each virtual account has an equivalent Service SID, with the same name. The installer also creates an equivalent SQL Server login, also with the same name. Applying folder and file permissions to Service SIDs, rather than to domain accounts or local computer accounts, provides tighter control, because these permissions are available only to the specific service when it is running, and not in any other context. (However, when using failover clustering, a domain account must be specified at installation, rather than a virtual account.) For more on this topic, see http://msdn.microsoft.com/en-us/library/ms143504(v=sql.120).aspx. Note 2: Tips for adding a service SID/virtual account to a folder's permission list. 1) In Windows Explorer, right-click on the folder and select "Properties." 2) Select the "Security" tab 3) Click "Edit" 4) Click "Add" 5) Click "Locations" 6) Select the computer name 7) Search for the name 7.a) SQL Server Service 7.a.i) Type "NT SERVICE\MSSQL" and click "Check Names". (What you have just typed in is the first 16 characters of the name. At least one character must follow "NT SERVICE\"; you will be presented with a list of all matches. If you have typed in the full, correct name, step 7.a.ii is bypassed.) 7.a.ii) Select the "MSSQL$<instance name>" user and click OK 7.b) SQL Agent Service 7.b.i) Type "NT SERVICE\SQL" and click "Check Names" 7.b.ii) Select the "SQLAgent$<instance name>" user and click OK 8) Click OK 9) Permission like a normal user from here
Fix: F-73907r1_fix
Modify audit file permissions to meet the requirement to protect against unauthorized modification. Navigate to audit folder location(s) using a command prompt or Windows Explorer. Right-click on the file, click Properties. On the Security tab, modify the security permissions to: Administrator(read) Users (none) Audit Administrator(Full Control) Auditors group (Read) SQL Server Service SID OR Service Account (Full Control) [Notes 1, 2] SQL Server SQL Agent Service SID OR Service Account, if SQL Server Agent is in use. (Read, Execute, Write) [Notes 1, 2] ----- Note 1: It is highly advisable to use a separate account for each service. When installing SQL Server in single-server mode, you can opt to have these provisioned for you. These automatically-generated accounts are referred to as virtual accounts. Each virtual account has an equivalent Service SID, with the same name. The installer also creates an equivalent SQL Server login, also with the same name. Applying folder and file permissions to Service SIDs, rather than to domain accounts or local computer accounts, provides tighter control, because these permissions are available only to the specific service when it is running, and not in any other context. (However, when using failover clustering, a domain account must be specified at installation, rather than a virtual account.) For more on this topic, see http://msdn.microsoft.com/en-us/library/ms143504(v=sql.120).aspx. Note 2: Tips for adding a service SID/virtual account to a folder's permission list. 1) In Windows Explorer, right-click on the folder and select "Properties." 2) Select the "Security" tab 3) Click "Edit" 4) Click "Add" 5) Click "Locations" 6) Select the computer name 7) Search for the name 7.a) SQL Server Service 7.a.i) Type "NT SERVICE\MSSQL" and click "Check Names". (What you have just typed in is the first 16 characters of the name. At least one character must follow "NT SERVICE\"; you will be presented with a list of all matches. If you have typed in the full, correct name, step 7.a.ii is bypassed.) 7.a.ii) Select the "MSSQL$<instance name>" user and click OK 7.b) SQL Agent Service 7.b.i) Type "NT SERVICE\SQL" and click "Check Names" 7.b.ii) Select the "SQLAgent$<instance name>" user and click OK 8) Click OK 9) Permission like a normal user from here
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000164
- Version
- SQL4-00-013800
- Vuln IDs
-
- V-67793
- Rule IDs
-
- SV-82283r1_rule
Checks: C-68361r1_chk
Obtain the SQL Server audit file location(s) by running the following SQL script: SELECT DISTINCT LEFT(path, (LEN(path) - CHARINDEX('\',REVERSE(path)) + 1)) AS "Audit Path" FROM sys.traces UNION SELECT log_file_path AS "Audit Path" FROM sys.server_file_audits For each audit, the path column will give the location of the file. Verify that all audit files have the correct permissions by doing the following for each audit file: Navigate to audit folder location(s) using a command prompt or Windows Explorer. Right-click the file/folder, click Properties. On the Security tab, verify that at most the following permissions are applied: Administrator(read) Users (none) Audit Administrator (Full Control) Auditors group (Read) SQL Server Service SID OR Service Account (Full Control) [Notes 1, 2] SQL Server SQL Agent Service SID OR Service Account, if SQL Server Agent is in use. (Read, Execute, Write) [Notes 1, 2] If any less restrictive permissions are present (and not specifically justified and approved), this is a finding. ----- Note 1: It is highly advisable to use a separate account for each service. When installing SQL Server in single-server mode, you can opt to have these provisioned for you. These automatically-generated accounts are referred to as virtual accounts. Each virtual account has an equivalent Service SID, with the same name. The installer also creates an equivalent SQL Server login, also with the same name. Applying folder and file permissions to Service SIDs, rather than to domain accounts or local computer accounts, provides tighter control, because these permissions are available only to the specific service when it is running, and not in any other context. (However, when using failover clustering, a domain account must be specified at installation, rather than a virtual account.) For more on this topic, see http://msdn.microsoft.com/en-us/library/ms143504(v=sql.120).aspx. Note 2: Tips for adding a service SID/virtual account to a folder's permission list. 1) In Windows Explorer, right-click on the folder and select "Properties." 2) Select the "Security" tab 3) Click "Edit" 4) Click "Add" 5) Click "Locations" 6) Select the computer name 7) Search for the name 7.a) SQL Server Service 7.a.i) Type "NT SERVICE\MSSQL" and click "Check Names". (What you have just typed in is the first 16 characters of the name. At least one character must follow "NT SERVICE\"; you will be presented with a list of all matches. If you have typed in the full, correct name, step 7.a.ii is bypassed.) 7.a.ii) Select the "MSSQL$<instance name>" user and click OK 7.b) SQL Agent Service 7.b.i) Type "NT SERVICE\SQL" and click "Check Names" 7.b.ii) Select the "SQLAgent$<instance name>" user and click OK 8) Click OK 9) Permission like a normal user from here
Fix: F-73909r1_fix
Modify audit file permissions to meet the requirement to protect against unauthorized deletion. Navigate to audit folder location(s) using a command prompt or Windows Explorer. Right-click on the file, click Properties. On the Security tab, modify the security permissions to: Administrator(read) Users (none) Audit Administrator(Full Control) Auditors group (Read) SQL Server Service SID OR Service Account (Full Control) [Notes 1, 2] SQL Server SQL Agent Service SID OR Service Account, if SQL Server Agent is in use. (Read, Execute, Write) [Notes 1, 2] ----- Note 1: It is highly advisable to use a separate account for each service. When installing SQL Server in single-server mode, you can opt to have these provisioned for you. These automatically-generated accounts are referred to as virtual accounts. Each virtual account has an equivalent Service SID, with the same name. The installer also creates an equivalent SQL Server login, also with the same name. Applying folder and file permissions to Service SIDs, rather than to domain accounts or local computer accounts, provides tighter control, because these permissions are available only to the specific service when it is running, and not in any other context. (However, when using failover clustering, a domain account must be specified at installation, rather than a virtual account.) For more on this topic, see http://msdn.microsoft.com/en-us/library/ms143504(v=sql.120).aspx. Note 2: Tips for adding a service SID/virtual account to a folder's permission list. 1) In Windows Explorer, right-click on the folder and select "Properties." 2) Select the "Security" tab 3) Click "Edit" 4) Click "Add" 5) Click "Locations" 6) Select the computer name 7) Search for the name 7.a) SQL Server Service 7.a.i) Type "NT SERVICE\MSSQL" and click "Check Names". (What you have just typed in is the first 16 characters of the name. At least one character must follow "NT SERVICE\"; you will be presented with a list of all matches. If you have typed in the full, correct name, step 7.a.ii is bypassed.) 7.a.ii) Select the "MSSQL$<instance name>" user and click OK 7.b) SQL Agent Service 7.b.i) Type "NT SERVICE\SQL" and click "Check Names" 7.b.ii) Select the "SQLAgent$<instance name>" user and click OK 8) Click OK 9) Permission like a normal user from here
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001493
- Version
- SQL4-00-013900
- Vuln IDs
-
- V-67795
- Rule IDs
-
- SV-82285r1_rule
Checks: C-68363r1_chk
Review the SQL Server permissions granted to principals. The views and functions provided in the supplemental file Permissions.sql can help with this. Look for permissions such as ALTER ANY SERVER AUDIT, ALTER ANY DATABASE AUDIT, ALTER TRACE; or EXECUTE on the stored procedures with names beginning "SP_TRACE", or on scopes including those procedures. If unauthorized accounts have these privileges, this is a finding.
Fix: F-73911r1_fix
Use REVOKE and/or DENY statements to remove audit-related permissions from individuals and roles not authorized to have them.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001493
- Version
- SQL4-00-013910
- Vuln IDs
-
- V-67797
- Rule IDs
-
- SV-82287r1_rule
Checks: C-68365r1_chk
In Windows Explorer, navigate to <drive>:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn. Right-click on the file PROFILER.EXE; select Properties. Click on the Security tab. Review the users and groups listed, and the permissions granted to each. If PROFILER.EXE can be executed or modified by any unauthorized users, this is a finding.
Fix: F-73913r1_fix
Apply or modify permissions on PROFILER.EXE to make it accessible by authorized personnel only.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001493
- Version
- SQL4-00-013920
- Vuln IDs
-
- V-67799
- Rule IDs
-
- SV-82289r1_rule
Checks: C-68367r1_chk
In Windows, review the access permissions to tools used to view or modify audit log data (to include traces used for audit purposes). If appropriate permissions and access controls to prevent unauthorized read actions and executions are not applied to these tools, this is a finding.
Fix: F-73915r1_fix
Apply or modify Windows permissions on tools used to view or modify audit log data (to include traces used for audit purposes), to make them accessible by authorized personnel only.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001494
- Version
- SQL4-00-014000
- Vuln IDs
-
- V-67803
- Rule IDs
-
- SV-82293r1_rule
Checks: C-68371r1_chk
In Windows, review the access permissions to tools used to view or modify audit log data (to include traces used for audit purposes). If appropriate permissions and access controls to prevent unauthorized changes are not applied to these tools, this is a finding.
Fix: F-73919r1_fix
Apply or modify Windows permissions on tools used to view or modify audit log data (to include traces used for audit purposes), to make them accessible by authorized personnel only.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001495
- Version
- SQL4-00-014100
- Vuln IDs
-
- V-67805
- Rule IDs
-
- SV-82295r1_rule
Checks: C-68373r1_chk
In Windows, review the access permissions to tools used to view or modify audit log data (to include traces used for audit purposes). If appropriate permissions and access controls to prevent unauthorized deletions are not applied to these tools, this is a finding.
Fix: F-73921r1_fix
Apply or modify Windows permissions on tools used to view or modify audit log data (to include traces used for audit purposes), to make them accessible by authorized personnel only.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- SQL4-00-015350
- Vuln IDs
-
- V-67807
- Rule IDs
-
- SV-82297r1_rule
Checks: C-68375r1_chk
Verify that files and folders that are part of, or related to, the SQL Server 2014 installation have only the appropriate privileges. In Windows Explorer, right-click the file/folder, click Properties. On the Security tab, modify the security permissions, so that at most the following permissions are present: Trusted Installer (Full Control) SYSTEM (Full Control) Administrators (Full Control) [See Note 1] Users (Read, List Folder Contents, Read & Execute) Creator Owner (Special Permissions - Full control - Subfolders and files only) All Application Packages (Read & Execute) [Only as needed - see Note 2] If any less restrictive permissions are present (and not specifically justified and approved), this is a finding. Verify that files and folders that are part of, or related to, the SQL Server 2014 installation have auditing enabled. Right-click on the file/folder, click Properties. On the Security tab, click Advanced. On the Auditing tab, verify that the following is set up on at least one audit: Type: All Principal: Everyone Access: Modify Applies to: This Folder, subfolder, and files [where applicable] If the required audit settings are not configured, there is a risk that unauthorized changes to the software will go undetected, and this is a finding. If a third-party security and data integrity tool is not used for monitoring and alerting files and folders based on cryptographic hashes, this is a finding. If the tool does not verify files/folder locations as listed in the documentation, this is a finding. Note 1: In the interest of separation of responsibilities with least privilege, consider granting Full Control only to SQL Database Administrators (or another appropriate group of administrators) and providing the local Administrators group with Read access only. Note 2: Some files also require 'ALL APPLICATION PACKAGES (READ, EXECUTE)' permissions for certain functionality to work appropriately, and this is considered acceptable where those permissions are required. (All SQL Server files that require this access reside by default in the ..\Microsoft SQL Server\110\ directory.)
Fix: F-73923r1_fix
Include locations of all files, libraries, scripts, and executables that are part of, or related to, the SQL Server 2014 installation in the documentation. Ensure that files and folders that are part of, or related to, the SQL Server 2014 installation have only the following privileges. Right-click the file/folder, click Properties. On the Security tab, modify the security permissions, so that at most the following permissions are present: Trusted Installer (Full Control) SYSTEM (FULL CONTROL) Administrators (FULL CONTROL) Users (READ, LIST FOLDER CONTENTS, READ & EXECUTE) Creator Owner (Special Permissions - Full control - Subfolders and files only) All Application Packages (Read & Execute) [Only as needed - see Note 2] Ensure that files and folders that are part of, or related to, the SQL Server 2014 installation have auditing enabled. Right-click on the file/folder, click Properties. On the Security tab, click Advanced. On the Auditing tab, use the Add or Edit buttons and the dialogs that follow from them, to set up the following on at least one audit: Type: All Principal: Everyone Access: Modify Applies to: This Folder, subfolder, and files [where applicable] Deploy a third-party security and data integrity tool for monitoring and alerting files and folders based on cryptographic hashes, to verify files/folder locations as listed in the documentation. Note 1: In the interest of separation of responsibilities with least privilege, consider granting Full Control only to SQL Database Administrators (or another appropriate group of administrators) and providing the local Administrators group with Read access only. Note 2: Some files also require 'ALL APPLICATION PACKAGES (READ, EXECUTE)' permissions for certain functionality to work appropriately, and this is considered acceptable where those permissions are required. (All SQL Server files that require this access reside by default in the ..\Microsoft SQL Server\110\ directory.)
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- SQL4-00-015300
- Vuln IDs
-
- V-67809
- Rule IDs
-
- SV-82299r1_rule
Checks: C-68377r1_chk
Verify within the system documentation that SQL Server is monitored for security-relevant configuration settings to discover unauthorized changes. This can be done by a third-party tool or a SQL script that does baselining and then comparisons. If the monitoring of security-relevant configuration settings to discover unauthorized changes is not implemented on SQL Server, this is a finding.
Fix: F-73925r1_fix
Document the monitoring of security-relevant configuration settings to discover unauthorized changes within the system documentation. Document the specific users or types of security personnel that are able to monitor security-relevant configuration settings to discover unauthorized changes. Deploy and implement a third-party tool or some other SQL Server method of monitoring security-relevant configuration settings to discover unauthorized changes.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- SQL4-00-015400
- Vuln IDs
-
- V-67811
- Rule IDs
-
- SV-82301r1_rule
Checks: C-68379r1_chk
Check system documentation for policy and procedures to restrict use of the SQL Server software installation account. Check OS settings to determine whether users are restricted from accessing SQL Server objects and data they are not authorized to access by checking the local OS user accounts. From a Command Prompt, open lusrmgr.msc. Navigate to Users >> right-click individual user >> Properties >> Member Of. If appropriate access controls for all users are not implemented to restrict access to only authorized users and to restrict the access of those users to objects and data they are authorized, this is a finding. Review procedures for controlling and granting access to use of the SQL Server software installation account. If access or use of this account is not restricted to the minimum number of personnel required, or unauthorized access to this account has been granted, this is a finding.
Fix: F-73927r1_fix
From a Command Prompt, open lusrmgr.msc. Navigate to Users >> right-click individual user >> Properties >> Member Of. Configure SQL Server & OS settings and access controls, to restrict user access to objects and data that the user is authorized to view or interact with. Develop, document, and implement procedures to restrict use of the DBMS software installation account.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- SQL4-00-015500
- Vuln IDs
-
- V-67813
- Rule IDs
-
- SV-82303r1_rule
Checks: C-68381r1_chk
Verify the SQL Server installations present on the server. From a Command Prompt, type regedit.exe, and press [ENTER]. Navigate to HKEY_LOCAL_MACHINE >> SOFTWARE >> Microsoft >> Microsoft SQL Server >> Instance Names. Each instance installed on the server possesses a key inside a folder under this registry entry. Analysis Services Instances are registered in the OLAP subfolder. Reporting Services Instances are registered in the RS subfolder. Standard SQL Server (database engine) Instances are registered in the SQL subfolder. Inside each one of these folders, a single key is used to reference an Instance's specific Windows Registry tree. Each key will have its own registry tree at the following registry location: HKEY_LOCAL_MACHINE >> SOFTWARE >> Microsoft >> Microsoft SQL Server >> [INSTANCE NAME]. An [INSTANCE NAME] is listed as the Data component of a key found in one of the above OLAP, RS, or SQL folders. To find the installation location of a particular instance, navigate to the following location in the Windows Registry: HKEY_LOCAL_MACHINE >> SOFTWARE >> Microsoft >> Microsoft SQL Server >> [INSTANCE NAME] >> Setup. Examine the value of the 'SqlProgramDir' key. The value of the 'SqlProgramDir' key is the SQL Server installation directory for that SQL Server Instance. Navigate to that folder location using a Command Prompt or Windows Explorer. Only applications that are required for the functioning and administration, not use, of SQL Server should be located on the same disk directory as the SQL Server software libraries. If any files or subfolders are not part of the SQL Server installation, this is a finding.
Fix: F-73929r1_fix
Separate database files (software, data) into dedicated directories.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- SQL4-00-030700
- Vuln IDs
-
- V-67815
- Rule IDs
-
- SV-82305r1_rule
Checks: C-68383r1_chk
Using the system security plan, identify the group(s)/role(s) established for SQL Server DBMS and database modification, and the individuals authorized to modify the DBMS and database(s). If helpful, the views STIG.server_permissions and STIG.database_permissions, provided in the supplemental file Permissions.sql, can be used to search for the relevant roles: look for Permission values containing "Alter," "Create," "Control," etc. Obtain the list of users in those group(s)/roles. The provided functions STIG.members_of_db_role() and STIG.members_of_server_role(), can be used for this. If unauthorized access to the group(s)/role(s) has been granted, this is a finding.
Fix: F-73931r1_fix
Revoke unauthorized memberships in the group(s)/role(s) designated for DBMS and database modification. Syntax examples: ALTER ROLE Power DROP MEMBER JenUser; -- the member is a database role or database user. ALTER SERVER ROLE GreatPower DROP MEMBER Irresponsibility; -- the member is a server role or login.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016200
- Vuln IDs
-
- V-67817
- Rule IDs
-
- SV-82307r1_rule
Checks: C-68385r1_chk
Check SQL Server for the existence of the publicly available "Northwind" database by performing the following query: SELECT name FROM sysdatabases WHERE name LIKE 'Northwind%'; If the "Northwind" database is present, this is a finding.
Fix: F-73933r1_fix
Remove the publicly available "Northwind" database from SQL Server by running the following script: USE master; GO DROP DATABASE Northwind; GO
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016300
- Vuln IDs
-
- V-67819
- Rule IDs
-
- SV-82309r1_rule
Checks: C-68387r1_chk
Check SQL Server for the existence of the publicly available "pubs" database by performing the following query: SELECT name FROM sysdatabases WHERE name LIKE 'pubs%'; If the "pubs" database is present, this is a finding.
Fix: F-73935r1_fix
Remove the publicly available "pubs" database from SQL Server by running the following script: USE master; GO DROP DATABASE pubs; GO
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016310
- Vuln IDs
-
- V-67821
- Rule IDs
-
- SV-82311r1_rule
Checks: C-68389r1_chk
Check SQL Server for the existence of the publicly available "AdventureWorks" database by performing the following query: SELECT name FROM sysdatabases WHERE name LIKE 'AdventureWorks%'; If the "AdventureWorks" database is present, this is a finding.
Fix: F-73937r1_fix
Remove the publicly available "AdventureWorks" database from SQL Server by running the following script: USE master; GO DROP DATABASE AdventureWorks; GO
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016500
- Vuln IDs
-
- V-67823
- Rule IDs
-
- SV-82313r1_rule
Checks: C-68391r1_chk
Review the list of components and features installed with the database. Using an account with System Administrator privileges, from Command Prompt, open control.exe. Navigate to Programs and Features. Check for the following entries in the 'Uninstall or change a program' window. Microsoft SQL Server Data Tools - Database Projects - Web installer entry point Prerequisites for SSDT If SQL Server Data Tools is not documented as a server requirement, and these entries exist, this is a finding.
Fix: F-73939r1_fix
Document the requirement for SQL Server Data Tools to reside on this server. If it is not required, using an account with System Administrator privileges, from Command Prompt, open control.exe. Navigate to Programs and Features. Remove the following entries in the 'Uninstall or change a program' window. Microsoft SQL Server Data Tools - Database Projects - Web installer entry point Prerequisites for SSDT
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016600
- Vuln IDs
-
- V-67825
- Rule IDs
-
- SV-82315r1_rule
Checks: C-68393r1_chk
If the SQL Server service "SQL Server Reporting Services (<Instance Name>)" is used and satisfies organizational requirements, this is not a finding. From a command prompt or the Start menu, using an account with System Administrator Privilege, open services.msc. Look for: "SQL Server Reporting Services (<Instance Name>)". If the "SQL Server Reporting Services (<Instance Name>)" service exists, this is a finding.
Fix: F-73941r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select the relevant SQL Server instance; click Next. Select Reporting Services - Native; select Reporting Services Add-in for SharePoint Products if it is present; click Next. Follow the remaining prompts, to remove SQL Server Reporting Services from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016700
- Vuln IDs
-
- V-67827
- Rule IDs
-
- SV-82317r1_rule
Checks: C-68395r1_chk
If the SQL Server service "SQL Server Integration Services 12.0" is used and satisfies organizational requirements, this is not a finding. From a command prompt or the Start menu, using an account with System Administrator Privilege, open services.msc. Look for: "SQL Server Integration Services 12.0". If the "SQL Server Integration Services 12.0" service exists, this is a finding.
Fix: F-73943r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select '<< Remove shared features only >>'; click Next. Note: all SQL Server 2014 instances will be affected by this action. Select Integration Services; click Next. Follow the remaining prompts, to remove SQL Server Integration Services from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016800
- Vuln IDs
-
- V-67829
- Rule IDs
-
- SV-82319r1_rule
Checks: C-68397r1_chk
If the SQL Server service "SQL Server Analysis Services (<Instance Name>)" is used and satisfies organizational requirements, this is not a finding. From a command prompt or the Start menu, using an account with System Administrator Privilege, open services.msc. Look for: "SQL Server Analysis Services (<Instance Name>)". If the "SQL Server Analysis Services (<Instance Name>)" service exists, this is a finding.
Fix: F-73945r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select the relevant SQL Server instance; click Next. Select Analysis Services; click Next. Follow the remaining prompts, to remove SQL Server Analysis Services from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016805
- Vuln IDs
-
- V-67831
- Rule IDs
-
- SV-82321r1_rule
Checks: C-68399r1_chk
If the SQL Server service "SQL Server Distributed Replay Client" is used and satisfies organizational requirements, this is not a finding. From a command prompt or the Start menu, using an account with System Administrator Privilege, open services.msc. Look for: "SQL Server Distributed Replay Client". If the "SQL Server Distributed Replay Client" service exists, this is a finding.
Fix: F-73947r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select a SQL Server instance; click Next. (Note: all instances of SQL Server 2012 or higher may be affected by this action.) Select Distributed Replay Client; click Next. Follow the remaining prompts, to remove Distributed Replay Client from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016810
- Vuln IDs
-
- V-67833
- Rule IDs
-
- SV-82323r1_rule
Checks: C-68401r1_chk
If the SQL Server service "SQL Server Distributed Replay Controller" is used and satisfies organizational requirements, this is not a finding. From a command prompt or the Start menu, using an account with System Administrator Privilege, open services.msc. Look for: "SQL Server Distributed Replay Controller". If the "SQL Server Distributed Replay Controller" service exists, this is a finding.
Fix: F-73949r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select '<< Remove shared features only >>'; click Next. (Note: all instances of SQL Server 2012 or higher may be affected by this action.) Select Distributed Replay Controller; click Next. Follow the remaining prompts, to remove Distributed Replay Controller from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016815
- Vuln IDs
-
- V-67835
- Rule IDs
-
- SV-82325r1_rule
Checks: C-68403r1_chk
If the SQL Server full-text search feature is used and satisfies organizational requirements, this is not a finding. From a command prompt or the Start menu, using an account with System Administrator Privilege, open services.msc. Look for: "SQL Full-text Daemon Launcher(<Instance name>)". If the "SQL Full-text Daemon Launcher(<Instance name>)" service exists, this is a finding.
Fix: F-73951r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select the relevant SQL Server instance; click Next. Select Full-Text and Semantic Extractions for Search; click Next. Follow the remaining prompts, to remove Full-Text and Semantic Extractions for Search from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016820
- Vuln IDs
-
- V-67837
- Rule IDs
-
- SV-82327r1_rule
Checks: C-68405r1_chk
If the Master Data Services feature is used and satisfies organizational requirements, this is not a finding. Click on the Start button. Navigate to >> Microsoft SQL Server 2014 >> Master Data Services. If the "Master Data Services" folder exists and contains any programs, this is a finding. In Windows Explorer, navigate to <drive where SQL Server is installed>:\Program Files\Microsoft SQL Server\120\Master Data Services\. If this exists and contains any files, this is a finding.
Fix: F-73953r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select '<< Remove shared features only >>'; click Next. Note: all SQL Server 2014 instances will be affected by this action.) Select Master Data Services; click Next. Follow the remaining prompts, to remove Master Data Services from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016826
- Vuln IDs
-
- V-67839
- Rule IDs
-
- SV-82329r1_rule
Checks: C-68407r1_chk
If the SQL Server Replication feature is used and satisfies organizational requirements, this is not a finding. In SQL Server Management Studio, Object Explorer, expand the instance. Right-click Replication >> New >> Publication. If the Publication Wizard appears, with no error message, this is a finding. Right-click Replication >> New >> Subscription. If the Subscription Wizard appears, with no error message, this is a finding.
Fix: F-73955r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select the relevant SQL Server instance; click Next. Select SQL Server Replication; click Next. Follow the remaining prompts, to remove SQL Server Replication from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016830
- Vuln IDs
-
- V-67841
- Rule IDs
-
- SV-82331r1_rule
Checks: C-68409r1_chk
If the Data Quality Client feature is used and satisfies organizational requirements, this is not a finding. In Windows Server 2008 R2 or lower, click on the Start button. In the Start menu, navigate to All Programs >> Microsoft SQL Server 2014. If the "Data Quality Services" folder exists and contains the Data Quality Client program, this is a finding. In Windows Server 2012 or higher, click on the Start button. In the Start menu, navigate to Apps >> Microsoft SQL Server 2014. If the Data Quality Client program is listed, this is a finding. In Windows Explorer, navigate to <drive where SQL Server is installed>:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\DQ\ If this folder exists and contains the file DataQualityServices.exe, this is a finding.
Fix: F-73957r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select the relevant SQL Server instance; click Next. Select Data Quality Client; click Next. Follow the remaining prompts, to remove Data Quality Client from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016835
- Vuln IDs
-
- V-67843
- Rule IDs
-
- SV-82333r1_rule
Checks: C-68411r1_chk
If the Data Quality Services feature is used and satisfies organizational requirements, this is not a finding. Run the query: SELECT * FROM sys.databases WHERE name in ('DQS_MAIN', 'DQS_PROJECTS', 'DQS_STAGING_DATA'); If any rows are returned, this is a finding. In Windows Server 2008 R2 or lower, click on the Start button. In the Start menu, navigate to All Programs >> Microsoft SQL Server 2014. If the "Data Quality Services" folder exists and contains the Data Quality Server Installer program, this is a finding. In Windows Server 2012 or higher, click on the Start button. In the Start menu, navigate to Apps >> Microsoft SQL Server 2014. If the Data Quality Server Installer program is listed, this is a finding. In Windows Explorer, navigate to <drive where SQL Server is installed>:\Program Files\Microsoft SQL Server\MSSQL12.<Instance name>\MSSQL\Binn\ If this contains the file DQSInstaller.exe, this is a finding.
Fix: F-73959r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select the relevant SQL Server instance; click Next. Select Data Quality Services; click Next. Follow the remaining prompts, to remove Data Quality Services from SQL Server. Then run the following script: USE master; GO DROP DATABASE DQS_STAGING; GO DROP DATABASE DQS_PROJECTS; GO DROP DATABASE DQS_MAIN; GO Restart the server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016845
- Vuln IDs
-
- V-67845
- Rule IDs
-
- SV-82335r1_rule
Checks: C-68413r1_chk
If the Client Tools Software Development Kit is used and satisfies organizational requirements, this is not a finding. Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select '<< Remove shared features only >>'; click Next. If the list of shared features includes Client Tools SDK, this is a finding.
Fix: F-73961r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select '<< Remove shared features only >>'; click Next. Note: all SQL Server 2014 instances will be affected by this action.) Select Client Tools Software Development Kit; click Next. Follow the remaining prompts, to remove the Client Tools Software Development Kit from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016850
- Vuln IDs
-
- V-67847
- Rule IDs
-
- SV-82337r1_rule
Checks: C-68415r1_chk
If the SQL Server Management Tools are used and satisfy organizational requirements, this is not a finding. In Windows Server 2008 R2 or lower, click on the Start button. In the Start menu, navigate to All Programs >> Microsoft SQL Server 2014. If the SQL Server Management Studio is listed, this is a finding. In Windows Server 2012 or higher, click on the Start button. In the Start menu, navigate to Apps >> Microsoft SQL Server 2014. If the SQL Server Management Studio is listed, this is a finding.
Fix: F-73963r1_fix
Either using the Start menu or via the command "control.exe", open the Windows Control Panel. Open Programs and Features. Double-click on Microsoft SQL Server 2014. In the dialog box that appears, select Remove. Wait for the Remove wizard to appear. Select the relevant SQL Server instance; click Next. Select Management Tools - Basic and Management Tools - Complete; click Next. Follow the remaining prompts, to remove Management Tools from SQL Server.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-016855
- Vuln IDs
-
- V-67849
- Rule IDs
-
- SV-82339r1_rule
Checks: C-68417r1_chk
Determine whether Filestream is required to support the database(s) in this instance of SQL Server. Either, in SQL Server Management Studio, Object Explorer, right-click on the SQL Server instance; select Properties; examine the Filestream section. If Filestream Access Level is "Disabled", this is not a finding. If Filestream Access Level is "Transact-SQL access enabled" or "Full access enabled," and Filestream is not required, this is a finding. If Filestream Access Level is "Full access enabled," but only Transact-SQL access is required, this is a finding. Or, in a query tool, run this code: EXEC sys.sp_configure N'filestream access level'; Review the number in the config_value column. If it is 0, this is not a finding. If config_value is 1 or 2, and Filestream is not required, this is a finding. If config_value is 2, but only Transact-SQL access is required, this is a finding.
Fix: F-73965r1_fix
Either, in SQL Server Management Studio, Object Explorer, right-click on the SQL Server instance; select Properties; examine the Filestream section. If Filestream is not required, set Filestream Access Level to "Disabled." If Filestream is required only at the Transact-SQL query level, set Filestream Access Level to "Transact-SQL access enabled." Restart the SQL Server instance. Or, in a query tool, run this script, substituting the correct value for <Level>: EXEC sys.sp_configure N'filestream access level', N'<Level>'; GO RECONFIGURE WITH OVERRIDE; GO The <Level> values are: 0 - Disabled 1 - Transact-SQL access enabled 2 - Full access enabled
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-017000
- Vuln IDs
-
- V-67851
- Rule IDs
-
- SV-82341r2_rule
Checks: C-68419r3_chk
Review the components and features included in SQL Server and capable of being disabled (by configuration settings, permissions and privileges, etc.). Take note of those which are enabled. Review the system documentation to verify that the enabled components or features are documented and authorized. If any enabled components or features are not authorized, this is a finding.
Fix: F-73967r1_fix
If any components or features of SQL Server are required for operation of applications that will be accessing SQL Server data or configuration, include them in the system documentation. If any unused components or features of SQL Server are installed and cannot be uninstalled or removed, then disable those components or features.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-017100
- Vuln IDs
-
- V-67853
- Rule IDs
-
- SV-82343r1_rule
Checks: C-68421r1_chk
Check SQL Server settings to determine if the [sa] (system administrator) account has been disabled by executing the following query: USE master; GO SELECT name, is_disabled FROM sys.sql_logins WHERE principal_id = 1; GO Verify that the "name" column contains the current name of the [sa] database server account (see note). If the "is_disabled" column is not set to 1, this is a finding. Note: If the [sa] account name has been changed per SQL4-00-010200, its new name should appear in the query results.
Fix: F-73969r1_fix
Modify the enabled flag of SQL Server's [sa] (system administrator) account by running the following script. If the account name has been changed per SQL4-00-010200, replace the letters "sa" in the query with the new name. USE master; GO ALTER LOGIN [sa] DISABLE; GO
- RMF Control
- CM-7
- Severity
- L
- CCI
- CCI-000381
- Version
- SQL4-00-010200
- Vuln IDs
-
- V-67855
- Rule IDs
-
- SV-82345r1_rule
Checks: C-68423r1_chk
Verify the SQL Server default [sa] (system administrator) account name has been changed by executing the following query: USE master; GO SELECT * FROM sys.sql_logins WHERE [name] = 'sa' OR [principal_id] = 1; GO If the login account name "SA" or "sa" appears in the query output, this is a finding.
Fix: F-73971r1_fix
Modify the SQL Server's [sa] (system administrator) account by running the following script: USE master; GO ALTER LOGIN [sa] WITH NAME = <new name>; GO
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- SQL4-00-017200
- Vuln IDs
-
- V-67857
- Rule IDs
-
- SV-82347r1_rule
Checks: C-68425r1_chk
To determine if xp_cmdshell is enabled, execute the following commands: EXEC SP_CONFIGURE 'show advanced options', '1'; RECONFIGURE WITH OVERRIDE; EXEC SP_CONFIGURE 'xp_cmdshell'; If the value of config_value is 0, this is not a finding. Review the system documentation to determine whether the use of xp_cmdshell is required and approved. If it is not approved, this is a finding.
Fix: F-73973r1_fix
To disable the use of xp_cmdshell, from the query prompt: EXEC sp_configure 'show advanced options', 1; GO RECONFIGURE; GO EXEC sp_configure 'xp_cmdshell', 0; GO RECONFIGURE; GO
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000382
- Version
- SQL4-00-017400
- Vuln IDs
-
- V-67859
- Rule IDs
-
- SV-82349r1_rule
Checks: C-68427r1_chk
Open SQL Server Configuration Manager. Navigate to SQL Server Network Configuration > Protocols for <instance name>, where <instance name> is a placeholder for the SQL Server instance name. If any listed protocol is enabled but not authorized, this is a finding.
Fix: F-73975r1_fix
In SQL Server Configuration Manager, right-click on each listed protocol that is enabled but not authorized; select Disable.
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000382
- Version
- SQL4-00-017410
- Vuln IDs
-
- V-67861
- Rule IDs
-
- SV-82351r1_rule
Checks: C-68429r1_chk
Review the ports used by SQL Server. If these are in conflict with PPSM guidance, and not explained and approved in the system documentation, this is a finding.
Fix: F-73977r1_fix
Change the ports used by SQL Server to comply with PPSM guidance, or document the need for other ports, and obtain written approval. Close ports no longer needed.
- RMF Control
- IA-2
- Severity
- M
- CCI
- CCI-000764
- Version
- SQL4-00-018400
- Vuln IDs
-
- V-67863
- Rule IDs
-
- SV-82353r1_rule
Checks: C-68431r1_chk
Review SQL Server users to determine whether shared accounts exist. (This does not include the case where SQL Server has a guest or public account that is providing access to publicly available information.) If accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding. If accounts are determined to be shared, determine if they are directly accessible to end users. If so, this is a finding.
Fix: F-73979r1_fix
Remove user-accessible shared accounts and use individual userids. Build/configure applications to ensure successful individual authentication prior to shared account access. Ensure each user's identity is received and used in audit data in all relevant circumstances.
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000197
- Version
- SQL4-00-018700
- Vuln IDs
-
- V-67865
- Rule IDs
-
- SV-82355r1_rule
Checks: C-68433r1_chk
From a command prompt, open SQL Server Configuration Manager by typing sqlservermanager12.msc, and pressing [ENTER]. Navigate to SQL Server Configuration Manager >> SQL Server Network Configuration. Right-click on Protocols for <instance name>, where <instance name> is a placeholder for the SQL Server instance name, and click on Properties. On the Flags tab, if Force Encryption is set to NO, this is a finding. On the Flags tab, if Force Encryption is set to YES, examine the certificate used on the Certificate tab. If it is not a DoD certificate, or if no certificate is listed, this is a finding.
Fix: F-73981r1_fix
Configure SQL Server to encrypt authentication data for remote connections using DoD-approved cryptography. Deploy encryption to the SQL Server Network Connections. From a command prompt, open SQL Server Configuration Manager by typing sqlservermanager12.msc, and pressing [ENTER]. Navigate to SQL Server Configuration Manager >> SQL Server Network Configuration. Right-click on Protocols for <instance name>, where <instance name> is a placeholder for the SQL Server instance name, and click on Properties. On the Flags tab, set Force Encryption to YES, and provide DoD certificate on the Certificate tab.
- RMF Control
- IA-6
- Severity
- H
- CCI
- CCI-000206
- Version
- SQL4-00-039010
- Vuln IDs
-
- V-67867
- Rule IDs
-
- SV-82357r1_rule
Checks: C-68435r1_chk
Determine whether any applications that access the database allow for entry of the account name and password, or PIN. If any do, determine whether these applications obfuscate authentication data; if they do not, this is a finding.
Fix: F-73983r1_fix
Configure or modify applications to prohibit display of passwords in clear text.
- RMF Control
- IA-6
- Severity
- H
- CCI
- CCI-000206
- Version
- SQL4-00-039020
- Vuln IDs
-
- V-67869
- Rule IDs
-
- SV-82359r1_rule
Checks: C-68437r1_chk
Run this query to determine whether SQL Server authentication is enabled: EXEC master.sys.xp_loginconfig 'login mode'; If the config_value returned is "Windows NT Authentication", this is not a finding. For SQLCMD, which cannot be configured not to accept a plain-text password, and any other essential tool with the same limitation, verify that the system documentation explains the need for the tool, who uses it, and any relevant mitigations; and that AO approval has been obtained; if not, this is a finding. Request evidence that all users of the tool are trained in the importance of not using the plain-text password option and in how to keep the password hidden; and that they adhere to this practice; if not, this is a finding.
Fix: F-73985r1_fix
Where possible, change the login mode to Windows-only: USE [master] GO EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 1; GO If mixed-mode authentication is necessary, then for SQLCMD, which cannot be configured not to accept a plain-text password when mixed-mode authentication is enabled, and any other essential tool with the same limitation: 1) Document the need for it, who uses it, and any relevant mitigations, and obtain AO approval. 2) Train all users of the tool in the importance of not using the plain-text password option and in how to keep the password hidden.
- RMF Control
- IA-7
- Severity
- H
- CCI
- CCI-000803
- Version
- SQL4-00-031100
- Vuln IDs
-
- V-67871
- Rule IDs
-
- SV-82361r1_rule
Checks: C-68439r1_chk
In Windows, open Administrative Tools >> Local Security Policy. Expand Local Policies >> Security Options. In the right-side pane, find "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing". If, in the Security Setting column, the value is "Disabled," this is a finding.
Fix: F-73987r1_fix
In Windows, open Administrative Tools >> Local Security Policy. Expand Local Policies >> Security Options. In the right-side pane, double-click on "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing". In the dialog box that appears, if the radio buttons are active, click Enabled, and then click Apply. If the radio buttons are grayed out, use Group Policy Management (on the appropriate server for this domain) to enforce the Enabled policy, and deploy it to the server(s) running SQL Server.
- RMF Control
- IA-8
- Severity
- M
- CCI
- CCI-000804
- Version
- SQL4-00-018900
- Vuln IDs
-
- V-67873
- Rule IDs
-
- SV-82363r1_rule
Checks: C-68441r1_chk
Review documentation, SQL Server settings and authentication system settings to determine if non-organizational users are individually identified and authenticated when logging onto the system. If the documentation indicates that this is a public-facing, read-only (from the point of view of public users) database that does not require individual authentication, this is not a finding. If non-organizational users are not uniquely identified and authenticated, this is a finding.
Fix: F-73989r1_fix
Configure SQL Server to uniquely identify and authenticate all non-organizational users who log onto the system. This likely would be done via a combination of the operating system with unique accounts and the SQL Server by ensuring mapping to individual accounts.
- RMF Control
- SC-2
- Severity
- M
- CCI
- CCI-001082
- Version
- SQL4-00-020500
- Vuln IDs
-
- V-67875
- Rule IDs
-
- SV-82365r1_rule
Checks: C-68443r1_chk
Check SQL Server permission settings to verify that administrative functionality is kept separate from user functionality. The views and functions provided in the supplemental file Permissions.sql can help with this review. If administrator and general user functionality are not separated either physically or logically, this is a finding.
Fix: F-73991r1_fix
Establish one or more locally-defined server roles and one or more locally-defined database roles for organizing administrative permissions. Grant administrative permissions to these roles. Assign the appropriate administrative users to these roles. Do not grant the roles and permissions to general users.
- RMF Control
- SC-28
- Severity
- M
- CCI
- CCI-001199
- Version
- SQL4-00-021300
- Vuln IDs
-
- V-67877
- Rule IDs
-
- SV-82367r1_rule
Checks: C-68445r1_chk
If the application owner and Authorizing Official have determined that encryption of data at rest is required, ensure the data on secondary devices is encrypted. If full-disk encryption is being used, this is not a finding. If DBMS data encryption is required, ensure the data is encrypted before being put on the secondary device by executing: SELECT d.name AS [Database Name], CASE e.encryption_state WHEN 0 THEN 'No database encryption key present, no encryption' WHEN 1 THEN 'Unencrypted' WHEN 2 THEN 'Encryption in progress' WHEN 3 THEN 'Encrypted' WHEN 4 THEN 'Key change in progress' WHEN 5 THEN 'Decryption in progress' WHEN 6 THEN 'Protection change in progress' END AS [Encryption State] FROM sys.dm_database_encryption_keys e RIGHT JOIN sys.databases d ON DB_NAME(e.database_id) = d.name WHERE d.name NOT IN ('master','model','msdb') ORDER BY 1 ; For each user database where encryption is required, verify that encryption is in effect. If not, this is a finding. Verify that there are physical security measures, operating system access control lists and organizational controls appropriate to the sensitivity level of the data in the database(s). If not, this is a finding.
Fix: F-73993r1_fix
Apply appropriate controls to protect the confidentiality and integrity of data on a secondary device. Where encryption is required, this can be done by full-disk encryption or by database encryption. To enable database encryption, create a master key, create a database encryption key, and protect it by using mechanisms tied to the master key, and then set encryption on. Implement physical security measures, operating system access control lists and organizational controls appropriate to the sensitivity level of the data in the database(s).
- RMF Control
- SC-3
- Severity
- M
- CCI
- CCI-001084
- Version
- SQL4-00-021500
- Vuln IDs
-
- V-67879
- Rule IDs
-
- SV-82369r1_rule
Checks: C-68447r1_chk
Determine application-specific security objects (lists of permissions, additional authentication information, stored procedures, application specific auditing, etc.) which are being housed inside SQL server in addition to the built-in security objects. Review permissions, both direct and indirect, on the security objects, both built-in and application-specific. The functions and views provided in the supplemental file Permissions.sql can help with this. If the database(s), schema(s) and permissions on security objects are not organized to provide effective isolation of security functions from nonsecurity functions, this is a finding.
Fix: F-73995r1_fix
Where possible, locate security-related database objects and code in a separate database, schema, or other separate security domain from database objects and code implementing application logic. In all cases, use GRANT, REVOKE, DENY, ALTER ROLE … ADD MEMBER … and/or ALTER ROLE …. DROP MEMBER statements to add and remove permissions on server-level and database-level security-related objects to provide effective isolation.
- RMF Control
- SC-4
- Severity
- M
- CCI
- CCI-001090
- Version
- SQL4-00-031400
- Vuln IDs
-
- V-67881
- Rule IDs
-
- SV-82371r1_rule
Checks: C-68449r1_chk
Review the permissions granted to users by the operating system/file system on the database files, database transaction log files, database audit log files, and database backup files. If any user/role who is not an authorized system administrator with a need to know or database administrator with a need to know, or a system account for running DBMS processes, is permitted to read/view any of these files, this is a finding.
Fix: F-73997r1_fix
Configure the permissions granted by the operating system/file system on the database files, database transaction log files, database audit log files, and database backup files so that only relevant system accounts and authorized system administrators and database administrators with a need to know are permitted to read/view these files.
- RMF Control
- AC-12
- Severity
- M
- CCI
- CCI-002361
- Version
- SQL4-00-031700
- Vuln IDs
-
- V-67883
- Rule IDs
-
- SV-82373r1_rule
Checks: C-68451r1_chk
Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding. If the documentation requires automatic session termination, but SQL Server and Windows (or third-party tools) are not configured accordingly, this is a finding.
Fix: F-73999r1_fix
Configure SQL Server, Windows and/or third-party tools to automatically terminate a user session after organization-defined conditions or trigger events requiring session termination.
- RMF Control
- AC-6
- Severity
- M
- CCI
- CCI-002235
- Version
- SQL4-00-032500
- Vuln IDs
-
- V-67885
- Rule IDs
-
- SV-82375r1_rule
Checks: C-68453r1_chk
Review the system documentation to obtain the definition of the SQL Server database/DBMS functionality considered privileged in the context of the system in question. Review the SQL Server security configuration and/or other means used to protect privileged functionality from unauthorized use. If the configuration does not protect all of the actions defined as privileged, this is a finding. The database permission functions and views provided in the supplemental file Permissions.sql can help with this.
Fix: F-74001r1_fix
Use REVOKE and/or DENY and/or ALTER SERVER ROLE ... DROP MEMBER ... statements to align EXECUTE permissions (and any other relevant permissions) with documented requirements.
- RMF Control
- AC-6
- Severity
- M
- CCI
- CCI-002233
- Version
- SQL4-00-032600
- Vuln IDs
-
- V-67887
- Rule IDs
-
- SV-82377r1_rule
Checks: C-68455r1_chk
Review the system documentation, SQL Server instance and database security configuration, source code for stored procedures, functions, and triggers, source code of external modules invoked by the DBMS, and source code of the application(s) using the database. If elevation of DBMS privileges is utilized but not documented, this is a finding. If elevation of DBMS privileges is documented, but not implemented as described in the documentation, this is a finding. If the privilege-elevation logic can be invoked in ways other than intended, or in contexts other than intended, or by subjects/principals other than intended, this is a finding.
Fix: F-74003r1_fix
Determine where, when, how, and by what principals/subjects elevated privilege is needed. Modify documentation as necessary to align it with the actual need for privilege elevation. Modify the database and DBMS security configuration, stored procedures, functions, and triggers, external modules invoked by the DBMS, and the application(s) using the database, so that privilege elevation is used only as required.
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-001844
- Version
- SQL4-00-032800
- Vuln IDs
-
- V-67889
- Rule IDs
-
- SV-82379r1_rule
Checks: C-68457r1_chk
Review the system documentation for a description of how audit records are off-loaded and how local audit log space is managed. If the SQL Server audit records (to include traces used for audit purposes) are not written directly to or systematically transferred to a centralized log management system, this is a finding.
Fix: F-74005r1_fix
Configure and/or deploy software tools to ensure that SQL Server audit records (to include traces used for audit purposes) are written directly to or systematically transferred to a centralized log management system.
- RMF Control
- AU-4
- Severity
- M
- CCI
- CCI-001849
- Version
- SQL4-00-033000
- Vuln IDs
-
- V-67891
- Rule IDs
-
- SV-82381r1_rule
Checks: C-68459r1_chk
Investigate whether there have been any incidents where the system ran out of audit log space (to include traces used for audit purposes) since the last time the space was allocated or other corrective measures were taken. If there have been, this is a finding.
Fix: F-74007r1_fix
Allocate sufficient audit storage space to support peak demand.
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-001855
- Version
- SQL4-00-033400
- Vuln IDs
-
- V-67893
- Rule IDs
-
- SV-82383r1_rule
Checks: C-68463r1_chk
Review system configuration. If appropriate support staff are not notified immediately upon storage volume utilization reaching 75%, this is a finding.
Fix: F-74009r1_fix
Configure the system to notify appropriate support staff immediately upon storage volume utilization reaching 75%.
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-001858
- Version
- SQL4-00-033500
- Vuln IDs
-
- V-67895
- Rule IDs
-
- SV-82385r1_rule
Checks: C-68465r1_chk
Review the system documentation to determine which audit failure events require real-time alerts. Review settings in SQL Server, Windows, and any monitoring software. If the real-time alerting that is specified in the documentation is not enabled, this is a finding.
Fix: F-74011r1_fix
Configure the system to provide an immediate real-time alert to appropriate support staff when a specified audit failure occurs.
- RMF Control
- AU-8
- Severity
- M
- CCI
- CCI-001890
- Version
- SQL4-00-033600
- Vuln IDs
-
- V-67897
- Rule IDs
-
- SV-82387r1_rule
Checks: C-68467r1_chk
Verify that the Windows operating system is configured to synchronize with an official time server, using Network Time Protocol (NTP). If it is not, and this is not documented, with justification and AO authorization, this is a finding. If the OS does not synchronize with a time server, review the procedure for maintaining accurate time on the system. If such a procedure does not exist, this is a finding. If the procedure exists, review evidence that the correct time is actually maintained. If the evidence indicates otherwise, this is a finding.
Fix: F-74013r1_fix
Where possible, configure the operating system to automatic synchronize with an official time server, using NTP. Where there is reason not to implement automatic synchronization with an official time server, using NTP, document the reason, and the procedure for maintaining the correct time, and obtain AO approval. Enforce the procedure.
- RMF Control
- CM-11
- Severity
- M
- CCI
- CCI-001812
- Version
- SQL4-00-033800
- Vuln IDs
-
- V-67899
- Rule IDs
-
- SV-82389r1_rule
Checks: C-68469r1_chk
If the SQL Server instance supports only software development, experimentation and/or developer-level testing (that is, excluding production systems, integration testing, stress testing, and user acceptance testing), this is not a finding. Review the SQL Server instance and database security settings with respect to non-administrative users' ability to create, alter, or replace logic modules, to include but not necessarily only stored procedures, functions, triggers, and views. The database permission functions and views provided in the supplemental file Permissions.sql can help with this. If any such permissions exist and are not documented and approved, this is a finding.
Fix: F-74015r1_fix
Document and obtain approval for any non-administrative users who require the ability to create, alter or replace logic modules. Implement the approved permissions. Revoke (or Deny) any unapproved permissions, and remove any unauthorized role memberships.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001813
- Version
- SQL4-00-033900
- Vuln IDs
-
- V-67901
- Rule IDs
-
- SV-82391r1_rule
Checks: C-68471r1_chk
Review the security configuration of the SQL Server instance and database(s). If unauthorized Windows users can start the SQL Server Configuration Manager or SQL Server Management Studio, this is a finding. If SQL Server does not enforce access restrictions associated with changes to the configuration of the SQL Server instance or database(s), this is a finding. - - - - - To assist in conducting reviews of permissions, the following views and permissions are defined in the supplemental file Permissions.sql, provided with this STIG: database_permissions database_role_members server_permissions server_role_members database_effective_permissions('<database user/role name>') database_roles_of('<database user/role name>') members_of_db_role('<database role name>') members_of_server_role('<server role name>') server_effective_permissions('<server login/role name>') server_roles_of('<server login/role name>') Permissions of concern in this respect include the following, and possibly others: - any server permission except CONNECT SQL, but including CONNECT ANY DATABASE - any database permission beginning with "CREATE" or "ALTER" - CONTROL - INSERT, UPDATE, DELETE, EXECUTE on locally-defined tables and procedures designed for supplemental configuration and security purposes.
Fix: F-74017r1_fix
Configure SQL Server to enforce access restrictions associated with changes to the configuration of the SQL Server instance and database(s).
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001814
- Version
- SQL4-00-034000
- Vuln IDs
-
- V-67903
- Rule IDs
-
- SV-82393r1_rule
Checks: C-68473r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should be among those listed; if not, this is a finding: 102 -- Audit Statement GDR Event 103 -- Audit Object GDR Event 104 -- Audit AddLogin Event 105 -- Audit Login GDR Event 106 -- Audit Login Change Property Event 107 -- Audit Login Change Password Event 108 -- Audit Add Login to Server Role Event 109 -- Audit Add DB User Event 110 -- Audit Add Member to DB Role Event 111 -- Audit Add Role Event 112 -- Audit App Role Change Password Event 113 -- Audit Statement Permission Event 115 -- Audit Backup/Restore Event 116 -- Audit DBCC Event 117 -- Audit Change Audit Event 118 -- Audit Object Derived Permission Event 128 -- Audit Database Management Event 129 -- Audit Database Object Management Event 130 -- Audit Database Principal Management Event 131 -- Audit Schema Object Management Event 132 -- Audit Server Principal Impersonation Event 133 -- Audit Database Principal Impersonation Event 134 -- Audit Server Object Take Ownership Event 135 -- Audit Database Object Take Ownership Event 152 -- Audit Change Database Owner 153 -- Audit Schema Object Take Ownership Event 162 -- User error message 170 -- Audit Server Scope GDR Event 171 -- Audit Server Object GDR Event 172 -- Audit Database Object GDR Event 173 -- Audit Server Operation Event 175 -- Audit Server Alter Trace Event 176 -- Audit Server Object Management Event 177 -- Audit Server Principal Management Event If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses broad, server-level audit action groups for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following code to verify that all configuration-related actions are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name IN ( 'APPLICATION_ROLE_CHANGE_PASSWORD_GROUP', 'AUDIT_CHANGE_GROUP', 'BACKUP_RESTORE_GROUP', 'DATABASE_CHANGE_GROUP', 'DATABASE_OBJECT_ACCESS_GROUP', 'DATABASE_OBJECT_CHANGE_GROUP', 'DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP', 'DATABASE_OBJECT_PERMISSION_CHANGE_GROUP', 'DATABASE_OWNERSHIP_CHANGE_GROUP', 'DATABASE_OPERATION_GROUP', 'DATABASE_OWNERSHIP_CHANGE_GROUP', 'DATABASE_PERMISSION_CHANGE_GROUP', 'DATABASE_PRINCIPAL_CHANGE_GROUP', 'DATABASE_PRINCIPAL_IMPERSONATION_GROUP', 'DATABASE_ROLE_MEMBER_CHANGE_GROUP', 'DBCC_GROUP', 'LOGIN_CHANGE_PASSWORD_GROUP', 'SCHEMA_OBJECT_CHANGE_GROUP', 'SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_OBJECT_CHANGE_GROUP', 'SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SERVER_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_OPERATION_GROUP', 'SERVER_PERMISSION_CHANGE_GROUP', 'SERVER_PRINCIPAL_IMPERSONATION_GROUP', 'SERVER_ROLE_MEMBER_CHANGE_GROUP', 'SERVER_STATE_CHANGE_GROUP', 'TRACE_CHANGE_GROUP' ); GO Examine the list produced by the query. If any of the audit action groups specified in the WHERE clause are not included in the list, this is a finding. If the audited_result column is not "SUCCESS AND FAILURE" on every row, this is a finding.
Fix: F-74019r1_fix
Design and deploy a SQL Server Audit or Trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to create a trace. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (APPLICATION_ROLE_CHANGE_PASSWORD_GROUP), ADD (AUDIT_CHANGE_GROUP), ADD (BACKUP_RESTORE_GROUP), ADD (DATABASE_CHANGE_GROUP), ADD (DATABASE_OBJECT_ACCESS_GROUP), ADD (DATABASE_OBJECT_CHANGE_GROUP), ADD (DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (DATABASE_OBJECT_PERMISSION_CHANGE_GROUP), ADD (DATABASE_OWNERSHIP_CHANGE_GROUP), ADD (DATABASE_OPERATION_GROUP), ADD (DATABASE_OWNERSHIP_CHANGE_GROUP), ADD (DATABASE_PERMISSION_CHANGE_GROUP), ADD (DATABASE_PRINCIPAL_CHANGE_GROUP), ADD (DATABASE_PRINCIPAL_IMPERSONATION_GROUP), ADD (DATABASE_ROLE_MEMBER_CHANGE_GROUP), ADD (DBCC_GROUP), ADD (LOGIN_CHANGE_PASSWORD_GROUP), ADD (SCHEMA_OBJECT_CHANGE_GROUP), ADD (SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP), ADD (SERVER_OBJECT_CHANGE_GROUP), ADD (SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (SERVER_OBJECT_PERMISSION_CHANGE_GROUP), ADD (SERVER_OPERATION_GROUP), ADD (SERVER_PERMISSION_CHANGE_GROUP), ADD (SERVER_PRINCIPAL_IMPERSONATION_GROUP), ADD (SERVER_STATE_CHANGE_GROUP), ADD (SERVER_ROLE_MEMBER_CHANGE_GROUP), ADD (TRACE_CHANGE_GROUP) ; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-001762
- Version
- SQL4-00-034200
- Vuln IDs
-
- V-67905
- Rule IDs
-
- SV-82395r1_rule
Checks: C-68475r1_chk
Review the system security plan to determine the communication protocols used by the SQL Server instance. Open SQL Server Configuration Manager from the Windows Start menu or by entering "SQLServerManager12.msc" in a Command Prompt window or in the Run dialog box. Select SQL Server Network Configuration >> Protocols for <instance name>. Review the list of protocols. If any that are not required are shown as enabled, this is a finding.
Fix: F-74021r1_fix
In SQL Server Configuration Manager, right-click on each enabled protocol that is not required. Select Disabled. Close SQL Server Configuration Manager. Restart SQL Server.
- RMF Control
- SC-28
- Severity
- M
- CCI
- CCI-002476
- Version
- SQL4-00-034800
- Vuln IDs
-
- V-67907
- Rule IDs
-
- SV-82397r1_rule
Checks: C-68477r1_chk
Review the system documentation to determine whether the organization has defined the information at rest that is to be protected from modification, which must include, at a minimum, PII and classified information. If no information is identified as requiring such protection, this is not a finding. Review the configuration of SQL Server, Windows, and additional software as relevant. If full-disk encryption is required, and Windows or the storage system is not configured for this, this is a finding. If database transparent data encryption (TDE) is called for, check whether it is enabled: In SQL Server Management Studio, Object Explorer, expand the instance and right-click on the database name; select properties. Select the Options page, State section, Encryption Enabled parameter. If the value displayed is False, this is a finding. If column encryption, done via SQL Server features, is required, review the definitions and contents of the relevant tables and columns. If any of the information defined as requiring cryptographic protection is not encrypted in a manner that provides the required level of protection, this is a finding.
Fix: F-74023r1_fix
Where full-disk encryption is required, configure Windows and/or the storage system to provide this. Where transparent data encryption (TDE) is required, deploy the necessary stack of certificates and keys, and set the Encryption Enabled to True. For guidance from the Microsoft Developer Network on how to do this, perform a web search for "SQL Server 2014 TDE". Where column encryption is required, deploy the necessary stack of certificates and keys, and enable encryption on the columns in question. For guidance from the Microsoft Developer Network on how to do this, perform a web search for "SQL Server 2014 Encrypt a Column of Data".
- RMF Control
- SC-8
- Severity
- M
- CCI
- CCI-002420
- Version
- SQL4-00-035000
- Vuln IDs
-
- V-67909
- Rule IDs
-
- SV-82399r1_rule
Checks: C-68479r1_chk
If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding. If SQL Server, associated applications, and infrastructure do not employ protective measures against unauthorized disclosure and modification during preparation for transmission, this is a finding.
Fix: F-74025r1_fix
Implement protective measures against unauthorized disclosure and modification during preparation for transmission.
- RMF Control
- SC-8
- Severity
- M
- CCI
- CCI-002422
- Version
- SQL4-00-035100
- Vuln IDs
-
- V-67911
- Rule IDs
-
- SV-82401r1_rule
Checks: C-68481r1_chk
If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding. If SQL Server, associated applications, and infrastructure do not employ protective measures against unauthorized disclosure and modification during reception, this is a finding.
Fix: F-74027r1_fix
Implement protective measures against unauthorized disclosure and modification during reception.
- RMF Control
- SI-2
- Severity
- M
- CCI
- CCI-002605
- Version
- SQL4-00-035400
- Vuln IDs
-
- V-67913
- Rule IDs
-
- SV-82403r1_rule
Checks: C-68483r1_chk
Obtain evidence that software patches are consistently applied to SQL Server within the time frame defined for each patch. If such evidence cannot be obtained, or the evidence that is obtained indicates a pattern of noncompliance, this is a finding.
Fix: F-74029r1_fix
Institute and adhere to policies and procedures to ensure that patches are consistently applied to SQL Server within the time allowed.
- RMF Control
- SI-2
- Severity
- M
- CCI
- CCI-002605
- Version
- SQL4-00-035500
- Vuln IDs
-
- V-67915
- Rule IDs
-
- SV-82405r1_rule
Checks: C-68485r1_chk
Obtain evidence that SQL Server software updates are tested before being applied to production servers, and that any exceptions are approved by the ISSM. If such evidence cannot be obtained, or the evidence that is obtained indicates a pattern of noncompliance, this is a finding.
Fix: F-74031r1_fix
Institute and adhere to policies and procedures to ensure that SQL Server updates are tested prior to installation on production servers.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-035600
- Vuln IDs
-
- V-67917
- Rule IDs
-
- SV-82407r1_rule
Checks: C-68487r1_chk
If there are no locally-defined security tables, functions, or procedures, this is not applicable. If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. Obtain the list of locally-defined security tables that require tracking of Insert-Update-Delete operations. If SQL Server Trace is in use for audit purposes, review these tables for the existence of triggers to raise a custom event on each Insert-Update-Delete operation. If such triggers are not present, this is a finding. Check to see that all required event classes are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should be among those listed; if not, this is a finding: 42 -- SP:Starting 43 -- SP:Completed 82-91 -- User-defined Event (at least one of these; 90 is used in the supplied script) 162 -- User error message If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses the broad, server-level audit action group SCHEMA_OBJECT_ACCESS_GROUP for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following to verify that all SELECT, INSERT, UPDATE, and DELETE actions on locally-defined permissions tables, and EXECUTE actions on locally-defined permissions functions and procedures, are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name = 'SCHEMA_OBJECT_ACCESS_GROUP'; If no row is returned, this is a finding. If the audited_result column is not "SUCCESS" or "SUCCESS AND FAILURE", this is a finding.
Fix: F-74033r1_fix
Where SQL Server Trace is in use, create triggers to raise a custom event on each table that requires tracking of Insert-Update-Delete operations. The examples provided in the supplemental file CustomTraceEvents.sql can serve as the basis for these. Add a block of code to the supplemental file Trace.sql for each custom event class (integers in the range 82-91; the same event class may be used for all such triggers) used in these triggers. Execute Trace.sql. If SQL Server Audit is in use, design and deploy an Audit that captures all auditable events and data items. The script provided in the supplemental file Audit.sql can be used as the basis for this. Supplement the standard audit data as necessary, using Extended Events and/or triggers. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (SCHEMA_OBJECT_ACCESS_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-035700
- Vuln IDs
-
- V-67919
- Rule IDs
-
- SV-82409r1_rule
Checks: C-68489r1_chk
If there are no locally-defined security tables, functions, or procedures, this is not applicable (NA). If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. Obtain the list of locally-defined security tables that require tracking of Insert-Update-Delete operations. If SQL Server Trace is in use for audit purposes, review these tables for the existence of triggers to raise a custom event on each Insert-Update-Delete operation. If such triggers are not present, this is a finding. Check to see that all required event classes are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should be among those listed; if not, this is a finding: 42 -- SP:Starting 43 -- SP:Completed 82-91 -- User-defined Event (at least one of these; 90 is used in the supplied script) 162 -- User error message If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses the broad, server-level audit action group SCHEMA_OBJECT_ACCESS_GROUP for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following to verify that all SELECT, INSERT, UPDATE, and DELETE actions on locally-defined permissions tables, and EXECUTE actions on locally-defined permissions functions and procedures, are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name = 'SCHEMA_OBJECT_ACCESS_GROUP'; If no row is returned, this is a finding. If the audited_result column is not "FAILURE" or "SUCCESS AND FAILURE", this is a finding.
Fix: F-74035r1_fix
Where SQL Server Trace is in use, create triggers to raise a custom event on each table that requires tracking of Insert-Update-Delete operations. The examples provided in the supplemental file CustomTraceEvents.sql can serve as the basis for these. Add a block of code to the supplemental file Trace.sql for each custom event class (integers in the range 82-91; the same event class may be used for all such triggers) used in these triggers. Execute Trace.sql. If SQL Server Audit is in use, design and deploy an Audit that captures all auditable events and data items. The script provided in the supplemental file Audit.sql can be used as the basis for this. Supplement the standard audit data as necessary, using Extended Events and/or triggers. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (SCHEMA_OBJECT_ACCESS_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-036000
- Vuln IDs
-
- V-67921
- Rule IDs
-
- SV-82411r1_rule
Checks: C-68491r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. Obtain the list of locally-defined security tables, procedures and functions (if any) that require tracking. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should all be among those listed; if not, this is a finding: 42 -- SP:Starting 43 -- SP:Completed 82-91 -- User-defined Event (required only where there are locally-defined security tables or procedures) 102 -- Audit Database Scope GDR 103 -- Audit Object GDR Event 104 -- Audit AddLogin Event 105 -- Audit Login GDR Event 108 -- Audit Add Login to Server Role Event 109 -- Audit Add DB User Event 110 -- Audit Add Member to DB Role Event 111 -- Audit Add Role Event 162 -- User error message 170 -- Audit Server Scope GDR Event 171 -- Audit Server Object GDR Event 172 -- Audit Database Object GDR Event 173 -- Audit Server Operation Event 177 -- Audit Server Principal Management Event Review the locally-defined security tables (if any) for the existence of triggers to raise a custom event on each Insert-Update-Delete operation. If such triggers are not present, this is a finding. If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses broad, server-level audit action groups for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following code to verify that all GRANT, ALTER SERVER ROLE . . . ADD MEMBER . . ., and/or ALTER ROLE . . . ADD MEMBER . . . actions, all INSERT and UPDATE actions on any locally-defined permissions tables, and all EXECUTE actions on any system or locally-defined permissions-related procedures and functions, are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name IN ( 'DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP', 'DATABASE_OBJECT_PERMISSION_CHANGE_GROUP', 'DATABASE_OWNERSHIP_CHANGE_GROUP', 'DATABASE_PERMISSION_CHANGE_GROUP', 'DATABASE_ROLE_MEMBER_CHANGE_GROUP', 'SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SERVER_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_PERMISSION_CHANGE_GROUP', 'SERVER_ROLE_MEMBER_CHANGE_GROUP', 'SCHEMA_OBJECT_ACCESS_GROUP' ); GO Examine the list produced by the query. If any locally-defined permissions tables, procedures, or functions exist, and the list does not include the audit action group SCHEMA_OBJECT_ACCESS_GROUP, this is a finding. If any of the other audit action groups specified in the WHERE clause are not included in the list, this is a finding. If the audited_result column is not "SUCCESS" or "SUCCESS AND FAILURE" on every row, this is a finding.
Fix: F-74037r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. Create triggers to raise a custom event on each locally-defined security table that requires tracking of Insert-Update-Delete operations. The examples provided in the supplemental file CustomTraceEvents.sql can serve as the basis for these. Add blocks of code to Trace.sql for each custom event class (integers in the range 82-91; the same event class may be used for all such triggers) used in these triggers. Execute Trace.sql. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (DATABASE_OBJECT_PERMISSION_CHANGE_GROUP), ADD (DATABASE_OWNERSHIP_CHANGE_GROUP), ADD (DATABASE_PERMISSION_CHANGE_GROUP), ADD (DATABASE_ROLE_MEMBER_CHANGE_GROUP), ADD (SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP), ADD (SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (SERVER_OBJECT_PERMISSION_CHANGE_GROUP), ADD (SERVER_PERMISSION_CHANGE_GROUP), ADD (SERVER_ROLE_MEMBER_CHANGE_GROUP) ; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-036100
- Vuln IDs
-
- V-67923
- Rule IDs
-
- SV-82413r1_rule
Checks: C-68493r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. Obtain the list of locally-defined security tables, procedures and functions (if any) that require tracking. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should all be among those listed; if not, this is a finding: 42 -- SP:Starting 43 -- SP:Completed 82-91 -- User-defined Event (required only where there are locally-defined security tables or procedures) 102 -- Audit Database Scope GDR 103 -- Audit Object GDR Event 104 -- Audit AddLogin Event 105 -- Audit Login GDR Event 108 -- Audit Add Login to Server Role Event 109 -- Audit Add DB User Event 110 -- Audit Add Member to DB Role Event 111 -- Audit Add Role Event 162 -- User error message 170 -- Audit Server Scope GDR Event 171 -- Audit Server Object GDR Event 172 -- Audit Database Object GDR Event 173 -- Audit Server Operation Event 177 -- Audit Server Principal Management Event Review the locally-defined security tables (if any) for the existence of triggers to raise a custom event on each Insert-Update-Delete operation. If such triggers are not present, this is a finding. If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses broad, server-level audit action groups for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following code to verify that all GRANT, ALTER SERVER ROLE . . . ADD MEMBER . . ., and/or ALTER ROLE . . . ADD MEMBER . . . actions, all INSERT and UPDATE actions on any locally-defined permissions tables, and all EXECUTE actions on any system or locally-defined permissions-related procedures and functions, are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name IN ( 'DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP', 'DATABASE_OBJECT_PERMISSION_CHANGE_GROUP', 'DATABASE_OWNERSHIP_CHANGE_GROUP', 'DATABASE_PERMISSION_CHANGE_GROUP', 'DATABASE_ROLE_MEMBER_CHANGE_GROUP', 'SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SERVER_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_PERMISSION_CHANGE_GROUP', 'SERVER_ROLE_MEMBER_CHANGE_GROUP', 'SCHEMA_OBJECT_ACCESS_GROUP' ); GO Examine the list produced by the query. If any locally-defined permissions tables, procedures, or functions exist, and the list does not include the audit action group SCHEMA_OBJECT_ACCESS_GROUP, this is a finding. If any of the other audit action groups specified in the WHERE clause are not included in the list, this is a finding. If the audited_result column is not "FAILURE" or "SUCCESS AND FAILURE" on every row, this is a finding.
Fix: F-74039r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. Create triggers to raise a custom event on each locally-defined security table that requires tracking of Insert-Update-Delete operations. The examples provided in the supplemental file CustomTraceEvents.sql can serve as the basis for these. Add blocks of code to Trace.sql for each custom event class (integers in the range 82-91; the same event class may be used for all such triggers) used in these triggers. Execute Trace.sql. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (DATABASE_OBJECT_PERMISSION_CHANGE_GROUP), ADD (DATABASE_OWNERSHIP_CHANGE_GROUP), ADD (DATABASE_PERMISSION_CHANGE_GROUP), ADD (DATABASE_ROLE_MEMBER_CHANGE_GROUP), ADD (SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP), ADD (SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP), ADD (SERVER_OBJECT_PERMISSION_CHANGE_GROUP), ADD (SERVER_PERMISSION_CHANGE_GROUP), ADD (SERVER_ROLE_MEMBER_CHANGE_GROUP) ; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-036900
- Vuln IDs
-
- V-67925
- Rule IDs
-
- SV-82415r1_rule
Checks: C-68495r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. Obtain the list of locally-defined security tables (if any) that require tracking of Insert-Update-Delete operations. If SQL Server Trace is in use for audit purposes, review these tables for the existence of triggers to raise a custom event on each Insert-Update-Delete operation. If such triggers are not present, this is a finding. Check to see that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should all be among those listed; if not, this is a finding: 42 -- SP:Starting 43 -- SP:Completed 82-91 -- User-defined Event (required only where there are locally-defined security tables or procedures) 102 -- Audit Database Scope GDR 103 -- Audit Object GDR Event 104 -- Audit AddLogin Event 105 -- Audit Login GDR Event 108 -- Audit Add Login to Server Role Event 109 -- Audit Add DB User Event 110 -- Audit Add Member to DB Role Event 111 -- Audit Add Role Event 162 -- User error message 170 -- Audit Server Scope GDR Event 171 -- Audit Server Object GDR Event 172 -- Audit Database Object GDR Event 173 -- Audit Server Operation Event 177 -- Audit Server Principal Management Event If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses broad, server-level audit action groups for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following code to verify that all GRANT, ALTER SERVER ROLE . . . ADD MEMBER . . ., and/or ALTER ROLE . . . ADD MEMBER . . . actions, all INSERT and UPDATE actions on any locally-defined permissions tables, and all EXECUTE actions on any system or locally-defined permissions-related procedures and functions, are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name IN ( 'DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP', 'DATABASE_OBJECT_PERMISSION_CHANGE_GROUP', 'DATABASE_OWNERSHIP_CHANGE_GROUP', 'DATABASE_PERMISSION_CHANGE_GROUP', 'DATABASE_ROLE_MEMBER_CHANGE_GROUP', 'SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SERVER_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_PERMISSION_CHANGE_GROUP', 'SERVER_ROLE_MEMBER_CHANGE_GROUP', 'SCHEMA_OBJECT_ACCESS_GROUP' ); GO Examine the list produced by the query. If any locally-defined permissions tables, procedures, or functions exist, and the list does not include the audit action group SCHEMA_OBJECT_ACCESS_GROUP, this is a finding. If any of the other audit action groups specified in the WHERE clause are not included in the list, this is a finding. If the audited_result column is not "SUCCESS" or "SUCCESS AND FAILURE" on every row, this is a finding.
Fix: F-74041r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. Add blocks of code to Trace.sql for each custom event class (integers in the range 82-91; the same event class may be used for all such triggers) used in these triggers. Create triggers to raise a custom event on each locally-defined security table that requires tracking of Insert-Update-Delete operations. The examples provided in the supplemental file CustomTraceEvents.sql can serve as the basis for these. Execute Trace.sql. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (SCHEMA_OBJECT_ACCESS_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-037000
- Vuln IDs
-
- V-67927
- Rule IDs
-
- SV-82417r1_rule
Checks: C-68497r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. Obtain the list of locally-defined security tables (if any) that require tracking of Insert-Update-Delete operations. If SQL Server Trace is in use for audit purposes, review these tables for the existence of triggers to raise a custom event on each Insert-Update-Delete operation. If such triggers are not present, this is a finding. Check to see that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should all be among those listed; if not, this is a finding: 42 -- SP:Starting 43 -- SP:Completed 82-91 -- User-defined Event (required only where there are locally-defined security tables or procedures) 102 -- Audit Database Scope GDR 103 -- Audit Object GDR Event 104 -- Audit AddLogin Event 105 -- Audit Login GDR Event 108 -- Audit Add Login to Server Role Event 109 -- Audit Add DB User Event 110 -- Audit Add Member to DB Role Event 111 -- Audit Add Role Event 162 -- User error message 170 -- Audit Server Scope GDR Event 171 -- Audit Server Object GDR Event 172 -- Audit Database Object GDR Event 173 -- Audit Server Operation Event 177 -- Audit Server Principal Management Event If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses broad, server-level audit action groups for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following code to verify that all GRANT, ALTER SERVER ROLE . . . ADD MEMBER . . ., and/or ALTER ROLE . . . ADD MEMBER . . . actions, all INSERT and UPDATE actions on any locally-defined permissions tables, and all EXECUTE actions on any system or locally-defined permissions-related procedures and functions, are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name IN ( 'DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP', 'DATABASE_OBJECT_PERMISSION_CHANGE_GROUP', 'DATABASE_OWNERSHIP_CHANGE_GROUP', 'DATABASE_PERMISSION_CHANGE_GROUP', 'DATABASE_ROLE_MEMBER_CHANGE_GROUP', 'SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP', 'SERVER_OBJECT_PERMISSION_CHANGE_GROUP', 'SERVER_PERMISSION_CHANGE_GROUP', 'SERVER_ROLE_MEMBER_CHANGE_GROUP', 'SCHEMA_OBJECT_ACCESS_GROUP' ); GO Examine the list produced by the query. If any locally-defined permissions tables, procedures, or functions exist, and the list does not include the audit action group SCHEMA_OBJECT_ACCESS_GROUP, this is a finding. If any of the other audit action groups specified in the WHERE clause are not included in the list, this is a finding. If the audited_result column is not "FAILURE" or "SUCCESS AND FAILURE" on every row, this is a finding.
Fix: F-74043r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. Add blocks of code to Trace.sql for each custom event class (integers in the range 82-91; the same event class may be used for all such triggers) used in these triggers. Create triggers to raise a custom event on each locally-defined security table that requires tracking of Insert-Update-Delete operations. The examples provided in the supplemental file CustomTraceEvents.sql can serve as the basis for these. Execute Trace.sql Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (SCHEMA_OBJECT_ACCESS_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-037500
- Vuln IDs
-
- V-67929
- Rule IDs
-
- SV-82419r1_rule
Checks: C-68499r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should all be among those listed; if not, this is a finding: 14 -- Audit Login 15 -- Audit Logout 16 -- Attention 17 -- ExistingConnection If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses the server-level audit action group SUCCESSFUL_LOGIN_GROUP for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following to verify that all logons and connections are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name = 'SUCCESSFUL_LOGIN_GROUP'; GO If no row is returned, this is a finding. If the audited_result column is not "SUCCESS" or "SUCCESS AND FAILURE", this is a finding.
Fix: F-74045r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (SUCCESSFUL_LOGIN_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-037600
- Vuln IDs
-
- V-67931
- Rule IDs
-
- SV-82421r1_rule
Checks: C-68501r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event ID should be among those listed; if not, this is a finding: 20 -- Audit Login Failed If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses the server-level audit action group FAILED_LOGIN_GROUP for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following to verify that all logons and connections are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name = 'FAILED_LOGIN_GROUP'; GO If no row is returned, this is a finding. If the audited_result column is not "FAILURE" or "SUCCESS AND FAILURE", this is a finding.
Fix: F-74047r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (FAILED_LOGIN_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-037700
- Vuln IDs
-
- V-67933
- Rule IDs
-
- SV-82423r1_rule
Checks: C-68503r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should all be among those listed; if not, this is a finding: 46 -- Object:Created 47 -- Object:Deleted 82-91 -- User-defined Event (required only where there are locally-defined auditable actions) 115 -- Audit Backup/Restore Event 116 -- Audit DBCC Event 117 -- Audit Change Audit Event 118 -- Audit Object Derived Permission Event 128 -- Audit Database Management Event 129 -- Audit Database Object Management Event 130 -- Audit Database Principal Management Event 131 -- Audit Schema Object Management Event 164 -- Object:Altered 170 -- Audit Server Scope GDR Event 171 -- Audit Server Object GDR Event 172 -- Audit Database Object GDR Event 173 -- Audit Server Operation Event 175 -- Audit Server Alter Trace Event 176 -- Audit Server Object Management Event 177 -- Audit Server Principal Management Event From the system security plan, obtain the list of any other actions considered privileged. For each, verify that event IDs (and triggers, where necessary) have been defined to capture audit information for these. If they have not, this is a finding. If SQL Server Audit is in use, verify that execution of all CREATE, ALTER, DROP, GRANT, REVOKE and DENY statements, all execution of security-related functions and procedures, and all other actions locally defined as privileged, is audited. If any such actions are not audited, this is a finding. If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses broad, server-level audit action groups for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following code to verify that all configuration-related actions are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>'); GO Examine the list produced by the query. If the audited_result column is not "SUCCESS" or "SUCCESS AND FAILURE" on every row, this is a finding. If any of the audit action groups listed below is not included in the query results, this is a finding. If there are locally-defined privileged activities not encompassed by the list below and not tracked in any other way, this is a finding. APPLICATION_ROLE_CHANGE_PASSWORD_GROUP AUDIT_CHANGE_GROUP BACKUP_RESTORE_GROUP DATABASE_CHANGE_GROUP DATABASE_OBJECT_ACCESS_GROUP DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP DBCC_GROUP FAILED_LOGIN_GROUP LOGIN_CHANGE_PASSWORD_GROUP LOGOUT_GROUP SCHEMA_OBJECT_ACCESS_GROUP SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP SERVER_OBJECT_CHANGE_GROUP SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP SERVER_OBJECT_PERMISSION_CHANGE_GROUP SERVER_OPERATION_GROUP SERVER_PERMISSION_CHANGE_GROUP SERVER_PRINCIPAL_CHANGE_GROUP SERVER_PRINCIPAL_IMPERSONATION_GROUP SERVER_ROLE_MEMBER_CHANGE_GROUP SERVER_STATE_CHANGE_GROUP SUCCESSFUL_LOGIN_GROUP TRACE_CHANGE_GROUP
Fix: F-74049r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. For additional actions considered privileged, identify the available event class IDs, or define custom event class IDs (integers in the range 82-91). Add blocks of code for these event IDs to Trace.sql. Execute Trace.sql. Define triggers as necessary to support data capture. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used to create an audit; supplement it as necessary to capture any additional, locally-defined privileged activity.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-037800
- Vuln IDs
-
- V-67935
- Rule IDs
-
- SV-82425r1_rule
Checks: C-68505r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should all be among those listed; if not, this is a finding: 46 -- Object:Created 47 -- Object:Deleted 82-91 -- User-defined Event (required only where there are locally-defined auditable actions) 115 -- Audit Backup/Restore Event 116 -- Audit DBCC Event 117 -- Audit Change Audit Event 118 -- Audit Object Derived Permission Event 128 -- Audit Database Management Event 129 -- Audit Database Object Management Event 130 -- Audit Database Principal Management Event 131 -- Audit Schema Object Management Event 164 -- Object:Altered 170 -- Audit Server Scope GDR Event 171 -- Audit Server Object GDR Event 172 -- Audit Database Object GDR Event 173 -- Audit Server Operation Event 175 -- Audit Server Alter Trace Event 176 -- Audit Server Object Management Event 177 -- Audit Server Principal Management Event From the system security plan, obtain the list of any other actions considered privileged. For each, verify that event IDs (and triggers, where necessary) have been defined to capture audit information for these. If they have not been defined to capture audit information, this is a finding. If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses broad, server-level audit action groups for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following code to verify that all configuration-related actions are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>'); GO Examine the list produced by the query.. If the audited_result column is not "FAILURE" or "SUCCESS AND FAILURE" on every row, this is a finding. If any of the audit action groups listed below is not included in the query results, this is a finding. If there are locally-defined privileged activities not encompassed by the list below and not tracked in any other way, this is a finding. APPLICATION_ROLE_CHANGE_PASSWORD_GROUP AUDIT_CHANGE_GROUP BACKUP_RESTORE_GROUP DATABASE_CHANGE_GROUP DATABASE_OBJECT_ACCESS_GROUP DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP DATABASE_ROLE_MEMBER_CHANGE_GROUP DBCC_GROUP FAILED_LOGIN_GROUP LOGIN_CHANGE_PASSWORD_GROUP LOGOUT_GROUP SCHEMA_OBJECT_ACCESS_GROUP SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP SERVER_OBJECT_CHANGE_GROUP SERVER_OBJECT_OWNERSHIP_CHANGE_GROUP SERVER_OBJECT_PERMISSION_CHANGE_GROUP SERVER_OPERATION_GROUP SERVER_PERMISSION_CHANGE_GROUP SERVER_PRINCIPAL_CHANGE_GROUP SERVER_PRINCIPAL_IMPERSONATION_GROUP SERVER_ROLE_MEMBER_CHANGE_GROUP SERVER_STATE_CHANGE_GROUP SUCCESSFUL_LOGIN_GROUP TRACE_CHANGE_GROUP
Fix: F-74051r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. For additional actions considered privileged, identify the available event class IDs, or define custom event class IDs (integers in the range 82-91). Add blocks of code for these event IDs to Trace.sql. Execute Trace.sql. Define triggers as necessary to support data capture. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used to create an audit; supplement it as necessary to capture any additional, locally-defined privileged activity.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-037900
- Vuln IDs
-
- V-67937
- Rule IDs
-
- SV-82427r1_rule
Checks: C-68507r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should be among those listed; if not, this is a finding: 14 -- Audit Login 15 -- Audit Logout 16 -- Attention 17 -- ExistingConnection If SQL Server Audit is in use, proceed as follows. The basic SQL Server Audit configuration provided in the supplemental file Audit.sql uses the server-level audit action group LOGOUT_GROUP for this purpose. SQL Server Audit's flexibility makes other techniques possible. If an alternative technique is in use and demonstrated effective, this is not a finding. Determine the name(s) of the server audit specification(s) in use. Run the following to verify that all logons and connections are being audited: USE [master]; GO SELECT * FROM sys.server_audit_specification_details WHERE server_specification_id = (SELECT server_specification_id FROM sys.server_audit_specifications WHERE [name] = '<server_audit_specification_name>') AND audit_action_name = 'LOGOUT_GROUP'; GO If no row is returned, this is a finding. If the audited_result column is not "SUCCESS AND FAILURE", this is a finding.
Fix: F-74053r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. Where SQL Server Audit is in use, design and deploy a SQL Server Audit that captures all auditable events. The script provided in the supplemental file Audit.sql can be used for this. Alternatively, to add the necessary data capture to an existing server audit specification, run the script: USE [master]; GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = OFF); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> ADD (LOGOUT_GROUP); GO ALTER SERVER AUDIT SPECIFICATION <server_audit_specification_name> WITH (STATE = ON); GO
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- SQL4-00-038000
- Vuln IDs
-
- V-67939
- Rule IDs
-
- SV-82429r1_rule
Checks: C-68509r1_chk
If neither SQL Server Audit nor SQL Server Trace is in use for audit purposes, this is a finding. If SQL Server Trace is in use for audit purposes, verify that all required events are being audited. From the query prompt: SELECT * FROM sys.traces; All currently defined traces for the SQL server instance will be listed. If no traces are returned, this is a finding. Determine the trace(s) being used for the auditing requirement. In the following, replace # with a trace ID being used for the auditing requirements. From the query prompt: SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The following required event IDs should be among those listed; if not, this is a finding: 14 -- Audit Login 15 -- Audit Logout 16 -- Attention 17 -- ExistingConnection If SQL Server Audit is in use, verify that the SUCCESSFUL_LOGIN_GROUP and LOGOUT_GROUP are enabled, as described in other STIG requirements; if not, this is a finding.
Fix: F-74055r1_fix
Where SQL Server Trace is in use, define and enable a trace that captures all auditable events. The script provided in the supplemental file Trace.sql can be used to do this. Where SQL Server Audit is in use, enable the SUCCESSFUL_LOGIN_GROUP and LOGOUT_GROUP, as described in other STIG requirements.
- RMF Control
- AU-4
- Severity
- M
- CCI
- CCI-001851
- Version
- SQL4-00-038700
- Vuln IDs
-
- V-67941
- Rule IDs
-
- SV-82431r1_rule
Checks: C-68511r1_chk
Review the system documentation for a description of how audit records are off-loaded. If the database server has a continuous network connection to the centralized log management system, but the SQL Server audit records are not written directly to the centralized log management system or transferred in near-real-time, this is a finding. If the database server does not have a continuous network connection to the centralized log management system, and the SQL Server audit records are not transferred to the centralized log management system weekly or more often, this is a finding.
Fix: F-74057r1_fix
Deploy and configure software tools to transfer audit records to a centralized log management system, continuously and in near-real time where a continuous network connection to the log management system exists, or at least weekly in the absence of such a connection.
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000192
- Version
- SQL4-00-038900
- Vuln IDs
-
- V-67943
- Rule IDs
-
- SV-82433r1_rule
Checks: C-68513r1_chk
Run the statement: SELECT name FROM sys.sql_logins WHERE type_desc = 'SQL_LOGIN' AND is_disabled = 0 AND is_policy_checked = 0 ; If no account names are listed, this is not a finding. For each account name listed, determine whether it is documented as requiring exemption from the standard password complexity rules, if it is not, this is a finding.
Fix: F-74059r1_fix
For each SQL Server Login identified in the Check as out of compliance: In SQL Server Management Studio Object Explorer, navigate to <SQL Server instance name> >> Security >> Logins >> <login name>. Right-click, select Properties. Select the check box Enforce Password Policy. Click OK. Alternatively, for each identified Login, run the statement: ALTER LOGIN <login name> CHECK_POLICY = ON;
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000198
- Version
- SQL4-00-038910
- Vuln IDs
-
- V-67945
- Rule IDs
-
- SV-82435r1_rule
Checks: C-68515r1_chk
Run the statement: SELECT name FROM sys.sql_logins WHERE type_desc = 'SQL_LOGIN' AND is_disabled = 0 AND is_expiration_checked = 0; If no account names are listed, this is not a finding. For each account name listed, determine whether it is documented as requiring exemption from the standard password lifetime rules, if it is not, this is a finding.
Fix: F-74061r1_fix
For each SQL Server Login identified in the Check as out of compliance: In SQL Server Management Studio Object Explorer, navigate to <SQL Server instance name> >> Security >> Logins >> <login name>. Right-click, select Properties. Select the check box Enforce Password Expiration. Click OK. Alternatively, for each identified Login, run the statement: ALTER LOGIN <login name> CHECK_EXPIRATION = ON;