diff --git a/components/audit.yml b/components/audit.yml index 3f0bca95a1f..91c37871763 100644 --- a/components/audit.yml +++ b/components/audit.yml @@ -124,6 +124,8 @@ rules: - audit_rules_login_events_lastlog - audit_rules_login_events_tallylog - audit_rules_mac_modification +- audit_rules_mac_modification_etc_apparmor +- audit_rules_mac_modification_etc_apparmor_d - audit_rules_mac_modification_usr_share - audit_rules_media_export - audit_rules_networkconfig_modification diff --git a/controls/cis_ubuntu2404.yml b/controls/cis_ubuntu2404.yml index c6cb97fa55b..57f2d15d1b4 100644 --- a/controls/cis_ubuntu2404.yml +++ b/controls/cis_ubuntu2404.yml @@ -2682,7 +2682,8 @@ controls: - l2_server - l2_workstation rules: - - audit_rules_mac_modification + - audit_rules_mac_modification_etc_apparmor + - audit_rules_mac_modification_etc_apparmor_d status: automated - id: 6.2.3.15 diff --git a/linux_os/guide/auditing/auditd_configure_rules/audit_rules_mac_modification_etc_apparmor/rule.yml b/linux_os/guide/auditing/auditd_configure_rules/audit_rules_mac_modification_etc_apparmor/rule.yml new file mode 100644 index 00000000000..dfd96070dd8 --- /dev/null +++ b/linux_os/guide/auditing/auditd_configure_rules/audit_rules_mac_modification_etc_apparmor/rule.yml @@ -0,0 +1,36 @@ +documentation_complete: true + +title: 'Record Events that Modify the System''s Mandatory Access Controls (/etc/apparmor)' + +description: |- + If the auditd daemon is configured to use the + augenrules program to read audit rules during daemon startup (the + default), add the following line to a file with suffix .rules in the + directory /etc/audit/rules.d: +
-w /etc/apparmor/ -p wa -k MAC-policy
+ If the auditd daemon is configured to use the auditctl + utility to read audit rules during daemon startup, add the following line to + /etc/audit/audit.rules file: +
-w /etc/apparmor/ -p wa -k MAC-policy
+ +rationale: |- + The system's mandatory access policy (Apparmor) should not be + arbitrarily changed by anything other than administrator action. All changes to + MAC policy should be audited. + +severity: medium + +ocil_clause: 'the system is not configured to audit attempts to change files within the /etc/apparmor directory' + +ocil: |- + To determine if the system is configured to audit changes to its Apparmor + configuration files, run the following command: +
$ sudo auditctl -l | grep "dir=/etc/apparmor"
+ If the system is configured to watch for changes to its Apparmor + configuration, a line should be returned (including + perm=wa indicating permissions that are watched). + +template: + name: audit_rules_watch + vars: + path: /etc/apparmor diff --git a/linux_os/guide/auditing/auditd_configure_rules/audit_rules_mac_modification_etc_apparmor_d/rule.yml b/linux_os/guide/auditing/auditd_configure_rules/audit_rules_mac_modification_etc_apparmor_d/rule.yml new file mode 100644 index 00000000000..dfe335655d2 --- /dev/null +++ b/linux_os/guide/auditing/auditd_configure_rules/audit_rules_mac_modification_etc_apparmor_d/rule.yml @@ -0,0 +1,36 @@ +documentation_complete: true + +title: 'Record Events that Modify the System''s Mandatory Access Controls (/etc/apparmor.d)' + +description: |- + If the auditd daemon is configured to use the + augenrules program to read audit rules during daemon startup (the + default), add the following line to a file with suffix .rules in the + directory /etc/audit/rules.d: +
-w /etc/apparmor.d/ -p wa -k MAC-policy
+ If the auditd daemon is configured to use the auditctl + utility to read audit rules during daemon startup, add the following line to + /etc/audit/audit.rules file: +
-w /etc/apparmor.d/ -p wa -k MAC-policy
+ +rationale: |- + The system's mandatory access policy (Apparmor) should not be + arbitrarily changed by anything other than administrator action. All changes to + MAC policy should be audited. + +severity: medium + +ocil_clause: 'the system is not configured to audit attempts to change files within the /etc/apparmor.d directory' + +ocil: |- + To determine if the system is configured to audit changes to its Apparmor + configuration files, run the following command: +
$ sudo auditctl -l | grep "dir=/etc/apparmor.d"
+ If the system is configured to watch for changes to its Apparmor + configuration, a line should be returned (including + perm=wa indicating permissions that are watched). + +template: + name: audit_rules_watch + vars: + path: /etc/apparmor.d