Rule ID
SV-289281r1319412_rule
Version
V1R1
CCIs
Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. System documentation should include a definition of the functionality considered privileged. A privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: CREATE ALTER DROP GRANT REVOKE DENY Note that it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Review the system documentation to determine if MySQL Server is required to audit for unsuccessful attempts to execute privileged activities or other system-level access. Verify the MySQL Enterprise Audit component is installed: SELECT * FROM mysql.component WHERE component_urn = 'file://component_audit_log'; If no row is returned, this is a finding. Verify audit logging has not been disabled: SHOW GLOBAL VARIABLES LIKE 'audit_log.disable'; If "audit_log.disable" is "ON", this is a finding. Review audit filters and associated users by running the following queries: SELECT `audit_log_filter`.`NAME`, `audit_log_filter`.`FILTER` FROM `mysql`.`audit_log_filter`; SELECT `audit_log_user`.`USER`, `audit_log_user`.`HOST`, `audit_log_user`.`FILTERNAME` FROM `mysql`.`audit_log_user`; All currently defined audits for the MySQL server instance will be listed. If no audits are returned, this is a finding. Determine if rules are in place to capture the following types of commands related to permissions by running: SELECT * FROM mysql.audit_log_filter; If the template SQL filter was used, it will have the name "log_stig". Review the filter values. Ensure filters for events based on the "general_sql_command.str" field capture the following SQL statement types: grant grant_roles revoke revoke_all revoke_roles drop_role alter_user_default_role create_role set_role create_user alter_user drop_user rename_user show_create_user
Configure the MySQL Database Server to audit for unsuccessful attempts to execute privileged activities or other system-level access. Add the following events to the MySQL Server Audit: grant grant_roles revoke revoke_all revoke_roles drop_role alter_user_default_role create_role set_role create_user alter_user drop_user rename_user show_create_user Refer to the following link for more information: https://dev.mysql.com/doc/refman/9.7/en/audit-log-component.html.