|
|
362bfa |
From ad2267a48db738fe69bed6cc009d8be7bbc61c87 Mon Sep 17 00:00:00 2001
|
|
|
362bfa |
From: Gabriel Becker <ggasparb@redhat.com>
|
|
|
362bfa |
Date: Thu, 17 Jun 2021 17:46:26 +0200
|
|
|
362bfa |
Subject: [PATCH] Add /var/log/audit individual ownership rules.
|
|
|
362bfa |
|
|
|
362bfa |
---
|
|
|
362bfa |
.../bash/shared.sh | 12 +++++
|
|
|
362bfa |
.../oval/shared.xml | 44 +++++++++++++++++++
|
|
|
362bfa |
.../rule.yml | 39 ++++++++++++++++
|
|
|
362bfa |
.../tests/correct_value.pass.sh | 5 +++
|
|
|
362bfa |
.../correct_value_non-root_group.pass.sh | 8 ++++
|
|
|
362bfa |
.../tests/wrong_value.fail.sh | 6 +++
|
|
|
362bfa |
.../bash/shared.sh | 3 ++
|
|
|
362bfa |
.../oval/shared.xml | 24 ++++++++++
|
|
|
362bfa |
.../rule.yml | 37 ++++++++++++++++
|
|
|
362bfa |
.../tests/correct_value.pass.sh | 3 ++
|
|
|
362bfa |
.../tests/wrong_value.fail.sh | 4 ++
|
|
|
362bfa |
.../bash/shared.sh | 12 +++++
|
|
|
362bfa |
.../oval/shared.xml | 44 +++++++++++++++++++
|
|
|
362bfa |
.../rule.yml | 39 ++++++++++++++++
|
|
|
362bfa |
.../tests/correct_value.pass.sh | 5 +++
|
|
|
362bfa |
.../correct_value_non-root_group.pass.sh | 8 ++++
|
|
|
362bfa |
.../tests/wrong_value.fail.sh | 7 +++
|
|
|
362bfa |
.../bash/shared.sh | 3 ++
|
|
|
362bfa |
.../oval/shared.xml | 24 ++++++++++
|
|
|
362bfa |
.../rule.yml | 36 +++++++++++++++
|
|
|
362bfa |
.../tests/correct_value.pass.sh | 3 ++
|
|
|
362bfa |
.../tests/wrong_value.fail.sh | 5 +++
|
|
|
362bfa |
products/rhel8/profiles/stig.profile | 15 +++++--
|
|
|
362bfa |
.../oval/auditd_conf_log_group_not_root.xml | 20 ++++++++-
|
|
|
362bfa |
shared/references/cce-redhat-avail.txt | 4 --
|
|
|
362bfa |
.../data/profile_stability/rhel8/stig.profile | 5 ++-
|
|
|
362bfa |
.../profile_stability/rhel8/stig_gui.profile | 5 ++-
|
|
|
362bfa |
27 files changed, 409 insertions(+), 11 deletions(-)
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/correct_value_non-root_group.pass.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/correct_value_non-root_group.pass.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/bash/shared.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/oval/shared.xml
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/rule.yml
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/tests/correct_value.pass.sh
|
|
|
362bfa |
create mode 100644 linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/tests/wrong_value.fail.sh
|
|
|
362bfa |
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/bash/shared.sh b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..685aa0cf3f2
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
@@ -0,0 +1,12 @@
|
|
|
362bfa |
+# platform = multi_platform_all
|
|
|
362bfa |
+
|
|
|
362bfa |
+if LC_ALL=C grep -m 1 -q ^log_group /etc/audit/auditd.conf; then
|
|
|
362bfa |
+ GROUP=$(awk -F "=" '/log_group/ {print $2}' /etc/audit/auditd.conf | tr -d ' ')
|
|
|
362bfa |
+ if ! [ "${GROUP}" == 'root' ] ; then
|
|
|
362bfa |
+ chgrp ${GROUP} /var/log/audit
|
|
|
362bfa |
+ else
|
|
|
362bfa |
+ chgrp root /var/log/audit
|
|
|
362bfa |
+ fi
|
|
|
362bfa |
+else
|
|
|
362bfa |
+ chgrp root /var/log/audit
|
|
|
362bfa |
+fi
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/oval/shared.xml b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..4d6eee02a30
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
@@ -0,0 +1,44 @@
|
|
|
362bfa |
+<def-group>
|
|
|
362bfa |
+ <definition class="compliance" id="directory_group_ownership_var_log_audit" version="1">
|
|
|
362bfa |
+ {{{ oval_metadata("Checks that all /var/log/audit directories are group owned by the root user.") }}}
|
|
|
362bfa |
+ <criteria operator="OR">
|
|
|
362bfa |
+ <criterion test_ref="test_group_ownership_var_log_audit_directories" />
|
|
|
362bfa |
+ <criteria operator="AND" comment="log_group in auditd.conf is not root">
|
|
|
362bfa |
+
|
|
|
362bfa |
+ definition_ref="auditd_conf_log_group_not_root" />
|
|
|
362bfa |
+ <criterion test_ref="test_group_ownership_var_log_audit_directories-non_root" />
|
|
|
362bfa |
+ </criteria>
|
|
|
362bfa |
+ </criteria>
|
|
|
362bfa |
+ </definition>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_test check="all" check_existence="none_exist" comment="/var/log/audit directories uid root gid root" id="test_group_ownership_var_log_audit_directories" version="1">
|
|
|
362bfa |
+ <unix:object object_ref="object_group_ownership_var_log_audit_directories" />
|
|
|
362bfa |
+ </unix:file_test>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_object comment="/var/log/audit directories" id="object_group_ownership_var_log_audit_directories" version="1">
|
|
|
362bfa |
+ <unix:behaviors recurse="directories" recurse_direction="down" max_depth="-1" recurse_file_system="all" />
|
|
|
362bfa |
+ <unix:path operation="equals">/var/log/audit</unix:path>
|
|
|
362bfa |
+ <unix:filename xsi:nil="true" />
|
|
|
362bfa |
+ <filter action="include">state_group_owner_not_root_var_log_audit_directories</filter>
|
|
|
362bfa |
+ </unix:file_object>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_state id="state_group_owner_not_root_var_log_audit_directories" version="1" operator="OR">
|
|
|
362bfa |
+ <unix:group_id datatype="int" operation="not equal">0</unix:group_id>
|
|
|
362bfa |
+ </unix:file_state>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_test check="all" check_existence="all_exist" comment="/var/log/audit directories uid root gid root" id="test_group_ownership_var_log_audit_directories-non_root" version="1">
|
|
|
362bfa |
+ <unix:object object_ref="object_group_ownership_var_log_audit_directories-non_root" />
|
|
|
362bfa |
+ </unix:file_test>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_object comment="/var/log/audit directories" id="object_group_ownership_var_log_audit_directories-non_root" version="1">
|
|
|
362bfa |
+ <unix:behaviors recurse="directories" recurse_direction="down" max_depth="-1" recurse_file_system="all" />
|
|
|
362bfa |
+ <unix:path operation="equals">/var/log/audit</unix:path>
|
|
|
362bfa |
+ <unix:filename xsi:nil="true" />
|
|
|
362bfa |
+ <filter action="include">state_group_owner_not_root_var_log_audit_directories-non_root</filter>
|
|
|
362bfa |
+ </unix:file_object>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_state id="state_group_owner_not_root_var_log_audit_directories-non_root" version="1" operator="OR">
|
|
|
362bfa |
+ <unix:group_id datatype="int" operation="not equal">0</unix:group_id>
|
|
|
362bfa |
+ </unix:file_state>
|
|
|
362bfa |
+
|
|
|
362bfa |
+</def-group>
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..3915300c106
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
@@ -0,0 +1,39 @@
|
|
|
362bfa |
+documentation_complete: true
|
|
|
362bfa |
+
|
|
|
362bfa |
+prodtype: rhel8
|
|
|
362bfa |
+
|
|
|
362bfa |
+title: 'System Audit Directories Must Be Group Owned By Root'
|
|
|
362bfa |
+
|
|
|
362bfa |
+description: |-
|
|
|
362bfa |
+ All audit directories must be group owned by root user. By default, the path for audit log is /var/log/audit/ .
|
|
|
362bfa |
+ {{{ describe_file_group_owner(file="/var/log/audit", group="root") }}}
|
|
|
362bfa |
+ If <tt>log_group</tt> in <tt>/etc/audit/auditd.conf</tt> is set to a group other than the <tt>root</tt>
|
|
|
362bfa |
+ group account, change the group ownership of the audit directories to this specific group.
|
|
|
362bfa |
+
|
|
|
362bfa |
+rationale: |-
|
|
|
362bfa |
+ Unauthorized disclosure of audit records can reveal system and configuration data to
|
|
|
362bfa |
+ attackers, thus compromising its confidentiality.
|
|
|
362bfa |
+
|
|
|
362bfa |
+severity: medium
|
|
|
362bfa |
+
|
|
|
362bfa |
+identifiers:
|
|
|
362bfa |
+ cce@rhel8: CCE-88225-8
|
|
|
362bfa |
+
|
|
|
362bfa |
+references:
|
|
|
362bfa |
+ cis-csc: 1,11,12,13,14,15,16,18,19,3,4,5,6,7,8
|
|
|
362bfa |
+ cjis: 5.4.1.1
|
|
|
362bfa |
+ cobit5: APO01.06,APO11.04,APO12.06,BAI03.05,BAI08.02,DSS02.02,DSS02.04,DSS02.07,DSS03.01,DSS05.04,DSS05.07,DSS06.02,MEA02.01
|
|
|
362bfa |
+ cui: 3.3.1
|
|
|
362bfa |
+ disa: CCI-000162,CCI-000163,CCI-000164,CCI-001314
|
|
|
362bfa |
+ isa-62443-2009: 4.2.3.10,4.3.3.3.9,4.3.3.5.8,4.3.3.7.3,4.3.4.4.7,4.3.4.5.6,4.3.4.5.7,4.3.4.5.8,4.4.2.1,4.4.2.2,4.4.2.4
|
|
|
362bfa |
+ isa-62443-2013: 'SR 2.1,SR 2.10,SR 2.11,SR 2.12,SR 2.8,SR 2.9,SR 5.2,SR 6.1'
|
|
|
362bfa |
+ iso27001-2013: A.10.1.1,A.11.1.4,A.11.1.5,A.11.2.1,A.12.4.1,A.12.4.2,A.12.4.3,A.12.4.4,A.12.7.1,A.13.1.1,A.13.1.3,A.13.2.1,A.13.2.3,A.13.2.4,A.14.1.2,A.14.1.3,A.16.1.4,A.16.1.5,A.16.1.7,A.6.1.2,A.7.1.1,A.7.1.2,A.7.3.1,A.8.2.2,A.8.2.3,A.9.1.1,A.9.1.2,A.9.2.3,A.9.4.1,A.9.4.4,A.9.4.5
|
|
|
362bfa |
+ nist: CM-6(a),AC-6(1),AU-9(4)
|
|
|
362bfa |
+ nist-csf: DE.AE-3,DE.AE-5,PR.AC-4,PR.DS-5,PR.PT-1,RS.AN-1,RS.AN-4
|
|
|
362bfa |
+ pcidss: Req-10.5.1
|
|
|
362bfa |
+ srg: SRG-OS-000057-GPOS-00027,SRG-OS-000058-GPOS-00028,SRG-OS-000059-GPOS-00029,SRG-OS-000206-GPOS-00084
|
|
|
362bfa |
+ stigid@rhel8: RHEL-08-030110
|
|
|
362bfa |
+
|
|
|
362bfa |
+ocil: |-
|
|
|
362bfa |
+ {{{ describe_file_group_owner(file="/var/log/audit", group="root") }}}
|
|
|
362bfa |
+
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/correct_value.pass.sh b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..4e68a450c3d
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
@@ -0,0 +1,5 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+sed -i "/\s*log_group.*/d" /etc/audit/auditd.conf
|
|
|
362bfa |
+echo "log_group = root" >> /etc/audit/auditd.conf
|
|
|
362bfa |
+chgrp root /var/log/audit
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/correct_value_non-root_group.pass.sh b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/correct_value_non-root_group.pass.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..89995b11954
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/correct_value_non-root_group.pass.sh
|
|
|
362bfa |
@@ -0,0 +1,8 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+groupadd group_test
|
|
|
362bfa |
+
|
|
|
362bfa |
+sed -i "/\s*log_group.*/d" /etc/audit/auditd.conf
|
|
|
362bfa |
+echo "log_group = group_test" >> /etc/audit/auditd.conf
|
|
|
362bfa |
+
|
|
|
362bfa |
+chgrp group_test /var/log/audit
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/wrong_value.fail.sh b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..13d22ca8361
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_group_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
@@ -0,0 +1,6 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+sed -i "/\s*log_group.*/d" /etc/audit/auditd.conf
|
|
|
362bfa |
+echo "log_group = root" >> /etc/audit/auditd.conf
|
|
|
362bfa |
+groupadd group_test
|
|
|
362bfa |
+chgrp group_test /var/log/audit
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/bash/shared.sh b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..de63152c410
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
@@ -0,0 +1,3 @@
|
|
|
362bfa |
+# platform = multi_platform_all
|
|
|
362bfa |
+
|
|
|
362bfa |
+chown root /var/log/audit
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/oval/shared.xml b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..fad17abe39a
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
@@ -0,0 +1,24 @@
|
|
|
362bfa |
+<def-group>
|
|
|
362bfa |
+ <definition class="compliance" id="directory_ownership_var_log_audit" version="1">
|
|
|
362bfa |
+ {{{ oval_metadata("Checks that all /var/log/audit directories are owned by the root user.") }}}
|
|
|
362bfa |
+ <criteria comment="directories are root owned">
|
|
|
362bfa |
+ <criterion test_ref="test_user_ownership_var_log_audit_directories" />
|
|
|
362bfa |
+ </criteria>
|
|
|
362bfa |
+ </definition>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_test check="all" check_existence="none_exist" comment="/var/log/audit directories uid root gid root" id="test_user_ownership_var_log_audit_directories" version="1">
|
|
|
362bfa |
+ <unix:object object_ref="object_user_ownership_var_log_audit_directories" />
|
|
|
362bfa |
+ </unix:file_test>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_object comment="/var/log/audit directories" id="object_user_ownership_var_log_audit_directories" version="1">
|
|
|
362bfa |
+ <unix:behaviors recurse="directories" recurse_direction="down" max_depth="-1" recurse_file_system="all" />
|
|
|
362bfa |
+ <unix:path operation="equals">/var/log/audit</unix:path>
|
|
|
362bfa |
+ <unix:filename xsi:nil="true" />
|
|
|
362bfa |
+ <filter action="include">state_owner_not_root_var_log_audit_directories</filter>
|
|
|
362bfa |
+ </unix:file_object>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_state id="state_owner_not_root_var_log_audit_directories" version="1" operator="OR">
|
|
|
362bfa |
+ <unix:user_id datatype="int" operation="not equal">0</unix:user_id>
|
|
|
362bfa |
+ </unix:file_state>
|
|
|
362bfa |
+
|
|
|
362bfa |
+</def-group>
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..cd6c45e249b
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
@@ -0,0 +1,37 @@
|
|
|
362bfa |
+documentation_complete: true
|
|
|
362bfa |
+
|
|
|
362bfa |
+prodtype: rhel8
|
|
|
362bfa |
+
|
|
|
362bfa |
+title: 'System Audit Directories Must Be Owned By Root'
|
|
|
362bfa |
+
|
|
|
362bfa |
+description: |-
|
|
|
362bfa |
+ All audit directories must be owned by root user. By default, the path for audit log is /var/log/audit/ .
|
|
|
362bfa |
+ {{{ describe_file_owner(file="/var/log/audit", owner="root") }}}
|
|
|
362bfa |
+
|
|
|
362bfa |
+rationale: |-
|
|
|
362bfa |
+ Unauthorized disclosure of audit records can reveal system and configuration data to
|
|
|
362bfa |
+ attackers, thus compromising its confidentiality.
|
|
|
362bfa |
+
|
|
|
362bfa |
+severity: medium
|
|
|
362bfa |
+
|
|
|
362bfa |
+identifiers:
|
|
|
362bfa |
+ cce@rhel8: CCE-88226-6
|
|
|
362bfa |
+
|
|
|
362bfa |
+references:
|
|
|
362bfa |
+ cis-csc: 1,11,12,13,14,15,16,18,19,3,4,5,6,7,8
|
|
|
362bfa |
+ cjis: 5.4.1.1
|
|
|
362bfa |
+ cobit5: APO01.06,APO11.04,APO12.06,BAI03.05,BAI08.02,DSS02.02,DSS02.04,DSS02.07,DSS03.01,DSS05.04,DSS05.07,DSS06.02,MEA02.01
|
|
|
362bfa |
+ cui: 3.3.1
|
|
|
362bfa |
+ disa: CCI-000162,CCI-000163,CCI-000164,CCI-001314
|
|
|
362bfa |
+ isa-62443-2009: 4.2.3.10,4.3.3.3.9,4.3.3.5.8,4.3.3.7.3,4.3.4.4.7,4.3.4.5.6,4.3.4.5.7,4.3.4.5.8,4.4.2.1,4.4.2.2,4.4.2.4
|
|
|
362bfa |
+ isa-62443-2013: 'SR 2.1,SR 2.10,SR 2.11,SR 2.12,SR 2.8,SR 2.9,SR 5.2,SR 6.1'
|
|
|
362bfa |
+ iso27001-2013: A.10.1.1,A.11.1.4,A.11.1.5,A.11.2.1,A.12.4.1,A.12.4.2,A.12.4.3,A.12.4.4,A.12.7.1,A.13.1.1,A.13.1.3,A.13.2.1,A.13.2.3,A.13.2.4,A.14.1.2,A.14.1.3,A.16.1.4,A.16.1.5,A.16.1.7,A.6.1.2,A.7.1.1,A.7.1.2,A.7.3.1,A.8.2.2,A.8.2.3,A.9.1.1,A.9.1.2,A.9.2.3,A.9.4.1,A.9.4.4,A.9.4.5
|
|
|
362bfa |
+ nist: CM-6(a),AC-6(1),AU-9(4)
|
|
|
362bfa |
+ nist-csf: DE.AE-3,DE.AE-5,PR.AC-4,PR.DS-5,PR.PT-1,RS.AN-1,RS.AN-4
|
|
|
362bfa |
+ pcidss: Req-10.5.1
|
|
|
362bfa |
+ srg: SRG-OS-000057-GPOS-00027,SRG-OS-000058-GPOS-00028,SRG-OS-000059-GPOS-00029,SRG-OS-000206-GPOS-00084
|
|
|
362bfa |
+ stigid@rhel8: RHEL-08-030100
|
|
|
362bfa |
+
|
|
|
362bfa |
+ocil: |-
|
|
|
362bfa |
+ {{{ describe_file_owner(file="/var/log/audit", owner="root") }}}
|
|
|
362bfa |
+
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/tests/correct_value.pass.sh b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..fa70fdc9494
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
@@ -0,0 +1,3 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+chown root /var/log/audit
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/tests/wrong_value.fail.sh b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..f65a1e67241
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/directory_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
@@ -0,0 +1,4 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+useradd testuser_123
|
|
|
362bfa |
+chown testuser_123 /var/log/audit
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/bash/shared.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..3f53de5ba26
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/bash/shared.sh
|
|
|
362bfa |
@@ -0,0 +1,12 @@
|
|
|
362bfa |
+# platform = multi_platform_all
|
|
|
362bfa |
+
|
|
|
362bfa |
+if LC_ALL=C grep -m 1 -q ^log_group /etc/audit/auditd.conf; then
|
|
|
362bfa |
+ GROUP=$(awk -F "=" '/log_group/ {print $2}' /etc/audit/auditd.conf | tr -d ' ')
|
|
|
362bfa |
+ if ! [ "${GROUP}" == 'root' ] ; then
|
|
|
362bfa |
+ chgrp ${GROUP} /var/log/audit/audit.log*
|
|
|
362bfa |
+ else
|
|
|
362bfa |
+ chgrp root /var/log/audit/audit.log*
|
|
|
362bfa |
+ fi
|
|
|
362bfa |
+else
|
|
|
362bfa |
+ chgrp root /var/log/audit/audit.log*
|
|
|
362bfa |
+fi
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/oval/shared.xml b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..af5414a6c9c
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/oval/shared.xml
|
|
|
362bfa |
@@ -0,0 +1,44 @@
|
|
|
362bfa |
+<def-group>
|
|
|
362bfa |
+ <definition class="compliance" id="file_group_ownership_var_log_audit" version="1">
|
|
|
362bfa |
+ {{{ oval_metadata("Checks that all /var/log/audit files are group owned by the root user.") }}}
|
|
|
362bfa |
+ <criteria operator="OR">
|
|
|
362bfa |
+ <criterion comment="files are root group owned" test_ref="test_group_ownership_var_log_audit_files"/>
|
|
|
362bfa |
+ <criteria operator="AND" comment="log_group in auditd.conf is not root">
|
|
|
362bfa |
+
|
|
|
362bfa |
+ definition_ref="auditd_conf_log_group_not_root" />
|
|
|
362bfa |
+ <criterion test_ref="test_group_ownership_var_log_audit_files-non_root" />
|
|
|
362bfa |
+ </criteria>
|
|
|
362bfa |
+ </criteria>
|
|
|
362bfa |
+ </definition>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_test check="all" check_existence="none_exist" comment="/var/log/audit files gid root" id="test_group_ownership_var_log_audit_files" version="1">
|
|
|
362bfa |
+ <unix:object object_ref="object_group_ownership_var_log_audit_files" />
|
|
|
362bfa |
+ </unix:file_test>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_object comment="/var/log/audit files" id="object_group_ownership_var_log_audit_files" version="1">
|
|
|
362bfa |
+ <unix:behaviors recurse="directories" recurse_direction="down" max_depth="-1" recurse_file_system="all" />
|
|
|
362bfa |
+ <unix:path operation="equals">/var/log/audit</unix:path>
|
|
|
362bfa |
+ <unix:filename operation="pattern match">^.*$</unix:filename>
|
|
|
362bfa |
+ <filter action="include">state_group_owner_not_root_var_log_audit</filter>
|
|
|
362bfa |
+ </unix:file_object>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_state id="state_group_owner_not_root_var_log_audit" version="1" operator="OR">
|
|
|
362bfa |
+ <unix:group_id datatype="int" operation="not equal">0</unix:group_id>
|
|
|
362bfa |
+ </unix:file_state>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_test check="all" check_existence="all_exist" comment="/var/log/audit files uid root " id="test_group_ownership_var_log_audit_files-non_root" version="1">
|
|
|
362bfa |
+ <unix:object object_ref="object_group_ownership_var_log_audit_files-non_root" />
|
|
|
362bfa |
+ </unix:file_test>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_object comment="/var/log/audit files" id="object_group_ownership_var_log_audit_files-non_root" version="1">
|
|
|
362bfa |
+ <unix:behaviors recurse="directories" recurse_direction="down" max_depth="-1" recurse_file_system="all" />
|
|
|
362bfa |
+ <unix:path operation="equals">/var/log/audit</unix:path>
|
|
|
362bfa |
+ <unix:filename operation="pattern match">^.*$</unix:filename>
|
|
|
362bfa |
+ <filter action="include">state_group_owner_not_root_var_log_audit-non_root</filter>
|
|
|
362bfa |
+ </unix:file_object>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_state id="state_group_owner_not_root_var_log_audit-non_root" version="1" operator="OR">
|
|
|
362bfa |
+ <unix:group_id datatype="int" operation="not equal">0</unix:group_id>
|
|
|
362bfa |
+ </unix:file_state>
|
|
|
362bfa |
+
|
|
|
362bfa |
+</def-group>
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..767c8c89bf7
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/rule.yml
|
|
|
362bfa |
@@ -0,0 +1,39 @@
|
|
|
362bfa |
+documentation_complete: true
|
|
|
362bfa |
+
|
|
|
362bfa |
+prodtype: rhel8
|
|
|
362bfa |
+
|
|
|
362bfa |
+title: 'System Audit Logs Must Be Group Owned By Root'
|
|
|
362bfa |
+
|
|
|
362bfa |
+description: |-
|
|
|
362bfa |
+ All audit logs must be group owned by root user. By default, the path for audit log is /var/log/audit/ .
|
|
|
362bfa |
+ {{{ describe_file_group_owner(file="/var/log/audit/*", group="root") }}}
|
|
|
362bfa |
+ If <tt>log_group</tt> in <tt>/etc/audit/auditd.conf</tt> is set to a group other than the <tt>root</tt>
|
|
|
362bfa |
+ group account, change the group ownership of the audit logs to this specific group.
|
|
|
362bfa |
+
|
|
|
362bfa |
+rationale: |-
|
|
|
362bfa |
+ Unauthorized disclosure of audit records can reveal system and configuration data to
|
|
|
362bfa |
+ attackers, thus compromising its confidentiality.
|
|
|
362bfa |
+
|
|
|
362bfa |
+severity: medium
|
|
|
362bfa |
+
|
|
|
362bfa |
+identifiers:
|
|
|
362bfa |
+ cce@rhel8: CCE-88227-4
|
|
|
362bfa |
+
|
|
|
362bfa |
+references:
|
|
|
362bfa |
+ cis-csc: 1,11,12,13,14,15,16,18,19,3,4,5,6,7,8
|
|
|
362bfa |
+ cjis: 5.4.1.1
|
|
|
362bfa |
+ cobit5: APO01.06,APO11.04,APO12.06,BAI03.05,BAI08.02,DSS02.02,DSS02.04,DSS02.07,DSS03.01,DSS05.04,DSS05.07,DSS06.02,MEA02.01
|
|
|
362bfa |
+ cui: 3.3.1
|
|
|
362bfa |
+ disa: CCI-000162,CCI-000163,CCI-000164,CCI-001314
|
|
|
362bfa |
+ isa-62443-2009: 4.2.3.10,4.3.3.3.9,4.3.3.5.8,4.3.3.7.3,4.3.4.4.7,4.3.4.5.6,4.3.4.5.7,4.3.4.5.8,4.4.2.1,4.4.2.2,4.4.2.4
|
|
|
362bfa |
+ isa-62443-2013: 'SR 2.1,SR 2.10,SR 2.11,SR 2.12,SR 2.8,SR 2.9,SR 5.2,SR 6.1'
|
|
|
362bfa |
+ iso27001-2013: A.10.1.1,A.11.1.4,A.11.1.5,A.11.2.1,A.12.4.1,A.12.4.2,A.12.4.3,A.12.4.4,A.12.7.1,A.13.1.1,A.13.1.3,A.13.2.1,A.13.2.3,A.13.2.4,A.14.1.2,A.14.1.3,A.16.1.4,A.16.1.5,A.16.1.7,A.6.1.2,A.7.1.1,A.7.1.2,A.7.3.1,A.8.2.2,A.8.2.3,A.9.1.1,A.9.1.2,A.9.2.3,A.9.4.1,A.9.4.4,A.9.4.5
|
|
|
362bfa |
+ nist: CM-6(a),AC-6(1),AU-9(4)
|
|
|
362bfa |
+ nist-csf: DE.AE-3,DE.AE-5,PR.AC-4,PR.DS-5,PR.PT-1,RS.AN-1,RS.AN-4
|
|
|
362bfa |
+ pcidss: Req-10.5.1
|
|
|
362bfa |
+ srg: SRG-OS-000057-GPOS-00027,SRG-OS-000058-GPOS-00028,SRG-OS-000059-GPOS-00029,SRG-OS-000206-GPOS-00084
|
|
|
362bfa |
+ stigid@rhel8: RHEL-08-030090
|
|
|
362bfa |
+
|
|
|
362bfa |
+ocil: |-
|
|
|
362bfa |
+ {{{ describe_file_group_owner(file="/var/log/audit/*", group="root") }}}
|
|
|
362bfa |
+
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/correct_value.pass.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..e4e69bff538
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/correct_value.pass.sh
|
|
|
362bfa |
@@ -0,0 +1,5 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+sed -i "/\s*log_group.*/d" /etc/audit/auditd.conf
|
|
|
362bfa |
+echo "log_group = root" >> /etc/audit/auditd.conf
|
|
|
362bfa |
+chgrp root /var/log/audit/audit.log*
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/correct_value_non-root_group.pass.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/correct_value_non-root_group.pass.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..89995b11954
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/correct_value_non-root_group.pass.sh
|
|
|
362bfa |
@@ -0,0 +1,8 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+groupadd group_test
|
|
|
362bfa |
+
|
|
|
362bfa |
+sed -i "/\s*log_group.*/d" /etc/audit/auditd.conf
|
|
|
362bfa |
+echo "log_group = group_test" >> /etc/audit/auditd.conf
|
|
|
362bfa |
+
|
|
|
362bfa |
+chgrp group_test /var/log/audit
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/wrong_value.fail.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..37c0f070ae1
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_group_ownership_var_log_audit/tests/wrong_value.fail.sh
|
|
|
362bfa |
@@ -0,0 +1,7 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+sed -i "/\s*log_group.*/d" /etc/audit/auditd.conf
|
|
|
362bfa |
+echo "log_group = root" >> /etc/audit/auditd.conf
|
|
|
362bfa |
+touch /var/log/audit/audit.log.1
|
|
|
362bfa |
+groupadd group_test
|
|
|
362bfa |
+chgrp group_test /var/log/audit/audit.log.1
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/bash/shared.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/bash/shared.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..ee2364a4a69
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/bash/shared.sh
|
|
|
362bfa |
@@ -0,0 +1,3 @@
|
|
|
362bfa |
+# platform = multi_platform_all
|
|
|
362bfa |
+
|
|
|
362bfa |
+chown root /var/log/audit/audit.log*
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/oval/shared.xml b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/oval/shared.xml
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..c20353b5926
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/oval/shared.xml
|
|
|
362bfa |
@@ -0,0 +1,24 @@
|
|
|
362bfa |
+<def-group>
|
|
|
362bfa |
+ <definition class="compliance" id="file_ownership_var_log_audit_stig" version="1">
|
|
|
362bfa |
+ {{{ oval_metadata("Checks that all /var/log/audit files are owned by the root user.") }}}
|
|
|
362bfa |
+ <criteria comment="files are root owned">
|
|
|
362bfa |
+ <criterion test_ref="test_user_ownership_var_log_audit_files" />
|
|
|
362bfa |
+ </criteria>
|
|
|
362bfa |
+ </definition>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_test check="all" check_existence="none_exist" comment="/var/log/audit files uid root" id="test_user_ownership_var_log_audit_files" version="1">
|
|
|
362bfa |
+ <unix:object object_ref="object_user_ownership_var_log_audit_files" />
|
|
|
362bfa |
+ </unix:file_test>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_object comment="/var/log/audit files" id="object_user_ownership_var_log_audit_files" version="1">
|
|
|
362bfa |
+ <unix:behaviors recurse="directories" recurse_direction="down" max_depth="-1" recurse_file_system="all" />
|
|
|
362bfa |
+ <unix:path operation="equals">/var/log/audit</unix:path>
|
|
|
362bfa |
+ <unix:filename operation="pattern match">^.*$</unix:filename>
|
|
|
362bfa |
+ <filter action="include">state_group_user_owner_not_root_var_log_audit</filter>
|
|
|
362bfa |
+ </unix:file_object>
|
|
|
362bfa |
+
|
|
|
362bfa |
+ <unix:file_state id="state_group_user_owner_not_root_var_log_audit" version="1" operator="OR">
|
|
|
362bfa |
+ <unix:user_id datatype="int" operation="not equal">0</unix:user_id>
|
|
|
362bfa |
+ </unix:file_state>
|
|
|
362bfa |
+
|
|
|
362bfa |
+</def-group>
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/rule.yml
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..7f895759486
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/rule.yml
|
|
|
362bfa |
@@ -0,0 +1,36 @@
|
|
|
362bfa |
+documentation_complete: true
|
|
|
362bfa |
+
|
|
|
362bfa |
+prodtype: rhel8
|
|
|
362bfa |
+
|
|
|
362bfa |
+title: 'System Audit Logs Must Be Owned By Root'
|
|
|
362bfa |
+
|
|
|
362bfa |
+description: |-
|
|
|
362bfa |
+ All audit logs must be owned by root user. By default, the path for audit log is /var/log/audit/ .
|
|
|
362bfa |
+ {{{ describe_file_owner(file="/var/log/audit/*", owner="root") }}}
|
|
|
362bfa |
+
|
|
|
362bfa |
+rationale: |-
|
|
|
362bfa |
+ Unauthorized disclosure of audit records can reveal system and configuration data to
|
|
|
362bfa |
+ attackers, thus compromising its confidentiality.
|
|
|
362bfa |
+
|
|
|
362bfa |
+severity: medium
|
|
|
362bfa |
+
|
|
|
362bfa |
+identifiers:
|
|
|
362bfa |
+ cce@rhel8: CCE-88228-2
|
|
|
362bfa |
+
|
|
|
362bfa |
+references:
|
|
|
362bfa |
+ cis-csc: 1,11,12,13,14,15,16,18,19,3,4,5,6,7,8
|
|
|
362bfa |
+ cjis: 5.4.1.1
|
|
|
362bfa |
+ cobit5: APO01.06,APO11.04,APO12.06,BAI03.05,BAI08.02,DSS02.02,DSS02.04,DSS02.07,DSS03.01,DSS05.04,DSS05.07,DSS06.02,MEA02.01
|
|
|
362bfa |
+ cui: 3.3.1
|
|
|
362bfa |
+ disa: CCI-000162,CCI-000163,CCI-000164,CCI-001314
|
|
|
362bfa |
+ isa-62443-2009: 4.2.3.10,4.3.3.3.9,4.3.3.5.8,4.3.3.7.3,4.3.4.4.7,4.3.4.5.6,4.3.4.5.7,4.3.4.5.8,4.4.2.1,4.4.2.2,4.4.2.4
|
|
|
362bfa |
+ isa-62443-2013: 'SR 2.1,SR 2.10,SR 2.11,SR 2.12,SR 2.8,SR 2.9,SR 5.2,SR 6.1'
|
|
|
362bfa |
+ iso27001-2013: A.10.1.1,A.11.1.4,A.11.1.5,A.11.2.1,A.12.4.1,A.12.4.2,A.12.4.3,A.12.4.4,A.12.7.1,A.13.1.1,A.13.1.3,A.13.2.1,A.13.2.3,A.13.2.4,A.14.1.2,A.14.1.3,A.16.1.4,A.16.1.5,A.16.1.7,A.6.1.2,A.7.1.1,A.7.1.2,A.7.3.1,A.8.2.2,A.8.2.3,A.9.1.1,A.9.1.2,A.9.2.3,A.9.4.1,A.9.4.4,A.9.4.5
|
|
|
362bfa |
+ nist: CM-6(a),AC-6(1),AU-9(4)
|
|
|
362bfa |
+ nist-csf: DE.AE-3,DE.AE-5,PR.AC-4,PR.DS-5,PR.PT-1,RS.AN-1,RS.AN-4
|
|
|
362bfa |
+ pcidss: Req-10.5.1
|
|
|
362bfa |
+ srg: SRG-OS-000057-GPOS-00027,SRG-OS-000058-GPOS-00028,SRG-OS-000059-GPOS-00029,SRG-OS-000206-GPOS-00084
|
|
|
362bfa |
+ stigid@rhel8: RHEL-08-030080
|
|
|
362bfa |
+
|
|
|
362bfa |
+ocil: |-
|
|
|
362bfa |
+ {{{ describe_file_owner(file="/var/log/audit/*", owner="root") }}}
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/tests/correct_value.pass.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/tests/correct_value.pass.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..eed3164eb31
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/tests/correct_value.pass.sh
|
|
|
362bfa |
@@ -0,0 +1,3 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+chown root /var/log/audit/audit.log*
|
|
|
362bfa |
diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/tests/wrong_value.fail.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/tests/wrong_value.fail.sh
|
|
|
362bfa |
new file mode 100644
|
|
|
362bfa |
index 00000000000..32a678562cf
|
|
|
362bfa |
--- /dev/null
|
|
|
362bfa |
+++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_var_log_audit_stig/tests/wrong_value.fail.sh
|
|
|
362bfa |
@@ -0,0 +1,5 @@
|
|
|
362bfa |
+#!/bin/bash
|
|
|
362bfa |
+
|
|
|
362bfa |
+touch /var/log/audit/audit.log.1
|
|
|
362bfa |
+useradd testuser_123
|
|
|
362bfa |
+chown testuser_123 /var/log/audit/audit.log.1
|
|
|
362bfa |
diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile
|
|
|
362bfa |
index 7270a8f91f2..7d2d386604e 100644
|
|
|
362bfa |
--- a/products/rhel8/profiles/stig.profile
|
|
|
362bfa |
+++ b/products/rhel8/profiles/stig.profile
|
|
|
362bfa |
@@ -625,10 +625,17 @@ selections:
|
|
|
362bfa |
# RHEL-08-030070
|
|
|
362bfa |
- file_permissions_var_log_audit
|
|
|
362bfa |
|
|
|
362bfa |
- # RHEL-08-030080, RHEL-08-030090, RHEL-08-030100, RHEL-08-030110
|
|
|
362bfa |
- ### NOTE: These might get broken up, but currently the following
|
|
|
362bfa |
- ### rule accounts for these STIG ID's
|
|
|
362bfa |
- - file_ownership_var_log_audit
|
|
|
362bfa |
+ # RHEL-08-030080
|
|
|
362bfa |
+ - file_ownership_var_log_audit_stig
|
|
|
362bfa |
+
|
|
|
362bfa |
+ # RHEL-08-030090
|
|
|
362bfa |
+ - file_group_ownership_var_log_audit
|
|
|
362bfa |
+
|
|
|
362bfa |
+ # RHEL-08-030100
|
|
|
362bfa |
+ - directory_ownership_var_log_audit
|
|
|
362bfa |
+
|
|
|
362bfa |
+ # RHEL-08-030110
|
|
|
362bfa |
+ - directory_group_ownership_var_log_audit
|
|
|
362bfa |
|
|
|
362bfa |
# RHEL-08-030120
|
|
|
362bfa |
- directory_permissions_var_log_audit
|
|
|
362bfa |
diff --git a/shared/checks/oval/auditd_conf_log_group_not_root.xml b/shared/checks/oval/auditd_conf_log_group_not_root.xml
|
|
|
362bfa |
index 93e47d119ef..2871052796e 100644
|
|
|
362bfa |
--- a/shared/checks/oval/auditd_conf_log_group_not_root.xml
|
|
|
362bfa |
+++ b/shared/checks/oval/auditd_conf_log_group_not_root.xml
|
|
|
362bfa |
@@ -8,9 +8,11 @@
|
|
|
362bfa |
<description>Verify 'log_group' is not set to 'root' in
|
|
|
362bfa |
/etc/audit/auditd.conf.</description>
|
|
|
362bfa |
</metadata>
|
|
|
362bfa |
- <criteria>
|
|
|
362bfa |
+ <criteria operator="AND">
|
|
|
362bfa |
|
|
|
362bfa |
comment="Verify 'log_group' not set to 'root' in /etc/audit/auditd.conf" />
|
|
|
362bfa |
+
|
|
|
362bfa |
+ comment="Verify 'log_group' is set in /etc/audit/auditd.conf" />
|
|
|
362bfa |
</criteria>
|
|
|
362bfa |
</definition>
|
|
|
362bfa |
|
|
|
362bfa |
@@ -26,4 +28,20 @@
|
|
|
362bfa |
<ind:instance datatype="int">1</ind:instance>
|
|
|
362bfa |
</ind:textfilecontent54_object>
|
|
|
362bfa |
|
|
|
362bfa |
+
|
|
|
362bfa |
+ By default, log_group is set to root, so we need to make sure something is set
|
|
|
362bfa |
+ to meet this criterion.
|
|
|
362bfa |
+ -->
|
|
|
362bfa |
+
|
|
|
362bfa |
+ check_existence="all_exist" comment="log_group is set" version="1">
|
|
|
362bfa |
+ <ind:object object_ref="object_auditd_conf_log_group_is_set" />
|
|
|
362bfa |
+ </ind:textfilecontent54_test>
|
|
|
362bfa |
+
|
|
|
362bfa |
+
|
|
|
362bfa |
+ comment="log_group is set" version="1">
|
|
|
362bfa |
+ <ind:filepath operation="equals">/etc/audit/auditd.conf</ind:filepath>
|
|
|
362bfa |
+ <ind:pattern operation="pattern match">^[ ]*log_group[ ]+=.*$</ind:pattern>
|
|
|
362bfa |
+ <ind:instance datatype="int">1</ind:instance>
|
|
|
362bfa |
+ </ind:textfilecontent54_object>
|
|
|
362bfa |
+
|
|
|
362bfa |
</def-group>
|
|
|
362bfa |
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
|
|
|
362bfa |
index 665f903ead4..b77e9abeb0b 100644
|
|
|
362bfa |
--- a/shared/references/cce-redhat-avail.txt
|
|
|
362bfa |
+++ b/shared/references/cce-redhat-avail.txt
|
|
|
362bfa |
@@ -2355,10 +2355,6 @@ CCE-88221-7
|
|
|
362bfa |
CCE-88222-5
|
|
|
362bfa |
CCE-88223-3
|
|
|
362bfa |
CCE-88224-1
|
|
|
362bfa |
-CCE-88225-8
|
|
|
362bfa |
-CCE-88226-6
|
|
|
362bfa |
-CCE-88227-4
|
|
|
362bfa |
-CCE-88228-2
|
|
|
362bfa |
CCE-88229-0
|
|
|
362bfa |
CCE-88230-8
|
|
|
362bfa |
CCE-88231-6
|
|
|
362bfa |
diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile
|
|
|
362bfa |
index 7d59cfff625..6c97a5a8ca3 100644
|
|
|
362bfa |
--- a/tests/data/profile_stability/rhel8/stig.profile
|
|
|
362bfa |
+++ b/tests/data/profile_stability/rhel8/stig.profile
|
|
|
362bfa |
@@ -103,6 +103,8 @@ selections:
|
|
|
362bfa |
- dir_group_ownership_library_dirs
|
|
|
362bfa |
- dir_perms_world_writable_root_owned
|
|
|
362bfa |
- dir_perms_world_writable_sticky_bits
|
|
|
362bfa |
+- directory_group_ownership_var_log_audit
|
|
|
362bfa |
+- directory_ownership_var_log_audit
|
|
|
362bfa |
- directory_permissions_var_log_audit
|
|
|
362bfa |
- disable_ctrlaltdel_burstaction
|
|
|
362bfa |
- disable_ctrlaltdel_reboot
|
|
|
362bfa |
@@ -113,6 +115,7 @@ selections:
|
|
|
362bfa |
- encrypt_partitions
|
|
|
362bfa |
- ensure_gpgcheck_globally_activated
|
|
|
362bfa |
- ensure_gpgcheck_local_packages
|
|
|
362bfa |
+- file_group_ownership_var_log_audit
|
|
|
362bfa |
- file_groupowner_var_log
|
|
|
362bfa |
- file_groupowner_var_log_messages
|
|
|
362bfa |
- file_groupownership_home_directories
|
|
|
362bfa |
@@ -121,7 +124,7 @@ selections:
|
|
|
362bfa |
- file_owner_var_log_messages
|
|
|
362bfa |
- file_ownership_binary_dirs
|
|
|
362bfa |
- file_ownership_library_dirs
|
|
|
362bfa |
-- file_ownership_var_log_audit
|
|
|
362bfa |
+- file_ownership_var_log_audit_stig
|
|
|
362bfa |
- file_permission_user_init_files
|
|
|
362bfa |
- file_permissions_binary_dirs
|
|
|
362bfa |
- file_permissions_etc_audit_auditd
|
|
|
362bfa |
diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
362bfa |
index 2c2daad6f6d..d026a40a02b 100644
|
|
|
362bfa |
--- a/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
362bfa |
+++ b/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
362bfa |
@@ -114,6 +114,8 @@ selections:
|
|
|
362bfa |
- dir_group_ownership_library_dirs
|
|
|
362bfa |
- dir_perms_world_writable_root_owned
|
|
|
362bfa |
- dir_perms_world_writable_sticky_bits
|
|
|
362bfa |
+- directory_group_ownership_var_log_audit
|
|
|
362bfa |
+- directory_ownership_var_log_audit
|
|
|
362bfa |
- directory_permissions_var_log_audit
|
|
|
362bfa |
- disable_ctrlaltdel_burstaction
|
|
|
362bfa |
- disable_ctrlaltdel_reboot
|
|
|
362bfa |
@@ -124,6 +126,7 @@ selections:
|
|
|
362bfa |
- encrypt_partitions
|
|
|
362bfa |
- ensure_gpgcheck_globally_activated
|
|
|
362bfa |
- ensure_gpgcheck_local_packages
|
|
|
362bfa |
+- file_group_ownership_var_log_audit
|
|
|
362bfa |
- file_groupowner_var_log
|
|
|
362bfa |
- file_groupowner_var_log_messages
|
|
|
362bfa |
- file_groupownership_home_directories
|
|
|
362bfa |
@@ -132,7 +135,7 @@ selections:
|
|
|
362bfa |
- file_owner_var_log_messages
|
|
|
362bfa |
- file_ownership_binary_dirs
|
|
|
362bfa |
- file_ownership_library_dirs
|
|
|
362bfa |
-- file_ownership_var_log_audit
|
|
|
362bfa |
+- file_ownership_var_log_audit_stig
|
|
|
362bfa |
- file_permission_user_init_files
|
|
|
362bfa |
- file_permissions_binary_dirs
|
|
|
362bfa |
- file_permissions_etc_audit_auditd
|