Blame SOURCES/scap-security-guide-0.1.58-RHEL_08_030710-PR_7268.patch

9be3b2
From 2f38b61e9b6b26dab05443a9bf03642971cbeeef Mon Sep 17 00:00:00 2001
9be3b2
From: Matthew Burket <mburket@redhat.com>
9be3b2
Date: Fri, 23 Jul 2021 16:32:15 -0500
9be3b2
Subject: [PATCH] Add new rule for RHEL-08-030710
9be3b2
9be3b2
---
9be3b2
 .../ansible/shared.yml                        |  5 +++
9be3b2
 .../bash/shared.sh                            |  6 +++
9be3b2
 .../oval/shared.xml                           | 44 +++++++++++++++++++
9be3b2
 .../rule.yml                                  | 38 ++++++++++++++++
9be3b2
 .../tests/default_no_pass.fail.sh             |  7 +++
9be3b2
 .../tests/rsyslog.pass.sh                     |  4 ++
9be3b2
 .../tests/rsyslog_wrong_value.fail.sh         |  4 ++
9be3b2
 .../tests/rsyslogd.pass.sh                    |  4 ++
9be3b2
 .../tests/rsyslogd_wrong_value.fail.sh        |  4 ++
9be3b2
 .../tests/setup.sh                            |  9 ++++
9be3b2
 .../ansible/shared.yml                        |  5 +++
9be3b2
 .../bash/shared.sh                            |  5 +++
9be3b2
 .../oval/shared.xml                           | 44 +++++++++++++++++++
9be3b2
 .../rule.yml                                  | 38 ++++++++++++++++
9be3b2
 .../tests/default_no_pass.fail.sh             |  7 +++
9be3b2
 .../tests/rsyslog.pass.sh                     |  4 ++
9be3b2
 .../tests/rsyslog_wrong_value.fail.sh         |  4 ++
9be3b2
 .../tests/rsyslogd.pass.sh                    |  4 ++
9be3b2
 .../tests/rsyslogd_wrong_value.fail.sh        |  4 ++
9be3b2
 .../tests/setup.sh                            |  9 ++++
9be3b2
 products/rhel8/profiles/stig.profile          |  2 +
9be3b2
 shared/references/cce-redhat-avail.txt        |  2 -
9be3b2
 .../data/profile_stability/rhel8/stig.profile |  2 +
9be3b2
 .../profile_stability/rhel8/stig_gui.profile  |  2 +
9be3b2
 24 files changed, 255 insertions(+), 2 deletions(-)
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/ansible/shared.yml
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/bash/shared.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/oval/shared.xml
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/rule.yml
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/default_no_pass.fail.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslog.pass.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslog_wrong_value.fail.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslogd.pass.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslogd_wrong_value.fail.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/setup.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/ansible/shared.yml
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/bash/shared.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/oval/shared.xml
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/rule.yml
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/default_no_pass.fail.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslog.pass.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslog_wrong_value.fail.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslogd.pass.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslogd_wrong_value.fail.sh
9be3b2
 create mode 100644 linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/setup.sh
9be3b2
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/ansible/shared.yml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/ansible/shared.yml
9be3b2
new file mode 100644
9be3b2
index 0000000000..2d6c5227a8
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/ansible/shared.yml
9be3b2
@@ -0,0 +1,5 @@
9be3b2
+# platform = Red Hat Enterprise Linux 8,multi_platform_fedora
9be3b2
+
9be3b2
+{{{ ansible_set_config_file(file="/etc/rsyslog.d/encrypt.conf",
9be3b2
+             parameter="\$ActionSendStreamDriverMode", value="1", create=true, separator=" ", separator_regex=" ")
9be3b2
+}}}
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/bash/shared.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/bash/shared.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..36853d1786
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/bash/shared.sh
9be3b2
@@ -0,0 +1,6 @@
9be3b2
+#!/bin/bash
9be3b2
+# platform = Red Hat Enterprise Linux 8,multi_platform_fedora
9be3b2
+
9be3b2
+{{{ set_config_file(path="/etc/rsyslog.d/encrypt.conf",
9be3b2
+             parameter="\$ActionSendStreamDriverMode", value="1", create=true, separator=" ", separator_regex=" ")
9be3b2
+}}}
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/oval/shared.xml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/oval/shared.xml
9be3b2
new file mode 100644
9be3b2
index 0000000000..d21f8af1e4
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/oval/shared.xml
9be3b2
@@ -0,0 +1,44 @@
9be3b2
+
9be3b2
+<def-group>
9be3b2
+    <definition class="compliance" id="{{{ rule_id }}}" version="1">
9be3b2
+        {{{ oval_metadata("Rsyslogd must encrypt the off-loading of logs off of the system.") }}}
9be3b2
+        <criteria operator="AND">
9be3b2
+            <criteria operator="OR">
9be3b2
+                 
9be3b2
+                            test_ref="test_{{{rule_id}}}_action_send_stream_driver_mode_rsyslog" />
9be3b2
+                
9be3b2
+                            test_ref="test_{{{rule_id}}}_action_send_stream_driver_mode_rsyslog_dir" />
9be3b2
+            </criteria>
9be3b2
+        </criteria>
9be3b2
+    </definition>
9be3b2
+
9be3b2
+    
9be3b2
+                                comment="Check if $ActionSendStreamDriverMode 1 is set in /etc/rsyslog.conf"
9be3b2
+                                id="test_{{{rule_id}}}_action_send_stream_driver_mode_rsyslog" version="1">
9be3b2
+
9be3b2
+        <ind:object object_ref="obj_{{{rule_id}}}_action_send_stream_driver_mode_rsyslog" />
9be3b2
+    </ind:textfilecontent54_test>
9be3b2
+
9be3b2
+    
9be3b2
+                                    comment="Check if  $ActionSendStreamDriverMode 1 is set in /etc/rsyslog.conf"
9be3b2
+                                    version="1">
9be3b2
+        <ind:filepath>/etc/rsyslog.conf</ind:filepath>
9be3b2
+        <ind:pattern operation="pattern match">^\$ActionSendStreamDriverMode 1$</ind:pattern>
9be3b2
+        <ind:instance datatype="int">1</ind:instance>
9be3b2
+    </ind:textfilecontent54_object>
9be3b2
+
9be3b2
+    
9be3b2
+                                comment="Check if $ActionSendStreamDriverMode 1 is set in /etc/rsyslog.conf"
9be3b2
+                                id="test_{{{rule_id}}}_action_send_stream_driver_mode_rsyslog_dir" version="1">
9be3b2
+        <ind:object object_ref="obj_{{{rule_id}}}_action_send_stream_driver_mode_rsyslog_dir" />
9be3b2
+    </ind:textfilecontent54_test>
9be3b2
+
9be3b2
+    
9be3b2
+                                    comment="Check if $ActionSendStreamDriverMode 1 is set in /etc/rsyslog.d"
9be3b2
+                                    version="1">
9be3b2
+        <ind:path>/etc/rsyslog.d</ind:path>
9be3b2
+        <ind:filename operation="pattern match">^.*conf$</ind:filename>
9be3b2
+        <ind:pattern operation="pattern match">^\$ActionSendStreamDriverMode 1$</ind:pattern>
9be3b2
+        <ind:instance datatype="int">1</ind:instance>
9be3b2
+    </ind:textfilecontent54_object>
9be3b2
+</def-group>
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/rule.yml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/rule.yml
9be3b2
new file mode 100644
9be3b2
index 0000000000..1bcc33927b
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/rule.yml
9be3b2
@@ -0,0 +1,38 @@
9be3b2
+documentation_complete: true
9be3b2
+
9be3b2
+title: Ensure Rsyslog Encrypts Off-Loaded Audit Records
9be3b2
+
9be3b2
+description: |-
9be3b2
+  Rsyslogd is a system utility providing support for message logging. Support
9be3b2
+  for both internet and UNIX domain sockets enables this utility to support both local
9be3b2
+  and remote logging.  Couple this utility with <tt>gnutls</tt> (which is a secure communications
9be3b2
+  library implementing the SSL, TLS and DTLS protocols), and you have a method to securely
9be3b2
+  encrypt and off-load auditing.
9be3b2
+
9be3b2
+  When using <tt>rsyslogd</tt> to off-load logs off a encrpytion system must be used.
9be3b2
+
9be3b2
+rationale: |-
9be3b2
+    The audit records generated by Rsyslog contain valuable information regarding system
9be3b2
+    configuration, user authentication, and other such information. Audit records should be
9be3b2
+    protected from unauthorized access.
9be3b2
+
9be3b2
+severity: medium
9be3b2
+
9be3b2
+identifiers:
9be3b2
+    cce@rhel8: CCE-86098-1
9be3b2
+
9be3b2
+references:
9be3b2
+    disa: CCI-001851
9be3b2
+    nist: AU-4(1)
9be3b2
+    srg: SRG-OS-000342-GPOS-00133,SRG-OS-000479-GPOS-00224
9be3b2
+    stigid@rhel8: RHEL-08-030710
9be3b2
+
9be3b2
+ocil_clause: 'rsyslogd ActionSendStreamDriverMode not set to 1'
9be3b2
+
9be3b2
+ocil: |-
9be3b2
+    Verify the operating system encrypts audit records off-loaded onto a different system
9be3b2
+    or media from the system being audited with the following commands:
9be3b2
+
9be3b2
+    
$ sudo grep -i '$ActionSendStreamDriverMode' /etc/rsyslog.conf /etc/rsyslog.d/*.conf
9be3b2
+    The output should be
9be3b2
+    
/etc/rsyslog.conf:$ActionSendStreamDriverMode 1
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/default_no_pass.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/default_no_pass.fail.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..3ee5384371
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/default_no_pass.fail.sh
9be3b2
@@ -0,0 +1,7 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+if [[ -f encrypt.conf ]]; then
9be3b2
+  sed -i i/\$ActionSendStreamDriverMod//g /etc/rsyslog.d/encrypt.conf
9be3b2
+fi
9be3b2
+  sed -i i/\$ActionSendStreamDriverMod//g /etc/rsyslog.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslog.pass.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslog.pass.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..34105aaa85
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslog.pass.sh
9be3b2
@@ -0,0 +1,4 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+echo "\$ActionSendStreamDriverMode 1" >> /etc/rsyslog.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslog_wrong_value.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslog_wrong_value.fail.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..db87b2956c
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslog_wrong_value.fail.sh
9be3b2
@@ -0,0 +1,4 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+echo "\$ActionSendStreamDriverMode 0" >> /etc/rsyslog.d/encrypt.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslogd.pass.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslogd.pass.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..25e7cdf783
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslogd.pass.sh
9be3b2
@@ -0,0 +1,4 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+echo "\$ActionSendStreamDriverMode 1" >> /etc/rsyslog.d/encrypt.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslogd_wrong_value.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslogd_wrong_value.fail.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..d37882acf3
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/rsyslogd_wrong_value.fail.sh
9be3b2
@@ -0,0 +1,4 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+echo "\$ActionSendStreamDriverMode 0" >> /etc/rsyslog
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/setup.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/setup.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..9686f16bcc
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_actionsendstreamdrivermode/tests/setup.sh
9be3b2
@@ -0,0 +1,9 @@
9be3b2
+#!/bin/bash
9be3b2
+# Use this script to ensure the rsyslog directory structure and rsyslog conf file
9be3b2
+# exist in the test env.
9be3b2
+config_file=/etc/rsyslog.conf
9be3b2
+
9be3b2
+# Ensure directory structure exists (useful for container based testing)
9be3b2
+test -f $config_file || touch $config_file
9be3b2
+
9be3b2
+test -d /etc/rsyslog.d/ || mkdir /etc/rsyslog.d/
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/ansible/shared.yml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/ansible/shared.yml
9be3b2
new file mode 100644
9be3b2
index 0000000000..2ddbfb871f
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/ansible/shared.yml
9be3b2
@@ -0,0 +1,5 @@
9be3b2
+# platform = Red Hat Enterprise Linux 8,multi_platform_fedora
9be3b2
+
9be3b2
+{{{ ansible_set_config_file(file="/etc/rsyslog.d/encrypt.conf",
9be3b2
+                    parameter="\$DefaultNetstreamDriver", value="gtls", create=true, separator=" ", separator_regex=" ")
9be3b2
+}}}
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/bash/shared.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/bash/shared.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..3955346cd3
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/bash/shared.sh
9be3b2
@@ -0,0 +1,5 @@
9be3b2
+#!/bin/bash
9be3b2
+# platform = Red Hat Enterprise Linux 8,multi_platform_fedora
9be3b2
+{{{ set_config_file(path="/etc/rsyslog.d/encrypt.conf",
9be3b2
+                    parameter="\$DefaultNetstreamDriver", value="gtls", create=true, separator=" ", separator_regex=" ")
9be3b2
+}}}
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/oval/shared.xml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/oval/shared.xml
9be3b2
new file mode 100644
9be3b2
index 0000000000..71d39c179d
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/oval/shared.xml
9be3b2
@@ -0,0 +1,44 @@
9be3b2
+
9be3b2
+<def-group>
9be3b2
+    <definition class="compliance" id="{{{ rule_id }}}" version="1">
9be3b2
+        {{{ oval_metadata("Rsyslogd must encrypt the off-loading of logs off of the system.") }}}
9be3b2
+        <criteria operator="AND">
9be3b2
+            <criteria operator="OR">
9be3b2
+                 
9be3b2
+                            test_ref="test_{{{rule_id}}}_default_netstream_rsyslog" />
9be3b2
+                
9be3b2
+                            test_ref="test_{{{rule_id}}}_default_netstream_rsyslog_dir" />
9be3b2
+            </criteria>
9be3b2
+        </criteria>
9be3b2
+    </definition>
9be3b2
+
9be3b2
+    
9be3b2
+                                comment="Check if $DefaultNetstreamDriver gtls is set in /etc/rsyslog.conf"
9be3b2
+                                id="test_{{{rule_id}}}_default_netstream_rsyslog" version="1">
9be3b2
+
9be3b2
+        <ind:object object_ref="obj_{{{rule_id}}}_default_netstream_rsyslog" />
9be3b2
+    </ind:textfilecontent54_test>
9be3b2
+
9be3b2
+    
9be3b2
+                                    comment="Check if  $DefaultNetstreamDriver gtls is set in /etc/rsyslog.conf"
9be3b2
+                                    version="1">
9be3b2
+        <ind:filepath>/etc/rsyslog.conf</ind:filepath>
9be3b2
+        <ind:pattern operation="pattern match">^\$DefaultNetstreamDriver gtls$</ind:pattern>
9be3b2
+        <ind:instance datatype="int">1</ind:instance>
9be3b2
+    </ind:textfilecontent54_object>
9be3b2
+
9be3b2
+    
9be3b2
+                                comment="Check if $DefaultNetstreamDriver gtls is set in /etc/rsyslog.conf"
9be3b2
+                                id="test_{{{rule_id}}}_default_netstream_rsyslog_dir" version="1">
9be3b2
+        <ind:object object_ref="obj_{{{rule_id}}}_default_netstream_rsyslog_dir" />
9be3b2
+    </ind:textfilecontent54_test>
9be3b2
+
9be3b2
+    
9be3b2
+                                    comment="Check if $DefaultNetstreamDriver gtls is set in /etc/rsyslog.d"
9be3b2
+                                    version="1">
9be3b2
+        <ind:path>/etc/rsyslog.d</ind:path>
9be3b2
+        <ind:filename operation="pattern match">^.*conf$</ind:filename>
9be3b2
+        <ind:pattern operation="pattern match">^\$DefaultNetstreamDriver gtls$</ind:pattern>
9be3b2
+        <ind:instance datatype="int">1</ind:instance>
9be3b2
+    </ind:textfilecontent54_object>
9be3b2
+</def-group>
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/rule.yml b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/rule.yml
9be3b2
new file mode 100644
9be3b2
index 0000000000..eff85d3fae
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/rule.yml
9be3b2
@@ -0,0 +1,38 @@
9be3b2
+documentation_complete: true
9be3b2
+
9be3b2
+title: Ensure Rsyslog Encrypts Off-Loaded Audit Records
9be3b2
+
9be3b2
+description: |-
9be3b2
+  Rsyslogd is a system utility providing support for message logging. Support
9be3b2
+  for both internet and UNIX domain sockets enables this utility to support both local
9be3b2
+  and remote logging.  Couple this utility with <tt>gnutls</tt> (which is a secure communications
9be3b2
+  library implementing the SSL, TLS and DTLS protocols), and you have a method to securely
9be3b2
+  encrypt and off-load auditing.
9be3b2
+
9be3b2
+  When using <tt>rsyslogd</tt> to off-load logs off a encrpytion system must be used.
9be3b2
+
9be3b2
+rationale: |-
9be3b2
+    The audit records generated by Rsyslog contain valuable information regarding system
9be3b2
+    configuration, user authentication, and other such information. Audit records should be
9be3b2
+    protected from unauthorized access.
9be3b2
+
9be3b2
+severity: medium
9be3b2
+
9be3b2
+identifiers:
9be3b2
+    cce@rhel8: CCE-85992-6
9be3b2
+
9be3b2
+references:
9be3b2
+    disa: CCI-001851
9be3b2
+    nist: AU-4(1)
9be3b2
+    srg: SRG-OS-000342-GPOS-00133,SRG-OS-000479-GPOS-00224
9be3b2
+    stigid@rhel8: RHEL-08-030710
9be3b2
+
9be3b2
+ocil_clause: 'rsyslogd DefaultNetstreamDriver not set to gtls'
9be3b2
+
9be3b2
+ocil: |-
9be3b2
+    Verify the operating system encrypts audit records off-loaded onto a different system
9be3b2
+    or media from the system being audited with the following commands:
9be3b2
+
9be3b2
+    
$ sudo grep -i '$DefaultNetstreamDriver' /etc/rsyslog.conf /etc/rsyslog.d/*.conf
9be3b2
+    The output should be
9be3b2
+    
/etc/rsyslog.conf:$DefaultNetstreamDriver gtls
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/default_no_pass.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/default_no_pass.fail.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..6ab43bfc0d
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/default_no_pass.fail.sh
9be3b2
@@ -0,0 +1,7 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+if [[ -f encrypt.conf ]]; then
9be3b2
+  sed -i i/\$DefaultNetstreamDriver*.$//g /etc/rsyslog.d/encrypt.conf
9be3b2
+fi
9be3b2
+  sed -i i/\$DefaultNetstreamDriver*.$//g /etc/rsyslog.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslog.pass.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslog.pass.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..40f1bfe087
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslog.pass.sh
9be3b2
@@ -0,0 +1,4 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+echo "\$DefaultNetstreamDriver gtls" >> /etc/rsyslog.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslog_wrong_value.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslog_wrong_value.fail.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..30a1d5b43a
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslog_wrong_value.fail.sh
9be3b2
@@ -0,0 +1,4 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+echo "\$DefaultNetstreamDriver none" >> /etc/rsyslog.d/encrypt.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslogd.pass.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslogd.pass.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..44715bca66
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslogd.pass.sh
9be3b2
@@ -0,0 +1,4 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+echo "\$DefaultNetstreamDriver gtls" >> /etc/rsyslog.d/encrypt.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslogd_wrong_value.fail.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslogd_wrong_value.fail.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..30a1d5b43a
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/rsyslogd_wrong_value.fail.sh
9be3b2
@@ -0,0 +1,4 @@
9be3b2
+#!/bin/bash
9be3b2
+bash -x setup.sh
9be3b2
+
9be3b2
+echo "\$DefaultNetstreamDriver none" >> /etc/rsyslog.d/encrypt.conf
9be3b2
diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/setup.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/setup.sh
9be3b2
new file mode 100644
9be3b2
index 0000000000..9686f16bcc
9be3b2
--- /dev/null
9be3b2
+++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_encrypt_offload_defaultnetstreamdriver/tests/setup.sh
9be3b2
@@ -0,0 +1,9 @@
9be3b2
+#!/bin/bash
9be3b2
+# Use this script to ensure the rsyslog directory structure and rsyslog conf file
9be3b2
+# exist in the test env.
9be3b2
+config_file=/etc/rsyslog.conf
9be3b2
+
9be3b2
+# Ensure directory structure exists (useful for container based testing)
9be3b2
+test -f $config_file || touch $config_file
9be3b2
+
9be3b2
+test -d /etc/rsyslog.d/ || mkdir /etc/rsyslog.d/
9be3b2
diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile
9be3b2
index 6372d13cfc..1cc53cf1e1 100644
9be3b2
--- a/products/rhel8/profiles/stig.profile
9be3b2
+++ b/products/rhel8/profiles/stig.profile
9be3b2
@@ -828,6 +828,8 @@ selections:
9be3b2
     - auditd_overflow_action
9be3b2
 
9be3b2
     # RHEL-08-030710
9be3b2
+    - rsyslog_encrypt_offload_defaultnetstreamdriver
9be3b2
+    - rsyslog_encrypt_offload_actionsendstreamdrivermode
9be3b2
 
9be3b2
     # RHEL-08-030720
9be3b2
 
9be3b2
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
9be3b2
index 24e8149168..fdf69f6baa 100644
9be3b2
--- a/shared/references/cce-redhat-avail.txt
9be3b2
+++ b/shared/references/cce-redhat-avail.txt
9be3b2
@@ -129,7 +129,6 @@ CCE-85988-4
9be3b2
 CCE-85989-2
9be3b2
 CCE-85990-0
9be3b2
 CCE-85991-8
9be3b2
-CCE-85992-6
9be3b2
 CCE-85993-4
9be3b2
 CCE-85994-2
9be3b2
 CCE-85995-9
9be3b2
@@ -235,7 +234,6 @@ CCE-86094-0
9be3b2
 CCE-86095-7
9be3b2
 CCE-86096-5
9be3b2
 CCE-86097-3
9be3b2
-CCE-86098-1
9be3b2
 CCE-86099-9
9be3b2
 CCE-86100-5
9be3b2
 CCE-86101-3
9be3b2
diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile
9be3b2
index 32f1a24a7a..c0ef381696 100644
9be3b2
--- a/tests/data/profile_stability/rhel8/stig.profile
9be3b2
+++ b/tests/data/profile_stability/rhel8/stig.profile
9be3b2
@@ -228,6 +228,8 @@ selections:
9be3b2
 - require_singleuser_auth
9be3b2
 - root_permissions_syslibrary_files
9be3b2
 - rsyslog_cron_logging
9be3b2
+- rsyslog_encrypt_offload_actionsendstreamdrivermode
9be3b2
+- rsyslog_encrypt_offload_defaultnetstreamdriver
9be3b2
 - rsyslog_remote_access_monitoring
9be3b2
 - rsyslog_remote_loghost
9be3b2
 - security_patches_up_to_date
9be3b2
diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile
9be3b2
index d6a27c67dc..5adeea4a35 100644
9be3b2
--- a/tests/data/profile_stability/rhel8/stig_gui.profile
9be3b2
+++ b/tests/data/profile_stability/rhel8/stig_gui.profile
9be3b2
@@ -239,6 +239,8 @@ selections:
9be3b2
 - require_singleuser_auth
9be3b2
 - root_permissions_syslibrary_files
9be3b2
 - rsyslog_cron_logging
9be3b2
+- rsyslog_encrypt_offload_actionsendstreamdrivermode
9be3b2
+- rsyslog_encrypt_offload_defaultnetstreamdriver
9be3b2
 - rsyslog_remote_access_monitoring
9be3b2
 - rsyslog_remote_loghost
9be3b2
 - security_patches_up_to_date