Skip to content

Commit 9be4603

Browse files
authored
Merge pull request #14008 from Arden97/monitor_networkmanager
Adding rules for /etc/hostname and NetworkManager auditd monitoring
2 parents 1ad6a8d + 8c8ce27 commit 9be4603

File tree

8 files changed

+69
-5
lines changed

8 files changed

+69
-5
lines changed

components/audit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ rules:
132132
- audit_rules_mac_modification_usr_share
133133
- audit_rules_media_export
134134
- audit_rules_networkconfig_modification
135+
- audit_rules_networkconfig_modification_hostname_file
135136
- audit_rules_networkconfig_modification_network_scripts
137+
- audit_rules_networkconfig_modification_networkmanager
136138
- audit_rules_privileged_commands
137139
- audit_rules_privileged_commands_apparmor_parser
138140
- audit_rules_privileged_commands_at

controls/cis_rhel9.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,11 +2611,11 @@ controls:
26112611
- l2_server
26122612
- l2_workstation
26132613
status: partial
2614-
notes: |-
2615-
These rules are not covering "/etc/hostname" and "/etc/NetworkManager/".
26162614
rules:
26172615
- audit_rules_networkconfig_modification
2616+
- audit_rules_networkconfig_modification_hostname_file
26182617
- audit_rules_networkconfig_modification_network_scripts
2618+
- audit_rules_networkconfig_modification_networkmanager
26192619

26202620
- id: 6.3.3.6
26212621
title: Ensure use of privileged commands are collected (Automated)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
documentation_complete: true
2+
3+
title: 'Record Events that Modify the System''s Network Environment - /etc/hostname'
4+
5+
description: |-
6+
{{{ describe_audit_rules_watch("/etc/hostname", "audit_rules_networkconfig_modification_hostname_file") }}}
7+
8+
rationale: |-
9+
The network environment should not be modified by anything other
10+
than administrator action. Any change to network parameters should be
11+
audited.
12+
13+
severity: medium
14+
15+
identifiers:
16+
cce@rhel9: CCE-86603-8
17+
18+
ocil_clause: 'the system is not configured to audit changes of the network configuration'
19+
20+
ocil: |-
21+
To determine if the system is configured to audit changes to its network configuration,
22+
run the following command:
23+
<pre>auditctl -l | grep -E '/etc/hostname'</pre>
24+
If the system is configured to watch for network configuration changes, a line should
25+
be returned and <tt>perm=wa</tt> should be indicated.
26+
27+
template:
28+
name: audit_rules_watch
29+
vars:
30+
path: /etc/hostname

linux_os/guide/auditing/auditd_configure_rules/audit_rules_networkconfig_modification_network_scripts/rule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
documentation_complete: true
22

3-
title: 'Record Events that Modify the System''s Network Environment'
3+
title: 'Record Events that Modify the System''s Network Environment - /etc/sysconfig/network-scripts'
44

55
description: |-
66
{{{ describe_audit_rules_watch("/etc/sysconfig/network-scripts", "audit_rules_networkconfig_modification_network_scripts") }}}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
documentation_complete: true
2+
3+
title: 'Record Events that Modify the System''s Network Environment - /etc/NetworkManager/'
4+
5+
description: |-
6+
{{{ describe_audit_rules_watch("/etc/NetworkManager", "audit_rules_networkconfig_modification_networkmanager") }}}
7+
8+
rationale: |-
9+
The network environment should not be modified by anything other
10+
than administrator action. Any change to network parameters should be
11+
audited.
12+
13+
severity: medium
14+
15+
identifiers:
16+
cce@rhel9: CCE-86481-9
17+
18+
ocil_clause: 'the system is not configured to audit changes of the network configuration'
19+
20+
ocil: |-
21+
To determine if the system is configured to audit changes to its network configuration,
22+
run the following command:
23+
<pre>auditctl -l | grep -E '/etc/NetworkManager'</pre>
24+
If the system is configured to watch for network configuration changes, a line should
25+
be returned and <tt>perm=wa</tt> should be indicated.
26+
27+
template:
28+
name: audit_rules_watch
29+
vars:
30+
path: /etc/NetworkManager

shared/references/cce-redhat-avail.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ CCE-86465-2
77
CCE-86466-0
88
CCE-86468-6
99
CCE-86469-4
10-
CCE-86481-9
1110
CCE-86482-7
1211
CCE-86483-5
1312
CCE-86484-3
@@ -37,7 +36,6 @@ CCE-86598-0
3736
CCE-86600-4
3837
CCE-86601-2
3938
CCE-86602-0
40-
CCE-86603-8
4139
CCE-86604-6
4240
CCE-86627-7
4341
CCE-86629-3

tests/data/profile_stability/rhel9/cis.profile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ audit_rules_mac_modification
6969
audit_rules_mac_modification_usr_share
7070
audit_rules_media_export
7171
audit_rules_networkconfig_modification
72+
audit_rules_networkconfig_modification_hostname_file
7273
audit_rules_networkconfig_modification_network_scripts
74+
audit_rules_networkconfig_modification_networkmanager
7375
audit_rules_privileged_commands
7476
audit_rules_privileged_commands_kmod
7577
audit_rules_privileged_commands_usermod

tests/data/profile_stability/rhel9/cis_workstation_l2.profile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ audit_rules_mac_modification
6969
audit_rules_mac_modification_usr_share
7070
audit_rules_media_export
7171
audit_rules_networkconfig_modification
72+
audit_rules_networkconfig_modification_hostname_file
7273
audit_rules_networkconfig_modification_network_scripts
74+
audit_rules_networkconfig_modification_networkmanager
7375
audit_rules_privileged_commands
7476
audit_rules_privileged_commands_kmod
7577
audit_rules_privileged_commands_usermod

0 commit comments

Comments
 (0)