SV-208910r603263_rule
V-208910
SRG-OS-000064
OL6-00-000202
CAT II
10
Add the following to "/etc/audit/audit.rules" in order to capture kernel module loading and unloading events:
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b32 -S init_module -S delete_module -k modules
If the system is 64-bit, then also add the following:
-a always,exit -F arch=b64 -S init_module -S delete_module -k modules
To determine if the system is configured to audit execution of module management programs, run the following commands:
sudo egrep -e "(-w |-F path=)/sbin/insmod|(-w |-F path=)/sbin/rmmod|(-w |-F path=)/sbin/modprobe" /etc/audit/audit.rules
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
If "/sbin/insmod" is not being audited, this is a finding.
If "/sbin/rmmod" is not being audited, this is a finding.
If "/sbin/modprobe" is not being audited, this is a finding.
To determine if the system is configured to audit calls to the "init_module" and "delete_module" system calls, run the following command:
$ sudo egrep -w "init_module|delete_module" /etc/audit/audit.rules
-a always,exit -F arch=b32 -S init_module -S delete_module -k modules
-a always,exit -F arch=b64 -S init_module -S delete_module -k modules
If the system is 64-bit and does not return rules for both "b32" and "b64" architectures, this is a finding.
If the system is not configured to audit "init_module" this is a finding.
If the system is not configured to audit "delete_module", this is a finding.
If no line is returned, this is a finding.
V-208910
False
OL6-00-000202
To determine if the system is configured to audit execution of module management programs, run the following commands:
sudo egrep -e "(-w |-F path=)/sbin/insmod|(-w |-F path=)/sbin/rmmod|(-w |-F path=)/sbin/modprobe" /etc/audit/audit.rules
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
If "/sbin/insmod" is not being audited, this is a finding.
If "/sbin/rmmod" is not being audited, this is a finding.
If "/sbin/modprobe" is not being audited, this is a finding.
To determine if the system is configured to audit calls to the "init_module" and "delete_module" system calls, run the following command:
$ sudo egrep -w "init_module|delete_module" /etc/audit/audit.rules
-a always,exit -F arch=b32 -S init_module -S delete_module -k modules
-a always,exit -F arch=b64 -S init_module -S delete_module -k modules
If the system is 64-bit and does not return rules for both "b32" and "b64" architectures, this is a finding.
If the system is not configured to audit "init_module" this is a finding.
If the system is not configured to audit "delete_module", this is a finding.
If no line is returned, this is a finding.
M
2928