forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rule audit_rules_networkconfig_modification_network_scripts
This commit adds a new rule that checks if an audit watch is configured on /etc/sysconfig/network-scripts. Then, this rule is added to RHEL CIS profiles. The CIS Benchmarks require changes on /etc/sysconfig/network-scripts to be audited. We could add this audit rule to existing rule audit_rules_networkconfig_modification. However, we decided to create a new rule. The rule audit_rules_networkconfig_modification is already overloaded by having many items in a single rule. The rule is also used in many different profiles in many products so the rule scope change could cause unpredicted effects in some of these profiles. Also, we expect /etc/sysconfig/network-scripts to be deprecated in future RHEL so creating a separate rule will help us to easily exclude this audit rule from other products. Resolves: RHEL-29308
- Loading branch information
Showing
12 changed files
with
50 additions
and
5 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
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
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
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
40 changes: 40 additions & 0 deletions
40
...ng/auditd_configure_rules/audit_rules_networkconfig_modification_network_scripts/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,40 @@ | ||
documentation_complete: true | ||
|
||
title: 'Record Events that Modify the System''s Network Environment' | ||
|
||
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/sysconfig/network-scripts -p wa -k audit_rules_networkconfig_modification_network_scripts</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/sysconfig/network-scripts -p wa -k audit_rules_networkconfig_modification_network_scripts</pre> | ||
rationale: |- | ||
The network environment should not be modified by anything other | ||
than administrator action. Any change to network parameters should be | ||
audited. | ||
severity: medium | ||
|
||
identifiers: | ||
cce@rhel7: CCE-86938-8 | ||
cce@rhel8: CCE-86939-6 | ||
cce@rhel9: CCE-86940-4 | ||
|
||
ocil_clause: 'the system is not configured to audit changes of the network configuration' | ||
|
||
ocil: |- | ||
To determine if the system is configured to audit changes to its network configuration, | ||
run the following command: | ||
<pre>auditctl -l | grep -E '/etc/sysconfig/network-scripts'</pre> | ||
If the system is configured to watch for network configuration changes, a line should | ||
be returned and <tt>perm=wa</tt> should be indicated. | ||
template: | ||
name: audit_rules_watch | ||
vars: | ||
path: /etc/sysconfig/network-scripts |
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
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
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
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
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
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
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