You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The audit_file_deletion_events rule checks for the `renameat`
syscall. However, there is a similar syscall `renameat2` which
should be checked as well. We don't have a rule for it so in
this commit we will create a new rule and add `renameat2` syscall
everywhere where `renameat` syscall is used.
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events/bash/shared.sh
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events/oval/shared.xml
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events/rule.yml
+6-2
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,12 @@ description: |-
10
10
default), add the following line to a file with suffix <tt>.rules</tt> in the
11
11
directory <tt>/etc/audit/rules.d</tt>, setting ARCH to either b32 for 32-bit
12
12
system, or having two lines for both b32 and b64 in case your system is 64-bit:
{{{ full_name }}} must audit all uses of the rename,unlink,rmdir,renameat, and unlinkat system calls.
2
+
{{{ full_name }}} must audit all uses of the rename,unlink,rmdir,renameat,renameat2 and unlinkat system calls.
3
3
4
4
vuldiscussion: |-
5
5
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
@@ -11,19 +11,19 @@ vuldiscussion: |-
11
11
The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible.
12
12
13
13
checktext: |-
14
-
Verify that {{{ full_name }}} is configured to audit successful/unsuccessful attempts to use the "rename", "unlink", "rmdir", "renameat", and "unlinkat" system calls with the following command:
14
+
Verify that {{{ full_name }}} is configured to audit successful/unsuccessful attempts to use the "rename", "unlink", "rmdir", "renameat", "renameat2", and "unlinkat" system calls with the following command:
If the command does not return an audit rule for "rename", "unlink", "rmdir", "renameat", and "unlinkat" or any of the lines returned are commented out, this is a finding.
22
22
23
23
fixtext: |-
24
-
Configure {{{ full_name }}} to generate an audit event for any successful/unsuccessful use of the "rename", "unlink", "rmdir", "renameat", and "unlinkat" system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file:
24
+
Configure {{{ full_name }}} to generate an audit event for any successful/unsuccessful use of the "rename", "unlink", "rmdir", "renameat", "renameat2", and "unlinkat" system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file:
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_rename/rule.yml
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_renameat/rule.yml
Successful/unsuccessful uses of the renameat2 system call in {{{ full_name }}} must generate an audit record.
3
+
4
+
vuldiscussion: |-
5
+
Auditing file deletions will create an audit trail for files that are removed
6
+
from the system. The audit trail could aid in system troubleshooting, as well as, detecting
7
+
malicious processes that attempt to delete log files to conceal their presence.
8
+
9
+
checktext: |-
10
+
To determine if the system is configured to audit calls to the
11
+
renameat2 system call, run the following command:
12
+
$ sudo grep "renameat2" /etc/audit/audit.*
13
+
If the system is configured to audit this activity, it will return a line.
14
+
15
+
16
+
If no line is returned, then this is a finding.
17
+
18
+
fixtext: |-
19
+
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "renameat2" system call by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file:
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_rmdir/policy/stig/shared.yml
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_rmdir/rule.yml
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlink/policy/stig/shared.yml
Copy file name to clipboardexpand all lines: linux_os/guide/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlink/rule.yml
0 commit comments