|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/ansible/shared.yml b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/ansible/shared.yml
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..4f88ed361d
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/ansible/shared.yml
|
|
|
889f2b |
@@ -0,0 +1,8 @@
|
|
|
889f2b |
+# platform = multi_platform_fedora,multi_platform_rhel
|
|
|
889f2b |
+
|
|
|
889f2b |
+{{{ ansible_set_config_file(file="/etc/audit/auditd.conf",
|
|
|
889f2b |
+ parameter="overflow_action",
|
|
|
889f2b |
+ value="syslog",
|
|
|
889f2b |
+ separator="=",
|
|
|
889f2b |
+ separator_regex="=",
|
|
|
889f2b |
+ prefix_regex="^\s*") }}}
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/bash/shared.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/bash/shared.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..539b9b6582
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/bash/shared.sh
|
|
|
889f2b |
@@ -0,0 +1,12 @@
|
|
|
889f2b |
+# platform = multi_platform_fedora,multi_platform_rhel
|
|
|
889f2b |
+# reboot = true
|
|
|
889f2b |
+# strategy = restrict
|
|
|
889f2b |
+# complexity = low
|
|
|
889f2b |
+# disruption = low
|
|
|
889f2b |
+
|
|
|
889f2b |
+{{{set_config_file(path="/etc/audit/auditd.conf",
|
|
|
889f2b |
+ parameter="overflow_action",
|
|
|
889f2b |
+ value="syslog",
|
|
|
889f2b |
+ separator="=",
|
|
|
889f2b |
+ separator_regex="=",
|
|
|
889f2b |
+ prefix_regex="^\s*")}}}
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/oval/shared.xml b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/oval/shared.xml
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..fd45280e4e
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/oval/shared.xml
|
|
|
889f2b |
@@ -0,0 +1,6 @@
|
|
|
889f2b |
+{{{ oval_check_config_file(
|
|
|
889f2b |
+ path="/etc/audit/auditd.conf",
|
|
|
889f2b |
+ prefix_regex="^(?:.*\\n)*\s*",
|
|
|
889f2b |
+ parameter="overflow_action",
|
|
|
889f2b |
+ value="syslog|single|halt",
|
|
|
889f2b |
+ separator_regex="\s*=\s*") }}}
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/rule.yml b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/rule.yml
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..d41ca00076
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/rule.yml
|
|
|
889f2b |
@@ -0,0 +1,36 @@
|
|
|
889f2b |
+documentation_complete: true
|
|
|
889f2b |
+
|
|
|
889f2b |
+title: Appropriate Action Must be Setup When the Internal Audit Event Queue is Full
|
|
|
889f2b |
+
|
|
|
889f2b |
+description: |-
|
|
|
889f2b |
+ The audit system should have an action setup in the event the internal event queue becomes full.
|
|
|
889f2b |
+ To setup an overflow action edit <tt>/etc/audit/auditd.conf</tt>. Set <tt>overflow_action</tt>
|
|
|
889f2b |
+ to one of the following values: <tt>syslog</tt>, <tt>single</tt>, <tt>halt</tt>.
|
|
|
889f2b |
+
|
|
|
889f2b |
+
|
|
|
889f2b |
+rationale: |-
|
|
|
889f2b |
+ The audit system should have an action setup in the event the internal event queue becomes full
|
|
|
889f2b |
+ so that no data is lost.
|
|
|
889f2b |
+
|
|
|
889f2b |
+severity: medium
|
|
|
889f2b |
+
|
|
|
889f2b |
+identifiers:
|
|
|
889f2b |
+ cce@rhel8: CCE-85889-4
|
|
|
889f2b |
+
|
|
|
889f2b |
+references:
|
|
|
889f2b |
+ disa: CCI-001851
|
|
|
889f2b |
+ nist: AU-4(1)
|
|
|
889f2b |
+ srg: SRG-OS-000342-GPOS-00133,SRG-OS-000479-GPOS-00224
|
|
|
889f2b |
+ stigid@rhel8: RHEL-08-030700
|
|
|
889f2b |
+
|
|
|
889f2b |
+ocil_clause: 'auditd overflow action is not setup correctly'
|
|
|
889f2b |
+
|
|
|
889f2b |
+ocil: |-
|
|
|
889f2b |
+ Verify the audit system is configured to take an appropriate action when the internal event queue is full:
|
|
|
889f2b |
+ $ sudo grep -i overflow_action /etc/audit/auditd.conf
|
|
|
889f2b |
+
|
|
|
889f2b |
+ The output should contain be like <tt>overflow_action = syslog</tt>
|
|
|
889f2b |
+
|
|
|
889f2b |
+ If the value of the "overflow_action" option is not set to <tt>syslog</tt>,
|
|
|
889f2b |
+ <tt>single</tt>, <tt>halt</tt> or the line is commented out, ask the System Administrator
|
|
|
889f2b |
+ to indicate how the audit logs are off-loaded to a different system or media.
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/commented_out.fail.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/commented_out.fail.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..ec7525b195
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/commented_out.fail.sh
|
|
|
889f2b |
@@ -0,0 +1,5 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+# Ensure test system has proper directories/files for test scenario
|
|
|
889f2b |
+bash -x setup.sh
|
|
|
889f2b |
+
|
|
|
889f2b |
+echo "# overflow_action = syslog" >> /etc/audit/auditd.conf
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/empty.fail.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/empty.fail.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..e4d173ab37
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/empty.fail.sh
|
|
|
889f2b |
@@ -0,0 +1,7 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+# Ensure test system has proper directories/files for test scenario
|
|
|
889f2b |
+bash -x setup.sh
|
|
|
889f2b |
+
|
|
|
889f2b |
+if [[ -f $config_file ]]; then
|
|
|
889f2b |
+ echo '' > $config_file
|
|
|
889f2b |
+fi
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/file_not_present.fail.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/file_not_present.fail.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..f26cd7cddf
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/file_not_present.fail.sh
|
|
|
889f2b |
@@ -0,0 +1,7 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+
|
|
|
889f2b |
+config_file=/etc/audit/auditd.conf
|
|
|
889f2b |
+
|
|
|
889f2b |
+if [[ -f $config_file ]]; then
|
|
|
889f2b |
+ rm -f $config_file
|
|
|
889f2b |
+fi
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/halt.pass.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/halt.pass.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..0ec591b25b
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/halt.pass.sh
|
|
|
889f2b |
@@ -0,0 +1,5 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+# Ensure test system has proper directories/files for test scenario
|
|
|
889f2b |
+bash -x setup.sh
|
|
|
889f2b |
+
|
|
|
889f2b |
+echo "overflow_action = halt" >> /etc/audit/auditd.conf
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/ignore.fail.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/ignore.fail.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..236ad543fe
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/ignore.fail.sh
|
|
|
889f2b |
@@ -0,0 +1,5 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+# Ensure test system has proper directories/files for test scenario
|
|
|
889f2b |
+bash -x setup.sh
|
|
|
889f2b |
+
|
|
|
889f2b |
+echo "overflow_action = ignore" >> /etc/audit/auditd.conf
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/not_present.fail.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/not_present.fail.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..74efdcafee
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/not_present.fail.sh
|
|
|
889f2b |
@@ -0,0 +1,5 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+# Ensure test system has proper directories/files for test scenario
|
|
|
889f2b |
+bash -x setup.sh
|
|
|
889f2b |
+config_file=/etc/audit/auditd.conf
|
|
|
889f2b |
+sed -i "s/^.*overflow_action.*$//" $config_file
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/setup.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/setup.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..de11126320
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/setup.sh
|
|
|
889f2b |
@@ -0,0 +1,9 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+# Use this script to ensure the audit directory structure and audit conf file
|
|
|
889f2b |
+# exist in the test env.
|
|
|
889f2b |
+config_file=/etc/audit/auditd.conf
|
|
|
889f2b |
+
|
|
|
889f2b |
+# Ensure directory structure exists (useful for container based testing)
|
|
|
889f2b |
+test -d /etc/audit/ || mkdir -p /etc/audit/
|
|
|
889f2b |
+
|
|
|
889f2b |
+test -f $config_file || touch $config_file
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/single.pass.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/single.pass.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..f9fa7a935c
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/single.pass.sh
|
|
|
889f2b |
@@ -0,0 +1,5 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+# Ensure test system has proper directories/files for test scenario
|
|
|
889f2b |
+bash -x setup.sh
|
|
|
889f2b |
+
|
|
|
889f2b |
+echo "overflow_action = single" >> /etc/audit/auditd.conf
|
|
|
889f2b |
diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/syslog.pass.sh b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/syslog.pass.sh
|
|
|
889f2b |
new file mode 100644
|
|
|
889f2b |
index 0000000000..1c625fb752
|
|
|
889f2b |
--- /dev/null
|
|
|
889f2b |
+++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_overflow_action/tests/syslog.pass.sh
|
|
|
889f2b |
@@ -0,0 +1,5 @@
|
|
|
889f2b |
+#!/bin/bash
|
|
|
889f2b |
+# Ensure test system has proper directories/files for test scenario
|
|
|
889f2b |
+bash -x setup.sh
|
|
|
889f2b |
+
|
|
|
889f2b |
+echo "overflow_action = syslog" >> /etc/audit/auditd.conf
|
|
|
889f2b |
diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile
|
|
|
889f2b |
index 6372d13cfc..5cac78e00d 100644
|
|
|
889f2b |
--- a/products/rhel8/profiles/stig.profile
|
|
|
889f2b |
+++ b/products/rhel8/profiles/stig.profile
|
|
|
889f2b |
@@ -826,6 +826,7 @@ selections:
|
|
|
889f2b |
- rsyslog_remote_loghost
|
|
|
889f2b |
|
|
|
889f2b |
# RHEL-08-030700
|
|
|
889f2b |
+ - auditd_overflow_action
|
|
|
889f2b |
|
|
|
889f2b |
# RHEL-08-030710
|
|
|
889f2b |
|
|
|
889f2b |
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
|
|
|
889f2b |
index 24e8149168..b3d9596e1f 100644
|
|
|
889f2b |
--- a/shared/references/cce-redhat-avail.txt
|
|
|
889f2b |
+++ b/shared/references/cce-redhat-avail.txt
|
|
|
889f2b |
@@ -27,7 +27,6 @@ CCE-85885-2
|
|
|
889f2b |
CCE-85886-0
|
|
|
889f2b |
CCE-85887-8
|
|
|
889f2b |
CCE-85888-6
|
|
|
889f2b |
-CCE-85889-4
|
|
|
889f2b |
CCE-85890-2
|
|
|
889f2b |
CCE-85891-0
|
|
|
889f2b |
CCE-85892-8
|
|
|
889f2b |
diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile
|
|
|
889f2b |
index 32f1a24a7a..c9d23ed1dc 100644
|
|
|
889f2b |
--- a/tests/data/profile_stability/rhel8/stig.profile
|
|
|
889f2b |
+++ b/tests/data/profile_stability/rhel8/stig.profile
|
|
|
889f2b |
@@ -73,6 +73,7 @@ selections:
|
|
|
889f2b |
- auditd_local_events
|
|
|
889f2b |
- auditd_log_format
|
|
|
889f2b |
- auditd_name_format
|
|
|
889f2b |
+- auditd_overflow_action
|
|
|
889f2b |
- banner_etc_issue
|
|
|
889f2b |
- bios_enable_execution_restrictions
|
|
|
889f2b |
- chronyd_client_only
|
|
|
889f2b |
diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
889f2b |
index d6a27c67dc..7303145141 100644
|
|
|
889f2b |
--- a/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
889f2b |
+++ b/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
889f2b |
@@ -84,6 +84,7 @@ selections:
|
|
|
889f2b |
- auditd_local_events
|
|
|
889f2b |
- auditd_log_format
|
|
|
889f2b |
- auditd_name_format
|
|
|
889f2b |
+- auditd_overflow_action
|
|
|
889f2b |
- banner_etc_issue
|
|
|
889f2b |
- bios_enable_execution_restrictions
|
|
|
889f2b |
- chronyd_client_only
|