forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new rules to replace audit_rules_mac_modification on Ubuntu
Analogous to PR ComplianceAsCode#12826
- Loading branch information
Showing
4 changed files
with
74 additions
and
2,580 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
.../guide/auditing/auditd_configure_rules/audit_rules_mac_modification_etc_apparmor/rule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
documentation_complete: true | ||
|
||
title: 'Record Events that Modify the System''s Mandatory Access Controls (/etc/apparmor)' | ||
|
||
description: |- | ||
If the <tt>auditd</tt> daemon is configured to use the | ||
<tt>augenrules</tt> program to read audit rules during daemon startup (the | ||
default), add the following line to a file with suffix <tt>.rules</tt> in the | ||
directory <tt>/etc/audit/rules.d</tt>: | ||
<pre>-w /etc/apparmor/ -p wa -k MAC-policy</pre> | ||
If the <tt>auditd</tt> daemon is configured to use the <tt>auditctl</tt> | ||
utility to read audit rules during daemon startup, add the following line to | ||
<tt>/etc/audit/audit.rules</tt> file: | ||
<pre>-w /etc/apparmor/ -p wa -k MAC-policy</pre> | ||
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: | ||
<pre>$ sudo auditctl -l | grep "dir=/etc/apparmor"</pre> | ||
If the system is configured to watch for changes to its Apparmor | ||
configuration, a line should be returned (including | ||
<tt>perm=wa</tt> indicating permissions that are watched). | ||
template: | ||
name: audit_rules_watch | ||
vars: | ||
path: /etc/apparmor |
36 changes: 36 additions & 0 deletions
36
...uide/auditing/auditd_configure_rules/audit_rules_mac_modification_etc_apparmor_d/rule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
documentation_complete: true | ||
|
||
title: 'Record Events that Modify the System''s Mandatory Access Controls (/etc/apparmor.d)' | ||
|
||
description: |- | ||
If the <tt>auditd</tt> daemon is configured to use the | ||
<tt>augenrules</tt> program to read audit rules during daemon startup (the | ||
default), add the following line to a file with suffix <tt>.rules</tt> in the | ||
directory <tt>/etc/audit/rules.d</tt>: | ||
<pre>-w /etc/apparmor.d/ -p wa -k MAC-policy</pre> | ||
If the <tt>auditd</tt> daemon is configured to use the <tt>auditctl</tt> | ||
utility to read audit rules during daemon startup, add the following line to | ||
<tt>/etc/audit/audit.rules</tt> file: | ||
<pre>-w /etc/apparmor.d/ -p wa -k MAC-policy</pre> | ||
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: | ||
<pre>$ sudo auditctl -l | grep "dir=/etc/apparmor.d"</pre> | ||
If the system is configured to watch for changes to its Apparmor | ||
configuration, a line should be returned (including | ||
<tt>perm=wa</tt> indicating permissions that are watched). | ||
template: | ||
name: audit_rules_watch | ||
vars: | ||
path: /etc/apparmor.d |
Oops, something went wrong.