diff --git a/rhel8-playbook-stig.yml b/rhel8-playbook-stig.yml
index 4d96250..fd49196 100644
--- a/rhel8-playbook-stig.yml
+++ b/rhel8-playbook-stig.yml
@@ -36643,7 +36643,7 @@
create: true
dest: /etc/modprobe.d/atm.conf
regexp: install\s+atm
- line: install atm /bin/true
+ line: install atm /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-82028-2
@@ -36680,7 +36680,7 @@
create: true
dest: /etc/modprobe.d/can.conf
regexp: install\s+can
- line: install can /bin/true
+ line: install can /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-82059-7
@@ -36717,7 +36717,7 @@
create: true
dest: /etc/modprobe.d/firewire-core.conf
regexp: install\s+firewire-core
- line: install firewire-core /bin/true
+ line: install firewire-core /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-82005-0
@@ -36754,7 +36754,7 @@
create: true
dest: /etc/modprobe.d/sctp.conf
regexp: install\s+sctp
- line: install sctp /bin/true
+ line: install sctp /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-80834-5
@@ -36803,7 +36803,7 @@
create: true
dest: /etc/modprobe.d/tipc.conf
regexp: install\s+tipc
- line: install tipc /bin/true
+ line: install tipc /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-82297-3
@@ -36844,7 +36844,7 @@
create: true
dest: /etc/modprobe.d/bluetooth.conf
regexp: install\s+bluetooth
- line: install bluetooth /bin/true
+ line: install bluetooth /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-80832-9
@@ -38707,7 +38707,7 @@
create: true
dest: /etc/modprobe.d/cramfs.conf
regexp: install\s+cramfs
- line: install cramfs /bin/true
+ line: install cramfs /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-81031-7
@@ -38750,7 +38750,7 @@
create: true
dest: /etc/modprobe.d/usb-storage.conf
regexp: install\s+usb-storage
- line: install usb-storage /bin/true
+ line: install usb-storage /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-80835-2
@@ -41402,7 +41402,7 @@
create: true
dest: /etc/modprobe.d/uvcvideo.conf
regexp: install\s+uvcvideo
- line: install uvcvideo /bin/true
+ line: install uvcvideo /bin/false
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
- CCE-86960-2
diff --git a/rhel8-script-stig.sh b/rhel8-script-stig.sh
index f5ab792..0010696 100644
--- a/rhel8-script-stig.sh
+++ b/rhel8-script-stig.sh
@@ -31023,7 +31023,7 @@ if LC_ALL=C grep -q -m 1 "^install atm" /etc/modprobe.d/atm.conf ; then
sed -i 's#^install atm.*#install atm /bin/true#g' /etc/modprobe.d/atm.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/atm.conf
- echo "install atm /bin/true" >> /etc/modprobe.d/atm.conf
+ echo "install atm /bin/false" >> /etc/modprobe.d/atm.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist atm$" /etc/modprobe.d/atm.conf ; then
@@ -31048,7 +31048,7 @@ if LC_ALL=C grep -q -m 1 "^install can" /etc/modprobe.d/can.conf ; then
sed -i 's#^install can.*#install can /bin/true#g' /etc/modprobe.d/can.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/can.conf
- echo "install can /bin/true" >> /etc/modprobe.d/can.conf
+ echo "install can /bin/false" >> /etc/modprobe.d/can.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist can$" /etc/modprobe.d/can.conf ; then
@@ -31073,7 +31073,7 @@ if LC_ALL=C grep -q -m 1 "^install firewire-core" /etc/modprobe.d/firewire-core.
sed -i 's#^install firewire-core.*#install firewire-core /bin/true#g' /etc/modprobe.d/firewire-core.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/firewire-core.conf
- echo "install firewire-core /bin/true" >> /etc/modprobe.d/firewire-core.conf
+ echo "install firewire-core /bin/false" >> /etc/modprobe.d/firewire-core.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist firewire-core$" /etc/modprobe.d/firewire-core.conf ; then
@@ -31098,7 +31098,7 @@ if LC_ALL=C grep -q -m 1 "^install sctp" /etc/modprobe.d/sctp.conf ; then
sed -i 's#^install sctp.*#install sctp /bin/true#g' /etc/modprobe.d/sctp.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/sctp.conf
- echo "install sctp /bin/true" >> /etc/modprobe.d/sctp.conf
+ echo "install sctp /bin/false" >> /etc/modprobe.d/sctp.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist sctp$" /etc/modprobe.d/sctp.conf ; then
@@ -31123,7 +31123,7 @@ if LC_ALL=C grep -q -m 1 "^install tipc" /etc/modprobe.d/tipc.conf ; then
sed -i 's#^install tipc.*#install tipc /bin/true#g' /etc/modprobe.d/tipc.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/tipc.conf
- echo "install tipc /bin/true" >> /etc/modprobe.d/tipc.conf
+ echo "install tipc /bin/false" >> /etc/modprobe.d/tipc.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist tipc$" /etc/modprobe.d/tipc.conf ; then
@@ -31148,7 +31148,7 @@ if LC_ALL=C grep -q -m 1 "^install bluetooth" /etc/modprobe.d/bluetooth.conf ; t
sed -i 's#^install bluetooth.*#install bluetooth /bin/true#g' /etc/modprobe.d/bluetooth.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/bluetooth.conf
- echo "install bluetooth /bin/true" >> /etc/modprobe.d/bluetooth.conf
+ echo "install bluetooth /bin/false" >> /etc/modprobe.d/bluetooth.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist bluetooth$" /etc/modprobe.d/bluetooth.conf ; then
@@ -31620,7 +31620,7 @@ if LC_ALL=C grep -q -m 1 "^install cramfs" /etc/modprobe.d/cramfs.conf ; then
sed -i 's#^install cramfs.*#install cramfs /bin/true#g' /etc/modprobe.d/cramfs.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/cramfs.conf
- echo "install cramfs /bin/true" >> /etc/modprobe.d/cramfs.conf
+ echo "install cramfs /bin/false" >> /etc/modprobe.d/cramfs.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist cramfs$" /etc/modprobe.d/cramfs.conf ; then
@@ -31645,7 +31645,7 @@ if LC_ALL=C grep -q -m 1 "^install usb-storage" /etc/modprobe.d/usb-storage.conf
sed -i 's#^install usb-storage.*#install usb-storage /bin/true#g' /etc/modprobe.d/usb-storage.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/usb-storage.conf
- echo "install usb-storage /bin/true" >> /etc/modprobe.d/usb-storage.conf
+ echo "install usb-storage /bin/false" >> /etc/modprobe.d/usb-storage.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist usb-storage$" /etc/modprobe.d/usb-storage.conf ; then
@@ -32861,7 +32861,7 @@ if LC_ALL=C grep -q -m 1 "^install uvcvideo" /etc/modprobe.d/uvcvideo.conf ; the
sed -i 's#^install uvcvideo.*#install uvcvideo /bin/true#g' /etc/modprobe.d/uvcvideo.conf
else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/uvcvideo.conf
- echo "install uvcvideo /bin/true" >> /etc/modprobe.d/uvcvideo.conf
+ echo "install uvcvideo /bin/false" >> /etc/modprobe.d/uvcvideo.conf
fi
if ! LC_ALL=C grep -q -m 1 "^blacklist uvcvideo$" /etc/modprobe.d/uvcvideo.conf ; then
diff --git a/ssg-rhel8-ds-1.2.xml b/ssg-rhel8-ds-1.2.xml
index 24d9ffa..9d620a2 100644
--- a/ssg-rhel8-ds-1.2.xml
+++ b/ssg-rhel8-ds-1.2.xml
@@ -23,7 +23,7 @@
-
+
Red Hat Enterprise Linux 8
@@ -75,9 +75,9 @@
-
+
- draft
+ draft
Guide to the Secure Configuration of Red Hat Enterprise Linux 8
This guide presents a catalog of security-relevant
configuration settings for Red Hat Enterprise Linux 8. It is a rendering of
@@ -145,63 +145,99 @@ respective companies.
stigid
stigref
-
+
-
+
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
+
-
+
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -210,6 +246,12 @@ respective companies.
+
+
+
+
+
+
@@ -217,93 +259,91 @@ respective companies.
-
+
-
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
-
+
-
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
-
+
+
+
+
+
-
-
+
-
+
-
+
-
-
+
-
+
-
+
@@ -312,22 +352,10 @@ respective companies.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -340,86 +368,69 @@ respective companies.
-
+
-
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
+
-
+
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
@@ -428,50 +439,26 @@ respective companies.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
+
-
+
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
@@ -480,48 +467,47 @@ respective companies.
-
+
-
+
+
-
+
-
+
-
+
-
-
+
-
+
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -529,59 +515,73 @@ respective companies.
-
-
-
-
-
-
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
+
-
+
-
-
+
-
+
-
+
+
-
+
-
+
-
+
+
+
+
-
-
+
-
+
+
+
+
+
+
+
@@ -646,6 +646,8 @@ respective companies.
Eric Christensen <echriste@redhat.com>
Dan Clark <danclark@redhat.com>
Jayson Cofell <1051437+70k10@users.noreply.github.com>
+ David du Colombier <djc@datadoghq.com>
+ Commandcracker <lukas.fricke.dev@gmail.com>
Caleb Cooper <coopercd@ornl.gov>
cortesana <acortes@redhat.com>
Richard Maciel Costa <richard.maciel.costa@canonical.com>
@@ -669,6 +671,7 @@ respective companies.
François Duthilleul <francoisduthilleul@gmail.com>
Greg Elin <gregelin@gitmachines.com>
eradot4027 <jrtonmac@gmail.com>
+ ermeratos <manuel.ermer@atos.net>
Alexis Facques <alexis.facques@mythalesgroup.io>
Henry Finucane <hfinucane@zscaler.com>
Leah Fisher <lfisher047@gmail.com>
@@ -754,6 +757,7 @@ respective companies.
Takuya Mishina <tmishina@jp.ibm.com>
Mixer9 <35545791+Mixer9@users.noreply.github.com>
mmosel <mmosel@kde.example.com>
+ Thomas Montague <montague.thomas@gmail.com>
Zbynek Moravec <zmoravec@redhat.com>
Kazuo Moriwaka <moriwaka@users.noreply.github.com>
Michael Moseley <michael@eclipse.ncsc.mil>
@@ -780,6 +784,7 @@ respective companies.
piggyvenus <piggyvenus@gmail.com>
Vojtech Polasek <vpolasek@redhat.com>
Orion Poplawski <orion@nwra.com>
+ Jennifer Power <barnabei.jennifer@gmail.com>
Nick Poyant <npoyant@redhat.com>
Martin Preisler <mpreisle@redhat.com>
Wesley Ceraso Prudencio <wcerasop@redhat.com>
@@ -798,12 +803,14 @@ respective companies.
Pat Riehecky <riehecky@fnal.gov>
rlucente-se-jboss <rlucente@redhat.com>
Juan Antonio Osorio Robles <juan.osoriorobles@eu.equinix.com>
+ Paul Roche <paul.roche@menlosecurity.com>
Jan Rodak <hony.com@seznam.cz>
Matt Rogers <mrogers@redhat.com>
Jesse Roland <jesse.roland@onyxpoint.com>
Joshua Roys <roysjosh@gmail.com>
rrenshaw <bofh69@yahoo.com>
Chris Ruffalo <chris.ruffalo@gmail.com>
+ Benjamin Ruland <benjamin.ruland@gmail.com>
rumch-se <77793453+rumch-se@users.noreply.github.com>
Rutvik <32413084+rutvik23@users.noreply.github.com>
rutvik23 <rutksh@gmail.com>
@@ -830,6 +837,7 @@ respective companies.
Jindrich Skacel <102800748+jskacel@users.noreply.github.com>
Alexandre Skrzyniarz <alexandre.skrzyniarz@laposte.net>
Francisco Slavin <fslavin@tresys.com>
+ sluetze <13255307+sluetze@users.noreply.github.com>
Dave Smith <dsmith@eclipse.ncsc.mil>
David Smith <dsmith@fornax.eclipse.ncsc.mil>
Kevin Spargur <kspargur@redhat.com>
@@ -894,246 +902,246 @@ https://www.ssi.gouv.fr/administration/guide/recommandations-de-securite-relativ
An English version of the ANSSI-BP-028 can also be found at the ANSSI website:
https://cyber.gouv.fr/publications/configuration-recommendations-gnulinux-system
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -1369,320 +1377,320 @@ https://www.ssi.gouv.fr/administration/guide/recommandations-de-securite-relativ
An English version of the ANSSI-BP-028 can also be found at the ANSSI website:
https://cyber.gouv.fr/publications/configuration-recommendations-gnulinux-system
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -1920,175 +1928,175 @@ https://www.ssi.gouv.fr/administration/guide/recommandations-de-securite-relativ
An English version of the ANSSI-BP-028 can also be found at the ANSSI website:
https://cyber.gouv.fr/publications/configuration-recommendations-gnulinux-system
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -2334,53 +2342,53 @@ https://www.ssi.gouv.fr/administration/guide/recommandations-de-securite-relativ
An English version of the ANSSI-BP-028 can also be found at the ANSSI website:
https://cyber.gouv.fr/publications/configuration-recommendations-gnulinux-system
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2636,378 +2644,401 @@ Linux 8 Benchmark™, v2.0.0, released 2022-02-23.
This profile includes Center for Internet Security®
Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
https://www.cisecurity.org/benchmark/red_hat_linux/
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -3105,7 +3136,6 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
@@ -3137,7 +3167,6 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
@@ -3151,22 +3180,27 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
@@ -3201,8 +3235,10 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
+
+
+
@@ -3217,293 +3253,306 @@ Linux 8 Benchmark™, v2.0.0, released 2022-02-23.
This profile includes Center for Internet Security®
Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
https://www.cisecurity.org/benchmark/red_hat_linux/
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -3649,7 +3698,6 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
@@ -3664,22 +3712,27 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
@@ -3723,289 +3776,301 @@ Linux 8 Benchmark™, v2.0.0, released 2022-02-23.
This profile includes Center for Internet Security®
Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
https://www.cisecurity.org/benchmark/red_hat_linux/
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -4155,7 +4220,6 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
@@ -4171,22 +4235,27 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
@@ -4230,372 +4299,395 @@ Linux 8 Benchmark™, v2.0.0, released 2022-02-23.
This profile includes Center for Internet Security®
Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
https://www.cisecurity.org/benchmark/red_hat_linux/
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -4695,7 +4787,6 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
@@ -4728,7 +4819,6 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
@@ -4744,22 +4834,27 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
@@ -4794,8 +4889,10 @@ Red Hat Enterprise Linux 8 CIS Benchmarks™ content.
-
+
+
+
@@ -4809,111 +4906,111 @@ Policy Resource Center:
https://www.fbi.gov/services/cjis/cjis-security-policy-resource-center
https://www.fbi.gov/services/cjis/cjis-security-policy-resource-center
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
@@ -5162,216 +5259,216 @@ in NIST Special Publication 800-53.
This profile configures Red Hat Enterprise Linux 8 to the NIST Special
Publication 800-53 controls identified for securing Controlled Unclassified
Information (CUI)."
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5606,104 +5703,104 @@ ACSC website:
https://www.cyber.gov.au/acsc/view-all-content/publications/hardening-linux-workstations-and-servers
https://www.cyber.gov.au/acsc/view-all-content/publications/hardening-linux-workstations-and-servers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5931,143 +6028,143 @@ This profile configures Red Hat Enterprise Linux 8 to the HIPAA Security
Rule identified for securing of electronic protected health information.
Use of this profile in no way guarantees or makes claims against legal compliance against the HIPAA Security Rule(s).
https://www.hhs.gov/hipaa/for-professionals/index.html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -6291,171 +6388,171 @@ A copy of the ISM can be found at the ACSC website:
https://www.cyber.gov.au/ism
https://www.cyber.gov.au/ism
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -6650,216 +6747,216 @@ U.S. National Security Systems to adhere to certain configuration
parameters. Accordingly, this configuration profile is suitable for
use in U.S. National Security Systems.
https://www.niap-ccevs.org/Profile/Info.cfm?PPID=442&id=442
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -7094,257 +7191,259 @@ financial information.
This profile ensures Red Hat Enterprise Linux 8 is configured in alignment
with PCI-DSS v4.0 requirements.
https://docs-prv.pcisecuritystandards.org/PCI%20DSS/Standard/PCI-DSS-v4_0.pdf
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
@@ -7551,77 +7650,77 @@ with PCI-DSS v4.0 requirements.
configuration settings recommended by Red Hat, Inc for
Red Hat Enterprise Linux 8 instances deployed by Red Hat Certified
Cloud Providers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
@@ -7863,85 +7962,85 @@ Cloud Providers.
This profile contains rules to ensure standard security baseline
of a Red Hat Enterprise Linux 8 system. Regardless of your system's workload
all of these checks should pass.
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -8182,416 +8281,416 @@ Red Hat technologies that are based on Red Hat Enterprise Linux 8, such as:
- Red Hat Storage
- Red Hat Containers with a Red Hat Enterprise Linux 8 image
https://public.cyber.mil/stigs/downloads/?_dl_facet_stigs=operating-systems%2Cunix-linux
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
@@ -8815,413 +8914,413 @@ your Information Systems Security Officer (ISSO) lacks a documented operational
requirement for a graphical user interface, please consider using the
standard DISA STIG for Red Hat Enterprise Linux 8 profile.
https://public.cyber.mil/stigs/downloads/?_dl_facet_stigs=operating-systems%2Cunix-linux
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
@@ -9570,19 +9669,6 @@ See https://access.redhat.com/articles/6999111.
CCE-80857-6
-
-# Find which files have incorrect hash (not in /etc, because of the system related config files) and then get files names
-files_with_incorrect_hash="$(rpm -Va --noconfig | grep -E '^..5' | awk '{print $NF}' )"
-
-if [ -n "$files_with_incorrect_hash" ]; then
- # From files names get package names and change newline to space, because rpm writes each package to new line
- packages_to_reinstall="$(rpm -qf $files_with_incorrect_hash | tr '\n' ' ')"
-
-
- yum reinstall -y $packages_to_reinstall
-
-fi
-
- name: 'Set fact: Package manager reinstall command'
set_fact:
package_manager_reinstall_cmd: yum reinstall -y
@@ -9717,6 +9803,19 @@ fi
- no_reboot_needed
- restrict_strategy
- rpm_verify_hashes
+
+
+# Find which files have incorrect hash (not in /etc, because of the system related config files) and then get files names
+files_with_incorrect_hash="$(rpm -Va --noconfig | grep -E '^..5' | awk '{print $NF}' )"
+
+if [ -n "$files_with_incorrect_hash" ]; then
+ # From files names get package names and change newline to space, because rpm writes each package to new line
+ packages_to_reinstall="$(rpm -qf $files_with_incorrect_hash | tr '\n' ' ')"
+
+
+ yum reinstall -y $packages_to_reinstall
+
+fi
@@ -9848,28 +9947,6 @@ See https://access.redhat.com/articles/6999111.
CCE-82196-7
-
-# Declare array to hold set of RPM packages we need to correct permissions for
-declare -A SETPERMS_RPM_DICT
-
-# Create a list of files on the system having permissions different from what
-# is expected by the RPM database
-readarray -t FILES_WITH_INCORRECT_PERMS < <(rpm -Va --nofiledigest | awk '{ if (substr($0,6,1)=="U" || substr($0,7,1)=="G") print $NF }')
-
-for FILE_PATH in "${FILES_WITH_INCORRECT_PERMS[@]}"
-do
- RPM_PACKAGE=$(rpm -qf "$FILE_PATH")
- # Use an associative array to store packages as it's keys, not having to care about duplicates.
- SETPERMS_RPM_DICT["$RPM_PACKAGE"]=1
-done
-
-# For each of the RPM packages left in the list -- reset its permissions to the
-# correct values
-for RPM_PACKAGE in "${!SETPERMS_RPM_DICT[@]}"
-do
- rpm --setugids "${RPM_PACKAGE}"
-done
-
- name: Read list of files with incorrect ownership
command: rpm -Va --nodeps --nosignature --nofiledigest --nosize --nomtime --nordev
--nocaps --nolinkto --nomode
@@ -9950,6 +10027,28 @@ done
- no_reboot_needed
- restrict_strategy
- rpm_verify_ownership
+
+
+# Declare array to hold set of RPM packages we need to correct permissions for
+declare -A SETPERMS_RPM_DICT
+
+# Create a list of files on the system having permissions different from what
+# is expected by the RPM database
+readarray -t FILES_WITH_INCORRECT_PERMS < <(rpm -Va --nofiledigest | awk '{ if (substr($0,6,1)=="U" || substr($0,7,1)=="G") print $NF }')
+
+for FILE_PATH in "${FILES_WITH_INCORRECT_PERMS[@]}"
+do
+ RPM_PACKAGE=$(rpm -qf "$FILE_PATH")
+ # Use an associative array to store packages as it's keys, not having to care about duplicates.
+ SETPERMS_RPM_DICT["$RPM_PACKAGE"]=1
+done
+
+# For each of the RPM packages left in the list -- reset its permissions to the
+# correct values
+for RPM_PACKAGE in "${!SETPERMS_RPM_DICT[@]}"
+do
+ rpm --setugids "${RPM_PACKAGE}"
+done
@@ -10095,32 +10194,6 @@ See https://access.redhat.com/articles/6999111.
CCE-80858-4
-
-# Declare array to hold set of RPM packages we need to correct permissions for
-declare -A SETPERMS_RPM_DICT
-
-# Create a list of files on the system having permissions different from what
-# is expected by the RPM database
-readarray -t FILES_WITH_INCORRECT_PERMS < <(rpm -Va --nofiledigest | awk '{ if (substr($0,2,1)=="M") print $NF }')
-
-for FILE_PATH in "${FILES_WITH_INCORRECT_PERMS[@]}"
-do
- # NOTE: some files maybe controlled by more then one package
- readarray -t RPM_PACKAGES < <(rpm -qf "${FILE_PATH}")
- for RPM_PACKAGE in "${RPM_PACKAGES[@]}"
- do
- # Use an associative array to store packages as it's keys, not having to care about duplicates.
- SETPERMS_RPM_DICT["$RPM_PACKAGE"]=1
- done
-done
-
-# For each of the RPM packages left in the list -- reset its permissions to the
-# correct values
-for RPM_PACKAGE in "${!SETPERMS_RPM_DICT[@]}"
-do
- rpm --restore "${RPM_PACKAGE}"
-done
-
- name: Read list of files with incorrect permissions
command: rpm -Va --nodeps --nosignature --nofiledigest --nosize --nomtime --nordev
--nocaps --nolinkto --nouser --nogroup
@@ -10204,6 +10277,32 @@ done
- no_reboot_needed
- restrict_strategy
- rpm_verify_permissions
+
+
+# Declare array to hold set of RPM packages we need to correct permissions for
+declare -A SETPERMS_RPM_DICT
+
+# Create a list of files on the system having permissions different from what
+# is expected by the RPM database
+readarray -t FILES_WITH_INCORRECT_PERMS < <(rpm -Va --nofiledigest | awk '{ if (substr($0,2,1)=="M") print $NF }')
+
+for FILE_PATH in "${FILES_WITH_INCORRECT_PERMS[@]}"
+do
+ # NOTE: some files maybe controlled by more then one package
+ readarray -t RPM_PACKAGES < <(rpm -qf "${FILE_PATH}")
+ for RPM_PACKAGE in "${RPM_PACKAGES[@]}"
+ do
+ # Use an associative array to store packages as it's keys, not having to care about duplicates.
+ SETPERMS_RPM_DICT["$RPM_PACKAGE"]=1
+ done
+done
+
+# For each of the RPM packages left in the list -- reset its permissions to the
+# correct values
+for RPM_PACKAGE in "${!SETPERMS_RPM_DICT[@]}"
+do
+ rpm --restore "${RPM_PACKAGE}"
+done
@@ -10306,8 +10405,29 @@ $ sudo yum install aide
SV-251710r880730_rule
The AIDE package must be installed if it is to be available for integrity checking.
CCE-80844-4
-
-package --add=aide
+ - name: Ensure aide is installed
+ package:
+ name: aide
+ state: present
+ when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
+ tags:
+ - CCE-80844-4
+ - CJIS-5.10.1.3
+ - DISA-STIG-RHEL-08-010359
+ - NIST-800-53-CM-6(a)
+ - PCI-DSS-Req-11.5
+ - PCI-DSSv4-11.5.2
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_aide_installed
+
+
+[[packages]]
+name = "aide"
+version = "*"
include install_aide
@@ -10316,6 +10436,9 @@ class install_aide {
ensure => 'installed',
}
}
+
+
+package --add=aide
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
@@ -10327,30 +10450,6 @@ fi
else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
-
-
-[[packages]]
-name = "aide"
-version = "*"
-
- - name: Ensure aide is installed
- package:
- name: aide
- state: present
- when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
- tags:
- - CCE-80844-4
- - CJIS-5.10.1.3
- - DISA-STIG-RHEL-08-010359
- - NIST-800-53-CM-6(a)
- - PCI-DSS-Req-11.5
- - PCI-DSSv4-11.5.2
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_aide_installed
@@ -10453,20 +10552,6 @@ If this check produces any unexpected output, investigate.For AIDE to be effective, an initial database of "known-good" information about files
must be captured and it should be able to be verified against the installed files.
CCE-80675-2
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-if ! rpm -q --quiet "aide" ; then
- yum install -y "aide"
-fi
-
-/usr/sbin/aide --init
-/bin/cp -p /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Build and Test AIDE Database - Ensure AIDE Is Installed
ansible.builtin.package:
name: '{{ item }}'
@@ -10547,6 +10632,20 @@ fi
- medium_severity
- no_reboot_needed
- restrict_strategy
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+if ! rpm -q --quiet "aide" ; then
+ yum install -y "aide"
+fi
+
+/usr/sbin/aide --init
+/bin/cp -p /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -10563,6 +10662,7 @@ fi
AU-9(3).1
SRG-OS-000278-GPOS-00108
RHEL-08-030650
+ 5.3.3
SV-230475r880722_rule
Protecting the integrity of the tools used for auditing purposes is a
critical step toward ensuring the integrity of audit information. Audit
@@ -10584,68 +10684,6 @@ provide the capability to identify when the audit tools have been modified,
manipulated, or replaced. An example is a checksum hash of the file or
files.
CCE-85964-5
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-if ! rpm -q --quiet "aide" ; then
- yum install -y "aide"
-fi
-
-
-
-
-
-
-
-
-
-
-if grep -i '^.*/usr/sbin/auditctl.*$' /etc/aide.conf; then
-sed -i "s#.*/usr/sbin/auditctl.*#/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
-else
-echo "/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
-fi
-
-if grep -i '^.*/usr/sbin/auditd.*$' /etc/aide.conf; then
-sed -i "s#.*/usr/sbin/auditd.*#/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
-else
-echo "/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
-fi
-
-if grep -i '^.*/usr/sbin/ausearch.*$' /etc/aide.conf; then
-sed -i "s#.*/usr/sbin/ausearch.*#/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
-else
-echo "/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
-fi
-
-if grep -i '^.*/usr/sbin/aureport.*$' /etc/aide.conf; then
-sed -i "s#.*/usr/sbin/aureport.*#/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
-else
-echo "/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
-fi
-
-if grep -i '^.*/usr/sbin/autrace.*$' /etc/aide.conf; then
-sed -i "s#.*/usr/sbin/autrace.*#/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
-else
-echo "/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
-fi
-
-if grep -i '^.*/usr/sbin/augenrules.*$' /etc/aide.conf; then
-sed -i "s#.*/usr/sbin/augenrules.*#/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
-else
-echo "/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
-fi
-
-if grep -i '^.*/usr/sbin/rsyslogd.*$' /etc/aide.conf; then
-sed -i "s#.*/usr/sbin/rsyslogd.*#/usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
-else
-echo "/usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Ensure aide is installed
package:
name: '{{ item }}'
@@ -10724,6 +10762,68 @@ fi
- medium_severity
- no_reboot_needed
- restrict_strategy
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+if ! rpm -q --quiet "aide" ; then
+ yum install -y "aide"
+fi
+
+
+
+
+
+
+
+
+
+
+if grep -i '^.*/usr/sbin/auditctl.*$' /etc/aide.conf; then
+sed -i "s#.*/usr/sbin/auditctl.*#/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
+else
+echo "/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
+fi
+
+if grep -i '^.*/usr/sbin/auditd.*$' /etc/aide.conf; then
+sed -i "s#.*/usr/sbin/auditd.*#/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
+else
+echo "/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
+fi
+
+if grep -i '^.*/usr/sbin/ausearch.*$' /etc/aide.conf; then
+sed -i "s#.*/usr/sbin/ausearch.*#/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
+else
+echo "/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
+fi
+
+if grep -i '^.*/usr/sbin/aureport.*$' /etc/aide.conf; then
+sed -i "s#.*/usr/sbin/aureport.*#/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
+else
+echo "/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
+fi
+
+if grep -i '^.*/usr/sbin/autrace.*$' /etc/aide.conf; then
+sed -i "s#.*/usr/sbin/autrace.*#/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
+else
+echo "/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
+fi
+
+if grep -i '^.*/usr/sbin/augenrules.*$' /etc/aide.conf; then
+sed -i "s#.*/usr/sbin/augenrules.*#/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
+else
+echo "/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
+fi
+
+if grep -i '^.*/usr/sbin/rsyslogd.*$' /etc/aide.conf; then
+sed -i "s#.*/usr/sbin/rsyslogd.*#/usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512#" /etc/aide.conf
+else
+echo "/usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -10832,24 +10932,6 @@ system. The operating system's Information Management Officer (IMO)/Information
Security Officer (ISSO) and System Administrators (SAs) must be notified via email and/or
monitoring system trap when there is an unauthorized modification of a configuration item.
CCE-80676-0
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-if ! rpm -q --quiet "aide" ; then
- yum install -y "aide"
-fi
-
-if ! grep -q "/usr/sbin/aide --check" /etc/crontab ; then
- echo "05 4 * * * root /usr/sbin/aide --check" >> /etc/crontab
-else
- sed -i '\!^.* --check.*$!d' /etc/crontab
- echo "05 4 * * * root /usr/sbin/aide --check" >> /etc/crontab
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Ensure AIDE is installed
package:
name: '{{ item }}'
@@ -10957,6 +11039,24 @@ fi
- medium_severity
- no_reboot_needed
- restrict_strategy
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+if ! rpm -q --quiet "aide" ; then
+ yum install -y "aide"
+fi
+
+if ! grep -q "/usr/sbin/aide --check" /etc/crontab ; then
+ echo "05 4 * * * root /usr/sbin/aide --check" >> /etc/crontab
+else
+ sed -i '\!^.* --check.*$!d' /etc/crontab
+ echo "05 4 * * * root /usr/sbin/aide --check" >> /etc/crontab
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -11036,36 +11136,6 @@ system. The operating system's Information Management Officer (IMO)/Information
Security Officer (ISSO) and System Administrators (SAs) must be notified via email and/or
monitoring system trap when there is an unauthorized modification of a configuration item.
CCE-82891-3
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-if ! rpm -q --quiet "aide" ; then
- yum install -y "aide"
-fi
-var_aide_scan_notification_email=''
-
-
-
-CRONTAB=/etc/crontab
-CRONDIRS='/etc/cron.d /etc/cron.daily /etc/cron.weekly /etc/cron.monthly'
-
-# NOTE: on some platforms, /etc/crontab may not exist
-if [ -f /etc/crontab ]; then
- CRONTAB_EXIST=/etc/crontab
-fi
-
-if [ -f /var/spool/cron/root ]; then
- VARSPOOL=/var/spool/cron/root
-fi
-
-if ! grep -qR '^.*/usr/sbin/aide\s*\-\-check.*|.*\/bin\/mail\s*-s\s*".*"\s*.*@.*$' $CRONTAB_EXIST $VARSPOOL $CRONDIRS; then
- echo "0 5 * * * root /usr/sbin/aide --check | /bin/mail -s \"\$(hostname) - AIDE Integrity Check\" $var_aide_scan_notification_email" >> $CRONTAB
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: XCCDF Value var_aide_scan_notification_email # promote to variable
set_fact:
var_aide_scan_notification_email: !!str
@@ -11112,6 +11182,36 @@ fi
- medium_severity
- no_reboot_needed
- restrict_strategy
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+if ! rpm -q --quiet "aide" ; then
+ yum install -y "aide"
+fi
+var_aide_scan_notification_email=''
+
+
+
+CRONTAB=/etc/crontab
+CRONDIRS='/etc/cron.d /etc/cron.daily /etc/cron.weekly /etc/cron.monthly'
+
+# NOTE: on some platforms, /etc/crontab may not exist
+if [ -f /etc/crontab ]; then
+ CRONTAB_EXIST=/etc/crontab
+fi
+
+if [ -f /var/spool/cron/root ]; then
+ VARSPOOL=/var/spool/cron/root
+fi
+
+if ! grep -qR '^.*/usr/sbin/aide\s*\-\-check.*|.*\/bin\/mail\s*-s\s*".*"\s*.*@.*$' $CRONTAB_EXIST $VARSPOOL $CRONDIRS; then
+ echo "0 5 * * * root /usr/sbin/aide --check | /bin/mail -s \"\$(hostname) - AIDE Integrity Check\" $var_aide_scan_notification_email" >> $CRONTAB
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -11170,8 +11270,10 @@ submits to this process.
PR.DS-6
PR.DS-8
SRG-OS-000480-GPOS-00227
+ 5.3.3
File integrity tools use cryptographic hashes for verifying file contents and directories
have not been altered. These hashes must be FIPS 140-2 approved cryptographic hashes.
+ CCE-86404-1
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
@@ -11258,37 +11360,6 @@ The remediation provided with this rule adds acl to all r
ACLs can provide permissions beyond those permitted through the file mode and must be
verified by the file integrity tools.
CCE-84220-3
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-if ! rpm -q --quiet "aide" ; then
- yum install -y "aide"
-fi
-
-aide_conf="/etc/aide.conf"
-
-groups=$(LC_ALL=C grep "^[A-Z][A-Za-z_]*" $aide_conf | grep -v "^ALLXTRAHASHES" | cut -f1 -d '=' | tr -d ' ' | sort -u)
-
-for group in $groups
-do
- config=$(grep "^$group\s*=" $aide_conf | cut -f2 -d '=' | tr -d ' ')
-
- if ! [[ $config = *acl* ]]
- then
- if [[ -z $config ]]
- then
- config="acl"
- else
- config=$config"+acl"
- fi
- fi
- sed -i "s/^$group\s*=.*/$group = $config/g" $aide_conf
-done
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather list of packages
package_facts:
manager: auto
@@ -11350,6 +11421,37 @@ fi
- low_severity
- no_reboot_needed
- restrict_strategy
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+if ! rpm -q --quiet "aide" ; then
+ yum install -y "aide"
+fi
+
+aide_conf="/etc/aide.conf"
+
+groups=$(LC_ALL=C grep "^[A-Z][A-Za-z_]*" $aide_conf | grep -v "^ALLXTRAHASHES" | cut -f1 -d '=' | tr -d ' ' | sort -u)
+
+for group in $groups
+do
+ config=$(grep "^$group\s*=" $aide_conf | cut -f2 -d '=' | tr -d ' ')
+
+ if ! [[ $config = *acl* ]]
+ then
+ if [[ -z $config ]]
+ then
+ config="acl"
+ else
+ config=$config"+acl"
+ fi
+ fi
+ sed -i "s/^$group\s*=.*/$group = $config/g" $aide_conf
+done
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -11400,37 +11502,6 @@ The remediation provided with this rule adds xattrs to al
Extended attributes in file systems are used to contain arbitrary data and file metadata
with security implications.
CCE-83733-6
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-if ! rpm -q --quiet "aide" ; then
- yum install -y "aide"
-fi
-
-aide_conf="/etc/aide.conf"
-
-groups=$(LC_ALL=C grep "^[A-Z][A-Za-z_]*" $aide_conf | grep -v "^ALLXTRAHASHES" | cut -f1 -d '=' | tr -d ' ' | sort -u)
-
-for group in $groups
-do
- config=$(grep "^$group\s*=" $aide_conf | cut -f2 -d '=' | tr -d ' ')
-
- if ! [[ $config = *xattrs* ]]
- then
- if [[ -z $config ]]
- then
- config="xattrs"
- else
- config=$config"+xattrs"
- fi
- fi
- sed -i "s/^$group\s*=.*/$group = $config/g" $aide_conf
-done
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather list of packages
package_facts:
manager: auto
@@ -11492,6 +11563,37 @@ fi
- low_severity
- no_reboot_needed
- restrict_strategy
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+if ! rpm -q --quiet "aide" ; then
+ yum install -y "aide"
+fi
+
+aide_conf="/etc/aide.conf"
+
+groups=$(LC_ALL=C grep "^[A-Z][A-Za-z_]*" $aide_conf | grep -v "^ALLXTRAHASHES" | cut -f1 -d '=' | tr -d ' ' | sort -u)
+
+for group in $groups
+do
+ config=$(grep "^$group\s*=" $aide_conf | cut -f2 -d '=' | tr -d ' ')
+
+ if ! [[ $config = *xattrs* ]]
+ then
+ if [[ -z $config ]]
+ then
+ config="xattrs"
+ else
+ config=$config"+xattrs"
+ fi
+ fi
+ sed -i "s/^$group\s*=.*/$group = $config/g" $aide_conf
+done
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -11519,21 +11621,6 @@ Audit tools must have the correct group owner.
Protecting audit information also includes identifying and protecting the tools used to view and manipulate log data.
Therefore, protecting audit tools is necessary to prevent unauthorized operations on audit information.
CCE-86239-1
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-chgrp 0 /sbin/auditctl
-chgrp 0 /sbin/aureport
-chgrp 0 /sbin/ausearch
-chgrp 0 /sbin/autrace
-chgrp 0 /sbin/auditd
-chgrp 0 /sbin/rsyslogd
-chgrp 0 /sbin/augenrules
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Test for existence /sbin/auditctl
stat:
path: /sbin/auditctl
@@ -11771,6 +11858,21 @@ fi
- low_disruption
- medium_severity
- no_reboot_needed
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+chgrp 0 /sbin/auditctl
+chgrp 0 /sbin/aureport
+chgrp 0 /sbin/ausearch
+chgrp 0 /sbin/autrace
+chgrp 0 /sbin/auditd
+chgrp 0 /sbin/rsyslogd
+chgrp 0 /sbin/augenrules
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -11798,21 +11900,6 @@ Audit tools must have the correct owner.
Protecting audit information also includes identifying and protecting the tools used to view and manipulate log data.
Therefore, protecting audit tools is necessary to prevent unauthorized operations on audit information.
CCE-86259-9
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-chown 0 /sbin/auditctl
-chown 0 /sbin/aureport
-chown 0 /sbin/ausearch
-chown 0 /sbin/autrace
-chown 0 /sbin/auditd
-chown 0 /sbin/rsyslogd
-chown 0 /sbin/augenrules
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Test for existence /sbin/auditctl
stat:
path: /sbin/auditctl
@@ -12050,6 +12137,21 @@ fi
- low_disruption
- medium_severity
- no_reboot_needed
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+chown 0 /sbin/auditctl
+chown 0 /sbin/aureport
+chown 0 /sbin/ausearch
+chown 0 /sbin/autrace
+chown 0 /sbin/auditd
+chown 0 /sbin/rsyslogd
+chown 0 /sbin/augenrules
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -12075,27 +12177,6 @@ Audit tools must have a mode of 0755 or less permissive.
Protecting audit information also includes identifying and protecting the tools used to view and manipulate log data.
Therefore, protecting audit tools is necessary to prevent unauthorized operations on audit information.
CCE-86227-6
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-chmod u-s,g-ws,o-wt /sbin/auditctl
-
-chmod u-s,g-ws,o-wt /sbin/aureport
-
-chmod u-s,g-ws,o-wt /sbin/ausearch
-
-chmod u-s,g-ws,o-wt /sbin/autrace
-
-chmod u-s,g-ws,o-wt /sbin/auditd
-
-chmod u-s,g-ws,o-wt /sbin/rsyslogd
-
-chmod u-s,g-ws,o-wt /sbin/augenrules
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Test for existence /sbin/auditctl
stat:
path: /sbin/auditctl
@@ -12333,6 +12414,27 @@ fi
- low_disruption
- medium_severity
- no_reboot_needed
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+chmod u-s,g-ws,o-wt /sbin/auditctl
+
+chmod u-s,g-ws,o-wt /sbin/aureport
+
+chmod u-s,g-ws,o-wt /sbin/ausearch
+
+chmod u-s,g-ws,o-wt /sbin/autrace
+
+chmod u-s,g-ws,o-wt /sbin/auditd
+
+chmod u-s,g-ws,o-wt /sbin/rsyslogd
+
+chmod u-s,g-ws,o-wt /sbin/augenrules
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -12398,19 +12500,6 @@ protect data. The operating system must implement cryptographic modules adhering
standards approved by the federal government since this provides assurance they have been tested
and validated.
CCE-82155-3
- # Remediation is applicable only in certain platforms
-if ( [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && ! ( [ "${container:-}" == "bwrap-osbuild" ] ) ); then
-
-fips-mode-setup --enable
-FIPS_CONF="/etc/dracut.conf.d/40-fips.conf"
-if ! grep "^add_dracutmodules+=\" fips \"" $FIPS_CONF; then
- echo "add_dracutmodules+=\" fips \"" >> $FIPS_CONF
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Check to see the current status of FIPS mode
command: /usr/bin/fips-mode-setup --check
register: is_fips_enabled
@@ -12477,6 +12566,19 @@ fi
- medium_disruption
- reboot_required
- restrict_strategy
+
+ # Remediation is applicable only in certain platforms
+if ( [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && ! ( [ "${container:-}" == "bwrap-osbuild" ] ) ); then
+
+fips-mode-setup --enable
+FIPS_CONF="/etc/dracut.conf.d/40-fips.conf"
+if ! grep "^add_dracutmodules+=\" fips \"" $FIPS_CONF; then
+ echo "add_dracutmodules+=\" fips \"" >> $FIPS_CONF
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -12530,37 +12632,6 @@ standards approved by the federal government since this provides assurance they
and validated.
CCE-80942-6
- # Remediation is applicable only in certain platforms
-if ( [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && ! ( [ "${container:-}" == "bwrap-osbuild" ] ) ) && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-var_system_crypto_policy=''
-
-
-fips-mode-setup --enable
-
-stderr_of_call=$(update-crypto-policies --set ${var_system_crypto_policy} 2>&1 > /dev/null)
-rc=$?
-
-if test "$rc" = 127; then
- echo "$stderr_of_call" >&2
- echo "Make sure that the script is installed on the remediated system." >&2
- echo "See output of the 'dnf provides update-crypto-policies' command" >&2
- echo "to see what package to (re)install" >&2
-
- false # end with an error code
-elif test "$rc" != 0; then
- echo "Error invoking the update-crypto-policies script: $stderr_of_call" >&2
- false # end with an error code
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
-
-[customizations]
-fips = true
-
- name: XCCDF Value var_system_crypto_policy # promote to variable
set_fact:
var_system_crypto_policy: !!str
@@ -12667,6 +12738,37 @@ fips = true
- medium_disruption
- reboot_required
- restrict_strategy
+
+
+[customizations]
+fips = true
+
+ # Remediation is applicable only in certain platforms
+if ( [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && ! ( [ "${container:-}" == "bwrap-osbuild" ] ) ) && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+var_system_crypto_policy=''
+
+
+fips-mode-setup --enable
+
+stderr_of_call=$(update-crypto-policies --set ${var_system_crypto_policy} 2>&1 > /dev/null)
+rc=$?
+
+if test "$rc" = 127; then
+ echo "$stderr_of_call" >&2
+ echo "Make sure that the script is installed on the remediated system." >&2
+ echo "See output of the 'dnf provides update-crypto-policies' command" >&2
+ echo "to see what package to (re)install" >&2
+
+ false # end with an error code
+elif test "$rc" != 0; then
+ echo "Error invoking the update-crypto-policies script: $stderr_of_call" >&2
+ false # end with an error code
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -12850,8 +12952,23 @@ $ sudo yum install crypto-policies
the applications that run on that operating system. Use of weak or untested encryption algorithms
undermines the purposes of utilizing encryption to protect data.
CCE-82723-8
-
-package --add=crypto-policies
+ - name: Ensure crypto-policies is installed
+ package:
+ name: crypto-policies
+ state: present
+ tags:
+ - CCE-82723-8
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_crypto-policies_installed
+
+
+[[packages]]
+name = "crypto-policies"
+version = "*"
include install_crypto-policies
@@ -12860,29 +12977,14 @@ class install_crypto-policies {
ensure => 'installed',
}
}
+
+
+package --add=crypto-policies
if ! rpm -q --quiet "crypto-policies" ; then
yum install -y "crypto-policies"
fi
-
-
-[[packages]]
-name = "crypto-policies"
-version = "*"
-
- - name: Ensure crypto-policies is installed
- package:
- name: crypto-policies
- state: present
- tags:
- - CCE-82723-8
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_crypto-policies_installed
@@ -12993,46 +13095,6 @@ submits to this process.
the applications that run on that operating system. Use of weak or untested encryption algorithms
undermines the purposes of utilizing encryption to protect data.
CCE-80935-0
- ---
-apiVersion: machineconfiguration.openshift.io/v1
-kind: MachineConfig
-spec:
- config:
- ignition:
- version: 3.1.0
- systemd:
- units:
- - name: configure-crypto-policy.service
- enabled: true
- contents: |
- [Unit]
- Before=kubelet.service
- [Service]
- Type=oneshot
- ExecStart=update-crypto-policies --set {{.var_system_crypto_policy}}
- RemainAfterExit=yes
- [Install]
- WantedBy=multi-user.target
-
-
-var_system_crypto_policy=''
-
-
-stderr_of_call=$(update-crypto-policies --set ${var_system_crypto_policy} 2>&1 > /dev/null)
-rc=$?
-
-if test "$rc" = 127; then
- echo "$stderr_of_call" >&2
- echo "Make sure that the script is installed on the remediated system." >&2
- echo "See output of the 'dnf provides update-crypto-policies' command" >&2
- echo "to see what package to (re)install" >&2
-
- false # end with an error code
-elif test "$rc" != 0; then
- echo "Error invoking the update-crypto-policies script: $stderr_of_call" >&2
- false # end with an error code
-fi
-
- name: XCCDF Value var_system_crypto_policy # promote to variable
set_fact:
var_system_crypto_policy: !!str
@@ -13082,6 +13144,46 @@ fi
- low_disruption
- no_reboot_needed
- restrict_strategy
+
+ ---
+apiVersion: machineconfiguration.openshift.io/v1
+kind: MachineConfig
+spec:
+ config:
+ ignition:
+ version: 3.1.0
+ systemd:
+ units:
+ - name: configure-crypto-policy.service
+ enabled: true
+ contents: |
+ [Unit]
+ Before=kubelet.service
+ [Service]
+ Type=oneshot
+ ExecStart=update-crypto-policies --set {{.var_system_crypto_policy}}
+ RemainAfterExit=yes
+ [Install]
+ WantedBy=multi-user.target
+
+
+var_system_crypto_policy=''
+
+
+stderr_of_call=$(update-crypto-policies --set ${var_system_crypto_policy} 2>&1 > /dev/null)
+rc=$?
+
+if test "$rc" = 127; then
+ echo "$stderr_of_call" >&2
+ echo "Make sure that the script is installed on the remediated system." >&2
+ echo "See output of the 'dnf provides update-crypto-policies' command" >&2
+ echo "to see what package to (re)install" >&2
+
+ false # end with an error code
+elif test "$rc" != 0; then
+ echo "Error invoking the update-crypto-policies script: $stderr_of_call" >&2
+ false # end with an error code
+fi
@@ -13111,29 +13213,6 @@ line and is not commented out:
library violate expectations, and makes system configuration more
fragmented.
CCE-84254-2
-
-CONF_FILE=/etc/crypto-policies/back-ends/gnutls.config
-correct_value='+VERS-ALL:-VERS-DTLS0.9:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-DTLS1.0'
-
-grep -q ${correct_value} ${CONF_FILE}
-
-if [[ $? -ne 0 ]]; then
- # We need to get the existing value, using PCRE to maintain same regex
- existing_value=$(grep -Po '(\+VERS-ALL(?::-VERS-[A-Z]+\d\.\d)+)' ${CONF_FILE})
-
- if [[ ! -z ${existing_value} ]]; then
- # replace existing_value with correct_value
- sed -i "s/${existing_value}/${correct_value}/g" ${CONF_FILE}
- else
- # ***NOTE*** #
- # This probably means this file is not here or it's been modified
- # unintentionally.
- # ********** #
- # echo correct_value to end
- echo ${correct_value} >> ${CONF_FILE}
- fi
-fi
-
- name: 'Configure GnuTLS library to use DoD-approved TLS Encryption: set_fact'
set_fact:
path: /etc/crypto-policies/back-ends/gnutls.config
@@ -13215,6 +13294,29 @@ fi
- medium_severity
- reboot_required
- restrict_strategy
+
+
+CONF_FILE=/etc/crypto-policies/back-ends/gnutls.config
+correct_value='+VERS-ALL:-VERS-DTLS0.9:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-DTLS1.0'
+
+grep -q ${correct_value} ${CONF_FILE}
+
+if [[ $? -ne 0 ]]; then
+ # We need to get the existing value, using PCRE to maintain same regex
+ existing_value=$(grep -Po '(\+VERS-ALL(?::-VERS-[A-Z]+\d\.\d)+)' ${CONF_FILE})
+
+ if [[ ! -z ${existing_value} ]]; then
+ # replace existing_value with correct_value
+ sed -i "s/${existing_value}/${correct_value}/g" ${CONF_FILE}
+ else
+ # ***NOTE*** #
+ # This probably means this file is not here or it's been modified
+ # unintentionally.
+ # ********** #
+ # echo correct_value to end
+ echo ${correct_value} >> ${CONF_FILE}
+ fi
+fi
@@ -13245,10 +13347,6 @@ If the symlink exists, Kerberos is configured to use the system-wide crypto poli
Overriding the system crypto policy makes the behavior of Kerberos violate expectations,
and makes system configuration more fragmented.
CCE-80936-8
-
-rm -f /etc/krb5.conf.d/crypto-policies
-ln -s /etc/crypto-policies/back-ends/krb5.config /etc/krb5.conf.d/crypto-policies
-
- name: Configure Kerberos to use System Crypto Policy
file:
src: /etc/crypto-policies/back-ends/krb5.config
@@ -13266,6 +13364,10 @@ ln -s /etc/crypto-policies/back-ends/krb5.config /etc/krb5.conf.d/crypto-policie
- low_complexity
- low_disruption
- reboot_required
+
+
+rm -f /etc/krb5.conf.d/crypto-policies
+ln -s /etc/crypto-policies/back-ends/krb5.config /etc/krb5.conf.d/crypto-policies
@@ -13302,18 +13404,6 @@ is not commented out or superseded by later includes:
service violate expectations, and makes system configuration more
fragmented.
CCE-80937-6
-
-function remediate_libreswan_crypto_policy() {
- CONFIG_FILE="/etc/ipsec.conf"
- if ! grep -qP "^\s*include\s+/etc/crypto-policies/back-ends/libreswan.config\s*(?:#.*)?$" "$CONFIG_FILE" ; then
- # the file might not end with a new line
- echo -e '\ninclude /etc/crypto-policies/back-ends/libreswan.config' >> "$CONFIG_FILE"
- fi
- return 0
-}
-
-remediate_libreswan_crypto_policy
-
- name: Configure Libreswan to use System Crypto Policy
lineinfile:
path: /etc/ipsec.conf
@@ -13334,6 +13424,18 @@ remediate_libreswan_crypto_policy
- low_disruption
- no_reboot_needed
- restrict_strategy
+
+
+function remediate_libreswan_crypto_policy() {
+ CONFIG_FILE="/etc/ipsec.conf"
+ if ! grep -qP "^\s*include\s+/etc/crypto-policies/back-ends/libreswan.config\s*(?:#.*)?$" "$CONFIG_FILE" ; then
+ # the file might not end with a new line
+ echo -e '\ninclude /etc/crypto-policies/back-ends/libreswan.config' >> "$CONFIG_FILE"
+ fi
+ return 0
+}
+
+remediate_libreswan_crypto_policy
@@ -13369,37 +13471,6 @@ if there is a [ crypto_policy ] section that contains the
Overriding the system crypto policy makes the behavior of the Java runtime violates expectations,
and makes system configuration more fragmented.
CCE-80938-4
-
-OPENSSL_CRYPTO_POLICY_SECTION='[ crypto_policy ]'
-OPENSSL_CRYPTO_POLICY_SECTION_REGEX='\[\s*crypto_policy\s*\]'
-
-OPENSSL_CRYPTO_POLICY_INCLUSION='.include /etc/crypto-policies/back-ends/opensslcnf.config'
-
-OPENSSL_CRYPTO_POLICY_INCLUSION_REGEX='^\s*\.include\s*(?:=\s*)?/etc/crypto-policies/back-ends/opensslcnf.config$'
-
-
-
-
-
-
-function remediate_openssl_crypto_policy() {
- CONFIG_FILE=/etc/pki/tls/openssl.cnf
- if test -f "$CONFIG_FILE"; then
- if ! grep -q "^\\s*$OPENSSL_CRYPTO_POLICY_SECTION_REGEX" "$CONFIG_FILE"; then
- printf '\n%s\n\n%s' "$OPENSSL_CRYPTO_POLICY_SECTION" "$OPENSSL_CRYPTO_POLICY_INCLUSION" >> "$CONFIG_FILE"
- return 0
- elif ! grep -q "^\\s*$OPENSSL_CRYPTO_POLICY_INCLUSION_REGEX" "$CONFIG_FILE"; then
- sed -i "s|$OPENSSL_CRYPTO_POLICY_SECTION_REGEX|&\\n\\n$OPENSSL_CRYPTO_POLICY_INCLUSION\\n|" "$CONFIG_FILE"
- return 0
- fi
- else
- echo "Aborting remediation as '$CONFIG_FILE' was not even found." >&2
- return 1
- fi
-}
-
-remediate_openssl_crypto_policy
-
- name: Configure OpenSSL library to use System Crypto Policy - Search for crypto_policy
Section
ansible.builtin.find:
@@ -13504,6 +13575,37 @@ remediate_openssl_crypto_policy
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+
+OPENSSL_CRYPTO_POLICY_SECTION='[ crypto_policy ]'
+OPENSSL_CRYPTO_POLICY_SECTION_REGEX='\[\s*crypto_policy\s*\]'
+
+OPENSSL_CRYPTO_POLICY_INCLUSION='.include /etc/crypto-policies/back-ends/opensslcnf.config'
+
+OPENSSL_CRYPTO_POLICY_INCLUSION_REGEX='^\s*\.include\s*(?:=\s*)?/etc/crypto-policies/back-ends/opensslcnf.config$'
+
+
+
+
+
+
+function remediate_openssl_crypto_policy() {
+ CONFIG_FILE=/etc/pki/tls/openssl.cnf
+ if test -f "$CONFIG_FILE"; then
+ if ! grep -q "^\\s*$OPENSSL_CRYPTO_POLICY_SECTION_REGEX" "$CONFIG_FILE"; then
+ printf '\n%s\n\n%s' "$OPENSSL_CRYPTO_POLICY_SECTION" "$OPENSSL_CRYPTO_POLICY_INCLUSION" >> "$CONFIG_FILE"
+ return 0
+ elif ! grep -q "^\\s*$OPENSSL_CRYPTO_POLICY_INCLUSION_REGEX" "$CONFIG_FILE"; then
+ sed -i "s|$OPENSSL_CRYPTO_POLICY_SECTION_REGEX|&\\n\\n$OPENSSL_CRYPTO_POLICY_INCLUSION\\n|" "$CONFIG_FILE"
+ return 0
+ fi
+ else
+ echo "Aborting remediation as '$CONFIG_FILE' was not even found." >&2
+ return 1
+ fi
+}
+
+remediate_openssl_crypto_policy
@@ -13588,16 +13690,11 @@ in the /etc/sysconfig/sshd.
2.2.7
SRG-OS-000250-GPOS-00093
RHEL-08-010287
- 5.2.14
+ 4.2.22
SV-244526r877394_rule
Overriding the system crypto policy makes the behavior of the SSH service violate expectations,
and makes system configuration more fragmented.
CCE-80939-2
-
-SSH_CONF="/etc/sysconfig/sshd"
-
-sed -i "/^\s*CRYPTO_POLICY.*$/Id" $SSH_CONF
-
- name: Configure SSH to use System Crypto Policy
lineinfile:
dest: /etc/sysconfig/sshd
@@ -13619,6 +13716,11 @@ sed -i "/^\s*CRYPTO_POLICY.*$/Id" $SSH_CONF
- medium_disruption
- medium_severity
- reboot_required
+
+
+SSH_CONF="/etc/sysconfig/sshd"
+
+sed -i "/^\s*CRYPTO_POLICY.*$/Id" $SSH_CONF
@@ -13653,15 +13755,6 @@ variable configured with predefined value.
are configured e.g. cipher suites. Currently particular requirements
specified by CC are stricter compared to any existing Crypto Policy.
CCE-84286-4
-
-cp="Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
-file="/etc/crypto-policies/local.d/opensslcnf-ospp.config"
-backend_file="/etc/crypto-policies/back-ends/opensslcnf.config"
-
-sed -i "/Ciphersuites\s*=\s*/d" "$backend_file"
-printf "\n%s\n" "$cp" >> "$file"
-update-crypto-policies
-
- name: Remove configuration from backend file /etc/crypto-policies/back-ends/opensslcnf.config
lineinfile:
path: /etc/crypto-policies/back-ends/opensslcnf.config
@@ -13708,6 +13801,15 @@ update-crypto-policies
- medium_severity
- reboot_required
- restrict_strategy
+
+
+cp="Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
+file="/etc/crypto-policies/local.d/opensslcnf-ospp.config"
+backend_file="/etc/crypto-policies/back-ends/opensslcnf.config"
+
+sed -i "/Ciphersuites\s*=\s*/d" "$backend_file"
+printf "\n%s\n" "$cp" >> "$file"
+update-crypto-policies
@@ -13803,25 +13905,6 @@ specifying a cipher list with the order of ciphers being in a “strongest
weakest” orientation, the system will automatically attempt to use the
strongest cipher for securing SSH connections.
CCE-85902-5
-
-sshd_approved_ciphers=''
-
-
-if [ -e "/etc/crypto-policies/back-ends/openssh.config" ] ; then
-
- LC_ALL=C sed -i "/^.*Ciphers\s\+/d" "/etc/crypto-policies/back-ends/openssh.config"
-else
- touch "/etc/crypto-policies/back-ends/openssh.config"
-fi
-# make sure file has newline at the end
-sed -i -e '$a\' "/etc/crypto-policies/back-ends/openssh.config"
-
-cp "/etc/crypto-policies/back-ends/openssh.config" "/etc/crypto-policies/back-ends/openssh.config.bak"
-# Insert at the end of the file
-printf '%s\n' "Ciphers ${sshd_approved_ciphers}" >> "/etc/crypto-policies/back-ends/openssh.config"
-# Clean up after ourselves.
-rm "/etc/crypto-policies/back-ends/openssh.config.bak"
-
- name: XCCDF Value sshd_approved_ciphers # promote to variable
set_fact:
sshd_approved_ciphers: !!str
@@ -13866,6 +13949,25 @@ rm "/etc/crypto-policies/back-ends/openssh.config.bak"
- low_disruption
- reboot_required
- restrict_strategy
+
+
+sshd_approved_ciphers=''
+
+
+if [ -e "/etc/crypto-policies/back-ends/openssh.config" ] ; then
+
+ LC_ALL=C sed -i "/^.*Ciphers\s\+/d" "/etc/crypto-policies/back-ends/openssh.config"
+else
+ touch "/etc/crypto-policies/back-ends/openssh.config"
+fi
+# make sure file has newline at the end
+sed -i -e '$a\' "/etc/crypto-policies/back-ends/openssh.config"
+
+cp "/etc/crypto-policies/back-ends/openssh.config" "/etc/crypto-policies/back-ends/openssh.config.bak"
+# Insert at the end of the file
+printf '%s\n' "Ciphers ${sshd_approved_ciphers}" >> "/etc/crypto-policies/back-ends/openssh.config"
+# Clean up after ourselves.
+rm "/etc/crypto-policies/back-ends/openssh.config.bak"
@@ -13915,38 +14017,6 @@ specifying a cipher list with the order of ciphers being in a “strongest
weakest” orientation, the system will automatically attempt to use the
strongest cipher for securing SSH connections.
CCE-85897-7
-
-sshd_approved_ciphers=''
-
-
-CONF_FILE=/etc/crypto-policies/back-ends/opensshserver.config
-correct_value="-oCiphers=${sshd_approved_ciphers}"
-
-# Test if file exists
-test -f ${CONF_FILE} || touch ${CONF_FILE}
-
-# Ensure CRYPTO_POLICY is not commented out
-sed -i 's/#CRYPTO_POLICY=/CRYPTO_POLICY=/' ${CONF_FILE}
-
-grep -q "'${correct_value}'" ${CONF_FILE}
-
-if [[ $? -ne 0 ]]; then
- # We need to get the existing value, using PCRE to maintain same regex
- existing_value=$(grep -Po '(-oCiphers=\S+)' ${CONF_FILE})
-
- if [[ ! -z ${existing_value} ]]; then
- # replace existing_value with correct_value
- sed -i "s/${existing_value}/${correct_value}/g" ${CONF_FILE}
- else
- # ***NOTE*** #
- # This probably means this file is not here or it's been modified
- # unintentionally.
- # ********** #
- # echo correct_value to end
- echo "CRYPTO_POLICY='${correct_value}'" >> ${CONF_FILE}
- fi
-fi
-
- name: XCCDF Value sshd_approved_ciphers # promote to variable
set_fact:
sshd_approved_ciphers: !!str
@@ -14034,6 +14104,38 @@ fi
- medium_severity
- reboot_required
- restrict_strategy
+
+
+sshd_approved_ciphers=''
+
+
+CONF_FILE=/etc/crypto-policies/back-ends/opensshserver.config
+correct_value="-oCiphers=${sshd_approved_ciphers}"
+
+# Test if file exists
+test -f ${CONF_FILE} || touch ${CONF_FILE}
+
+# Ensure CRYPTO_POLICY is not commented out
+sed -i 's/#CRYPTO_POLICY=/CRYPTO_POLICY=/' ${CONF_FILE}
+
+grep -q "'${correct_value}'" ${CONF_FILE}
+
+if [[ $? -ne 0 ]]; then
+ # We need to get the existing value, using PCRE to maintain same regex
+ existing_value=$(grep -Po '(-oCiphers=\S+)' ${CONF_FILE})
+
+ if [[ ! -z ${existing_value} ]]; then
+ # replace existing_value with correct_value
+ sed -i "s/${existing_value}/${correct_value}/g" ${CONF_FILE}
+ else
+ # ***NOTE*** #
+ # This probably means this file is not here or it's been modified
+ # unintentionally.
+ # ********** #
+ # echo correct_value to end
+ echo "CRYPTO_POLICY='${correct_value}'" >> ${CONF_FILE}
+ fi
+fi
@@ -14120,25 +14222,6 @@ submits to this process.
client violate expectations, and makes system configuration more
fragmented.
CCE-85870-4
-
-sshd_approved_macs=''
-
-
-if [ -e "/etc/crypto-policies/back-ends/openssh.config" ] ; then
-
- LC_ALL=C sed -i "/^.*MACs\s\+/d" "/etc/crypto-policies/back-ends/openssh.config"
-else
- touch "/etc/crypto-policies/back-ends/openssh.config"
-fi
-# make sure file has newline at the end
-sed -i -e '$a\' "/etc/crypto-policies/back-ends/openssh.config"
-
-cp "/etc/crypto-policies/back-ends/openssh.config" "/etc/crypto-policies/back-ends/openssh.config.bak"
-# Insert at the end of the file
-printf '%s\n' "MACs ${sshd_approved_macs}" >> "/etc/crypto-policies/back-ends/openssh.config"
-# Clean up after ourselves.
-rm "/etc/crypto-policies/back-ends/openssh.config.bak"
-
- name: XCCDF Value sshd_approved_macs # promote to variable
set_fact:
sshd_approved_macs: !!str
@@ -14183,6 +14266,25 @@ rm "/etc/crypto-policies/back-ends/openssh.config.bak"
- medium_severity
- reboot_required
- restrict_strategy
+
+
+sshd_approved_macs=''
+
+
+if [ -e "/etc/crypto-policies/back-ends/openssh.config" ] ; then
+
+ LC_ALL=C sed -i "/^.*MACs\s\+/d" "/etc/crypto-policies/back-ends/openssh.config"
+else
+ touch "/etc/crypto-policies/back-ends/openssh.config"
+fi
+# make sure file has newline at the end
+sed -i -e '$a\' "/etc/crypto-policies/back-ends/openssh.config"
+
+cp "/etc/crypto-policies/back-ends/openssh.config" "/etc/crypto-policies/back-ends/openssh.config.bak"
+# Insert at the end of the file
+printf '%s\n' "MACs ${sshd_approved_macs}" >> "/etc/crypto-policies/back-ends/openssh.config"
+# Clean up after ourselves.
+rm "/etc/crypto-policies/back-ends/openssh.config.bak"
@@ -14230,38 +14332,6 @@ submits to this process.
server violate expectations, and makes system configuration more
fragmented.
CCE-85899-3
-
-sshd_approved_macs=''
-
-
-CONF_FILE=/etc/crypto-policies/back-ends/opensshserver.config
-correct_value="-oMACs=${sshd_approved_macs}"
-
-# Test if file exists
-test -f ${CONF_FILE} || touch ${CONF_FILE}
-
-# Ensure CRYPTO_POLICY is not commented out
-sed -i 's/#CRYPTO_POLICY=/CRYPTO_POLICY=/' ${CONF_FILE}
-
-grep -q "'${correct_value}'" ${CONF_FILE}
-
-if [[ $? -ne 0 ]]; then
- # We need to get the existing value, using PCRE to maintain same regex
- existing_value=$(grep -Po '(-oMACs=\S+)' ${CONF_FILE})
-
- if [[ ! -z ${existing_value} ]]; then
- # replace existing_value with correct_value
- sed -i "s/${existing_value}/${correct_value}/g" ${CONF_FILE}
- else
- # ***NOTE*** #
- # This probably means this file is not here or it's been modified
- # unintentionally.
- # ********** #
- # echo correct_value to end
- echo "CRYPTO_POLICY='${correct_value}'" >> ${CONF_FILE}
- fi
-fi
-
- name: XCCDF Value sshd_approved_macs # promote to variable
set_fact:
sshd_approved_macs: !!str
@@ -14349,6 +14419,38 @@ fi
- medium_severity
- reboot_required
- restrict_strategy
+
+
+sshd_approved_macs=''
+
+
+CONF_FILE=/etc/crypto-policies/back-ends/opensshserver.config
+correct_value="-oMACs=${sshd_approved_macs}"
+
+# Test if file exists
+test -f ${CONF_FILE} || touch ${CONF_FILE}
+
+# Ensure CRYPTO_POLICY is not commented out
+sed -i 's/#CRYPTO_POLICY=/CRYPTO_POLICY=/' ${CONF_FILE}
+
+grep -q "'${correct_value}'" ${CONF_FILE}
+
+if [[ $? -ne 0 ]]; then
+ # We need to get the existing value, using PCRE to maintain same regex
+ existing_value=$(grep -Po '(-oMACs=\S+)' ${CONF_FILE})
+
+ if [[ ! -z ${existing_value} ]]; then
+ # replace existing_value with correct_value
+ sed -i "s/${existing_value}/${correct_value}/g" ${CONF_FILE}
+ else
+ # ***NOTE*** #
+ # This probably means this file is not here or it's been modified
+ # unintentionally.
+ # ********** #
+ # echo correct_value to end
+ echo "CRYPTO_POLICY='${correct_value}'" >> ${CONF_FILE}
+ fi
+fi
@@ -14403,38 +14505,6 @@ openssl()
SRG-OS-000480-GPOS-00227
This rule ensures that openssl invocations always uses SP800-90A compliant random number generator as a default behavior.
CCE-82721-2
-
-cat > /etc/profile.d/openssl-rand.sh <<- 'EOM'
-# provide a default -rand /dev/random option to openssl commands that
-# support it
-
-# written inefficiently for maximum shell compatibility
-openssl()
-(
- openssl_bin=/usr/bin/openssl
-
- case "$*" in
- # if user specified -rand, honor it
- *\ -rand\ *|*\ -help*) exec $openssl_bin "$@" ;;
- esac
-
- cmds=`$openssl_bin list -digest-commands -cipher-commands | tr '\n' ' '`
- for i in `$openssl_bin list -commands`; do
- if $openssl_bin list -options "$i" | grep -q '^rand '; then
- cmds=" $i $cmds"
- fi
- done
-
- case "$cmds" in
- *\ "$1"\ *)
- cmd="$1"; shift
- exec $openssl_bin "$cmd" -rand /dev/random "$@" ;;
- esac
-
- exec $openssl_bin "$@"
-)
-EOM
-
- name: Put a file with shell wrapper to configure OpenSSL to always use strong entropy
copy:
dest: /etc/profile.d/openssl-rand.sh
@@ -14475,6 +14545,38 @@ EOM
- no_reboot_needed
- openssl_use_strong_entropy
- restrict_strategy
+
+
+cat > /etc/profile.d/openssl-rand.sh <<- 'EOM'
+# provide a default -rand /dev/random option to openssl commands that
+# support it
+
+# written inefficiently for maximum shell compatibility
+openssl()
+(
+ openssl_bin=/usr/bin/openssl
+
+ case "$*" in
+ # if user specified -rand, honor it
+ *\ -rand\ *|*\ -help*) exec $openssl_bin "$@" ;;
+ esac
+
+ cmds=`$openssl_bin list -digest-commands -cipher-commands | tr '\n' ' '`
+ for i in `$openssl_bin list -commands`; do
+ if $openssl_bin list -options "$i" | grep -q '^rand '; then
+ cmds=" $i $cmds"
+ fi
+ done
+
+ case "$cmds" in
+ *\ "$1"\ *)
+ cmd="$1"; shift
+ exec $openssl_bin "$cmd" -rand /dev/random "$@" ;;
+ esac
+
+ exec $openssl_bin "$@"
+)
+EOM
@@ -14811,31 +14913,6 @@ The nails service can be enabled with the following comma
Virus scanning software can be used to detect if a system has been compromised by
computer viruses, as well as to limit their spread to other systems.
- include enable_nails
-
-class enable_nails {
- service {'nails':
- enable => true,
- ensure => 'running',
- }
-}
-
- # Remediation is applicable only in certain platforms
-if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
-
-SYSTEMCTL_EXEC='/usr/bin/systemctl'
-"$SYSTEMCTL_EXEC" unmask 'nails.service'
-"$SYSTEMCTL_EXEC" start 'nails.service'
-"$SYSTEMCTL_EXEC" enable 'nails.service'
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
-
-[customizations.services]
-enabled = ["nails"]
-
- name: Enable service nails
block:
@@ -14862,6 +14939,31 @@ enabled = ["nails"]
- medium_severity
- no_reboot_needed
- service_nails_enabled
+
+
+[customizations.services]
+enabled = ["nails"]
+
+ include enable_nails
+
+class enable_nails {
+ service {'nails':
+ enable => true,
+ ensure => 'running',
+ }
+}
+
+ # Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
+
+SYSTEMCTL_EXEC='/usr/bin/systemctl'
+"$SYSTEMCTL_EXEC" unmask 'nails.service'
+"$SYSTEMCTL_EXEC" start 'nails.service'
+"$SYSTEMCTL_EXEC" enable 'nails.service'
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -15005,7 +15107,7 @@ automated remediation is not available for this configuration check.SI-2(2)
SRG-OS-000191-GPOS-00080
RHEL-08-010001
- SV-245540r754730_rule
+ SV-245540r942951_rule
Virus scanning software can be used to detect if a system has been compromised by
computer viruses, as well as to limit their spread to other systems.
CCE-86260-7
@@ -15028,7 +15130,7 @@ automated remediation is not available for this configuration check.SI-2(2)
SRG-OS-000191-GPOS-00080
RHEL-08-010001
- SV-245540r754730_rule
+ SV-245540r942951_rule
Virus scanning software can be used to detect if a system has been compromised by
computer viruses, as well as to limit their spread to other systems.
CCE-86261-5
@@ -15701,13 +15803,13 @@ option.
Access to this partition should be restricted.
CCE-83336-8
-
-part /boot
-
[[customizations.filesystem]]
mountpoint = "/boot"
size = 1073741824
+
+
+part /boot
@@ -15782,13 +15884,13 @@ setting of more restrictive mount options, and also helps ensure that
users cannot trivially fill partitions used for log or audit data storage.
CCE-81044-0
-
-part /home
-
[[customizations.filesystem]]
mountpoint = "/home"
size = 1073741824
+
+
+part /home
@@ -15808,13 +15910,13 @@ makes it easier to apply restrictions e.g. through the nosuid
CCE-83340-0
-
-part /opt
-
[[customizations.filesystem]]
mountpoint = "/opt"
size = 1073741824
+
+
+part /opt
@@ -15837,13 +15939,13 @@ more restrictive mount options, and also helps ensure that
users cannot trivially fill partitions used for log or audit data storage.
CCE-83387-1
-
-part /srv
-
[[customizations.filesystem]]
mountpoint = "/srv"
size = 1073741824
+
+
+part /srv
@@ -15889,13 +15991,13 @@ Placing /tmp in its own partition enables the setting of
restrictive mount options, which can help protect programs which use it.
CCE-80851-9
-
-part /tmp
-
[[customizations.filesystem]]
mountpoint = "/tmp"
size = 1073741824
+
+
+part /tmp
@@ -15914,13 +16016,13 @@ Putting it on a separate partition allows limiting its size and applying
restrictions through mount options.
CCE-83343-4
-
-part /usr
-
[[customizations.filesystem]]
mountpoint = "/usr"
size = 5368709120
+
+
+part /usr
@@ -15968,13 +16070,13 @@ It is not uncommon for the /var directory to contain
world-writable directories installed by other software packages.
CCE-80852-7
-
-part /var
-
[[customizations.filesystem]]
mountpoint = "/var"
size = 3221225472
+
+
+part /var
@@ -16052,13 +16154,13 @@ enables better separation between log files
and other files in /var/.
CCE-80853-5
-
-part /var/log
-
[[customizations.filesystem]]
mountpoint = "/var/log"
size = 5368709120
+
+
+part /var/log
@@ -16151,13 +16253,13 @@ auditing cannot be halted due to the partition running out
of space.
CCE-80854-3
-
-part /var/log/audit
-
[[customizations.filesystem]]
mountpoint = "/var/log/audit"
size = 10737418240
+
+
+part /var/log/audit
@@ -16181,13 +16283,13 @@ Placing /var/tmp in its own partition enables the setting
restrictive mount options, which can help protect programs which use it.
CCE-82730-3
-
-part /var/tmp
-
[[customizations.filesystem]]
mountpoint = "/var/tmp"
size = 1073741824
+
+
+part /var/tmp
@@ -16230,36 +16332,6 @@ mode. To do so, run the following command:
A graphical environment is unnecessary for certain types of systems including a virtualization
hypervisor.
CCE-82367-4
-
-package --remove=gdm
-
- include remove_gdm
-
-class remove_gdm {
- package { 'gdm':
- ensure => 'purged',
- }
-}
-
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm; then
-
-# CAUTION: This remediation script will remove gdm
-# from the system, and may remove any packages
-# that depend on gdm. Execute this
-# remediation AFTER testing on a non-production
-# system!
-
-if rpm -q --quiet "gdm" ; then
-
- yum remove -y "gdm"
-
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -16291,6 +16363,36 @@ fi
- medium_severity
- no_reboot_needed
- package_gdm_removed
+
+ include remove_gdm
+
+class remove_gdm {
+ package { 'gdm':
+ ensure => 'purged',
+ }
+}
+
+
+package --remove=gdm
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm; then
+
+# CAUTION: This remediation script will remove gdm
+# from the system, and may remove any packages
+# that depend on gdm. Execute this
+# remediation AFTER testing on a non-production
+# system!
+
+if rpm -q --quiet "gdm" ; then
+
+ yum remove -y "gdm"
+
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -16319,15 +16421,6 @@ configuration files have to be compliant, and the database needs to be more rece
which gives confidence that it reflects them.
CCE-81003-6
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -16358,6 +16451,15 @@ fi
- medium_disruption
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -16468,68 +16570,6 @@ After the settings have been set, run dconf update.
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/login-screen\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|gdm.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/gdm.d/00-security-settings"
-DBDIR="/etc/dconf/db/gdm.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*disable-restart-buttons\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)disable-restart-buttons(\s*=)/#\1disable-restart-buttons\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/login-screen\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/login-screen]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*disable-restart-buttons\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*disable-restart-buttons\\s*=\\s*.*/disable-restart-buttons=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/login-screen\\]|a\\disable-restart-buttons=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/login-screen/disable-restart-buttons$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|gdm.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/gdm.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/login-screen/disable-restart-buttons$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/login-screen/disable-restart-buttons$" /etc/dconf/db/gdm.d/
-then
- echo "/org/gnome/login-screen/disable-restart-buttons" >> "/etc/dconf/db/gdm.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -16607,41 +16647,7 @@ fi
- no_reboot_needed
- unknown_strategy
-
-
-
-
-
-
-
-
- Disable the GNOME3 Login User List
- In the default graphical environment, users logging directly into the
-system are greeted with a login screen that displays all known users.
-This functionality should be disabled by setting disable-user-list
-to true.
-
-To disable, add or edit disable-user-list to
-/etc/dconf/db/gdm.d/00-security-settings. For example:
-[org/gnome/login-screen]
-disable-user-list=true
-Once the setting has been added, add a lock to
-/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent
-user modification. For example:
-/org/gnome/login-screen/disable-user-list
-After the settings have been set, run dconf update.
- CM-6(a)
- AC-23
- SRG-OS-000480-GPOS-00227
- RHEL-08-020032
- 1.8.3
- SV-244536r743857_rule
- Leaving the user list enabled is a security risk since it allows anyone
-with physical access to the system to quickly enumerate known user accounts
-without logging in.
-
- CCE-86195-5
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
# Check for setting in any of the DConf db directories
@@ -16657,10 +16663,10 @@ mkdir -p "${DBDIR}"
# Comment out the configurations in databases different from the target one
if [ "${#SETTINGSFILES[@]}" -ne 0 ]
then
- if grep -q "^\\s*disable-user-list\\s*=" "${SETTINGSFILES[@]}"
+ if grep -q "^\\s*disable-restart-buttons\\s*=" "${SETTINGSFILES[@]}"
then
- sed -Ei "s/(^\s*)disable-user-list(\s*=)/#\1disable-user-list\2/g" "${SETTINGSFILES[@]}"
+ sed -Ei "s/(^\s*)disable-restart-buttons(\s*=)/#\1disable-restart-buttons\2/g" "${SETTINGSFILES[@]}"
fi
fi
@@ -16671,16 +16677,16 @@ then
fi
escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*disable-user-list\\s*=" "${DCONFFILE}"
+if grep -q "^\\s*disable-restart-buttons\\s*=" "${DCONFFILE}"
then
- sed -i "s/\\s*disable-user-list\\s*=\\s*.*/disable-user-list=${escaped_value}/g" "${DCONFFILE}"
+ sed -i "s/\\s*disable-restart-buttons\\s*=\\s*.*/disable-restart-buttons=${escaped_value}/g" "${DCONFFILE}"
else
- sed -i "\\|\\[org/gnome/login-screen\\]|a\\disable-user-list=${escaped_value}" "${DCONFFILE}"
+ sed -i "\\|\\[org/gnome/login-screen\\]|a\\disable-restart-buttons=${escaped_value}" "${DCONFFILE}"
fi
dconf update
# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/login-screen/disable-user-list$" "/etc/dconf/db/" \
+LOCKFILES=$(grep -r "^/org/gnome/login-screen/disable-restart-buttons$" "/etc/dconf/db/" \
| grep -v 'distro\|ibus\|gdm.d' | grep ":" | cut -d":" -f1)
LOCKSFOLDER="/etc/dconf/db/gdm.d/locks"
@@ -16689,12 +16695,12 @@ mkdir -p "${LOCKSFOLDER}"
# Comment out the configurations in databases different from the target one
if [[ ! -z "${LOCKFILES}" ]]
then
- sed -i -E "s|^/org/gnome/login-screen/disable-user-list$|#&|" "${LOCKFILES[@]}"
+ sed -i -E "s|^/org/gnome/login-screen/disable-restart-buttons$|#&|" "${LOCKFILES[@]}"
fi
-if ! grep -qr "^/org/gnome/login-screen/disable-user-list$" /etc/dconf/db/gdm.d/
+if ! grep -qr "^/org/gnome/login-screen/disable-restart-buttons$" /etc/dconf/db/gdm.d/
then
- echo "/org/gnome/login-screen/disable-user-list" >> "/etc/dconf/db/gdm.d/locks/00-security-settings-lock"
+ echo "/org/gnome/login-screen/disable-restart-buttons" >> "/etc/dconf/db/gdm.d/locks/00-security-settings-lock"
fi
dconf update
@@ -16703,6 +16709,40 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+ Disable the GNOME3 Login User List
+ In the default graphical environment, users logging directly into the
+system are greeted with a login screen that displays all known users.
+This functionality should be disabled by setting disable-user-list
+to true.
+
+To disable, add or edit disable-user-list to
+/etc/dconf/db/gdm.d/00-security-settings. For example:
+[org/gnome/login-screen]
+disable-user-list=true
+Once the setting has been added, add a lock to
+/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent
+user modification. For example:
+/org/gnome/login-screen/disable-user-list
+After the settings have been set, run dconf update.
+ CM-6(a)
+ AC-23
+ SRG-OS-000480-GPOS-00227
+ RHEL-08-020032
+ 1.8.3
+ SV-244536r743857_rule
+ Leaving the user list enabled is a security risk since it allows anyone
+with physical access to the system to quickly enumerate known user accounts
+without logging in.
+
+ CCE-86195-5
- name: Gather the package facts
package_facts:
manager: auto
@@ -16779,51 +16819,7 @@ fi
- no_reboot_needed
- unknown_strategy
-
-
-
-
-
-
-
-
- Enable the GNOME3 Login Smartcard Authentication
- In the default graphical environment, smart card authentication
-can be enabled on the login screen by setting enable-smartcard-authentication
-to true.
-
-To enable, add or edit enable-smartcard-authentication to
-/etc/dconf/db/gdm.d/00-security-settings. For example:
-[org/gnome/login-screen]
-enable-smartcard-authentication=true
-Once the setting has been added, add a lock to
-/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification.
-For example:
-/org/gnome/login-screen/enable-smartcard-authentication
-After the settings have been set, run dconf update.
- CCI-000765
- CCI-000766
- CCI-000767
- CCI-000768
- CCI-000771
- CCI-000772
- CCI-000884
- CCI-001948
- CCI-001954
- IA-2(3)
- IA-2(4)
- IA-2(8)
- IA-2(9)
- IA-2(11)
- Req-8.3
- SRG-OS-000375-GPOS-00160
- SRG-OS-000376-GPOS-00161
- SRG-OS-000377-GPOS-00162
- Smart card login provides two-factor authentication stronger than
-that provided by a username and password combination. Smart cards leverage PKI
-(public key infrastructure) in order to provide and verify credentials.
-
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
# Check for setting in any of the DConf db directories
@@ -16839,10 +16835,10 @@ mkdir -p "${DBDIR}"
# Comment out the configurations in databases different from the target one
if [ "${#SETTINGSFILES[@]}" -ne 0 ]
then
- if grep -q "^\\s*enable-smartcard-authentication\\s*=" "${SETTINGSFILES[@]}"
+ if grep -q "^\\s*disable-user-list\\s*=" "${SETTINGSFILES[@]}"
then
- sed -Ei "s/(^\s*)enable-smartcard-authentication(\s*=)/#\1enable-smartcard-authentication\2/g" "${SETTINGSFILES[@]}"
+ sed -Ei "s/(^\s*)disable-user-list(\s*=)/#\1disable-user-list\2/g" "${SETTINGSFILES[@]}"
fi
fi
@@ -16853,16 +16849,16 @@ then
fi
escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*enable-smartcard-authentication\\s*=" "${DCONFFILE}"
+if grep -q "^\\s*disable-user-list\\s*=" "${DCONFFILE}"
then
- sed -i "s/\\s*enable-smartcard-authentication\\s*=\\s*.*/enable-smartcard-authentication=${escaped_value}/g" "${DCONFFILE}"
+ sed -i "s/\\s*disable-user-list\\s*=\\s*.*/disable-user-list=${escaped_value}/g" "${DCONFFILE}"
else
- sed -i "\\|\\[org/gnome/login-screen\\]|a\\enable-smartcard-authentication=${escaped_value}" "${DCONFFILE}"
+ sed -i "\\|\\[org/gnome/login-screen\\]|a\\disable-user-list=${escaped_value}" "${DCONFFILE}"
fi
dconf update
# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/login-screen/enable-smartcard-authentication$" "/etc/dconf/db/" \
+LOCKFILES=$(grep -r "^/org/gnome/login-screen/disable-user-list$" "/etc/dconf/db/" \
| grep -v 'distro\|ibus\|gdm.d' | grep ":" | cut -d":" -f1)
LOCKSFOLDER="/etc/dconf/db/gdm.d/locks"
@@ -16871,12 +16867,12 @@ mkdir -p "${LOCKSFOLDER}"
# Comment out the configurations in databases different from the target one
if [[ ! -z "${LOCKFILES}" ]]
then
- sed -i -E "s|^/org/gnome/login-screen/enable-smartcard-authentication$|#&|" "${LOCKFILES[@]}"
+ sed -i -E "s|^/org/gnome/login-screen/disable-user-list$|#&|" "${LOCKFILES[@]}"
fi
-if ! grep -qr "^/org/gnome/login-screen/enable-smartcard-authentication$" /etc/dconf/db/gdm.d/
+if ! grep -qr "^/org/gnome/login-screen/disable-user-list$" /etc/dconf/db/gdm.d/
then
- echo "/org/gnome/login-screen/enable-smartcard-authentication" >> "/etc/dconf/db/gdm.d/locks/00-security-settings-lock"
+ echo "/org/gnome/login-screen/disable-user-list" >> "/etc/dconf/db/gdm.d/locks/00-security-settings-lock"
fi
dconf update
@@ -16885,6 +16881,50 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+ Enable the GNOME3 Login Smartcard Authentication
+ In the default graphical environment, smart card authentication
+can be enabled on the login screen by setting enable-smartcard-authentication
+to true.
+
+To enable, add or edit enable-smartcard-authentication to
+/etc/dconf/db/gdm.d/00-security-settings. For example:
+[org/gnome/login-screen]
+enable-smartcard-authentication=true
+Once the setting has been added, add a lock to
+/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification.
+For example:
+/org/gnome/login-screen/enable-smartcard-authentication
+After the settings have been set, run dconf update.
+ CCI-000765
+ CCI-000766
+ CCI-000767
+ CCI-000768
+ CCI-000771
+ CCI-000772
+ CCI-000884
+ CCI-001948
+ CCI-001954
+ IA-2(3)
+ IA-2(4)
+ IA-2(8)
+ IA-2(9)
+ IA-2(11)
+ Req-8.3
+ SRG-OS-000375-GPOS-00160
+ SRG-OS-000376-GPOS-00161
+ SRG-OS-000377-GPOS-00162
+ Smart card login provides two-factor authentication stronger than
+that provided by a username and password combination. Smart cards leverage PKI
+(public key infrastructure) in order to provide and verify credentials.
+
- name: Gather the package facts
package_facts:
manager: auto
@@ -16969,92 +17009,60 @@ fi
- no_reboot_needed
- unknown_strategy
-
-
-
-
-
-
-
-
- Enable the GNOME3 Screen Locking On Smartcard Removal
- In the default graphical environment, screen locking on smartcard removal
-can be enabled by setting removal-action
-to 'lock-screen'.
-
-To enable, add or edit removal-action to
-/etc/dconf/db/local.d/00-security-settings. For example:
-[org/gnome/settings-daemon/peripherals/smartcard]
-removal-action='lock-screen'
-Once the setting has been added, add a lock to
-/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
-For example:
-/org/gnome/settings-daemon/peripherals/smartcard/removal-action
-After the settings have been set, run dconf update.
- CCI-000056
- CCI-000058
- SRG-OS-000028-GPOS-00009
- SRG-OS-000030-GPOS-00011
- RHEL-08-020050
- SV-230351r792899_rule
- Locking the screen automatically when removing the smartcard can
-prevent undesired access to system.
-
- CCE-83910-0
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
# Check for setting in any of the DConf db directories
# If files contain ibus or distro, ignore them.
# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/settings-daemon/peripherals/smartcard\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/login-screen\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|gdm.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/gdm.d/00-security-settings"
+DBDIR="/etc/dconf/db/gdm.d"
mkdir -p "${DBDIR}"
# Comment out the configurations in databases different from the target one
if [ "${#SETTINGSFILES[@]}" -ne 0 ]
then
- if grep -q "^\\s*removal-action\\s*=" "${SETTINGSFILES[@]}"
+ if grep -q "^\\s*enable-smartcard-authentication\\s*=" "${SETTINGSFILES[@]}"
then
- sed -Ei "s/(^\s*)removal-action(\s*=)/#\1removal-action\2/g" "${SETTINGSFILES[@]}"
+ sed -Ei "s/(^\s*)enable-smartcard-authentication(\s*=)/#\1enable-smartcard-authentication\2/g" "${SETTINGSFILES[@]}"
fi
fi
[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/settings-daemon/peripherals/smartcard\\]" "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/login-screen\\]" "${DCONFFILE}"
then
- printf '%s\n' "[org/gnome/settings-daemon/peripherals/smartcard]" >> ${DCONFFILE}
+ printf '%s\n' "[org/gnome/login-screen]" >> ${DCONFFILE}
fi
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "'lock-screen'")"
-if grep -q "^\\s*removal-action\\s*=" "${DCONFFILE}"
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
+if grep -q "^\\s*enable-smartcard-authentication\\s*=" "${DCONFFILE}"
then
- sed -i "s/\\s*removal-action\\s*=\\s*.*/removal-action=${escaped_value}/g" "${DCONFFILE}"
+ sed -i "s/\\s*enable-smartcard-authentication\\s*=\\s*.*/enable-smartcard-authentication=${escaped_value}/g" "${DCONFFILE}"
else
- sed -i "\\|\\[org/gnome/settings-daemon/peripherals/smartcard\\]|a\\removal-action=${escaped_value}" "${DCONFFILE}"
+ sed -i "\\|\\[org/gnome/login-screen\\]|a\\enable-smartcard-authentication=${escaped_value}" "${DCONFFILE}"
fi
dconf update
# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/settings-daemon/peripherals/smartcard/removal-action$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+LOCKFILES=$(grep -r "^/org/gnome/login-screen/enable-smartcard-authentication$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|gdm.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/gdm.d/locks"
mkdir -p "${LOCKSFOLDER}"
# Comment out the configurations in databases different from the target one
if [[ ! -z "${LOCKFILES}" ]]
then
- sed -i -E "s|^/org/gnome/settings-daemon/peripherals/smartcard/removal-action$|#&|" "${LOCKFILES[@]}"
+ sed -i -E "s|^/org/gnome/login-screen/enable-smartcard-authentication$|#&|" "${LOCKFILES[@]}"
fi
-if ! grep -qr "^/org/gnome/settings-daemon/peripherals/smartcard/removal-action$" /etc/dconf/db/local.d/
+if ! grep -qr "^/org/gnome/login-screen/enable-smartcard-authentication$" /etc/dconf/db/gdm.d/
then
- echo "/org/gnome/settings-daemon/peripherals/smartcard/removal-action" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+ echo "/org/gnome/login-screen/enable-smartcard-authentication" >> "/etc/dconf/db/gdm.d/locks/00-security-settings-lock"
fi
dconf update
@@ -17063,6 +17071,38 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+ Enable the GNOME3 Screen Locking On Smartcard Removal
+ In the default graphical environment, screen locking on smartcard removal
+can be enabled by setting removal-action
+to 'lock-screen'.
+
+To enable, add or edit removal-action to
+/etc/dconf/db/local.d/00-security-settings. For example:
+[org/gnome/settings-daemon/peripherals/smartcard]
+removal-action='lock-screen'
+Once the setting has been added, add a lock to
+/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
+For example:
+/org/gnome/settings-daemon/peripherals/smartcard/removal-action
+After the settings have been set, run dconf update.
+ CCI-000056
+ CCI-000058
+ SRG-OS-000028-GPOS-00009
+ SRG-OS-000030-GPOS-00011
+ RHEL-08-020050
+ SV-230351r792899_rule
+ Locking the screen automatically when removing the smartcard can
+prevent undesired access to system.
+
+ CCE-83910-0
- name: Gather the package facts
package_facts:
manager: auto
@@ -17216,90 +17256,60 @@ fi
- no_reboot_needed
- unknown_strategy
-
-
-
-
-
-
-
-
- Set the GNOME3 Login Number of Failures
- In the default graphical environment, the GNOME3 login
-screen and be configured to restart the authentication process after
-a configured number of attempts. This can be configured by setting
-allowed-failures to 3 or less.
-
-To enable, add or edit allowed-failures to
-/etc/dconf/db/gdm.d/00-security-settings. For example:
-[org/gnome/login-screen]
-allowed-failures=3
-Once the setting has been added, add a lock to
-/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification.
-For example:
-/org/gnome/login-screen/allowed-failures
-After the settings have been set, run dconf update.
- 3.1.8
- FMT_MOF_EXT.1
- Setting the password retry prompts that are permitted on a per-session basis to a low value
-requires some software, such as SSH, to re-connect. This can slow down and
-draw additional attention to some types of password-guessing attacks.
-
- CCE-80771-9
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
# Check for setting in any of the DConf db directories
# If files contain ibus or distro, ignore them.
# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/login-screen\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|gdm.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/gdm.d/00-security-settings"
-DBDIR="/etc/dconf/db/gdm.d"
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/settings-daemon/peripherals/smartcard\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
mkdir -p "${DBDIR}"
# Comment out the configurations in databases different from the target one
if [ "${#SETTINGSFILES[@]}" -ne 0 ]
then
- if grep -q "^\\s*allowed-failures\\s*=" "${SETTINGSFILES[@]}"
+ if grep -q "^\\s*removal-action\\s*=" "${SETTINGSFILES[@]}"
then
- sed -Ei "s/(^\s*)allowed-failures(\s*=)/#\1allowed-failures\2/g" "${SETTINGSFILES[@]}"
+ sed -Ei "s/(^\s*)removal-action(\s*=)/#\1removal-action\2/g" "${SETTINGSFILES[@]}"
fi
fi
[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/login-screen\\]" "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/settings-daemon/peripherals/smartcard\\]" "${DCONFFILE}"
then
- printf '%s\n' "[org/gnome/login-screen]" >> ${DCONFFILE}
+ printf '%s\n' "[org/gnome/settings-daemon/peripherals/smartcard]" >> ${DCONFFILE}
fi
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "3")"
-if grep -q "^\\s*allowed-failures\\s*=" "${DCONFFILE}"
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "'lock-screen'")"
+if grep -q "^\\s*removal-action\\s*=" "${DCONFFILE}"
then
- sed -i "s/\\s*allowed-failures\\s*=\\s*.*/allowed-failures=${escaped_value}/g" "${DCONFFILE}"
+ sed -i "s/\\s*removal-action\\s*=\\s*.*/removal-action=${escaped_value}/g" "${DCONFFILE}"
else
- sed -i "\\|\\[org/gnome/login-screen\\]|a\\allowed-failures=${escaped_value}" "${DCONFFILE}"
+ sed -i "\\|\\[org/gnome/settings-daemon/peripherals/smartcard\\]|a\\removal-action=${escaped_value}" "${DCONFFILE}"
fi
dconf update
# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/login-screen/allowed-failures$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|gdm.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/gdm.d/locks"
+LOCKFILES=$(grep -r "^/org/gnome/settings-daemon/peripherals/smartcard/removal-action$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
mkdir -p "${LOCKSFOLDER}"
# Comment out the configurations in databases different from the target one
if [[ ! -z "${LOCKFILES}" ]]
then
- sed -i -E "s|^/org/gnome/login-screen/allowed-failures$|#&|" "${LOCKFILES[@]}"
+ sed -i -E "s|^/org/gnome/settings-daemon/peripherals/smartcard/removal-action$|#&|" "${LOCKFILES[@]}"
fi
-if ! grep -qr "^/org/gnome/login-screen/allowed-failures$" /etc/dconf/db/gdm.d/
+if ! grep -qr "^/org/gnome/settings-daemon/peripherals/smartcard/removal-action$" /etc/dconf/db/local.d/
then
- echo "/org/gnome/login-screen/allowed-failures" >> "/etc/dconf/db/gdm.d/locks/00-security-settings-lock"
+ echo "/org/gnome/settings-daemon/peripherals/smartcard/removal-action" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
fi
dconf update
@@ -17308,6 +17318,36 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+ Set the GNOME3 Login Number of Failures
+ In the default graphical environment, the GNOME3 login
+screen and be configured to restart the authentication process after
+a configured number of attempts. This can be configured by setting
+allowed-failures to 3 or less.
+
+To enable, add or edit allowed-failures to
+/etc/dconf/db/gdm.d/00-security-settings. For example:
+[org/gnome/login-screen]
+allowed-failures=3
+Once the setting has been added, add a lock to
+/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification.
+For example:
+/org/gnome/login-screen/allowed-failures
+After the settings have been set, run dconf update.
+ 3.1.8
+ FMT_MOF_EXT.1
+ Setting the password retry prompts that are permitted on a per-session basis to a low value
+requires some software, such as SSH, to re-connect. This can slow down and
+draw additional attention to some types of password-guessing attacks.
+
+ CCE-80771-9
- name: Gather the package facts
package_facts:
manager: auto
@@ -17375,6 +17415,68 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/login-screen\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|gdm.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/gdm.d/00-security-settings"
+DBDIR="/etc/dconf/db/gdm.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*allowed-failures\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)allowed-failures(\s*=)/#\1allowed-failures\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/login-screen\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/login-screen]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "3")"
+if grep -q "^\\s*allowed-failures\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*allowed-failures\\s*=\\s*.*/allowed-failures=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/login-screen\\]|a\\allowed-failures=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/login-screen/allowed-failures$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|gdm.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/gdm.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/login-screen/allowed-failures$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/login-screen/allowed-failures$" /etc/dconf/db/gdm.d/
+then
+ echo "/org/gnome/login-screen/allowed-failures" >> "/etc/dconf/db/gdm.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -17423,24 +17525,6 @@ AutomaticLoginEnable=false
system security.
CCE-80823-8
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-if rpm --quiet -q gdm
-then
- if ! grep -q "^AutomaticLoginEnable=" /etc/gdm/custom.conf
- then
- sed -i "/^\[daemon\]/a \
- AutomaticLoginEnable=False" /etc/gdm/custom.conf
- else
- sed -i "s/^AutomaticLoginEnable=.*/AutomaticLoginEnable=False/g" /etc/gdm/custom.conf
- fi
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -17484,6 +17568,24 @@ fi
- medium_disruption
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+if rpm --quiet -q gdm
+then
+ if ! grep -q "^AutomaticLoginEnable=" /etc/gdm/custom.conf
+ then
+ sed -i "/^\[daemon\]/a \
+ AutomaticLoginEnable=False" /etc/gdm/custom.conf
+ else
+ sed -i "s/^AutomaticLoginEnable=.*/AutomaticLoginEnable=False/g" /etc/gdm/custom.conf
+ fi
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -17531,24 +17633,6 @@ TimedLoginEnable=false
system security.
CCE-80824-6
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-if rpm --quiet -q gdm
-then
- if ! grep -q "^TimedLoginEnable=" /etc/gdm/custom.conf
- then
- sed -i "/^\[daemon\]/a \
- TimedLoginEnable=false" /etc/gdm/custom.conf
- else
- sed -i "s/^TimedLoginEnable=.*/TimedLoginEnable=false/g" /etc/gdm/custom.conf
- fi
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -17592,6 +17676,24 @@ fi
- medium_disruption
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+if rpm --quiet -q gdm
+then
+ if ! grep -q "^TimedLoginEnable=" /etc/gdm/custom.conf
+ then
+ sed -i "/^\[daemon\]/a \
+ TimedLoginEnable=false" /etc/gdm/custom.conf
+ else
+ sed -i "s/^TimedLoginEnable=.*/TimedLoginEnable=false/g" /etc/gdm/custom.conf
+ fi
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -17617,28 +17719,6 @@ remote session. If a privileged user were to login using XDMCP, the
privileged user password could be compromised due to typed XEvents
and keystrokes will traversing over the network in clear text.
CCE-86007-2
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm; then
-
-# Try find '[xdmcp]' and 'Enable' in '/etc/gdm/custom.conf', if it exists, set
-# to 'false', if it isn't here, add it, if '[xdmcp]' doesn't exist, add it there
-if grep -qzosP '[[:space:]]*\[xdmcp]([^\n\[]*\n+)+?[[:space:]]*Enable' '/etc/gdm/custom.conf'; then
-
- sed -i "s/Enable[^(\n)]*/Enable=false/" '/etc/gdm/custom.conf'
-elif grep -qs '[[:space:]]*\[xdmcp]' '/etc/gdm/custom.conf'; then
- sed -i "/[[:space:]]*\[xdmcp]/a Enable=false" '/etc/gdm/custom.conf'
-else
- if test -d "/etc/gdm"; then
- printf '%s\n' '[xdmcp]' "Enable=false" >> '/etc/gdm/custom.conf'
- else
- echo "Config file directory '/etc/gdm' doesnt exist, not remediating, assuming non-applicability." >&2
- fi
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -17668,6 +17748,28 @@ fi
- medium_disruption
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm; then
+
+# Try find '[xdmcp]' and 'Enable' in '/etc/gdm/custom.conf', if it exists, set
+# to 'false', if it isn't here, add it, if '[xdmcp]' doesn't exist, add it there
+if grep -qzosP '[[:space:]]*\[xdmcp]([^\n\[]*\n+)+?[[:space:]]*Enable' '/etc/gdm/custom.conf'; then
+
+ sed -i "s/Enable[^(\n)]*/Enable=false/" '/etc/gdm/custom.conf'
+elif grep -qs '[[:space:]]*\[xdmcp]' '/etc/gdm/custom.conf'; then
+ sed -i "/[[:space:]]*\[xdmcp]/a Enable=false" '/etc/gdm/custom.conf'
+else
+ if test -d "/etc/gdm"; then
+ printf '%s\n' '[xdmcp]' "Enable=false" >> '/etc/gdm/custom.conf'
+ else
+ echo "Config file directory '/etc/gdm' doesnt exist, not remediating, assuming non-applicability." >&2
+ fi
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -17744,68 +17846,6 @@ It will, however, also prevent desktop users from legitimate use
of removable media.
CCE-89904-7
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/media-handling\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*automount\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)automount(\s*=)/#\1automount\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/media-handling\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/media-handling]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "false")"
-if grep -q "^\\s*automount\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*automount\\s*=\\s*.*/automount=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/media-handling\\]|a\\automount=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/media-handling/automount$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/media-handling/automount$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/media-handling/automount$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/media-handling/automount" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -17889,6 +17929,68 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/media-handling\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*automount\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)automount(\s*=)/#\1automount\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/media-handling\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/media-handling]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "false")"
+if grep -q "^\\s*automount\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*automount\\s*=\\s*.*/automount=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/media-handling\\]|a\\automount=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/media-handling/automount$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/media-handling/automount$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/media-handling/automount$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/media-handling/automount" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -17962,68 +18064,6 @@ It will, however, also prevent desktop users from legitimate use
of removable media.
CCE-83693-2
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/media-handling\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*automount-open\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)automount-open(\s*=)/#\1automount-open\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/media-handling\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/media-handling]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "false")"
-if grep -q "^\\s*automount-open\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*automount-open\\s*=\\s*.*/automount-open=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/media-handling\\]|a\\automount-open=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/media-handling/automount-open$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/media-handling/automount-open$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/media-handling/automount-open$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/media-handling/automount-open" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -18107,6 +18147,68 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/media-handling\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*automount-open\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)automount-open(\s*=)/#\1automount-open\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/media-handling\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/media-handling]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "false")"
+if grep -q "^\\s*automount-open\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*automount-open\\s*=\\s*.*/automount-open=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/media-handling\\]|a\\automount-open=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/media-handling/automount-open$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/media-handling/automount-open$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/media-handling/automount-open$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/media-handling/automount-open" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -18179,68 +18281,6 @@ It will, however, also prevent desktop users from legitimate use
of removable media.
CCE-83742-7
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/media-handling\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*autorun-never\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)autorun-never(\s*=)/#\1autorun-never\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/media-handling\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/media-handling]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*autorun-never\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*autorun-never\\s*=\\s*.*/autorun-never=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/media-handling\\]|a\\autorun-never=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/media-handling/autorun-never$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/media-handling/autorun-never$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/media-handling/autorun-never$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/media-handling/autorun-never" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -18320,6 +18360,68 @@ fi
- medium_disruption
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/media-handling\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*autorun-never\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)autorun-never(\s*=)/#\1autorun-never\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/media-handling\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/media-handling]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
+if grep -q "^\\s*autorun-never\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*autorun-never\\s*=\\s*.*/autorun-never=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/media-handling\\]|a\\autorun-never=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/media-handling/autorun-never$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/media-handling/autorun-never$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/media-handling/autorun-never$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/media-handling/autorun-never" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -18418,68 +18520,6 @@ file to exploit this flaw. Assuming the attacker could place the malicious file
malicious file would exploit the thumbnailer with the potential for malicious code execution. It
is best to disable these thumbnailer applications unless they are explicitly required.
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/thumbnailers\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*disable-all\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)disable-all(\s*=)/#\1disable-all\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/thumbnailers\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/thumbnailers]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*disable-all\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*disable-all\\s*=\\s*.*/disable-all=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/thumbnailers\\]|a\\disable-all=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/thumbnailers/disable-all$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/thumbnailers/disable-all$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/thumbnailers/disable-all$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/thumbnailers/disable-all" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -18552,42 +18592,13 @@ fi
- unknown_severity
- unknown_strategy
-
-
-
-
-
-
-
-
-
- GNOME Network Settings
- GNOME network settings that apply to the graphical interface.
-
- Disable WIFI Network Connection Creation in GNOME3
- GNOME allows users to create ad-hoc wireless connections through the
-NetworkManager applet. Wireless connections should be disabled by
-adding or setting disable-wifi-create to true in
-/etc/dconf/db/local.d/00-security-settings. For example:
-[org/gnome/nm-applet]
-disable-wifi-create=true
-
-Once the settings have been added, add a lock to
-/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
-For example:
-/org/gnome/nm-applet/disable-wifi-create
-After the settings have been set, run dconf update.
- 3.1.16
- Wireless network connections should not be allowed to be configured by general
-users on a given system as it could open the system to backdoor attacks.
-
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
# Check for setting in any of the DConf db directories
# If files contain ibus or distro, ignore them.
# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/nm-applet\\]" "/etc/dconf/db/" \
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/thumbnailers\\]" "/etc/dconf/db/" \
| grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
DBDIR="/etc/dconf/db/local.d"
@@ -18597,30 +18608,30 @@ mkdir -p "${DBDIR}"
# Comment out the configurations in databases different from the target one
if [ "${#SETTINGSFILES[@]}" -ne 0 ]
then
- if grep -q "^\\s*disable-wifi-create\\s*=" "${SETTINGSFILES[@]}"
+ if grep -q "^\\s*disable-all\\s*=" "${SETTINGSFILES[@]}"
then
- sed -Ei "s/(^\s*)disable-wifi-create(\s*=)/#\1disable-wifi-create\2/g" "${SETTINGSFILES[@]}"
+ sed -Ei "s/(^\s*)disable-all(\s*=)/#\1disable-all\2/g" "${SETTINGSFILES[@]}"
fi
fi
[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/nm-applet\\]" "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/thumbnailers\\]" "${DCONFFILE}"
then
- printf '%s\n' "[org/gnome/nm-applet]" >> ${DCONFFILE}
+ printf '%s\n' "[org/gnome/desktop/thumbnailers]" >> ${DCONFFILE}
fi
escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*disable-wifi-create\\s*=" "${DCONFFILE}"
+if grep -q "^\\s*disable-all\\s*=" "${DCONFFILE}"
then
- sed -i "s/\\s*disable-wifi-create\\s*=\\s*.*/disable-wifi-create=${escaped_value}/g" "${DCONFFILE}"
+ sed -i "s/\\s*disable-all\\s*=\\s*.*/disable-all=${escaped_value}/g" "${DCONFFILE}"
else
- sed -i "\\|\\[org/gnome/nm-applet\\]|a\\disable-wifi-create=${escaped_value}" "${DCONFFILE}"
+ sed -i "\\|\\[org/gnome/desktop/thumbnailers\\]|a\\disable-all=${escaped_value}" "${DCONFFILE}"
fi
dconf update
# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/nm-applet/disable-wifi-create$" "/etc/dconf/db/" \
+LOCKFILES=$(grep -r "^/org/gnome/desktop/thumbnailers/disable-all$" "/etc/dconf/db/" \
| grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
LOCKSFOLDER="/etc/dconf/db/local.d/locks"
@@ -18629,12 +18640,12 @@ mkdir -p "${LOCKSFOLDER}"
# Comment out the configurations in databases different from the target one
if [[ ! -z "${LOCKFILES}" ]]
then
- sed -i -E "s|^/org/gnome/nm-applet/disable-wifi-create$|#&|" "${LOCKFILES[@]}"
+ sed -i -E "s|^/org/gnome/desktop/thumbnailers/disable-all$|#&|" "${LOCKFILES[@]}"
fi
-if ! grep -qr "^/org/gnome/nm-applet/disable-wifi-create$" /etc/dconf/db/local.d/
+if ! grep -qr "^/org/gnome/desktop/thumbnailers/disable-all$" /etc/dconf/db/local.d/
then
- echo "/org/gnome/nm-applet/disable-wifi-create" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+ echo "/org/gnome/desktop/thumbnailers/disable-all" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
fi
dconf update
@@ -18643,6 +18654,35 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+
+ GNOME Network Settings
+ GNOME network settings that apply to the graphical interface.
+
+ Disable WIFI Network Connection Creation in GNOME3
+ GNOME allows users to create ad-hoc wireless connections through the
+NetworkManager applet. Wireless connections should be disabled by
+adding or setting disable-wifi-create to true in
+/etc/dconf/db/local.d/00-security-settings. For example:
+[org/gnome/nm-applet]
+disable-wifi-create=true
+
+Once the settings have been added, add a lock to
+/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
+For example:
+/org/gnome/nm-applet/disable-wifi-create
+After the settings have been set, run dconf update.
+ 3.1.16
+ Wireless network connections should not be allowed to be configured by general
+users on a given system as it could open the system to backdoor attacks.
+
- name: Gather the package facts
package_facts:
manager: auto
@@ -18707,34 +18747,7 @@ fi
- no_reboot_needed
- unknown_strategy
-
-
-
-
-
-
-
-
- Disable WIFI Network Notification in GNOME3
- By default, GNOME disables WIFI notification. This should be permanently set
-so that users do not connect to a wireless network when the system finds one.
-While useful for mobile devices, this setting should be disabled for all other systems.
-To configure the system to disable the WIFI notication, add or set
-suppress-wireless-networks-available to true in
-/etc/dconf/db/local.d/00-security-settings. For example:
-[org/gnome/nm-applet]
-suppress-wireless-networks-available=true
-
-Once the settings have been added, add a lock to
-/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
-For example:
-/org/gnome/nm-applet/suppress-wireless-networks-available
-After the settings have been set, run dconf update.
- 3.1.16
- Wireless network connections should not be allowed to be configured by general
-users on a given system as it could open the system to backdoor attacks.
-
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
# Check for setting in any of the DConf db directories
@@ -18750,10 +18763,10 @@ mkdir -p "${DBDIR}"
# Comment out the configurations in databases different from the target one
if [ "${#SETTINGSFILES[@]}" -ne 0 ]
then
- if grep -q "^\\s*suppress-wireless-networks-available\\s*=" "${SETTINGSFILES[@]}"
+ if grep -q "^\\s*disable-wifi-create\\s*=" "${SETTINGSFILES[@]}"
then
- sed -Ei "s/(^\s*)suppress-wireless-networks-available(\s*=)/#\1suppress-wireless-networks-available\2/g" "${SETTINGSFILES[@]}"
+ sed -Ei "s/(^\s*)disable-wifi-create(\s*=)/#\1disable-wifi-create\2/g" "${SETTINGSFILES[@]}"
fi
fi
@@ -18764,16 +18777,16 @@ then
fi
escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*suppress-wireless-networks-available\\s*=" "${DCONFFILE}"
+if grep -q "^\\s*disable-wifi-create\\s*=" "${DCONFFILE}"
then
- sed -i "s/\\s*suppress-wireless-networks-available\\s*=\\s*.*/suppress-wireless-networks-available=${escaped_value}/g" "${DCONFFILE}"
+ sed -i "s/\\s*disable-wifi-create\\s*=\\s*.*/disable-wifi-create=${escaped_value}/g" "${DCONFFILE}"
else
- sed -i "\\|\\[org/gnome/nm-applet\\]|a\\suppress-wireless-networks-available=${escaped_value}" "${DCONFFILE}"
+ sed -i "\\|\\[org/gnome/nm-applet\\]|a\\disable-wifi-create=${escaped_value}" "${DCONFFILE}"
fi
dconf update
# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/nm-applet/suppress-wireless-networks-available$" "/etc/dconf/db/" \
+LOCKFILES=$(grep -r "^/org/gnome/nm-applet/disable-wifi-create$" "/etc/dconf/db/" \
| grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
LOCKSFOLDER="/etc/dconf/db/local.d/locks"
@@ -18782,12 +18795,12 @@ mkdir -p "${LOCKSFOLDER}"
# Comment out the configurations in databases different from the target one
if [[ ! -z "${LOCKFILES}" ]]
then
- sed -i -E "s|^/org/gnome/nm-applet/suppress-wireless-networks-available$|#&|" "${LOCKFILES[@]}"
+ sed -i -E "s|^/org/gnome/nm-applet/disable-wifi-create$|#&|" "${LOCKFILES[@]}"
fi
-if ! grep -qr "^/org/gnome/nm-applet/suppress-wireless-networks-available$" /etc/dconf/db/local.d/
+if ! grep -qr "^/org/gnome/nm-applet/disable-wifi-create$" /etc/dconf/db/local.d/
then
- echo "/org/gnome/nm-applet/suppress-wireless-networks-available" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+ echo "/org/gnome/nm-applet/disable-wifi-create" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
fi
dconf update
@@ -18796,6 +18809,33 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+ Disable WIFI Network Notification in GNOME3
+ By default, GNOME disables WIFI notification. This should be permanently set
+so that users do not connect to a wireless network when the system finds one.
+While useful for mobile devices, this setting should be disabled for all other systems.
+To configure the system to disable the WIFI notication, add or set
+suppress-wireless-networks-available to true in
+/etc/dconf/db/local.d/00-security-settings. For example:
+[org/gnome/nm-applet]
+suppress-wireless-networks-available=true
+
+Once the settings have been added, add a lock to
+/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
+For example:
+/org/gnome/nm-applet/suppress-wireless-networks-available
+After the settings have been set, run dconf update.
+ 3.1.16
+ Wireless network connections should not be allowed to be configured by general
+users on a given system as it could open the system to backdoor attacks.
+
- name: Gather the package facts
package_facts:
manager: auto
@@ -18860,49 +18900,13 @@ fi
- no_reboot_needed
- unknown_strategy
-
-
-
-
-
-
-
-
-
- GNOME Remote Access Settings
- GNOME remote access settings that apply to the graphical interface.
-
- Require Credential Prompting for Remote Access in GNOME3
- By default, GNOME does not require credentials when using Vino for
-remote access. To configure the system to require remote credentials, add or set
-authentication-methods to ['vnc'] in
-/etc/dconf/db/local.d/00-security-settings. For example:
-[org/gnome/Vino]
-authentication-methods=['vnc']
-
-Once the settings have been added, add a lock to
-/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
-For example:
-/org/gnome/Vino/authentication-methods
-After the settings have been set, run dconf update.
- 3.1.12
- 164.308(a)(4)(i)
- 164.308(b)(1)
- 164.308(b)(3)
- 164.310(b)
- 164.312(e)(1)
- 164.312(e)(2)(ii)
- Username and password prompting is required for remote access. Otherwise, non-authorized
-and nefarious users can access the system freely.
-
- CCE-80772-7
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
# Check for setting in any of the DConf db directories
# If files contain ibus or distro, ignore them.
# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/Vino\\]" "/etc/dconf/db/" \
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/nm-applet\\]" "/etc/dconf/db/" \
| grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
DBDIR="/etc/dconf/db/local.d"
@@ -18912,30 +18916,30 @@ mkdir -p "${DBDIR}"
# Comment out the configurations in databases different from the target one
if [ "${#SETTINGSFILES[@]}" -ne 0 ]
then
- if grep -q "^\\s*authentication-methods\\s*=" "${SETTINGSFILES[@]}"
+ if grep -q "^\\s*suppress-wireless-networks-available\\s*=" "${SETTINGSFILES[@]}"
then
- sed -Ei "s/(^\s*)authentication-methods(\s*=)/#\1authentication-methods\2/g" "${SETTINGSFILES[@]}"
+ sed -Ei "s/(^\s*)suppress-wireless-networks-available(\s*=)/#\1suppress-wireless-networks-available\2/g" "${SETTINGSFILES[@]}"
fi
fi
[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/Vino\\]" "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/nm-applet\\]" "${DCONFFILE}"
then
- printf '%s\n' "[org/gnome/Vino]" >> ${DCONFFILE}
+ printf '%s\n' "[org/gnome/nm-applet]" >> ${DCONFFILE}
fi
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "['vnc']")"
-if grep -q "^\\s*authentication-methods\\s*=" "${DCONFFILE}"
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
+if grep -q "^\\s*suppress-wireless-networks-available\\s*=" "${DCONFFILE}"
then
- sed -i "s/\\s*authentication-methods\\s*=\\s*.*/authentication-methods=${escaped_value}/g" "${DCONFFILE}"
+ sed -i "s/\\s*suppress-wireless-networks-available\\s*=\\s*.*/suppress-wireless-networks-available=${escaped_value}/g" "${DCONFFILE}"
else
- sed -i "\\|\\[org/gnome/Vino\\]|a\\authentication-methods=${escaped_value}" "${DCONFFILE}"
+ sed -i "\\|\\[org/gnome/nm-applet\\]|a\\suppress-wireless-networks-available=${escaped_value}" "${DCONFFILE}"
fi
dconf update
# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/Vino/authentication-methods$" "/etc/dconf/db/" \
+LOCKFILES=$(grep -r "^/org/gnome/nm-applet/suppress-wireless-networks-available$" "/etc/dconf/db/" \
| grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
LOCKSFOLDER="/etc/dconf/db/local.d/locks"
@@ -18944,12 +18948,12 @@ mkdir -p "${LOCKSFOLDER}"
# Comment out the configurations in databases different from the target one
if [[ ! -z "${LOCKFILES}" ]]
then
- sed -i -E "s|^/org/gnome/Vino/authentication-methods$|#&|" "${LOCKFILES[@]}"
+ sed -i -E "s|^/org/gnome/nm-applet/suppress-wireless-networks-available$|#&|" "${LOCKFILES[@]}"
fi
-if ! grep -qr "^/org/gnome/Vino/authentication-methods$" /etc/dconf/db/local.d/
+if ! grep -qr "^/org/gnome/nm-applet/suppress-wireless-networks-available$" /etc/dconf/db/local.d/
then
- echo "/org/gnome/Vino/authentication-methods" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+ echo "/org/gnome/nm-applet/suppress-wireless-networks-available" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
fi
dconf update
@@ -18958,6 +18962,42 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+
+ GNOME Remote Access Settings
+ GNOME remote access settings that apply to the graphical interface.
+
+ Require Credential Prompting for Remote Access in GNOME3
+ By default, GNOME does not require credentials when using Vino for
+remote access. To configure the system to require remote credentials, add or set
+authentication-methods to ['vnc'] in
+/etc/dconf/db/local.d/00-security-settings. For example:
+[org/gnome/Vino]
+authentication-methods=['vnc']
+
+Once the settings have been added, add a lock to
+/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
+For example:
+/org/gnome/Vino/authentication-methods
+After the settings have been set, run dconf update.
+ 3.1.12
+ 164.308(a)(4)(i)
+ 164.308(b)(1)
+ 164.308(b)(3)
+ 164.310(b)
+ 164.312(e)(1)
+ 164.312(e)(2)(ii)
+ Username and password prompting is required for remote access. Otherwise, non-authorized
+and nefarious users can access the system freely.
+
+ CCE-80772-7
- name: Gather the package facts
package_facts:
manager: auto
@@ -19025,6 +19065,68 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/Vino\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*authentication-methods\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)authentication-methods(\s*=)/#\1authentication-methods\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/Vino\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/Vino]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "['vnc']")"
+if grep -q "^\\s*authentication-methods\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*authentication-methods\\s*=\\s*.*/authentication-methods=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/Vino\\]|a\\authentication-methods=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/Vino/authentication-methods$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/Vino/authentication-methods$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/Vino/authentication-methods$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/Vino/authentication-methods" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -19099,68 +19201,6 @@ After the settings have been set, run dconf update.
CCE-80773-5
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/Vino\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*require-encryption\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)require-encryption(\s*=)/#\1require-encryption\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/Vino\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/Vino]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*require-encryption\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*require-encryption\\s*=\\s*.*/require-encryption=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/Vino\\]|a\\require-encryption=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/Vino/require-encryption$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/Vino/require-encryption$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/Vino/require-encryption$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/Vino/require-encryption" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -19240,6 +19280,68 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/Vino\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*require-encryption\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)require-encryption(\s*=)/#\1require-encryption\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/Vino\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/Vino]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
+if grep -q "^\\s*require-encryption\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*require-encryption\\s*=\\s*.*/require-encryption=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/Vino\\]|a\\require-encryption=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/Vino/require-encryption$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/Vino/require-encryption$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/Vino/require-encryption$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/Vino/require-encryption" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -19350,68 +19452,6 @@ login session does not have administrator rights and the display station is loca
controlled-access area.
CCE-80774-3
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/screensaver\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*idle-activation-enabled\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)idle-activation-enabled(\s*=)/#\1idle-activation-enabled\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/screensaver\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*idle-activation-enabled\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*idle-activation-enabled\\s*=\\s*.*/idle-activation-enabled=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\idle-activation-enabled=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/idle-activation-enabled$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/screensaver/idle-activation-enabled$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/screensaver/idle-activation-enabled$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/screensaver/idle-activation-enabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -19499,6 +19539,68 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/screensaver\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*idle-activation-enabled\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)idle-activation-enabled(\s*=)/#\1idle-activation-enabled\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/screensaver\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
+if grep -q "^\\s*idle-activation-enabled\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*idle-activation-enabled\\s*=\\s*.*/idle-activation-enabled=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\idle-activation-enabled=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/idle-activation-enabled$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/screensaver/idle-activation-enabled$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/screensaver/idle-activation-enabled$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/screensaver/idle-activation-enabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -19555,48 +19657,21 @@ After the settings have been set, run dconf update.A session lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity
of the information system but does not want to logout because of the temporary nature of the absense.
CCE-83858-1
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm; then
-
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/idle-activation-enabled$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/screensaver/idle-activation-enabled$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/screensaver/idle-activation-enabled$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/screensaver/idle-activation-enabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- - name: Gather the package facts
- package_facts:
- manager: auto
- tags:
- - CCE-83858-1
- - CJIS-5.5.5
- - NIST-800-171-3.1.10
- - NIST-800-53-CM-6(a)
- - PCI-DSS-Req-8.1.8
- - dconf_gnome_screensaver_idle_activation_locked
- - low_complexity
- - medium_disruption
- - medium_severity
- - no_reboot_needed
- - unknown_strategy
+ - name: Gather the package facts
+ package_facts:
+ manager: auto
+ tags:
+ - CCE-83858-1
+ - CJIS-5.5.5
+ - NIST-800-171-3.1.10
+ - NIST-800-53-CM-6(a)
+ - PCI-DSS-Req-8.1.8
+ - dconf_gnome_screensaver_idle_activation_locked
+ - low_complexity
+ - medium_disruption
+ - medium_severity
+ - no_reboot_needed
+ - unknown_strategy
- name: Prevent user modification of GNOME Screensaver idle-activation-enabled
lineinfile:
@@ -19633,6 +19708,33 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm; then
+
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/idle-activation-enabled$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/screensaver/idle-activation-enabled$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/screensaver/idle-activation-enabled$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/screensaver/idle-activation-enabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -19702,52 +19804,6 @@ system session prior to vacating the vicinity, GNOME3 can be configured to ident
a user's session has idled and take action to initiate a session lock.
CCE-80775-0
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-inactivity_timeout_value=''
-
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/session\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*idle-delay\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)idle-delay(\s*=)/#\1idle-delay\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/session\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/session]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "uint32 ${inactivity_timeout_value}")"
-if grep -q "^\\s*idle-delay\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*idle-delay\\s*=\\s*.*/idle-delay=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/session\\]|a\\idle-delay=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -19819,6 +19875,52 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+inactivity_timeout_value=''
+
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/session\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*idle-delay\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)idle-delay(\s*=)/#\1idle-delay\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/session\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/session]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "uint32 ${inactivity_timeout_value}")"
+if grep -q "^\\s*idle-delay\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*idle-delay\\s*=\\s*.*/idle-delay=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/session\\]|a\\idle-delay=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -19885,52 +19987,6 @@ After the settings have been set, run dconf update.
CCE-80776-8
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-var_screensaver_lock_delay=''
-
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/screensaver\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*lock-delay\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)lock-delay(\s*=)/#\1lock-delay\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/screensaver\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "uint32 ${var_screensaver_lock_delay}")"
-if grep -q "^\\s*lock-delay\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*lock-delay\\s*=\\s*.*/lock-delay=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\lock-delay=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -19999,6 +20055,52 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+var_screensaver_lock_delay=''
+
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/screensaver\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*lock-delay\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)lock-delay(\s*=)/#\1lock-delay\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/screensaver\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "uint32 ${var_screensaver_lock_delay}")"
+if grep -q "^\\s*lock-delay\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*lock-delay\\s*=\\s*.*/lock-delay=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\lock-delay=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -20069,68 +20171,6 @@ After the settings have been set, run dconf update.
CCE-80777-6
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/screensaver\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*lock-enabled\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)lock-enabled(\s*=)/#\1lock-enabled\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/screensaver\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*lock-enabled\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*lock-enabled\\s*=\\s*.*/lock-enabled=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\lock-enabled=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/lock-enabled$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/screensaver/lock-enabled$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/screensaver/lock-enabled$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/screensaver/lock-enabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -20336,6 +20376,68 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/screensaver\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*lock-enabled\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)lock-enabled(\s*=)/#\1lock-enabled\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/screensaver\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
+if grep -q "^\\s*lock-enabled\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*lock-enabled\\s*=\\s*.*/lock-enabled=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\lock-enabled=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/lock-enabled$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/screensaver/lock-enabled$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/screensaver/lock-enabled$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/screensaver/lock-enabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -20396,33 +20498,6 @@ After the settings have been set, run dconf update.A session lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity
of the information system but does not want to logout because of the temporary nature of the absense.
CCE-87261-4
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm; then
-
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/lock-enabled$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/screensaver/lock-enabled$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/screensaver/lock-enabled$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/screensaver/lock-enabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -20477,6 +20552,33 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm; then
+
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/lock-enabled$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/screensaver/lock-enabled$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/screensaver/lock-enabled$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/screensaver/lock-enabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -20545,68 +20647,6 @@ After the settings have been set, run dconf update.
CCE-80778-4
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/screensaver\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*picture-uri\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)picture-uri(\s*=)/#\1picture-uri\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/screensaver\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "string ''")"
-if grep -q "^\\s*picture-uri\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*picture-uri\\s*=\\s*.*/picture-uri=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\picture-uri=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/picture-uri$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/screensaver/picture-uri$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/screensaver/picture-uri$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/screensaver/picture-uri" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -20699,34 +20739,7 @@ fi
- no_reboot_needed
- unknown_strategy
-
-
-
-
-
-
-
-
- Disable Full User Name on Splash Shield
- By default when the screen is locked, the splash shield will show the user's
-full name. This should be disabled to prevent casual observers from seeing
-who has access to the system. This can be disabled by adding or setting
-show-full-name-in-top-bar to false in
-/etc/dconf/db/local.d/00-security-settings. For example:
-[org/gnome/desktop/screensaver]
-show-full-name-in-top-bar=false
-
-Once the settings have been added, add a lock to
-/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
-For example:
-/org/gnome/desktop/screensaver/show-full-name-in-top-bar
-After the settings have been set, run dconf update.
- FMT_MOF_EXT.1
- Setting the splash screen to not reveal the logged in user's name
-conceals who has access to the system from passersby.
-
- CCE-80779-2
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
# Check for setting in any of the DConf db directories
@@ -20742,10 +20755,10 @@ mkdir -p "${DBDIR}"
# Comment out the configurations in databases different from the target one
if [ "${#SETTINGSFILES[@]}" -ne 0 ]
then
- if grep -q "^\\s*show-full-name-in-top-bar\\s*=" "${SETTINGSFILES[@]}"
+ if grep -q "^\\s*picture-uri\\s*=" "${SETTINGSFILES[@]}"
then
- sed -Ei "s/(^\s*)show-full-name-in-top-bar(\s*=)/#\1show-full-name-in-top-bar\2/g" "${SETTINGSFILES[@]}"
+ sed -Ei "s/(^\s*)picture-uri(\s*=)/#\1picture-uri\2/g" "${SETTINGSFILES[@]}"
fi
fi
@@ -20755,17 +20768,17 @@ then
printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
fi
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "false")"
-if grep -q "^\\s*show-full-name-in-top-bar\\s*=" "${DCONFFILE}"
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "string ''")"
+if grep -q "^\\s*picture-uri\\s*=" "${DCONFFILE}"
then
- sed -i "s/\\s*show-full-name-in-top-bar\\s*=\\s*.*/show-full-name-in-top-bar=${escaped_value}/g" "${DCONFFILE}"
+ sed -i "s/\\s*picture-uri\\s*=\\s*.*/picture-uri=${escaped_value}/g" "${DCONFFILE}"
else
- sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\show-full-name-in-top-bar=${escaped_value}" "${DCONFFILE}"
+ sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\picture-uri=${escaped_value}" "${DCONFFILE}"
fi
dconf update
# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$" "/etc/dconf/db/" \
+LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/picture-uri$" "/etc/dconf/db/" \
| grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
LOCKSFOLDER="/etc/dconf/db/local.d/locks"
@@ -20774,12 +20787,12 @@ mkdir -p "${LOCKSFOLDER}"
# Comment out the configurations in databases different from the target one
if [[ ! -z "${LOCKFILES}" ]]
then
- sed -i -E "s|^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$|#&|" "${LOCKFILES[@]}"
+ sed -i -E "s|^/org/gnome/desktop/screensaver/picture-uri$|#&|" "${LOCKFILES[@]}"
fi
-if ! grep -qr "^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$" /etc/dconf/db/local.d/
+if ! grep -qr "^/org/gnome/desktop/screensaver/picture-uri$" /etc/dconf/db/local.d/
then
- echo "/org/gnome/desktop/screensaver/show-full-name-in-top-bar" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+ echo "/org/gnome/desktop/screensaver/picture-uri" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
fi
dconf update
@@ -20788,6 +20801,33 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+ Disable Full User Name on Splash Shield
+ By default when the screen is locked, the splash shield will show the user's
+full name. This should be disabled to prevent casual observers from seeing
+who has access to the system. This can be disabled by adding or setting
+show-full-name-in-top-bar to false in
+/etc/dconf/db/local.d/00-security-settings. For example:
+[org/gnome/desktop/screensaver]
+show-full-name-in-top-bar=false
+
+Once the settings have been added, add a lock to
+/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification.
+For example:
+/org/gnome/desktop/screensaver/show-full-name-in-top-bar
+After the settings have been set, run dconf update.
+ FMT_MOF_EXT.1
+ Setting the splash screen to not reveal the logged in user's name
+conceals who has access to the system from passersby.
+
+ CCE-80779-2
- name: Gather the package facts
package_facts:
manager: auto
@@ -20851,6 +20891,68 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/screensaver\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*show-full-name-in-top-bar\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)show-full-name-in-top-bar(\s*=)/#\1show-full-name-in-top-bar\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/screensaver\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/screensaver]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "false")"
+if grep -q "^\\s*show-full-name-in-top-bar\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*show-full-name-in-top-bar\\s*=\\s*.*/show-full-name-in-top-bar=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/screensaver\\]|a\\show-full-name-in-top-bar=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/screensaver/show-full-name-in-top-bar" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -20914,33 +21016,6 @@ GNOME desktops can be configured to identify when a user's session has idled and
session lock. As such, users should not be allowed to change session settings.
CCE-80780-0
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/lock-delay$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/screensaver/lock-delay$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/screensaver/lock-delay$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/screensaver/lock-delay" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -20993,6 +21068,33 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/screensaver/lock-delay$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/screensaver/lock-delay$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/screensaver/lock-delay$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/screensaver/lock-delay" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -21058,33 +21160,6 @@ GNOME desktops can be configured to identify when a user's session has idled and
session lock. As such, users should not be allowed to change session settings.
CCE-80781-8
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/session/idle-delay$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/session/idle-delay$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/session/idle-delay$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/session/idle-delay" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -21143,6 +21218,33 @@ fi
- medium_severity
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/session/idle-delay$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/session/idle-delay$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/session/idle-delay$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/session/idle-delay" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -21230,68 +21332,6 @@ the case of mixed OS environment, this can create the risk of short-term
loss of availability of systems due to unintentional reboot.
CCE-84028-0
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/settings-daemon/plugins/media-keys\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*logout\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)logout(\s*=)/#\1logout\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/settings-daemon/plugins/media-keys\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/settings-daemon/plugins/media-keys]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "''")"
-if grep -q "^\\s*logout\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*logout\\s*=\\s*.*/logout=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/settings-daemon/plugins/media-keys\\]|a\\logout=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/settings-daemon/plugins/media-keys/logout$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/settings-daemon/plugins/media-keys/logout$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/settings-daemon/plugins/media-keys/logout$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/settings-daemon/plugins/media-keys/logout" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -21375,6 +21415,68 @@ fi
- medium_disruption
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/settings-daemon/plugins/media-keys\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*logout\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)logout(\s*=)/#\1logout\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/settings-daemon/plugins/media-keys\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/settings-daemon/plugins/media-keys]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "''")"
+if grep -q "^\\s*logout\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*logout\\s*=\\s*.*/logout=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/settings-daemon/plugins/media-keys\\]|a\\logout=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/settings-daemon/plugins/media-keys/logout$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/settings-daemon/plugins/media-keys/logout$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/settings-daemon/plugins/media-keys/logout$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/settings-daemon/plugins/media-keys/logout" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -21407,6 +21509,101 @@ After the settings have been set, run dconf update.
+ - name: Gather the package facts
+ package_facts:
+ manager: auto
+ tags:
+ - dconf_gnome_disable_geolocation
+ - low_complexity
+ - medium_disruption
+ - medium_severity
+ - no_reboot_needed
+ - unknown_strategy
+
+- name: Disable Geolocation in GNOME3 - location tracking
+ ini_file:
+ dest: /etc/dconf/db/local.d/00-security-settings
+ section: org/gnome/system/location
+ option: enabled
+ value: 'false'
+ create: true
+ no_extra_spaces: true
+ when:
+ - '"gdm" in ansible_facts.packages'
+ - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
+ tags:
+ - dconf_gnome_disable_geolocation
+ - low_complexity
+ - medium_disruption
+ - medium_severity
+ - no_reboot_needed
+ - unknown_strategy
+
+- name: Disable Geolocation in GNOME3 - clock location tracking
+ ini_file:
+ dest: /etc/dconf/db/local.d/00-security-settings
+ section: org/gnome/clocks
+ option: gelocation
+ value: 'false'
+ create: true
+ when:
+ - '"gdm" in ansible_facts.packages'
+ - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
+ tags:
+ - dconf_gnome_disable_geolocation
+ - low_complexity
+ - medium_disruption
+ - medium_severity
+ - no_reboot_needed
+ - unknown_strategy
+
+- name: Prevent user modification of GNOME geolocation - location tracking
+ lineinfile:
+ path: /etc/dconf/db/local.d/locks/00-security-settings-lock
+ regexp: ^/org/gnome/system/location/enabled$
+ line: /org/gnome/system/location/enabled
+ create: true
+ when:
+ - '"gdm" in ansible_facts.packages'
+ - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
+ tags:
+ - dconf_gnome_disable_geolocation
+ - low_complexity
+ - medium_disruption
+ - medium_severity
+ - no_reboot_needed
+ - unknown_strategy
+
+- name: Prevent user modification of GNOME geolocation - clock location tracking
+ lineinfile:
+ path: /etc/dconf/db/local.d/locks/00-security-settings-lock
+ regexp: ^/org/gnome/clocks/geolocation$
+ line: /org/gnome/clocks/geolocation
+ create: true
+ when:
+ - '"gdm" in ansible_facts.packages'
+ - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
+ tags:
+ - dconf_gnome_disable_geolocation
+ - low_complexity
+ - medium_disruption
+ - medium_severity
+ - no_reboot_needed
+ - unknown_strategy
+
+- name: Dconf Update
+ command: dconf update
+ when:
+ - '"gdm" in ansible_facts.packages'
+ - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
+ tags:
+ - dconf_gnome_disable_geolocation
+ - low_complexity
+ - medium_disruption
+ - medium_severity
+ - no_reboot_needed
+ - unknown_strategy
+
# Remediation is applicable only in certain platforms
if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
@@ -21522,101 +21719,6 @@ dconf update
else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
-
- - name: Gather the package facts
- package_facts:
- manager: auto
- tags:
- - dconf_gnome_disable_geolocation
- - low_complexity
- - medium_disruption
- - medium_severity
- - no_reboot_needed
- - unknown_strategy
-
-- name: Disable Geolocation in GNOME3 - location tracking
- ini_file:
- dest: /etc/dconf/db/local.d/00-security-settings
- section: org/gnome/system/location
- option: enabled
- value: 'false'
- create: true
- no_extra_spaces: true
- when:
- - '"gdm" in ansible_facts.packages'
- - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
- tags:
- - dconf_gnome_disable_geolocation
- - low_complexity
- - medium_disruption
- - medium_severity
- - no_reboot_needed
- - unknown_strategy
-
-- name: Disable Geolocation in GNOME3 - clock location tracking
- ini_file:
- dest: /etc/dconf/db/local.d/00-security-settings
- section: org/gnome/clocks
- option: gelocation
- value: 'false'
- create: true
- when:
- - '"gdm" in ansible_facts.packages'
- - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
- tags:
- - dconf_gnome_disable_geolocation
- - low_complexity
- - medium_disruption
- - medium_severity
- - no_reboot_needed
- - unknown_strategy
-
-- name: Prevent user modification of GNOME geolocation - location tracking
- lineinfile:
- path: /etc/dconf/db/local.d/locks/00-security-settings-lock
- regexp: ^/org/gnome/system/location/enabled$
- line: /org/gnome/system/location/enabled
- create: true
- when:
- - '"gdm" in ansible_facts.packages'
- - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
- tags:
- - dconf_gnome_disable_geolocation
- - low_complexity
- - medium_disruption
- - medium_severity
- - no_reboot_needed
- - unknown_strategy
-
-- name: Prevent user modification of GNOME geolocation - clock location tracking
- lineinfile:
- path: /etc/dconf/db/local.d/locks/00-security-settings-lock
- regexp: ^/org/gnome/clocks/geolocation$
- line: /org/gnome/clocks/geolocation
- create: true
- when:
- - '"gdm" in ansible_facts.packages'
- - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
- tags:
- - dconf_gnome_disable_geolocation
- - low_complexity
- - medium_disruption
- - medium_severity
- - no_reboot_needed
- - unknown_strategy
-
-- name: Dconf Update
- command: dconf update
- when:
- - '"gdm" in ansible_facts.packages'
- - ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
- tags:
- - dconf_gnome_disable_geolocation
- - low_complexity
- - medium_disruption
- - medium_severity
- - no_reboot_needed
- - unknown_strategy
@@ -21675,68 +21777,6 @@ unintended configuration changes as well as a nefarious user the capability to m
changes such as adding new accounts, etc.
CCE-80769-3
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
-
-# Check for setting in any of the DConf db directories
-# If files contain ibus or distro, ignore them.
-# The assignment assumes that individual filenames don't contain :
-readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/lockdown\\]" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
-DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
-DBDIR="/etc/dconf/db/local.d"
-
-mkdir -p "${DBDIR}"
-
-# Comment out the configurations in databases different from the target one
-if [ "${#SETTINGSFILES[@]}" -ne 0 ]
-then
- if grep -q "^\\s*user-administration-disabled\\s*=" "${SETTINGSFILES[@]}"
- then
-
- sed -Ei "s/(^\s*)user-administration-disabled(\s*=)/#\1user-administration-disabled\2/g" "${SETTINGSFILES[@]}"
- fi
-fi
-
-[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
-if ! grep -q "\\[org/gnome/desktop/lockdown\\]" "${DCONFFILE}"
-then
- printf '%s\n' "[org/gnome/desktop/lockdown]" >> ${DCONFFILE}
-fi
-
-escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
-if grep -q "^\\s*user-administration-disabled\\s*=" "${DCONFFILE}"
-then
- sed -i "s/\\s*user-administration-disabled\\s*=\\s*.*/user-administration-disabled=${escaped_value}/g" "${DCONFFILE}"
- else
- sed -i "\\|\\[org/gnome/desktop/lockdown\\]|a\\user-administration-disabled=${escaped_value}" "${DCONFFILE}"
-fi
-
-dconf update
-# Check for setting in any of the DConf db directories
-LOCKFILES=$(grep -r "^/org/gnome/desktop/lockdown/user-administration-disabled$" "/etc/dconf/db/" \
- | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
-LOCKSFOLDER="/etc/dconf/db/local.d/locks"
-
-mkdir -p "${LOCKSFOLDER}"
-
-# Comment out the configurations in databases different from the target one
-if [[ ! -z "${LOCKFILES}" ]]
-then
- sed -i -E "s|^/org/gnome/desktop/lockdown/user-administration-disabled$|#&|" "${LOCKFILES[@]}"
-fi
-
-if ! grep -qr "^/org/gnome/desktop/lockdown/user-administration-disabled$" /etc/dconf/db/local.d/
-then
- echo "/org/gnome/desktop/lockdown/user-administration-disabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
-fi
-
-dconf update
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -21888,6 +21928,68 @@ fi
- medium_disruption
- no_reboot_needed
- unknown_strategy
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q gdm && { [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; }; then
+
+# Check for setting in any of the DConf db directories
+# If files contain ibus or distro, ignore them.
+# The assignment assumes that individual filenames don't contain :
+readarray -t SETTINGSFILES < <(grep -r "\\[org/gnome/desktop/lockdown\\]" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | cut -d":" -f1)
+DCONFFILE="/etc/dconf/db/local.d/00-security-settings"
+DBDIR="/etc/dconf/db/local.d"
+
+mkdir -p "${DBDIR}"
+
+# Comment out the configurations in databases different from the target one
+if [ "${#SETTINGSFILES[@]}" -ne 0 ]
+then
+ if grep -q "^\\s*user-administration-disabled\\s*=" "${SETTINGSFILES[@]}"
+ then
+
+ sed -Ei "s/(^\s*)user-administration-disabled(\s*=)/#\1user-administration-disabled\2/g" "${SETTINGSFILES[@]}"
+ fi
+fi
+
+[ ! -z "${DCONFFILE}" ] && echo "" >> "${DCONFFILE}"
+if ! grep -q "\\[org/gnome/desktop/lockdown\\]" "${DCONFFILE}"
+then
+ printf '%s\n' "[org/gnome/desktop/lockdown]" >> ${DCONFFILE}
+fi
+
+escaped_value="$(sed -e 's/\\/\\\\/g' <<< "true")"
+if grep -q "^\\s*user-administration-disabled\\s*=" "${DCONFFILE}"
+then
+ sed -i "s/\\s*user-administration-disabled\\s*=\\s*.*/user-administration-disabled=${escaped_value}/g" "${DCONFFILE}"
+ else
+ sed -i "\\|\\[org/gnome/desktop/lockdown\\]|a\\user-administration-disabled=${escaped_value}" "${DCONFFILE}"
+fi
+
+dconf update
+# Check for setting in any of the DConf db directories
+LOCKFILES=$(grep -r "^/org/gnome/desktop/lockdown/user-administration-disabled$" "/etc/dconf/db/" \
+ | grep -v 'distro\|ibus\|local.d' | grep ":" | cut -d":" -f1)
+LOCKSFOLDER="/etc/dconf/db/local.d/locks"
+
+mkdir -p "${LOCKSFOLDER}"
+
+# Comment out the configurations in databases different from the target one
+if [[ ! -z "${LOCKFILES}" ]]
+then
+ sed -i -E "s|^/org/gnome/desktop/lockdown/user-administration-disabled$|#&|" "${LOCKFILES[@]}"
+fi
+
+if ! grep -qr "^/org/gnome/desktop/lockdown/user-administration-disabled$" /etc/dconf/db/local.d/
+then
+ echo "/org/gnome/desktop/lockdown/user-administration-disabled" >> "/etc/dconf/db/local.d/locks/00-security-settings-lock"
+fi
+
+dconf update
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -21976,15 +22078,33 @@ $ sudo yum install sudo
FMT_MOF_EXT.1
2.2.6
SRG-OS-000324-GPOS-00125
- 5.3.1
+ 4.3.1
sudo is a program designed to allow a system administrator to give
limited root privileges to users and log root activity. The basic philosophy
is to give as few privileges as possible but still allow system users to
get their work done.
CCE-82214-8
-
-package --add=sudo
+ - name: Ensure sudo is installed
+ package:
+ name: sudo
+ state: present
+ when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
+ tags:
+ - CCE-82214-8
+ - NIST-800-53-CM-6(a)
+ - PCI-DSSv4-2.2.6
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_sudo_installed
+
+
+[[packages]]
+name = "sudo"
+version = "*"
include install_sudo
@@ -21993,6 +22113,9 @@ class install_sudo {
ensure => 'installed',
}
}
+
+
+package --add=sudo
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
@@ -22004,27 +22127,6 @@ fi
else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
-
-
-[[packages]]
-name = "sudo"
-version = "*"
-
- - name: Ensure sudo is installed
- package:
- name: sudo
- state: present
- when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
- tags:
- - CCE-82214-8
- - NIST-800-53-CM-6(a)
- - PCI-DSSv4-2.2.6
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_sudo_installed
@@ -22045,6 +22147,21 @@ in /etc/sudoers.d/.
Forcing sudo to reset the environment ensures that environment variables are not passed on to the
command accidentaly, preventing leak of potentially sensitive information.
CCE-83820-1
+ - name: Ensure env_reset is enabled in /etc/sudoers
+ lineinfile:
+ path: /etc/sudoers
+ regexp: ^[\s]*Defaults.*\benv_reset\b.*$
+ line: Defaults env_reset
+ validate: /usr/sbin/visudo -cf %s
+ tags:
+ - CCE-83820-1
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - restrict_strategy
+ - sudo_add_env_reset
+
if /usr/sbin/visudo -qcf /etc/sudoers; then
cp /etc/sudoers /etc/sudoers.bak
@@ -22065,21 +22182,6 @@ else
echo "Skipping remediation, /etc/sudoers failed to validate"
false
fi
-
- - name: Ensure env_reset is enabled in /etc/sudoers
- lineinfile:
- path: /etc/sudoers
- regexp: ^[\s]*Defaults.*\benv_reset\b.*$
- line: Defaults env_reset
- validate: /usr/sbin/visudo -cf %s
- tags:
- - CCE-83820-1
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - restrict_strategy
- - sudo_add_env_reset
@@ -22100,6 +22202,21 @@ in /etc/sudoers.d/.
Ignoring the commands in the user's current directory prevents an attacker from executing commands
downloaded locally.
CCE-83810-2
+ - name: Ensure ignore_dot is enabled in /etc/sudoers
+ lineinfile:
+ path: /etc/sudoers
+ regexp: ^[\s]*Defaults.*\bignore_dot\b.*$
+ line: Defaults ignore_dot
+ validate: /usr/sbin/visudo -cf %s
+ tags:
+ - CCE-83810-2
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - restrict_strategy
+ - sudo_add_ignore_dot
+
if /usr/sbin/visudo -qcf /etc/sudoers; then
cp /etc/sudoers /etc/sudoers.bak
@@ -22120,21 +22237,6 @@ else
echo "Skipping remediation, /etc/sudoers failed to validate"
false
fi
-
- - name: Ensure ignore_dot is enabled in /etc/sudoers
- lineinfile:
- path: /etc/sudoers
- regexp: ^[\s]*Defaults.*\bignore_dot\b.*$
- line: Defaults ignore_dot
- validate: /usr/sbin/visudo -cf %s
- tags:
- - CCE-83810-2
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - restrict_strategy
- - sudo_add_ignore_dot
@@ -22154,6 +22256,21 @@ in /etc/sudoers.d/.
Restricting the capability of sudo allowed commands to execute sub-commands
prevents users from running programs with privileges they wouldn't have otherwise.
CCE-83747-6
+ - name: Ensure noexec is enabled in /etc/sudoers
+ lineinfile:
+ path: /etc/sudoers
+ regexp: ^[\s]*Defaults.*\bnoexec\b.*$
+ line: Defaults noexec
+ validate: /usr/sbin/visudo -cf %s
+ tags:
+ - CCE-83747-6
+ - high_severity
+ - low_complexity
+ - low_disruption
+ - no_reboot_needed
+ - restrict_strategy
+ - sudo_add_noexec
+
if /usr/sbin/visudo -qcf /etc/sudoers; then
cp /etc/sudoers /etc/sudoers.bak
@@ -22174,21 +22291,6 @@ else
echo "Skipping remediation, /etc/sudoers failed to validate"
false
fi
-
- - name: Ensure noexec is enabled in /etc/sudoers
- lineinfile:
- path: /etc/sudoers
- regexp: ^[\s]*Defaults.*\bnoexec\b.*$
- line: Defaults noexec
- validate: /usr/sbin/visudo -cf %s
- tags:
- - CCE-83747-6
- - high_severity
- - low_complexity
- - low_disruption
- - no_reboot_needed
- - restrict_strategy
- - sudo_add_noexec
@@ -22208,38 +22310,6 @@ The passwd_timeout should be configured by making sure that the
in /etc/sudoers.d/.
Reducing the time sudo waits for a a password reduces the time the process is exposed.
CCE-83964-7
-
-
-var_sudo_passwd_timeout=''
-
-
-if /usr/sbin/visudo -qcf /etc/sudoers; then
- cp /etc/sudoers /etc/sudoers.bak
- if ! grep -P '^[\s]*Defaults[\s]*\bpasswd_timeout=\w+\b\b.*$' /etc/sudoers; then
- # sudoers file doesn't define Option passwd_timeout
- echo "Defaults passwd_timeout=${var_sudo_passwd_timeout}" >> /etc/sudoers
- else
- # sudoers file defines Option passwd_timeout, remediate if appropriate value is not set
- if ! grep -P "^[\s]*Defaults.*\bpasswd_timeout=${var_sudo_passwd_timeout}\b.*$" /etc/sudoers; then
-
- escaped_variable=${var_sudo_passwd_timeout//$'/'/$'\/'}
- sed -Ei "s/(^[\s]*Defaults.*\bpasswd_timeout=)[-]?.+(\b.*$)/\1$escaped_variable\2/" /etc/sudoers
- fi
- fi
-
- # Check validity of sudoers and cleanup bak
- if /usr/sbin/visudo -qcf /etc/sudoers; then
- rm -f /etc/sudoers.bak
- else
- echo "Fail to validate remediated /etc/sudoers, reverting to original file."
- mv /etc/sudoers.bak /etc/sudoers
- false
- fi
-else
- echo "Skipping remediation, /etc/sudoers failed to validate"
- false
-fi
-
- name: XCCDF Value var_sudo_passwd_timeout # promote to variable
set_fact:
var_sudo_passwd_timeout: !!str
@@ -22277,6 +22347,38 @@ fi
- no_reboot_needed
- restrict_strategy
- sudo_add_passwd_timeout
+
+
+
+var_sudo_passwd_timeout=''
+
+
+if /usr/sbin/visudo -qcf /etc/sudoers; then
+ cp /etc/sudoers /etc/sudoers.bak
+ if ! grep -P '^[\s]*Defaults[\s]*\bpasswd_timeout=\w+\b\b.*$' /etc/sudoers; then
+ # sudoers file doesn't define Option passwd_timeout
+ echo "Defaults passwd_timeout=${var_sudo_passwd_timeout}" >> /etc/sudoers
+ else
+ # sudoers file defines Option passwd_timeout, remediate if appropriate value is not set
+ if ! grep -P "^[\s]*Defaults.*\bpasswd_timeout=${var_sudo_passwd_timeout}\b.*$" /etc/sudoers; then
+
+ escaped_variable=${var_sudo_passwd_timeout//$'/'/$'\/'}
+ sed -Ei "s/(^[\s]*Defaults.*\bpasswd_timeout=)[-]?.+(\b.*$)/\1$escaped_variable\2/" /etc/sudoers
+ fi
+ fi
+
+ # Check validity of sudoers and cleanup bak
+ if /usr/sbin/visudo -qcf /etc/sudoers; then
+ rm -f /etc/sudoers.bak
+ else
+ echo "Fail to validate remediated /etc/sudoers, reverting to original file."
+ mv /etc/sudoers.bak /etc/sudoers
+ false
+ fi
+else
+ echo "Skipping remediation, /etc/sudoers failed to validate"
+ false
+fi
@@ -22297,6 +22399,21 @@ in /etc/sudoers.d/.
Restricting the use cases in which a user is allowed to execute sudo commands
reduces the attack surface.
CCE-83790-6
+ - name: Ensure requiretty is enabled in /etc/sudoers
+ lineinfile:
+ path: /etc/sudoers
+ regexp: ^[\s]*Defaults.*\brequiretty\b.*$
+ line: Defaults requiretty
+ validate: /usr/sbin/visudo -cf %s
+ tags:
+ - CCE-83790-6
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - restrict_strategy
+ - sudo_add_requiretty
+
if /usr/sbin/visudo -qcf /etc/sudoers; then
cp /etc/sudoers /etc/sudoers.bak
@@ -22317,21 +22434,6 @@ else
echo "Skipping remediation, /etc/sudoers failed to validate"
false
fi
-
- - name: Ensure requiretty is enabled in /etc/sudoers
- lineinfile:
- path: /etc/sudoers
- regexp: ^[\s]*Defaults.*\brequiretty\b.*$
- line: Defaults requiretty
- validate: /usr/sbin/visudo -cf %s
- tags:
- - CCE-83790-6
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - restrict_strategy
- - sudo_add_requiretty
@@ -22354,38 +22456,6 @@ in /etc/sudoers.d/.
A misconfigured umask value could result in files with excessive permissions that can be read or
written to by unauthorized users.
CCE-83860-7
-
-
-var_sudo_umask=''
-
-
-if /usr/sbin/visudo -qcf /etc/sudoers; then
- cp /etc/sudoers /etc/sudoers.bak
- if ! grep -P '^[\s]*Defaults[\s]*\bumask=\w+\b\b.*$' /etc/sudoers; then
- # sudoers file doesn't define Option umask
- echo "Defaults umask=${var_sudo_umask}" >> /etc/sudoers
- else
- # sudoers file defines Option umask, remediate if appropriate value is not set
- if ! grep -P "^[\s]*Defaults.*\bumask=${var_sudo_umask}\b.*$" /etc/sudoers; then
-
- escaped_variable=${var_sudo_umask//$'/'/$'\/'}
- sed -Ei "s/(^[\s]*Defaults.*\bumask=)[-]?.+(\b.*$)/\1$escaped_variable\2/" /etc/sudoers
- fi
- fi
-
- # Check validity of sudoers and cleanup bak
- if /usr/sbin/visudo -qcf /etc/sudoers; then
- rm -f /etc/sudoers.bak
- else
- echo "Fail to validate remediated /etc/sudoers, reverting to original file."
- mv /etc/sudoers.bak /etc/sudoers
- false
- fi
-else
- echo "Skipping remediation, /etc/sudoers failed to validate"
- false
-fi
-
- name: XCCDF Value var_sudo_umask # promote to variable
set_fact:
var_sudo_umask: !!str
@@ -22423,6 +22493,38 @@ fi
- no_reboot_needed
- restrict_strategy
- sudo_add_umask
+
+
+
+var_sudo_umask=''
+
+
+if /usr/sbin/visudo -qcf /etc/sudoers; then
+ cp /etc/sudoers /etc/sudoers.bak
+ if ! grep -P '^[\s]*Defaults[\s]*\bumask=\w+\b\b.*$' /etc/sudoers; then
+ # sudoers file doesn't define Option umask
+ echo "Defaults umask=${var_sudo_umask}" >> /etc/sudoers
+ else
+ # sudoers file defines Option umask, remediate if appropriate value is not set
+ if ! grep -P "^[\s]*Defaults.*\bumask=${var_sudo_umask}\b.*$" /etc/sudoers; then
+
+ escaped_variable=${var_sudo_umask//$'/'/$'\/'}
+ sed -Ei "s/(^[\s]*Defaults.*\bumask=)[-]?.+(\b.*$)/\1$escaped_variable\2/" /etc/sudoers
+ fi
+ fi
+
+ # Check validity of sudoers and cleanup bak
+ if /usr/sbin/visudo -qcf /etc/sudoers; then
+ rm -f /etc/sudoers.bak
+ else
+ echo "Fail to validate remediated /etc/sudoers, reverting to original file."
+ mv /etc/sudoers.bak /etc/sudoers
+ false
+ fi
+else
+ echo "Skipping remediation, /etc/sudoers failed to validate"
+ false
+fi
@@ -22442,38 +22544,11 @@ in /etc/sudoers.d/.
BP28(R58)
Req-10.2.5
2.2.6
- 5.3.2
+ 4.3.2
Requiring that sudo commands be run in a pseudo-terminal can prevent an attacker from retaining
access to the user's terminal after the main program has finished executing.
CCE-83798-9
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q sudo; then
-
-if /usr/sbin/visudo -qcf /etc/sudoers; then
- cp /etc/sudoers /etc/sudoers.bak
- if ! grep -P '^[\s]*Defaults[\s]*\buse_pty\b.*$' /etc/sudoers; then
- # sudoers file doesn't define Option use_pty
- echo "Defaults use_pty" >> /etc/sudoers
- fi
-
- # Check validity of sudoers and cleanup bak
- if /usr/sbin/visudo -qcf /etc/sudoers; then
- rm -f /etc/sudoers.bak
- else
- echo "Fail to validate remediated /etc/sudoers, reverting to original file."
- mv /etc/sudoers.bak /etc/sudoers
- false
- fi
-else
- echo "Skipping remediation, /etc/sudoers failed to validate"
- false
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -22506,42 +22581,14 @@ fi
- restrict_strategy
- sudo_add_use_pty
-
-
-
-
-
-
-
-
- Ensure Sudo Logfile Exists - sudo logfile
- A custom log sudo file can be configured with the 'logfile' tag. This rule configures
-a sudo custom logfile at the default location suggested by CIS, which uses
-/var/log/sudo.log.
- Req-10.2.5
- 2.2.6
- 5.3.3
- A sudo log file simplifies auditing of sudo commands.
-
- CCE-83601-5
- # Remediation is applicable only in certain platforms
+ # Remediation is applicable only in certain platforms
if rpm --quiet -q sudo; then
-var_sudo_logfile=''
-
-
if /usr/sbin/visudo -qcf /etc/sudoers; then
cp /etc/sudoers /etc/sudoers.bak
- if ! grep -P '^[\s]*Defaults[\s]*\blogfile\s*=\s*("(?:\\"|\\\\|[^"\\\n])*"\B|[^"](?:(?:\\,|\\"|\\ |\\\\|[^", \\\n])*)\b)\b.*$' /etc/sudoers; then
- # sudoers file doesn't define Option logfile
- echo "Defaults logfile=${var_sudo_logfile}" >> /etc/sudoers
- else
- # sudoers file defines Option logfile, remediate if appropriate value is not set
- if ! grep -P "^[\s]*Defaults.*\blogfile=${var_sudo_logfile}\b.*$" /etc/sudoers; then
-
- escaped_variable=${var_sudo_logfile//$'/'/$'\/'}
- sed -Ei "s/(^[\s]*Defaults.*\blogfile=)[-]?.+(\b.*$)/\1$escaped_variable\2/" /etc/sudoers
- fi
+ if ! grep -P '^[\s]*Defaults[\s]*\buse_pty\b.*$' /etc/sudoers; then
+ # sudoers file doesn't define Option use_pty
+ echo "Defaults use_pty" >> /etc/sudoers
fi
# Check validity of sudoers and cleanup bak
@@ -22561,6 +22608,24 @@ else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
+
+
+
+
+
+
+
+
+ Ensure Sudo Logfile Exists - sudo logfile
+ A custom log sudo file can be configured with the 'logfile' tag. This rule configures
+a sudo custom logfile at the default location suggested by CIS, which uses
+/var/log/sudo.log.
+ Req-10.2.5
+ 2.2.6
+ 4.3.3
+ A sudo log file simplifies auditing of sudo commands.
+
+ CCE-83601-5
- name: Gather the package facts
package_facts:
manager: auto
@@ -22618,6 +22683,43 @@ fi
- no_reboot_needed
- restrict_strategy
- sudo_custom_logfile
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q sudo; then
+
+var_sudo_logfile=''
+
+
+if /usr/sbin/visudo -qcf /etc/sudoers; then
+ cp /etc/sudoers /etc/sudoers.bak
+ if ! grep -P '^[\s]*Defaults[\s]*\blogfile\s*=\s*("(?:\\"|\\\\|[^"\\\n])*"\B|[^"](?:(?:\\,|\\"|\\ |\\\\|[^", \\\n])*)\b)\b.*$' /etc/sudoers; then
+ # sudoers file doesn't define Option logfile
+ echo "Defaults logfile=${var_sudo_logfile}" >> /etc/sudoers
+ else
+ # sudoers file defines Option logfile, remediate if appropriate value is not set
+ if ! grep -P "^[\s]*Defaults.*\blogfile=${var_sudo_logfile}\b.*$" /etc/sudoers; then
+
+ escaped_variable=${var_sudo_logfile//$'/'/$'\/'}
+ sed -Ei "s/(^[\s]*Defaults.*\blogfile=)[-]?.+(\b.*$)/\1$escaped_variable\2/" /etc/sudoers
+ fi
+ fi
+
+ # Check validity of sudoers and cleanup bak
+ if /usr/sbin/visudo -qcf /etc/sudoers; then
+ rm -f /etc/sudoers.bak
+ else
+ echo "Fail to validate remediated /etc/sudoers, reverting to original file."
+ mv /etc/sudoers.bak /etc/sudoers
+ false
+ fi
+else
+ echo "Skipping remediation, /etc/sudoers failed to validate"
+ false
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -22707,22 +22809,6 @@ do not have authorization.
When operating systems provide the capability to escalate a functional capability, it
is critical that the user re-authenticate.
CCE-82202-3
-
-for f in /etc/sudoers /etc/sudoers.d/* ; do
- if [ ! -e "$f" ] ; then
- continue
- fi
- matching_list=$(grep -P '^(?!#).*[\s]+\!authenticate.*$' $f | uniq )
- if ! test -z "$matching_list"; then
- while IFS= read -r entry; do
- # comment out "!authenticate" matches to preserve user data
- sed -i "s/^${entry}$/# &/g" $f
- done <<< "$matching_list"
-
- /usr/sbin/visudo -cf $f &> /dev/null || echo "Fail to validate $f with visudo"
- fi
-done
-
- name: Find /etc/sudoers.d/ files
ansible.builtin.find:
paths:
@@ -22760,6 +22846,22 @@ done
- no_reboot_needed
- restrict_strategy
- sudo_remove_no_authenticate
+
+
+for f in /etc/sudoers /etc/sudoers.d/* ; do
+ if [ ! -e "$f" ] ; then
+ continue
+ fi
+ matching_list=$(grep -P '^(?!#).*[\s]+\!authenticate.*$' $f | uniq )
+ if ! test -z "$matching_list"; then
+ while IFS= read -r entry; do
+ # comment out "!authenticate" matches to preserve user data
+ sed -i "s/^${entry}$/# &/g" $f
+ done <<< "$matching_list"
+
+ /usr/sbin/visudo -cf $f &> /dev/null || echo "Fail to validate $f with visudo"
+ fi
+done
@@ -22833,22 +22935,6 @@ When operating systems provide the capability to escalate a functional capabilit
is critical that the user re-authenticate.
CCE-82197-5
-
-for f in /etc/sudoers /etc/sudoers.d/* ; do
- if [ ! -e "$f" ] ; then
- continue
- fi
- matching_list=$(grep -P '^(?!#).*[\s]+NOPASSWD[\s]*\:.*$' $f | uniq )
- if ! test -z "$matching_list"; then
- while IFS= read -r entry; do
- # comment out "NOPASSWD" matches to preserve user data
- sed -i "s/^${entry}$/# &/g" $f
- done <<< "$matching_list"
-
- /usr/sbin/visudo -cf $f &> /dev/null || echo "Fail to validate $f with visudo"
- fi
-done
-
- name: Find /etc/sudoers.d/ files
ansible.builtin.find:
paths:
@@ -22886,6 +22972,22 @@ done
- no_reboot_needed
- restrict_strategy
- sudo_remove_nopasswd
+
+
+for f in /etc/sudoers /etc/sudoers.d/* ; do
+ if [ ! -e "$f" ] ; then
+ continue
+ fi
+ matching_list=$(grep -P '^(?!#).*[\s]+NOPASSWD[\s]*\:.*$' $f | uniq )
+ if ! test -z "$matching_list"; then
+ while IFS= read -r entry; do
+ # comment out "NOPASSWD" matches to preserve user data
+ sed -i "s/^${entry}$/# &/g" $f
+ done <<< "$matching_list"
+
+ /usr/sbin/visudo -cf $f &> /dev/null || echo "Fail to validate $f with visudo"
+ fi
+done
@@ -22946,44 +23048,14 @@ in /etc/sudoers.d/."
PR.AC-7
2.2.6
SRG-OS-000373-GPOS-00156
- 5.3.4
+ 4.3.4
+ 4.3.5
Without re-authentication, users may access resources or perform tasks for which they
do not have authorization.
When operating systems provide the capability to escalate a functional capability, it
is critical that the user re-authenticate.
CCE-82279-1
-
-for f in /etc/sudoers /etc/sudoers.d/* ; do
- if [ ! -e "$f" ] ; then
- continue
- fi
- matching_list=$(grep -P '^(?!#).*[\s]+NOPASSWD[\s]*\:.*$' $f | uniq )
- if ! test -z "$matching_list"; then
- while IFS= read -r entry; do
- # comment out "NOPASSWD" matches to preserve user data
- sed -i "s/^${entry}$/# &/g" $f
- done <<< "$matching_list"
-
- /usr/sbin/visudo -cf $f &> /dev/null || echo "Fail to validate $f with visudo"
- fi
-done
-
-for f in /etc/sudoers /etc/sudoers.d/* ; do
- if [ ! -e "$f" ] ; then
- continue
- fi
- matching_list=$(grep -P '^(?!#).*[\s]+\!authenticate.*$' $f | uniq )
- if ! test -z "$matching_list"; then
- while IFS= read -r entry; do
- # comment out "!authenticate" matches to preserve user data
- sed -i "s/^${entry}$/# &/g" $f
- done <<< "$matching_list"
-
- /usr/sbin/visudo -cf $f &> /dev/null || echo "Fail to validate $f with visudo"
- fi
-done
-
- name: Find /etc/sudoers.d/ files
ansible.builtin.find:
paths:
@@ -23059,6 +23131,37 @@ done
- no_reboot_needed
- restrict_strategy
- sudo_require_authentication
+
+
+for f in /etc/sudoers /etc/sudoers.d/* ; do
+ if [ ! -e "$f" ] ; then
+ continue
+ fi
+ matching_list=$(grep -P '^(?!#).*[\s]+NOPASSWD[\s]*\:.*$' $f | uniq )
+ if ! test -z "$matching_list"; then
+ while IFS= read -r entry; do
+ # comment out "NOPASSWD" matches to preserve user data
+ sed -i "s/^${entry}$/# &/g" $f
+ done <<< "$matching_list"
+
+ /usr/sbin/visudo -cf $f &> /dev/null || echo "Fail to validate $f with visudo"
+ fi
+done
+
+for f in /etc/sudoers /etc/sudoers.d/* ; do
+ if [ ! -e "$f" ] ; then
+ continue
+ fi
+ matching_list=$(grep -P '^(?!#).*[\s]+\!authenticate.*$' $f | uniq )
+ if ! test -z "$matching_list"; then
+ while IFS= read -r entry; do
+ # comment out "!authenticate" matches to preserve user data
+ sed -i "s/^${entry}$/# &/g" $f
+ done <<< "$matching_list"
+
+ /usr/sbin/visudo -cf $f &> /dev/null || echo "Fail to validate $f with visudo"
+ fi
+done
@@ -23084,8 +23187,7 @@ and the user will not have to re-authenticate for privileged actions until the u
SRG-OS-000373-GPOS-00157
SRG-OS-000373-GPOS-00158
RHEL-08-010384
- 5.3.5
- 5.3.6
+ 4.3.6
SV-237643r861088_rule
Without re-authentication, users may access resources or perform tasks for which they
do not have authorization.
@@ -23094,64 +23196,25 @@ When operating systems provide the capability to escalate a functional capabilit
is critical that the user re-authenticate.
CCE-87838-9
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q sudo; then
-
-var_sudo_timestamp_timeout=''
-
-
-if grep -Px '^[\s]*Defaults.*timestamp_timeout[\s]*=.*' /etc/sudoers.d/*; then
- find /etc/sudoers.d/ -type f -exec sed -Ei "/^[[:blank:]]*Defaults.*timestamp_timeout[[:blank:]]*=.*/d" {} \;
-fi
-
-if /usr/sbin/visudo -qcf /etc/sudoers; then
- cp /etc/sudoers /etc/sudoers.bak
- if ! grep -P '^[\s]*Defaults.*timestamp_timeout[\s]*=[\s]*[-]?\w+.*$' /etc/sudoers; then
- # sudoers file doesn't define Option timestamp_timeout
- echo "Defaults timestamp_timeout=${var_sudo_timestamp_timeout}" >> /etc/sudoers
- else
- # sudoers file defines Option timestamp_timeout, remediate wrong values if present
- if grep -qP "^[\s]*Defaults\s.*\btimestamp_timeout[\s]*=[\s]*(?!${var_sudo_timestamp_timeout}\b)[-]?\w+\b.*$" /etc/sudoers; then
- sed -Ei "s/(^[[:blank:]]*Defaults.*timestamp_timeout[[:blank:]]*=)[[:blank:]]*[-]?\w+(.*$)/\1${var_sudo_timestamp_timeout}\2/" /etc/sudoers
- fi
- fi
-
- # Check validity of sudoers and cleanup bak
- if /usr/sbin/visudo -qcf /etc/sudoers; then
- rm -f /etc/sudoers.bak
- else
- echo "Fail to validate remediated /etc/sudoers, reverting to original file."
- mv /etc/sudoers.bak /etc/sudoers
- false
- fi
-else
- echo "Skipping remediation, /etc/sudoers failed to validate"
- false
-fi
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- - name: Gather the package facts
- package_facts:
- manager: auto
- tags:
- - CCE-87838-9
- - DISA-STIG-RHEL-08-010384
- - NIST-800-53-IA-11
- - PCI-DSSv4-2.2.6
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - restrict_strategy
- - sudo_require_reauthentication
-- name: XCCDF Value var_sudo_timestamp_timeout # promote to variable
- set_fact:
- var_sudo_timestamp_timeout: !!str
- tags:
- - always
+ - name: Gather the package facts
+ package_facts:
+ manager: auto
+ tags:
+ - CCE-87838-9
+ - DISA-STIG-RHEL-08-010384
+ - NIST-800-53-IA-11
+ - PCI-DSSv4-2.2.6
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - restrict_strategy
+ - sudo_require_reauthentication
+- name: XCCDF Value var_sudo_timestamp_timeout # promote to variable
+ set_fact:
+ var_sudo_timestamp_timeout: !!str
+ tags:
+ - always
- name: Require Re-Authentication When Using the sudo Command - Find /etc/sudoers.d/*
files containing 'Defaults timestamp_timeout'
@@ -23257,6 +23320,45 @@ fi
- no_reboot_needed
- restrict_strategy
- sudo_require_reauthentication
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q sudo; then
+
+var_sudo_timestamp_timeout=''
+
+
+if grep -Px '^[\s]*Defaults.*timestamp_timeout[\s]*=.*' /etc/sudoers.d/*; then
+ find /etc/sudoers.d/ -type f -exec sed -Ei "/^[[:blank:]]*Defaults.*timestamp_timeout[[:blank:]]*=.*/d" {} \;
+fi
+
+if /usr/sbin/visudo -qcf /etc/sudoers; then
+ cp /etc/sudoers /etc/sudoers.bak
+ if ! grep -P '^[\s]*Defaults.*timestamp_timeout[\s]*=[\s]*[-]?\w+.*$' /etc/sudoers; then
+ # sudoers file doesn't define Option timestamp_timeout
+ echo "Defaults timestamp_timeout=${var_sudo_timestamp_timeout}" >> /etc/sudoers
+ else
+ # sudoers file defines Option timestamp_timeout, remediate wrong values if present
+ if grep -qP "^[\s]*Defaults\s.*\btimestamp_timeout[\s]*=[\s]*(?!${var_sudo_timestamp_timeout}\b)[-]?\w+\b.*$" /etc/sudoers; then
+ sed -Ei "s/(^[[:blank:]]*Defaults.*timestamp_timeout[[:blank:]]*=)[[:blank:]]*[-]?\w+(.*$)/\1${var_sudo_timestamp_timeout}\2/" /etc/sudoers
+ fi
+ fi
+
+ # Check validity of sudoers and cleanup bak
+ if /usr/sbin/visudo -qcf /etc/sudoers; then
+ rm -f /etc/sudoers.bak
+ else
+ echo "Fail to validate remediated /etc/sudoers, reverting to original file."
+ mv /etc/sudoers.bak /etc/sudoers
+ false
+ fi
+else
+ echo "Skipping remediation, /etc/sudoers failed to validate"
+ false
+fi
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -23274,13 +23376,6 @@ To properly set the permissions of /usr/bin/sudo, run the
BP28(R57)
Restricting the set of users able to execute commands as privileged user reduces the attack surface.
CCE-83574-4
-
-
-
-
-
-chmod u-wr,g-wrs,o-xwrt /usr/bin/sudo
-
- name: Test for existence /usr/bin/sudo
stat:
path: /usr/bin/sudo
@@ -23307,6 +23402,13 @@ chmod u-wr,g-wrs,o-xwrt /usr/bin/sudo
- medium_severity
- no_reboot_needed
- sudo_restrict_others_executable_permission
+
+
+
+
+
+
+chmod u-wr,g-wrs,o-xwrt /usr/bin/sudo
@@ -23379,27 +23481,6 @@ Note that the '#' character doesn't denote a comment in the configuration file.<
Use of these configuration options makes it easier for one compromised accound to be used to
compromise other accounts.
CCE-86377-9
-
-sudoers_config_file="/etc/sudoers"
-sudoers_config_dir="/etc/sudoers.d"
-sudoers_includedir_count=$(grep -c "#includedir" "$sudoers_config_file")
-if [ "$sudoers_includedir_count" -gt 1 ]; then
- sed -i "/#includedir/d" "$sudoers_config_file"
- echo "#includedir /etc/sudoers.d" >> "$sudoers_config_file"
-elif [ "$sudoers_includedir_count" -eq 0 ]; then
- echo "#includedir /etc/sudoers.d" >> "$sudoers_config_file"
-else
- if ! grep -q "^#includedir /etc/sudoers.d" "$sudoers_config_file"; then
- sed -i "s|^#includedir.*|#includedir /etc/sudoers.d|g" "$sudoers_config_file"
- fi
-fi
-
-sed -Ei "/^#include\s/d; /^@includedir\s/d" "$sudoers_config_file"
-
-if grep -Pr "^[#@]include(dir)?\s" "$sudoers_config_dir" ; then
- sed -Ei "/^[#@]include(dir)?\s/d" "$sudoers_config_dir"/*
-fi
-
- name: Check for duplicate values
lineinfile:
path: /etc/sudoers
@@ -23517,6 +23598,27 @@ fi
- medium_severity
- no_reboot_needed
- sudoers_default_includedir
+
+
+sudoers_config_file="/etc/sudoers"
+sudoers_config_dir="/etc/sudoers.d"
+sudoers_includedir_count=$(grep -c "#includedir" "$sudoers_config_file")
+if [ "$sudoers_includedir_count" -gt 1 ]; then
+ sed -i "/#includedir/d" "$sudoers_config_file"
+ echo "#includedir /etc/sudoers.d" >> "$sudoers_config_file"
+elif [ "$sudoers_includedir_count" -eq 0 ]; then
+ echo "#includedir /etc/sudoers.d" >> "$sudoers_config_file"
+else
+ if ! grep -q "^#includedir /etc/sudoers.d" "$sudoers_config_file"; then
+ sed -i "s|^#includedir.*|#includedir /etc/sudoers.d|g" "$sudoers_config_file"
+ fi
+fi
+
+sed -Ei "/^#include\s/d; /^@includedir\s/d" "$sudoers_config_file"
+
+if grep -Pr "^[#@]include(dir)?\s" "$sudoers_config_dir" ; then
+ sed -Ei "/^[#@]include(dir)?\s/d" "$sudoers_config_dir"/*
+fi
@@ -23620,75 +23722,6 @@ or if cvtsudoers not supported:
the invoking user for the "root" user password.
CCE-83422-6
- # Remediation is applicable only in certain platforms
-if rpm --quiet -q sudo; then
-
-if grep -x '^Defaults targetpw$' /etc/sudoers; then
- sed -i "/Defaults targetpw/d" /etc/sudoers \;
-fi
-if grep -x '^Defaults targetpw$' /etc/sudoers.d/*; then
- find /etc/sudoers.d/ -type f -exec sed -i "/Defaults targetpw/d" {} \;
-fi
-if grep -x '^Defaults rootpw$' /etc/sudoers; then
- sed -i "/Defaults rootpw/d" /etc/sudoers \;
-fi
-if grep -x '^Defaults rootpw$' /etc/sudoers.d/*; then
- find /etc/sudoers.d/ -type f -exec sed -i "/Defaults rootpw/d" {} \;
-fi
-if grep -x '^Defaults runaspw$' /etc/sudoers; then
- sed -i "/Defaults runaspw/d" /etc/sudoers \;
-fi
-if grep -x '^Defaults runaspw$' /etc/sudoers.d/*; then
- find /etc/sudoers.d/ -type f -exec sed -i "/Defaults runaspw/d" {} \;
-fi
-
-if [ -e "/etc/sudoers" ] ; then
-
- LC_ALL=C sed -i "/Defaults !targetpw/d" "/etc/sudoers"
-else
- touch "/etc/sudoers"
-fi
-# make sure file has newline at the end
-sed -i -e '$a\' "/etc/sudoers"
-
-cp "/etc/sudoers" "/etc/sudoers.bak"
-# Insert at the end of the file
-printf '%s\n' "Defaults !targetpw" >> "/etc/sudoers"
-# Clean up after ourselves.
-rm "/etc/sudoers.bak"
-if [ -e "/etc/sudoers" ] ; then
-
- LC_ALL=C sed -i "/Defaults !rootpw/d" "/etc/sudoers"
-else
- touch "/etc/sudoers"
-fi
-# make sure file has newline at the end
-sed -i -e '$a\' "/etc/sudoers"
-
-cp "/etc/sudoers" "/etc/sudoers.bak"
-# Insert at the end of the file
-printf '%s\n' "Defaults !rootpw" >> "/etc/sudoers"
-# Clean up after ourselves.
-rm "/etc/sudoers.bak"
-if [ -e "/etc/sudoers" ] ; then
-
- LC_ALL=C sed -i "/Defaults !runaspw/d" "/etc/sudoers"
-else
- touch "/etc/sudoers"
-fi
-# make sure file has newline at the end
-sed -i -e '$a\' "/etc/sudoers"
-
-cp "/etc/sudoers" "/etc/sudoers.bak"
-# Insert at the end of the file
-printf '%s\n' "Defaults !runaspw" >> "/etc/sudoers"
-# Clean up after ourselves.
-rm "/etc/sudoers.bak"
-
-else
- >&2 echo 'Remediation is not applicable, nothing was done'
-fi
-
- name: Gather the package facts
package_facts:
manager: auto
@@ -24066,6 +24099,75 @@ fi
- no_reboot_needed
- restrict_strategy
- sudoers_validate_passwd
+
+ # Remediation is applicable only in certain platforms
+if rpm --quiet -q sudo; then
+
+if grep -x '^Defaults targetpw$' /etc/sudoers; then
+ sed -i "/Defaults targetpw/d" /etc/sudoers \;
+fi
+if grep -x '^Defaults targetpw$' /etc/sudoers.d/*; then
+ find /etc/sudoers.d/ -type f -exec sed -i "/Defaults targetpw/d" {} \;
+fi
+if grep -x '^Defaults rootpw$' /etc/sudoers; then
+ sed -i "/Defaults rootpw/d" /etc/sudoers \;
+fi
+if grep -x '^Defaults rootpw$' /etc/sudoers.d/*; then
+ find /etc/sudoers.d/ -type f -exec sed -i "/Defaults rootpw/d" {} \;
+fi
+if grep -x '^Defaults runaspw$' /etc/sudoers; then
+ sed -i "/Defaults runaspw/d" /etc/sudoers \;
+fi
+if grep -x '^Defaults runaspw$' /etc/sudoers.d/*; then
+ find /etc/sudoers.d/ -type f -exec sed -i "/Defaults runaspw/d" {} \;
+fi
+
+if [ -e "/etc/sudoers" ] ; then
+
+ LC_ALL=C sed -i "/Defaults !targetpw/d" "/etc/sudoers"
+else
+ touch "/etc/sudoers"
+fi
+# make sure file has newline at the end
+sed -i -e '$a\' "/etc/sudoers"
+
+cp "/etc/sudoers" "/etc/sudoers.bak"
+# Insert at the end of the file
+printf '%s\n' "Defaults !targetpw" >> "/etc/sudoers"
+# Clean up after ourselves.
+rm "/etc/sudoers.bak"
+if [ -e "/etc/sudoers" ] ; then
+
+ LC_ALL=C sed -i "/Defaults !rootpw/d" "/etc/sudoers"
+else
+ touch "/etc/sudoers"
+fi
+# make sure file has newline at the end
+sed -i -e '$a\' "/etc/sudoers"
+
+cp "/etc/sudoers" "/etc/sudoers.bak"
+# Insert at the end of the file
+printf '%s\n' "Defaults !rootpw" >> "/etc/sudoers"
+# Clean up after ourselves.
+rm "/etc/sudoers.bak"
+if [ -e "/etc/sudoers" ] ; then
+
+ LC_ALL=C sed -i "/Defaults !runaspw/d" "/etc/sudoers"
+else
+ touch "/etc/sudoers"
+fi
+# make sure file has newline at the end
+sed -i -e '$a\' "/etc/sudoers"
+
+cp "/etc/sudoers" "/etc/sudoers.bak"
+# Insert at the end of the file
+printf '%s\n' "Defaults !runaspw" >> "/etc/sudoers"
+# Clean up after ourselves.
+rm "/etc/sudoers.bak"
+
+else
+ >&2 echo 'Remediation is not applicable, nothing was done'
+fi
@@ -24088,8 +24190,23 @@ $ sudo yum install binutils
foundational system operator activities, such as ld,
nm, objcopy and readelf.
CCE-82989-5
-
-package --add=binutils
+ - name: Ensure binutils is installed
+ package:
+ name: binutils
+ state: present
+ tags:
+ - CCE-82989-5
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_binutils_installed
+
+
+[[packages]]
+name = "binutils"
+version = "*"
include install_binutils
@@ -24098,29 +24215,14 @@ class install_binutils {
ensure => 'installed',
}
}
+
+
+package --add=binutils
if ! rpm -q --quiet "binutils" ; then
yum install -y "binutils"
fi
-
-
-[[packages]]
-name = "binutils"
-version = "*"
-
- - name: Ensure binutils is installed
- package:
- name: binutils
- state: present
- tags:
- - CCE-82989-5
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_binutils_installed
@@ -24149,8 +24251,23 @@ $ sudo yum install dnf-plugin-subscription-manager
CCE-82315-3
-
-package --add=dnf-plugin-subscription-manager
+ - name: Ensure dnf-plugin-subscription-manager is installed
+ package:
+ name: dnf-plugin-subscription-manager
+ state: present
+ tags:
+ - CCE-82315-3
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_dnf-plugin-subscription-manager_installed
+
+
+[[packages]]
+name = "dnf-plugin-subscription-manager"
+version = "*"
include install_dnf-plugin-subscription-manager
@@ -24159,29 +24276,14 @@ class install_dnf-plugin-subscription-manager {
ensure => 'installed',
}
}
+
+
+package --add=dnf-plugin-subscription-manager
if ! rpm -q --quiet "dnf-plugin-subscription-manager" ; then
yum install -y "dnf-plugin-subscription-manager"
fi
-
-
-[[packages]]
-name = "dnf-plugin-subscription-manager"
-version = "*"
-
- - name: Ensure dnf-plugin-subscription-manager is installed
- package:
- name: dnf-plugin-subscription-manager
- state: present
- tags:
- - CCE-82315-3
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_dnf-plugin-subscription-manager_installed
@@ -24206,8 +24308,23 @@ other required structures.
This package contains command line TLS client and server and certificate
manipulation tools.
CCE-82395-5
-
-package --add=gnutls-utils
+ - name: Ensure gnutls-utils is installed
+ package:
+ name: gnutls-utils
+ state: present
+ tags:
+ - CCE-82395-5
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_gnutls-utils_installed
+
+
+[[packages]]
+name = "gnutls-utils"
+version = "*"
include install_gnutls-utils
@@ -24216,29 +24333,14 @@ class install_gnutls-utils {
ensure => 'installed',
}
}
+
+
+package --add=gnutls-utils
if ! rpm -q --quiet "gnutls-utils" ; then
yum install -y "gnutls-utils"
fi
-
-
-[[packages]]
-name = "gnutls-utils"
-version = "*"
-
- - name: Ensure gnutls-utils is installed
- package:
- name: gnutls-utils
- state: present
- tags:
- - CCE-82395-5
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_gnutls-utils_installed
@@ -24258,8 +24360,23 @@ posix capabilities of all the programs running on a system.
libcap-ng-utils also lets system operators set the file
system based capabilities.
CCE-82979-6
-
-package --add=libcap-ng-utils
+ - name: Ensure libcap-ng-utils is installed
+ package:
+ name: libcap-ng-utils
+ state: present
+ tags:
+ - CCE-82979-6
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_libcap-ng-utils_installed
+
+
+[[packages]]
+name = "libcap-ng-utils"
+version = "*"
include install_libcap-ng-utils
@@ -24268,29 +24385,14 @@ class install_libcap-ng-utils {
ensure => 'installed',
}
}
+
+
+package --add=libcap-ng-utils
if ! rpm -q --quiet "libcap-ng-utils" ; then
yum install -y "libcap-ng-utils"
fi
-
-
-[[packages]]
-name = "libcap-ng-utils"
-version = "*"
-
- - name: Ensure libcap-ng-utils is installed
- package:
- name: libcap-ng-utils
- state: present
- tags:
- - CCE-82979-6
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_libcap-ng-utils_installed
@@ -24312,8 +24414,23 @@ server applications. Install the nss-tools package
to install command-line tools to manipulate the NSS certificate
and key database.
CCE-82396-3
-
-package --add=nss-tools
+ - name: Ensure nss-tools is installed
+ package:
+ name: nss-tools
+ state: present
+ tags:
+ - CCE-82396-3
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_nss-tools_installed
+
+
+[[packages]]
+name = "nss-tools"
+version = "*"
include install_nss-tools
@@ -24322,29 +24439,14 @@ class install_nss-tools {
ensure => 'installed',
}
}
+
+
+package --add=nss-tools
if ! rpm -q --quiet "nss-tools" ; then
yum install -y "nss-tools"
fi
-
-
-[[packages]]
-name = "nss-tools"
-version = "*"
-
- - name: Ensure nss-tools is installed
- package:
- name: nss-tools
- state: present
- tags:
- - CCE-82396-3
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_nss-tools_installed
@@ -24366,8 +24468,23 @@ $ sudo yum install openscap-scanner
configuration and vulnerability scanner, capable of performing compliance checking using
SCAP content.
CCE-82220-5
-
-package --add=openscap-scanner
+ - name: Ensure openscap-scanner is installed
+ package:
+ name: openscap-scanner
+ state: present
+ tags:
+ - CCE-82220-5
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_openscap-scanner_installed
+
+
+[[packages]]
+name = "openscap-scanner"
+version = "*"
include install_openscap-scanner
@@ -24376,29 +24493,14 @@ class install_openscap-scanner {
ensure => 'installed',
}
}
+
+
+package --add=openscap-scanner
if ! rpm -q --quiet "openscap-scanner" ; then
yum install -y "openscap-scanner"
fi
-
-
-[[packages]]
-name = "openscap-scanner"
-version = "*"
-
- - name: Ensure openscap-scanner is installed
- package:
- name: openscap-scanner
- state: present
- tags:
- - CCE-82220-5
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_openscap-scanner_installed
@@ -24416,8 +24518,28 @@ $ sudo yum install rear
image of a system and restores from backup using this image.
CCE-82883-0
-
-package --add=rear
+ - name: Ensure rear is installed
+ package:
+ name: rear
+ state: present
+ when: not ( ( ( ansible_architecture == "aarch64" and ansible_distribution == 'OracleLinux'
+ and ansible_distribution_version is version('9.0', '>=') ) or ( ansible_architecture
+ == "aarch64" and ansible_distribution == 'RedHat' and ansible_distribution_version
+ is version('9.0', '>=') ) or ( ansible_distribution == 'RedHat' and ansible_distribution_version
+ is version('8.4', '<=') and ansible_architecture == "s390x" ) ) )
+ tags:
+ - CCE-82883-0
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - package_rear_installed
+
+
+[[packages]]
+name = "rear"
+version = "*"
include install_rear
@@ -24426,6 +24548,9 @@ class install_rear {
ensure => 'installed',
}
}
+
+
+package --add=rear
# Remediation is applicable only in certain platforms
if ! ( ( ( grep -q aarch64 /proc/sys/kernel/osrelease && grep -qP "^ID=[\"']?ol[\"']?$" "/etc/os-release" && { real="$(grep -P "^VERSION_ID=[\"']?[\w.]+[\"']?$" /etc/os-release | sed "s/^VERSION_ID=[\"']\?\([^\"']\+\)[\"']\?$/\1/")"; expected="9.0"; printf "%s\n%s" "$expected" "$real" | sort -VC; } ) || ( grep -q aarch64 /proc/sys/kernel/osrelease && grep -qP "^ID=[\"']?rhel[\"']?$" "/etc/os-release" && { real="$(grep -P "^VERSION_ID=[\"']?[\w.]+[\"']?$" /etc/os-release | sed "s/^VERSION_ID=[\"']\?\([^\"']\+\)[\"']\?$/\1/")"; expected="9.0"; printf "%s\n%s" "$expected" "$real" | sort -VC; } ) || ( grep -qP "^ID=[\"']?rhel[\"']?$" "/etc/os-release" && { real="$(grep -P "^VERSION_ID=[\"']?[\w.]+[\"']?$" /etc/os-release | sed "s/^VERSION_ID=[\"']\?\([^\"']\+\)[\"']\?$/\1/")"; expected="8.4"; printf "%s\n%s" "$real" "$expected" | sort -VC; } && grep -q s390x /proc/sys/kernel/osrelease ) ) ); then
@@ -24437,29 +24562,6 @@ fi
else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
-
-
-[[packages]]
-name = "rear"
-version = "*"
-
- - name: Ensure rear is installed
- package:
- name: rear
- state: present
- when: not ( ( ( ansible_architecture == "aarch64" and ansible_distribution == 'OracleLinux'
- and ansible_distribution_version is version('9.0', '>=') ) or ( ansible_architecture
- == "aarch64" and ansible_distribution == 'RedHat' and ansible_distribution_version
- is version('9.0', '>=') ) or ( ansible_distribution == 'RedHat' and ansible_distribution_version
- is version('8.4', '<=') and ansible_architecture == "s390x" ) ) )
- tags:
- - CCE-82883-0
- - enable_strategy
- - low_complexity
- - low_disruption
- - medium_severity
- - no_reboot_needed
- - package_rear_installed
@@ -24481,8 +24583,25 @@ $ sudo yum install rng-tools
such as those used in the formation of x509/PKI certificates.
CCE-82968-9
-
-package --add=rng-tools
+ - name: Ensure rng-tools is installed
+ package:
+ name: rng-tools
+ state: present
+ when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
+ tags:
+ - CCE-82968-9
+ - DISA-STIG-RHEL-08-010472
+ - enable_strategy
+ - low_complexity
+ - low_disruption
+ - low_severity
+ - no_reboot_needed
+ - package_rng-tools_installed
+
+
+[[packages]]
+name = "rng-tools"
+version = "*"
include install_rng-tools
@@ -24491,6 +24610,9 @@ class install_rng-tools {
ensure => 'installed',
}
}
+
+
+package --add=rng-tools
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
@@ -24502,26 +24624,6 @@ fi
else
>&2 echo 'Remediation is not applicable, nothing was done'
fi
-
-
-[[packages]]
-name = "rng-tools"
-version = "*"
-
- - name: Ensure rng-tools is installed
- package:
- name: rng-tools
- state: present
- when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
- tags:
- - CCE-82968-9
- - DISA-STIG-RHEL-08-010472
- - enable_strategy
- - low_complexity
- - low_disruption
- - low_severity
- - no_reboot_needed
- - package_rng-tools_installed
@@ -24548,8 +24650,23 @@ package, or the SCAP Workbench GUI tool from the scap-workbench