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

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