-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new rule audit_rules_var_log_journal
- New rule for auditing /var/log/journal directory - Satisfies STIG requirement UBTU-22-654190 - Uses template `audit_rules_watch`
- Loading branch information
Showing
3 changed files
with
57 additions
and
2 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
55 changes: 55 additions & 0 deletions
55
linux_os/guide/auditing/auditd_configure_rules/audit_rules_var_log_journal/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,55 @@ | ||
documentation_complete: true | ||
|
||
title: 'Ensure auditd Collects records for events that affect "/var/log/journal"' | ||
|
||
description: |- | ||
Auditing the systemd journal files provides logging that can be used for | ||
forensic purposes. Verify the system generates audit records for all events | ||
that affect "/var/log/journal" by using the following command: | ||
<pre> | ||
$ sudo auditctl -l | grep journal | ||
-w /var/log/journal/ -p wa -k systemd_journal | ||
</pre> | ||
If the command does not return a line that matches the example or the line | ||
is commented out, this is a finding. | ||
Note: The "-k" value is arbitrary and can be different from the example | ||
output above. | ||
rationale: |- | ||
Once an attacker establishes access to a system, the attacker often attempts | ||
to create a persistent method of reestablishing access. One way to accomplish | ||
this is for the attacker to modify system level binaries and their operation. | ||
Auditing the systemd journal files provides logging that can be used for | ||
forensic purposes. | ||
severity: medium | ||
|
||
references: | ||
disa: CCI-000366 | ||
stigid@ubuntu2204: UBTU-22-654190 | ||
|
||
ocil_clause: 'the command does not return a line, or the line is commented out' | ||
|
||
ocil: |- | ||
Verify the system generates audit records for all events | ||
that affect "/var/log/journal" by using the following command: | ||
<pre> | ||
$ sudo auditctl -l | grep journal | ||
-w /var/log/journal/ -p wa -k systemd_journal | ||
</pre> | ||
If the command does not return a line that matches the example or the line | ||
is commented out, this is a finding. | ||
fixtext: '{{{ fixtext_audit_file_watch_rule("/var/log/journal/", "systemd_journal", "/etc/audit/rules.d/audit.rules") }}}' | ||
|
||
srg_requirement: '{{{ srg_requirement_audit_file_watch_rule("/var/log/journal/") }}}' | ||
|
||
template: | ||
name: audit_rules_watch | ||
vars: | ||
path: /var/log/journal/ |
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