diff --git a/.gitignore b/.gitignore index 8a94a7b..22df73b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/scap-security-guide-0.1.57.tar.bz2 +SOURCES/scap-security-guide-0.1.60.tar.bz2 diff --git a/.scap-security-guide.metadata b/.scap-security-guide.metadata index ea6c565..2336832 100644 --- a/.scap-security-guide.metadata +++ b/.scap-security-guide.metadata @@ -1 +1 @@ -d78bdc956df4301c3b3bbb2f9f24d809d7b1d08c SOURCES/scap-security-guide-0.1.57.tar.bz2 +6768818c9bd6f9f35596f2fe23c50ffe52b974c3 SOURCES/scap-security-guide-0.1.60.tar.bz2 diff --git a/SOURCES/scap-security-guide-0.1.58-cis_build_system_fix-PR_7226.patch b/SOURCES/scap-security-guide-0.1.58-cis_build_system_fix-PR_7226.patch deleted file mode 100644 index c609d07..0000000 --- a/SOURCES/scap-security-guide-0.1.58-cis_build_system_fix-PR_7226.patch +++ /dev/null @@ -1,702 +0,0 @@ -From 7901659fa169db8ac5ffd7c610a798c785a3556b Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Fri, 9 Jul 2021 14:41:03 +0200 -Subject: [PATCH 01/12] ensure that higher policy levels can override variables - of lower levels - ---- - ssg/controls.py | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 297d80e46c5..165cdf0511a 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -202,9 +202,16 @@ def get_all_controls_of_level(self, policy_id, level_id): - - all_policy_controls = self.get_all_controls(policy_id) - eligible_controls = [] -- for c in all_policy_controls: -- if len(level_ids.intersection(c.levels)) > 0: -- eligible_controls.append(c) -+ defined_variables = [] -+ # we will go level by level, from top to bottom -+ # this is done to enable overriding of variables by higher levels -+ for lv in level_ids: -+ for c in all_policy_controls: -+ if lv in c.levels: -+ # if the control has a variable, check if it is not already defined -+ if c.variables.keys().isdisjoint(defined_variables): -+ eligible_controls.append(c) -+ defined_variables += [*c.variables.keys()] - return eligible_controls - - def get_all_controls(self, policy_id): - -From 66e612a9668009cc553fcf1abbf2c9477155c0c2 Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Thu, 5 Aug 2021 14:02:25 +0200 -Subject: [PATCH 02/12] use ordered sets emulated by ordereddict - -because of compatibility with python2 ---- - ssg/controls.py | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 165cdf0511a..611a647e125 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -2,6 +2,7 @@ - import logging - import os - from glob import glob -+from collections import OrderedDict - - import ssg.build_yaml - import ssg.yaml -@@ -152,16 +153,18 @@ def get_level(self, level_id): - raise ValueError(msg) - - def get_level_with_ancestors(self, level_id): -- levels = set() -+ # use OrderedDict for Python2 compatibility instead of ordered set -+ levels = OrderedDict() - level = self.get_level(level_id) -- levels.add(level) -+ levels[level] = "" - if level.inherits_from: - for lv in level.inherits_from: -- levels.update(self.get_level_with_ancestors(lv)) -+ eligible_levels = [l for l in self.get_level_with_ancestors(lv).keys() if l not in levels.keys()] -+ for l in eligible_levels: -+ levels[l] = "" - return levels - - -- - class ControlsManager(): - def __init__(self, controls_dir, env_yaml=None): - self.controls_dir = os.path.abspath(controls_dir) -@@ -198,20 +201,24 @@ def _get_policy(self, policy_id): - def get_all_controls_of_level(self, policy_id, level_id): - policy = self._get_policy(policy_id) - levels = policy.get_level_with_ancestors(level_id) -- level_ids = set([lv.id for lv in levels]) -+ # we use OrderedDict here with empty values instead of ordered set -+ # cause we want to be compatible with python 2 -+ level_ids = OrderedDict() -+ for lv in levels.keys(): -+ level_ids[lv.id] = "" - - all_policy_controls = self.get_all_controls(policy_id) - eligible_controls = [] - defined_variables = [] - # we will go level by level, from top to bottom - # this is done to enable overriding of variables by higher levels -- for lv in level_ids: -+ for lv in level_ids.keys(): - for c in all_policy_controls: - if lv in c.levels: - # if the control has a variable, check if it is not already defined - if c.variables.keys().isdisjoint(defined_variables): - eligible_controls.append(c) -- defined_variables += [*c.variables.keys()] -+ defined_variables += list(c.variables.keys()) - return eligible_controls - - def get_all_controls(self, policy_id): - -From 95a23a31293a0a63361ddf1831866cd5ae1ab61e Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Thu, 5 Aug 2021 16:30:10 +0200 -Subject: [PATCH 03/12] rework handling of variables when returning all - controls of a level - -currently only the top most level variables are kept in the controls -if there is a control with lower level which has the same variable defined, it is deep copied and the variable definition is removed only from the resulting control -the original control stays in tact ---- - ssg/controls.py | 27 +++++++++++++++++++++------ - 1 file changed, 21 insertions(+), 6 deletions(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 611a647e125..4ebb8bda3d7 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -1,8 +1,8 @@ - import collections - import logging - import os -+import copy - from glob import glob --from collections import OrderedDict - - import ssg.build_yaml - import ssg.yaml -@@ -154,7 +154,7 @@ def get_level(self, level_id): - - def get_level_with_ancestors(self, level_id): - # use OrderedDict for Python2 compatibility instead of ordered set -- levels = OrderedDict() -+ levels = collections.OrderedDict() - level = self.get_level(level_id) - levels[level] = "" - if level.inherits_from: -@@ -201,24 +201,39 @@ def _get_policy(self, policy_id): - def get_all_controls_of_level(self, policy_id, level_id): - policy = self._get_policy(policy_id) - levels = policy.get_level_with_ancestors(level_id) -+ print ("getting levels of " + level_id) -+ print ([ l.id for l in levels.keys()]) - # we use OrderedDict here with empty values instead of ordered set - # cause we want to be compatible with python 2 -- level_ids = OrderedDict() -+ level_ids = collections.OrderedDict() - for lv in levels.keys(): - level_ids[lv.id] = "" -- -+ print (level_ids.keys()) - all_policy_controls = self.get_all_controls(policy_id) - eligible_controls = [] - defined_variables = [] - # we will go level by level, from top to bottom - # this is done to enable overriding of variables by higher levels - for lv in level_ids.keys(): -+ print ("going through level " +lv) - for c in all_policy_controls: -+ print (c.levels) - if lv in c.levels: - # if the control has a variable, check if it is not already defined -- if c.variables.keys().isdisjoint(defined_variables): -+ variables = list(c.variables.keys()) -+ if len(variables) == 0: - eligible_controls.append(c) -- defined_variables += list(c.variables.keys()) -+ for var in variables: -+ if var in defined_variables: -+ # if it is, create new instance of the control and remove the variable -+ # we are going from the top level to the bottom -+ # so we don't want to overwrite variables -+ new_c = copy.deepcopy(c) -+ del new_c.variables[var] -+ eligible_controls.append(new_c) -+ else: -+ defined_variables.append(var) -+ eligible_controls.append(c) - return eligible_controls - - def get_all_controls(self, policy_id): - -From a2dd7e9386c757a523b57646bdc5a9ffa99f68c5 Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Thu, 5 Aug 2021 16:31:25 +0200 -Subject: [PATCH 04/12] add tests for defining of variables - ---- - tests/unit/ssg-module/data/controls_dir/abcd-levels.yml | 6 ++++++ - tests/unit/ssg-module/test_controls.py | 5 +++++ - 2 files changed, 11 insertions(+) - -diff --git a/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml b/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -index aded77c12a6..b98a7cd4e19 100644 ---- a/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -+++ b/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -@@ -19,10 +19,14 @@ controls: - - id: S2 - levels: - - low -+ rules: -+ - var_password_pam_minlen=1 - - - id: S3 - levels: - - medium -+ rules: -+ - var_password_pam_minlen=2 - - - id: S4 - title: Configure authentication -@@ -36,3 +40,5 @@ controls: - title: Enforce password quality standards - levels: - - high -+ rules: -+ - var_password_pam_minlen=3 -diff --git a/tests/unit/ssg-module/test_controls.py b/tests/unit/ssg-module/test_controls.py -index ff9b04f26c9..06fcb0c375d 100644 ---- a/tests/unit/ssg-module/test_controls.py -+++ b/tests/unit/ssg-module/test_controls.py -@@ -87,6 +87,11 @@ def test_controls_levels(): - assert len(low_controls) == 4 - assert len(medium_controls) == 5 - -+ # test overriding of variables in levels -+ assert c_2.variables["var_password_pam_minlen"] == "1" -+ assert c_3.variables["var_password_pam_minlen"] == "2" -+ assert c_4b.variables["var_password_pam_minlen"] == "3" -+ - - def test_controls_load_product(): - ssg_root = \ - -From 82b90a9720dadab7d6060f0ccbcd902b1c097904 Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Fri, 6 Aug 2021 09:30:47 +0200 -Subject: [PATCH 05/12] make overriding of variables optional - ---- - ssg/controls.py | 38 +++++++++++++++++++------------------- - 1 file changed, 19 insertions(+), 19 deletions(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 4ebb8bda3d7..90639fbe4c7 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -198,42 +198,42 @@ def _get_policy(self, policy_id): - raise ValueError(msg) - return policy - -- def get_all_controls_of_level(self, policy_id, level_id): -+ def get_all_controls_of_level(self, policy_id, level_id, override_vars=True): -+ # if override_vars is enabled, then variables from higher levels will -+ # override variables efined in controls of lower levels - policy = self._get_policy(policy_id) - levels = policy.get_level_with_ancestors(level_id) -- print ("getting levels of " + level_id) -- print ([ l.id for l in levels.keys()]) - # we use OrderedDict here with empty values instead of ordered set - # cause we want to be compatible with python 2 - level_ids = collections.OrderedDict() - for lv in levels.keys(): - level_ids[lv.id] = "" -- print (level_ids.keys()) - all_policy_controls = self.get_all_controls(policy_id) - eligible_controls = [] - defined_variables = [] - # we will go level by level, from top to bottom - # this is done to enable overriding of variables by higher levels - for lv in level_ids.keys(): -- print ("going through level " +lv) - for c in all_policy_controls: -- print (c.levels) - if lv in c.levels: -- # if the control has a variable, check if it is not already defined -- variables = list(c.variables.keys()) -- if len(variables) == 0: -+ if override_vars == False: - eligible_controls.append(c) -- for var in variables: -- if var in defined_variables: -- # if it is, create new instance of the control and remove the variable -- # we are going from the top level to the bottom -- # so we don't want to overwrite variables -- new_c = copy.deepcopy(c) -- del new_c.variables[var] -- eligible_controls.append(new_c) -- else: -- defined_variables.append(var) -+ else: -+ # if the control has a variable, check if it is not already defined -+ variables = list(c.variables.keys()) -+ if len(variables) == 0: - eligible_controls.append(c) -+ for var in variables: -+ if var in defined_variables: -+ # if it is, create new instance of the control and remove the variable -+ # we are going from the top level to the bottom -+ # so we don't want to overwrite variables -+ new_c = copy.deepcopy(c) -+ del new_c.variables[var] -+ eligible_controls.append(new_c) -+ else: -+ defined_variables.append(var) -+ eligible_controls.append(c) - return eligible_controls - - def get_all_controls(self, policy_id): - -From 47df80d086e96deb4eab88d5f813bffb380006a8 Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Wed, 11 Aug 2021 12:38:42 +0200 -Subject: [PATCH 06/12] fix a typo - ---- - ssg/controls.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 90639fbe4c7..10a304bf8c2 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -200,7 +200,7 @@ def _get_policy(self, policy_id): - - def get_all_controls_of_level(self, policy_id, level_id, override_vars=True): - # if override_vars is enabled, then variables from higher levels will -- # override variables efined in controls of lower levels -+ # override variables defined in controls of lower levels - policy = self._get_policy(policy_id) - levels = policy.get_level_with_ancestors(level_id) - # we use OrderedDict here with empty values instead of ordered set - -From 8e59037ed07aad33a55e8297ee5bce0f51c0dee6 Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Wed, 11 Aug 2021 17:02:11 +0200 -Subject: [PATCH 07/12] update tests to check that overriding of variables - works - ---- - .../ssg-module/data/controls_dir/abcd-levels.yml | 4 +--- - tests/unit/ssg-module/test_controls.py | 16 ++++++++++++++-- - 2 files changed, 15 insertions(+), 5 deletions(-) - -diff --git a/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml b/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -index b98a7cd4e19..99efafd832e 100644 ---- a/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -+++ b/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -@@ -25,8 +25,6 @@ controls: - - id: S3 - levels: - - medium -- rules: -- - var_password_pam_minlen=2 - - - id: S4 - title: Configure authentication -@@ -41,4 +39,4 @@ controls: - levels: - - high - rules: -- - var_password_pam_minlen=3 -+ - var_password_pam_minlen=2 -diff --git a/tests/unit/ssg-module/test_controls.py b/tests/unit/ssg-module/test_controls.py -index 06fcb0c375d..124b344d141 100644 ---- a/tests/unit/ssg-module/test_controls.py -+++ b/tests/unit/ssg-module/test_controls.py -@@ -89,8 +89,20 @@ def test_controls_levels(): - - # test overriding of variables in levels - assert c_2.variables["var_password_pam_minlen"] == "1" -- assert c_3.variables["var_password_pam_minlen"] == "2" -- assert c_4b.variables["var_password_pam_minlen"] == "3" -+ assert "var_password_pam_minlen" not in c_3.variables.keys() -+ assert c_4b.variables["var_password_pam_minlen"] == "2" -+ -+ for c in low_controls: -+ if "var_password_pam_minlen" in c.variables.keys(): -+ assert c.variables["var_password_pam_minlen"] == "1" -+ -+ for c in medium_controls: -+ if "var_password_pam_minlen" in c.variables.keys(): -+ assert c.variables["var_password_pam_minlen"] == "1" -+ -+ for c in high_controls: -+ if "var_password_pam_minlen" in c.variables.keys(): -+ assert c.variables["var_password_pam_minlen"] == "2" - - - def test_controls_load_product(): - -From dae4fc52a627eac6595bb73e3ffb1a0c50e78fdd Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Wed, 11 Aug 2021 17:02:32 +0200 -Subject: [PATCH 08/12] make overriding of variables hardcoded when requesting - controls of a certain level - ---- - ssg/controls.py | 34 +++++++++++++++------------------- - 1 file changed, 15 insertions(+), 19 deletions(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 10a304bf8c2..7923f0cb379 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -198,9 +198,7 @@ def _get_policy(self, policy_id): - raise ValueError(msg) - return policy - -- def get_all_controls_of_level(self, policy_id, level_id, override_vars=True): -- # if override_vars is enabled, then variables from higher levels will -- # override variables defined in controls of lower levels -+ def get_all_controls_of_level(self, policy_id, level_id): - policy = self._get_policy(policy_id) - levels = policy.get_level_with_ancestors(level_id) - # we use OrderedDict here with empty values instead of ordered set -@@ -216,24 +214,22 @@ def get_all_controls_of_level(self, policy_id, level_id, override_vars=True): - for lv in level_ids.keys(): - for c in all_policy_controls: - if lv in c.levels: -- if override_vars == False: -+ # if the control has a variable, check if it is not already defined -+ variables = list(c.variables.keys()) -+ if len(variables) == 0: - eligible_controls.append(c) -- else: -- # if the control has a variable, check if it is not already defined -- variables = list(c.variables.keys()) -- if len(variables) == 0: -+ continue -+ for var in variables: -+ if var in defined_variables: -+ # if it is, create new instance of the control and remove the variable -+ # we are going from the top level to the bottom -+ # so we don't want to overwrite variables -+ new_c = copy.deepcopy(c) -+ del new_c.variables[var] -+ eligible_controls.append(new_c) -+ else: -+ defined_variables.append(var) - eligible_controls.append(c) -- for var in variables: -- if var in defined_variables: -- # if it is, create new instance of the control and remove the variable -- # we are going from the top level to the bottom -- # so we don't want to overwrite variables -- new_c = copy.deepcopy(c) -- del new_c.variables[var] -- eligible_controls.append(new_c) -- else: -- defined_variables.append(var) -- eligible_controls.append(c) - return eligible_controls - - def get_all_controls(self, policy_id): - -From c051e11c70b7e23ce3d4a8e0670da4fae72833c6 Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Thu, 12 Aug 2021 15:30:39 +0200 -Subject: [PATCH 09/12] get rid of one ordereddict - ---- - ssg/controls.py | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 7923f0cb379..891b13c891c 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -201,19 +201,14 @@ def _get_policy(self, policy_id): - def get_all_controls_of_level(self, policy_id, level_id): - policy = self._get_policy(policy_id) - levels = policy.get_level_with_ancestors(level_id) -- # we use OrderedDict here with empty values instead of ordered set -- # cause we want to be compatible with python 2 -- level_ids = collections.OrderedDict() -- for lv in levels.keys(): -- level_ids[lv.id] = "" - all_policy_controls = self.get_all_controls(policy_id) - eligible_controls = [] - defined_variables = [] - # we will go level by level, from top to bottom - # this is done to enable overriding of variables by higher levels -- for lv in level_ids.keys(): -+ for lv in levels.keys(): - for c in all_policy_controls: -- if lv in c.levels: -+ if lv.id in c.levels: - # if the control has a variable, check if it is not already defined - variables = list(c.variables.keys()) - if len(variables) == 0: - -From 4dd5cb1326932cf020785a8c2472998eb2e7775e Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Thu, 12 Aug 2021 16:44:57 +0200 -Subject: [PATCH 10/12] fix overriding of variables - -when there were multiple variables overridden, it caused problems by creating multiple copies of controls ---- - ssg/controls.py | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 891b13c891c..8b69676313c 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -214,17 +214,19 @@ def get_all_controls_of_level(self, policy_id, level_id): - if len(variables) == 0: - eligible_controls.append(c) - continue -+ variables_to_remove = [] # contains list of variables which are already defined and should be removed from the control - for var in variables: - if var in defined_variables: -- # if it is, create new instance of the control and remove the variable -- # we are going from the top level to the bottom -- # so we don't want to overwrite variables -- new_c = copy.deepcopy(c) -- del new_c.variables[var] -- eligible_controls.append(new_c) -+ variables_to_remove.append(var) - else: - defined_variables.append(var) -- eligible_controls.append(c) -+ if len(variables_to_remove) == 0: -+ eligible_controls.append(c) -+ else: -+ new_c = copy.deepcopy(c) -+ for var in variables_to_remove: -+ del new_c.variables[var] -+ eligible_controls.append(new_c) - return eligible_controls - - def get_all_controls(self, policy_id): - -From fbebba524cab090bc4c2f92b75257a7cc881ef5e Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Thu, 12 Aug 2021 16:45:38 +0200 -Subject: [PATCH 11/12] extended tests to test for multiple overridden - variables - ---- - .../data/controls_dir/abcd-levels.yml | 2 ++ - tests/unit/ssg-module/test_controls.py | 19 +++++++++++++++++++ - 2 files changed, 21 insertions(+) - -diff --git a/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml b/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -index 99efafd832e..2e60ec43532 100644 ---- a/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -+++ b/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml -@@ -21,6 +21,7 @@ controls: - - low - rules: - - var_password_pam_minlen=1 -+ - var_some_variable=1 - - - id: S3 - levels: -@@ -40,3 +41,4 @@ controls: - - high - rules: - - var_password_pam_minlen=2 -+ - var_some_variable=3 -diff --git a/tests/unit/ssg-module/test_controls.py b/tests/unit/ssg-module/test_controls.py -index 124b344d141..1465661b04a 100644 ---- a/tests/unit/ssg-module/test_controls.py -+++ b/tests/unit/ssg-module/test_controls.py -@@ -104,6 +104,25 @@ def test_controls_levels(): - if "var_password_pam_minlen" in c.variables.keys(): - assert c.variables["var_password_pam_minlen"] == "2" - -+ # now test if controls of lower level has the variable definition correctly removed -+ # because it is overriden by higher level controls -+ s2_high = [c for c in high_controls if c.id == "S2"] -+ assert len(s2_high) == 1 -+ assert "var_some_variable" not in s2_high[0].variables.keys() -+ assert "var_password_pam_minlen" not in s2_high[0].variables.keys() -+ s4b_high = [c for c in high_controls if c.id == "S4.b"] -+ assert len(s4b_high) == 1 -+ assert s4b_high[0].variables["var_some_variable"] == "3" -+ assert s4b_high[0].variables["var_password_pam_minlen"] == "2" -+ -+ # check that in low level the variable is correctly placed there in S2 -+ s2_low = [c for c in low_controls if c.id == "S2"] -+ assert len(s2_low) == 1 -+ assert s2_low[0].variables["var_some_variable"] == "1" -+ assert s2_low[0].variables["var_password_pam_minlen"] == "1" -+ -+ -+ - - def test_controls_load_product(): - ssg_root = \ - -From 369de6b8374084d9d607979b712285912dbb65aa Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Mon, 16 Aug 2021 10:39:22 +0200 -Subject: [PATCH 12/12] Style improvements - -- Renamed get_level_with_ancestors to get_level_with_ancestors_sequence, - and made it return a list - a dictionary result is quite confusing. -- Removed some optimization in the variable deletion loops. -- Extracted functionality to a _get_control_without_variables static - method. -- Defined variable removal steps using set operations. ---- - ssg/controls.py | 54 +++++++++++++++++++++++++------------------------ - 1 file changed, 28 insertions(+), 26 deletions(-) - -diff --git a/ssg/controls.py b/ssg/controls.py -index 8b69676313c..ca3187d5b16 100644 ---- a/ssg/controls.py -+++ b/ssg/controls.py -@@ -152,17 +152,17 @@ def get_level(self, level_id): - ) - raise ValueError(msg) - -- def get_level_with_ancestors(self, level_id): -+ def get_level_with_ancestors_sequence(self, level_id): - # use OrderedDict for Python2 compatibility instead of ordered set - levels = collections.OrderedDict() - level = self.get_level(level_id) - levels[level] = "" - if level.inherits_from: - for lv in level.inherits_from: -- eligible_levels = [l for l in self.get_level_with_ancestors(lv).keys() if l not in levels.keys()] -+ eligible_levels = [l for l in self.get_level_with_ancestors_sequence(lv) if l not in levels.keys()] - for l in eligible_levels: - levels[l] = "" -- return levels -+ return list(levels.keys()) - - - class ControlsManager(): -@@ -200,35 +200,37 @@ def _get_policy(self, policy_id): - - def get_all_controls_of_level(self, policy_id, level_id): - policy = self._get_policy(policy_id) -- levels = policy.get_level_with_ancestors(level_id) -+ levels = policy.get_level_with_ancestors_sequence(level_id) - all_policy_controls = self.get_all_controls(policy_id) - eligible_controls = [] -- defined_variables = [] -+ already_defined_variables = set() - # we will go level by level, from top to bottom - # this is done to enable overriding of variables by higher levels -- for lv in levels.keys(): -- for c in all_policy_controls: -- if lv.id in c.levels: -- # if the control has a variable, check if it is not already defined -- variables = list(c.variables.keys()) -- if len(variables) == 0: -- eligible_controls.append(c) -- continue -- variables_to_remove = [] # contains list of variables which are already defined and should be removed from the control -- for var in variables: -- if var in defined_variables: -- variables_to_remove.append(var) -- else: -- defined_variables.append(var) -- if len(variables_to_remove) == 0: -- eligible_controls.append(c) -- else: -- new_c = copy.deepcopy(c) -- for var in variables_to_remove: -- del new_c.variables[var] -- eligible_controls.append(new_c) -+ for lv in levels: -+ for control in all_policy_controls: -+ if lv.id not in control.levels: -+ continue -+ -+ variables = set(control.variables.keys()) -+ -+ variables_to_remove = variables.intersection(already_defined_variables) -+ already_defined_variables.update(variables) -+ -+ new_c = self._get_control_without_variables(variables_to_remove, control) -+ eligible_controls.append(new_c) -+ - return eligible_controls - -+ @staticmethod -+ def _get_control_without_variables(variables_to_remove, control): -+ if not variables_to_remove: -+ return control -+ -+ new_c = copy.deepcopy(control) -+ for var in variables_to_remove: -+ del new_c.variables[var] -+ return new_c -+ - def get_all_controls(self, policy_id): - policy = self._get_policy(policy_id) - return policy.controls_by_id.values() diff --git a/SOURCES/scap-security-guide-0.1.58-cis_def-PR_6976.patch b/SOURCES/scap-security-guide-0.1.58-cis_def-PR_6976.patch deleted file mode 100644 index 3082bf2..0000000 --- a/SOURCES/scap-security-guide-0.1.58-cis_def-PR_6976.patch +++ /dev/null @@ -1,5333 +0,0 @@ -From 7f366ca6916df9dd3cc3b50e3118adad77bcc04c Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Tue, 29 Jun 2021 14:37:28 +0100 -Subject: [PATCH 01/55] Split RHEL 8 CIS profile into modular files - per-benchmark - ---- - products/rhel8/profiles/cis.profile | 1080 +---------------- - products/rhel8/profiles/cis_server_l1.profile | 22 + - .../rhel8/profiles/cis_workstation_l1.profile | 22 + - .../rhel8/profiles/cis_workstation_l2.profile | 22 + - 4 files changed, 72 insertions(+), 1074 deletions(-) - create mode 100644 products/rhel8/profiles/cis_server_l1.profile - create mode 100644 products/rhel8/profiles/cis_workstation_l1.profile - create mode 100644 products/rhel8/profiles/cis_workstation_l2.profile - -diff --git a/products/rhel8/profiles/cis.profile b/products/rhel8/profiles/cis.profile -index c22ae86d076..4a00c24e0f7 100644 ---- a/products/rhel8/profiles/cis.profile -+++ b/products/rhel8/profiles/cis.profile -@@ -1,1090 +1,22 @@ - documentation_complete: true - - metadata: -- version: 1.0.0 -+ version: 1.0.1 - SMEs: - - vojtapolasek - - yuumasato - - reference: https://www.cisecurity.org/benchmark/red_hat_linux/ - --title: 'CIS Red Hat Enterprise Linux 8 Benchmark' -+title: 'CIS Red Hat Enterprise Linux 8 Benchmark for Level 2 - Server' - - description: |- -- This profile defines a baseline that aligns to the Center for Internet Security® -- Red Hat Enterprise Linux 8 Benchmark™, v1.0.0, released 09-30-2019. -+ This profile defines a baseline that aligns to the "Level 2 - Server" -+ configuration from the Center for Internet Security® Red Hat Enterprise -+ Linux 8 Benchmark™, v1.0.1, released 2021-05-19. - - This profile includes Center for Internet Security® - Red Hat Enterprise Linux 8 CIS Benchmarks™ content. - - selections: -- # Necessary for dconf rules -- - dconf_db_up_to_date -- -- ### Partitioning -- - mount_option_home_nodev -- -- ## 1.1 Filesystem Configuration -- -- ### 1.1.1 Disable unused filesystems -- -- #### 1.1.1.1 Ensure mounting cramfs filesystems is disabled (Scored) -- - kernel_module_cramfs_disabled -- -- #### 1.1.1.2 Ensure mounting of vFAT filesystems is limited (Not Scored) -- -- -- #### 1.1.1.3 Ensure mounting of squashfs filesystems is disabled (Scored) -- - kernel_module_squashfs_disabled -- -- #### 1.1.1.4 Ensure mounting of udf filesystems is disabled (Scored) -- - kernel_module_udf_disabled -- -- ### 1.1.2 Ensure /tmp is configured (Scored) -- - partition_for_tmp -- -- ### 1.1.3 Ensure nodev option set on /tmp partition (Scored) -- - mount_option_tmp_nodev -- -- ### 1.1.4 Ensure nosuid option set on /tmp partition (Scored) -- - mount_option_tmp_nosuid -- -- ### 1.1.5 Ensure noexec option set on /tmp partition (Scored) -- - mount_option_tmp_noexec -- -- ### 1.1.6 Ensure separate partition exists for /var (Scored) -- - partition_for_var -- -- ### 1.1.7 Ensure separate partition exists for /var/tmp (Scored) -- - partition_for_var_tmp -- -- ### 1.1.8 Ensure nodev option set on /var/tmp partition (Scored) -- - mount_option_var_tmp_nodev -- -- ### 1.1.9 Ensure nosuid option set on /var/tmp partition (Scored) -- - mount_option_var_tmp_nosuid -- -- ### 1.1.10 Ensure noexec option set on /var/tmp partition (Scored) -- - mount_option_var_tmp_noexec -- -- ### 1.1.11 Ensure separate partition exists for /var/log (Scored) -- - partition_for_var_log -- -- ### 1.1.12 Ensure separate partition exists for /var/log/audit (Scored) -- - partition_for_var_log_audit -- -- ### 1.1.13 Ensure separate partition exists for /home (Scored) -- - partition_for_home -- -- ### 1.1.14 Ensure nodev option set on /home partition (Scored) -- - mount_option_home_nodev -- -- ### 1.1.15 Ensure nodev option set on /dev/shm partition (Scored) -- - mount_option_dev_shm_nodev -- -- ### 1.1.16 Ensure nosuid option set on /dev/shm partition (Scored) -- - mount_option_dev_shm_nosuid -- -- ### 1.1.17 Ensure noexec option set on /dev/shm partition (Scored) -- - mount_option_dev_shm_noexec -- -- ### 1.1.18 Ensure nodev option set on removable media partitions (Not Scored) -- - mount_option_nodev_removable_partitions -- -- ### 1.1.19 Ensure nosuid option set on removable media partitions (Not Scored) -- - mount_option_nosuid_removable_partitions -- -- ### 1.1.20 Ensure noexec option set on removable media partitions (Not Scored) -- - mount_option_noexec_removable_partitions -- -- ### 1.1.21 Ensure sticky bit is set on all world-writable directories (Scored) -- - dir_perms_world_writable_sticky_bits -- -- ### 1.1.22 Disable Automounting (Scored) -- - service_autofs_disabled -- -- ### 1.1.23 Disable USB Storage (Scored) -- - kernel_module_usb-storage_disabled -- -- ## 1.2 Configure Software Updates -- -- ### 1.2.1 Ensure Red Hat Subscription Manager connection is configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5218 -- -- ### 1.2.2 Disable the rhnsd Daemon (Not Scored) -- - service_rhnsd_disabled -- -- ### 1.2.3 Ensure GPG keys are configured (Not Scored) -- - ensure_redhat_gpgkey_installed -- -- ### 1.2.4 Ensure gpgcheck is globally activated (Scored) -- - ensure_gpgcheck_globally_activated -- -- ### 1.2.5 Ensure package manager repositories are configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5219 -- -- ## 1.3 Configure sudo -- -- ### 1.3.1 Ensure sudo is installed (Scored) -- - package_sudo_installed -- -- ### 1.3.2 Ensure sudo commands use pty (Scored) -- - sudo_add_use_pty -- -- ### 1.3.3 Ensure sudo log file exists (Scored) -- - sudo_custom_logfile -- -- ## 1.4 Filesystem Integrity Checking -- -- ### 1.4.1 Ensure AIDE is installed (Scored) -- - package_aide_installed -- -- ### 1.4.2 Ensure filesystem integrity is regularly checked (Scored) -- - aide_periodic_cron_checking -- -- ## Secure Boot Settings -- -- ### 1.5.1 Ensure permissions on bootloader config are configured (Scored) -- #### chown root:root /boot/grub2/grub.cfg -- - file_owner_grub2_cfg -- - file_groupowner_grub2_cfg -- -- #### chmod og-rwx /boot/grub2/grub.cfg -- - file_permissions_grub2_cfg -- -- #### chown root:root /boot/grub2/grubenv -- # NEED RULE - https://github.com/ComplianceAsCode/content/issues/5222 -- -- #### chmod og-rwx /boot/grub2/grubenv -- # NEED RULE - https://github.com/ComplianceAsCode/content/issues/5222 -- -- ### 1.5.2 Ensure bootloader password is set (Scored) -- - grub2_password -- -- ### 1.5.3 Ensure authentication required for single user mode (Scored) -- #### ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue -- - require_singleuser_auth -- -- #### ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency -- - require_emergency_target_auth -- -- ## 1.6 Additional Process Hardening -- -- ### 1.6.1 Ensure core dumps are restricted (Scored) -- #### * hard core 0 -- - disable_users_coredumps -- -- #### fs.suid_dumpable = 0 -- - sysctl_fs_suid_dumpable -- -- #### ProcessSizeMax=0 -- - coredump_disable_backtraces -- -- #### Storage=none -- - coredump_disable_storage -- -- ### 1.6.2 Ensure address space layout randomization (ASLR) is enabled -- - sysctl_kernel_randomize_va_space -- -- ## 1.7 Mandatory Access Control -- -- ### 1.7.1 Configure SELinux -- -- #### 1.7.1.1 Ensure SELinux is installed (Scored) -- - package_libselinux_installed -- -- #### 1.7.1.2 Ensure SELinux is not disabled in bootloader configuration (Scored) -- - grub2_enable_selinux -- -- #### 1.7.1.3 Ensure SELinux policy is configured (Scored) -- - var_selinux_policy_name=targeted -- - selinux_policytype -- -- #### 1.7.1.4 Ensure the SELinux state is enforcing (Scored) -- - var_selinux_state=enforcing -- - selinux_state -- -- #### 1.7.1.5 Ensure no unconfied services exist (Scored) -- - selinux_confinement_of_daemons -- -- #### 1.7.1.6 Ensure SETroubleshoot is not installed (Scored) -- - package_setroubleshoot_removed -- -- #### 1.7.1.7 Ensure the MCS Translation Service (mcstrans) is not installed (Scored) -- - package_mcstrans_removed -- -- ## Warning Banners -- -- ### 1.8.1 Command Line Warning Baners -- -- #### 1.8.1.1 Ensure message of the day is configured properly (Scored) -- - banner_etc_motd -- -- #### 1.8.1.2 Ensure local login warning banner is configured properly (Scored) -- - banner_etc_issue -- -- #### 1.8.1.3 Ensure remote login warning banner is configured properly (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5225 -- -- #### 1.8.1.4 Ensure permissions on /etc/motd are configured (Scored) -- # chmod u-x,go-wx /etc/motd -- - file_permissions_etc_motd -- -- #### 1.8.1.5 Ensure permissions on /etc/issue are configured (Scored) -- # chmod u-x,go-wx /etc/issue -- - file_permissions_etc_issue -- -- #### 1.8.1.6 Ensure permissions on /etc/issue.net are configured (Scored) -- # Previously addressed via 'rpm_verify_permissions' rule -- -- ### 1.8.2 Ensure GDM login banner is configured (Scored) -- #### banner-message-enable=true -- - dconf_gnome_banner_enabled -- -- #### banner-message-text='' -- - dconf_gnome_login_banner_text -- -- ## 1.9 Ensure updates, patches, and additional security software are installed (Scored) -- - security_patches_up_to_date -- -- ## 1.10 Ensure system-wide crypto policy is not legacy (Scored) -- - var_system_crypto_policy=future -- - configure_crypto_policy -- -- ## 1.11 Ensure system-wide crytpo policy is FUTURE or FIPS (Scored) -- # Previously addressed via 'configure_crypto_policy' rule -- -- # Services -- -- ## 2.1 inetd Services -- -- ### 2.1.1 Ensure xinetd is not installed (Scored) -- - package_xinetd_removed -- -- ## 2.2 Special Purpose Services -- -- ### 2.2.1 Time Synchronization -- -- #### 2.2.1.1 Ensure time synchronization is in use (Not Scored) -- - package_chrony_installed -- -- #### 2.2.1.2 Ensure chrony is configured (Scored) -- - service_chronyd_enabled -- - chronyd_specify_remote_server -- - chronyd_run_as_chrony_user -- -- ### 2.2.2 Ensure X Window System is not installed (Scored) -- - package_xorg-x11-server-common_removed -- - xwindows_runlevel_target -- -- ### 2.2.3 Ensure rsync service is not enabled (Scored) -- - service_rsyncd_disabled -- -- ### 2.2.4 Ensure Avahi Server is not enabled (Scored) -- - service_avahi-daemon_disabled -- -- ### 2.2.5 Ensure SNMP Server is not enabled (Scored) -- - service_snmpd_disabled -- -- ### 2.2.6 Ensure HTTP Proxy Server is not enabled (Scored) -- - package_squid_removed -- -- ### 2.2.7 Ensure Samba is not enabled (Scored) -- - service_smb_disabled -- -- ### 2.2.8 Ensure IMAP and POP3 server is not enabled (Scored) -- - service_dovecot_disabled -- -- ### 2.2.9 Ensure HTTP server is not enabled (Scored) -- - service_httpd_disabled -- -- ### 2.2.10 Ensure FTP Server is not enabled (Scored) -- - service_vsftpd_disabled -- -- ### 2.2.11 Ensure DNS Server is not enabled (Scored) -- - service_named_disabled -- -- ### 2.2.12 Ensure NFS is not enabled (Scored) -- - service_nfs_disabled -- -- ### 2.2.13 Ensure RPC is not enabled (Scored) -- - service_rpcbind_disabled -- -- ### 2.2.14 Ensure LDAP service is not enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5231 -- -- ### 2.2.15 Ensure DHCP Server is not enabled (Scored) -- - service_dhcpd_disabled -- -- ### 2.2.16 Ensure CUPS is not enabled (Scored) -- - service_cups_disabled -- -- ### 2.2.17 Ensure NIS Server is not enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5232 -- -- ### 2.2.18 Ensure mail transfer agent is configured for -- ### local-only mode (Scored) -- - postfix_network_listening_disabled -- -- ## 2.3 Service Clients -- -- ### 2.3.1 Ensure NIS Client is not installed (Scored) -- - package_ypbind_removed -- -- ### 2.3.2 Ensure telnet client is not installed (Scored) -- - package_telnet_removed -- -- ### Ensure LDAP client is not installed -- - package_openldap-clients_removed -- -- # 3 Network Configuration -- -- ## 3.1 Network Parameters (Host Only) -- -- ### 3.1.1 Ensure IP forwarding is disabled (Scored) -- #### net.ipv4.ip_forward = 0 -- - sysctl_net_ipv4_ip_forward -- -- #### net.ipv6.conf.all.forwarding = 0 -- - sysctl_net_ipv6_conf_all_forwarding -- -- ### 3.1.2 Ensure packet redirect sending is disabled (Scored) -- #### net.ipv4.conf.all.send_redirects = 0 -- - sysctl_net_ipv4_conf_all_send_redirects -- -- #### net.ipv4.conf.default.send_redirects = 0 -- - sysctl_net_ipv4_conf_default_send_redirects -- -- ## 3.2 Network Parameters (Host and Router) -- -- ### 3.2.1 Ensure source routed packets are not accepted (Scored) -- #### net.ipv4.conf.all.accept_source_route = 0 -- - sysctl_net_ipv4_conf_all_accept_source_route -- -- #### net.ipv4.conf.default.accept_source_route = 0 -- - sysctl_net_ipv4_conf_default_accept_source_route -- -- #### net.ipv6.conf.all.accept_source_route = 0 -- - sysctl_net_ipv6_conf_all_accept_source_route -- -- #### net.ipv6.conf.default.accept_source_route = 0 -- - sysctl_net_ipv6_conf_default_accept_source_route -- -- ### 3.2.2 Ensure ICMP redirects are not accepted (Scored) -- #### net.ipv4.conf.all.accept_redirects = 0 -- - sysctl_net_ipv4_conf_all_accept_redirects -- -- #### net.ipv4.conf.default.accept_redirects -- - sysctl_net_ipv4_conf_default_accept_redirects -- -- #### net.ipv6.conf.all.accept_redirects = 0 -- - sysctl_net_ipv6_conf_all_accept_redirects -- -- #### net.ipv6.conf.defaults.accept_redirects = 0 -- - sysctl_net_ipv6_conf_default_accept_redirects -- -- ### 3.2.3 Ensure secure ICMP redirects are not accepted (Scored) -- #### net.ipv4.conf.all.secure_redirects = 0 -- - sysctl_net_ipv4_conf_all_secure_redirects -- -- #### net.ipv4.cof.default.secure_redirects = 0 -- - sysctl_net_ipv4_conf_default_secure_redirects -- -- ### 3.2.4 Ensure suspicious packets are logged (Scored) -- #### net.ipv4.conf.all.log_martians = 1 -- - sysctl_net_ipv4_conf_all_log_martians -- -- #### net.ipv4.conf.default.log_martians = 1 -- - sysctl_net_ipv4_conf_default_log_martians -- -- ### 3.2.5 Ensure broadcast ICMP requests are ignored (Scored) -- - sysctl_net_ipv4_icmp_echo_ignore_broadcasts -- -- ### 3.2.6 Ensure bogus ICMP responses are ignored (Scored) -- - sysctl_net_ipv4_icmp_ignore_bogus_error_responses -- -- ### 3.2.7 Ensure Reverse Path Filtering is enabled (Scored) -- #### net.ipv4.conf.all.rp_filter = 1 -- - sysctl_net_ipv4_conf_all_rp_filter -- -- #### net.ipv4.conf.default.rp_filter = 1 -- - sysctl_net_ipv4_conf_default_rp_filter -- -- ### 3.2.8 Ensure TCP SYN Cookies is enabled (Scored) -- - sysctl_net_ipv4_tcp_syncookies -- -- ### 3.2.9 Ensure IPv6 router advertisements are not accepted (Scored) -- #### net.ipv6.conf.all.accept_ra = 0 -- - sysctl_net_ipv6_conf_all_accept_ra -- -- #### net.ipv6.conf.default.accept_ra = 0 -- - sysctl_net_ipv6_conf_default_accept_ra -- -- ## 3.3 Uncommon Network Protocols -- -- ### 3.3.1 Ensure DCCP is disabled (Scored) -- - kernel_module_dccp_disabled -- -- ### Ensure SCTP is disabled (Scored) -- - kernel_module_sctp_disabled -- -- ### 3.3.3 Ensure RDS is disabled (Scored) -- - kernel_module_rds_disabled -- -- ### 3.3.4 Ensure TIPC is disabled (Scored) -- - kernel_module_tipc_disabled -- -- ## 3.4 Firewall Configuration -- -- ### 3.4.1 Ensure Firewall software is installed -- -- #### 3.4.1.1 Ensure a Firewall package is installed (Scored) -- ##### firewalld -- - package_firewalld_installed -- -- ##### nftables -- #NEED RULE - https://github.com/ComplianceAsCode/content/issues/5237 -- -- ##### iptables -- #- package_iptables_installed -- -- ### 3.4.2 Configure firewalld -- -- #### 3.4.2.1 Ensure firewalld service is enabled and running (Scored) -- - service_firewalld_enabled -- -- #### 3.4.2.2 Ensure iptables is not enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5238 -- -- #### 3.4.2.3 Ensure nftables is not enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5239 -- -- #### 3.4.2.4 Ensure default zone is set (Scored) -- - set_firewalld_default_zone -- -- #### 3.4.2.5 Ensure network interfaces are assigned to -- #### appropriate zone (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5240 -- -- #### 3.4.2.6 Ensure unnecessary services and ports are not -- #### accepted (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5241 -- -- ### 3.4.3 Configure nftables -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5242 -- -- #### 3.4.3.1 Ensure iptables are flushed (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5243 -- -- #### 3.4.3.2 Ensure a table exists (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5244 -- -- #### 3.4.3.3 Ensure base chains exist (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5245 -- -- #### 3.4.3.4 Ensure loopback traffic is configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5246 -- -- #### 3.4.3.5 Ensure outbound and established connections are -- #### configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5247 -- -- #### 3.4.3.6 Ensure default deny firewall policy (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5248 -- -- #### 3.4.3.7 Ensure nftables service is enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5249 -- -- #### 3.4.3.8 Ensure nftables rules are permanent (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5250 -- -- ### 3.4.4 Configure iptables -- -- #### 3.4.4.1 Configure IPv4 iptables -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5251 -- -- ##### 3.4.4.1.1 Ensure default deny firewall policy (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5252 -- -- ##### 3.4.4.1.2 Ensure loopback traffic is configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5253 -- -- ##### 3.4.4.1.3 Ensure outbound and established connections are -- ##### configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5254 -- -- ##### 3.4.4.1.4 Ensure firewall rules exist for all open ports (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5255 -- -- #### 3.4.4.2 Configure IPv6 ip6tables -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5256 -- -- ##### 3.4.4.2.1 Ensure IPv6 default deny firewall policy (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5257 -- -- ##### 3.4.4.2.2 Ensure IPv6 loopback traffic is configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5258 -- -- ##### 3.4.4.2.3 Ensure IPv6 outbound and established connections are -- ##### configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5260 -- -- ## 3.5 Ensure wireless interfaces are disabled (Scored) -- - wireless_disable_interfaces -- -- ## 3.6 Disable IPv6 (Not Scored) -- - kernel_module_ipv6_option_disabled -- -- # Logging and Auditing -- -- ## 4.1 Configure System Accounting (auditd) -- -- ### 4.1.1 Ensure auditing is enabled -- -- #### 4.1.1.1 Ensure auditd is installed (Scored) -- - package_audit_installed -- -- #### 4.1.1.2 Ensure auditd service is enabled (Scored) -- - service_auditd_enabled -- -- #### 4.1.1.3 Ensure auditing for processes that start prior to audit -- #### is enabled (Scored) -- - grub2_audit_argument -- -- #### 4.1.1.4 Ensure audit_backlog_limit is sufficient (Scored) -- - grub2_audit_backlog_limit_argument -- -- ### 4.1.2 Configure Data Retention -- -- #### 4.1.2.1 Ensure audit log storage size is configured (Scored) -- - auditd_data_retention_max_log_file -- -- #### 4.1.2.2 Ensure audit logs are not automatically deleted (Scored) -- - auditd_data_retention_max_log_file_action -- -- #### 4.1.2.3 Ensure system is disabled when audit logs are full (Scored) -- - var_auditd_space_left_action=email -- - auditd_data_retention_space_left_action -- -- ##### action_mail_acct = root -- - var_auditd_action_mail_acct=root -- - auditd_data_retention_action_mail_acct -- -- ##### admin_space_left_action = halt -- - var_auditd_admin_space_left_action=halt -- - auditd_data_retention_admin_space_left_action -- -- ### 4.1.3 Ensure changes to system administration scope -- ### (sudoers) is collected (Scored) -- - audit_rules_sysadmin_actions -- -- ### 4.1.4 Ensure login and logout events are collected (Scored) -- - audit_rules_login_events_faillock -- - audit_rules_login_events_lastlog -- -- ### 4.1.5 Ensure session initiation information is collected (Scored) -- - audit_rules_session_events -- -- ### 4.1.6 Ensure events that modify date and time information -- ### are collected (Scored) -- #### adjtimex -- - audit_rules_time_adjtimex -- -- #### settimeofday -- - audit_rules_time_settimeofday -- -- #### stime -- - audit_rules_time_stime -- -- #### clock_settime -- - audit_rules_time_clock_settime -- -- #### -w /etc/localtime -p wa -- - audit_rules_time_watch_localtime -- -- ### 4.1.7 Ensure events that modify the system's Mandatory -- ### Access Control are collected (Scored) -- #### -w /etc/selinux/ -p wa -- - audit_rules_mac_modification -- -- #### -w /usr/share/selinux/ -p wa -- # NEED RULE - https://github.com/ComplianceAsCode/content/issues/5264 -- -- ### 4.1.8 Ensure events that modify the system's network -- ### enironment are collected (Scored) -- - audit_rules_networkconfig_modification -- -- ### 4.1.9 Ensure discretionary access control permission modification -- ### events are collected (Scored) -- - audit_rules_dac_modification_chmod -- - audit_rules_dac_modification_fchmod -- - audit_rules_dac_modification_fchmodat -- - audit_rules_dac_modification_chown -- - audit_rules_dac_modification_fchown -- - audit_rules_dac_modification_fchownat -- - audit_rules_dac_modification_lchown -- - audit_rules_dac_modification_setxattr -- - audit_rules_dac_modification_lsetxattr -- - audit_rules_dac_modification_fsetxattr -- - audit_rules_dac_modification_removexattr -- - audit_rules_dac_modification_lremovexattr -- - audit_rules_dac_modification_fremovexattr -- -- ### 4.1.10 Ensure unsuccessful unauthorized file access attempts are -- ### collected (Scored) -- - audit_rules_unsuccessful_file_modification_creat -- - audit_rules_unsuccessful_file_modification_open -- - audit_rules_unsuccessful_file_modification_openat -- - audit_rules_unsuccessful_file_modification_truncate -- - audit_rules_unsuccessful_file_modification_ftruncate -- # Opinionated selection -- - audit_rules_unsuccessful_file_modification_open_by_handle_at -- -- ### 4.1.11 Ensure events that modify user/group information are -- ### collected (Scored) -- - audit_rules_usergroup_modification_passwd -- - audit_rules_usergroup_modification_group -- - audit_rules_usergroup_modification_gshadow -- - audit_rules_usergroup_modification_shadow -- - audit_rules_usergroup_modification_opasswd -- -- ### 4.1.12 Ensure successful file system mounts are collected (Scored) -- - audit_rules_media_export -- -- ### 4.1.13 Ensure use of privileged commands is collected (Scored) -- - audit_rules_privileged_commands -- -- ### 4.1.14 Ensure file deletion events by users are collected -- ### (Scored) -- - audit_rules_file_deletion_events_unlink -- - audit_rules_file_deletion_events_unlinkat -- - audit_rules_file_deletion_events_rename -- - audit_rules_file_deletion_events_renameat -- # Opinionated selection -- - audit_rules_file_deletion_events_rmdir -- -- ### 4.1.15 Ensure kernel module loading and unloading is collected -- ### (Scored) -- - audit_rules_kernel_module_loading -- -- ### 4.1.16 Ensure system administrator actions (sudolog) are -- ### collected (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5516 -- -- ### 4.1.17 Ensure the audit configuration is immutable (Scored) -- - audit_rules_immutable -- -- ## 4.2 Configure Logging -- -- ### 4.2.1 Configure rsyslog -- -- #### 4.2.1.1 Ensure rsyslog is installed (Scored) -- - package_rsyslog_installed -- -- #### 4.2.1.2 Ensure rsyslog Service is enabled (Scored) -- - service_rsyslog_enabled -- -- #### 4.2.1.3 Ensure rsyslog default file permissions configured (Scored) -- - rsyslog_files_permissions -- -- #### 4.2.1.4 Ensure logging is configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5519 -- -- #### 4.2.1.5 Ensure rsyslog is configured to send logs to a remote -- #### log host (Scored) -- - rsyslog_remote_loghost -- -- #### 4.2.1.6 Ensure remote rsyslog messages are only accepted on -- #### designated log hosts (Not Scored) -- - rsyslog_nolisten -- -- ### 4.2.2 Configure journald -- -- #### 4.2.2.1 Ensure journald is configured to send logs to -- #### rsyslog (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5520 -- -- #### 4.2.2.2 Ensure journald is configured to compress large -- #### log files (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5521 -- -- -- #### 4.2.2.3 Ensure journald is configured to write logfiles to -- #### persistent disk (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5522 -- -- ### 4.2.3 Ensure permissions on all logfiles are configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5523 -- -- ## 4.3 Ensure logrotate is configured (Not Scored) -- -- # 5 Access, Authentication and Authorization -- -- ## 5.1 Configure cron -- -- ### 5.1.1 Ensure cron daemon is enabled (Scored) -- - service_crond_enabled -- -- -- ### 5.1.2 Ensure permissions on /etc/crontab are configured (Scored) -- # chown root:root /etc/crontab -- - file_owner_crontab -- - file_groupowner_crontab -- # chmod og-rwx /etc/crontab -- - file_permissions_crontab -- -- ### 5.1.3 Ensure permissions on /etc/cron.hourly are configured (Scored) -- # chown root:root /etc/cron.hourly -- - file_owner_cron_hourly -- - file_groupowner_cron_hourly -- # chmod og-rwx /etc/cron.hourly -- - file_permissions_cron_hourly -- -- ### 5.1.4 Ensure permissions on /etc/cron.daily are configured (Scored) -- # chown root:root /etc/cron.daily -- - file_owner_cron_daily -- - file_groupowner_cron_daily -- # chmod og-rwx /etc/cron.daily -- - file_permissions_cron_daily -- -- ### 5.1.5 Ensure permissions on /etc/cron.weekly are configured (Scored) -- # chown root:root /etc/cron.weekly -- - file_owner_cron_weekly -- - file_groupowner_cron_weekly -- # chmod og-rwx /etc/cron.weekly -- - file_permissions_cron_weekly -- -- ### 5.1.6 Ensure permissions on /etc/cron.monthly are configured (Scored) -- # chown root:root /etc/cron.monthly -- - file_owner_cron_monthly -- - file_groupowner_cron_monthly -- # chmod og-rwx /etc/cron.monthly -- - file_permissions_cron_monthly -- -- ### 5.1.7 Ensure permissions on /etc/cron.d are configured (Scored) -- # chown root:root /etc/cron.d -- - file_owner_cron_d -- - file_groupowner_cron_d -- # chmod og-rwx /etc/cron.d -- - file_permissions_cron_d -- -- ### 5.1.8 Ensure at/cron is restricted to authorized users (Scored) -- -- -- ## 5.2 SSH Server Configuration -- -- ### 5.2.1 Ensure permissions on /etc/ssh/sshd_config are configured (Scored) -- # chown root:root /etc/ssh/sshd_config -- - file_owner_sshd_config -- - file_groupowner_sshd_config -- -- # chmod og-rwx /etc/ssh/sshd_config -- - file_permissions_sshd_config -- -- ### 5.2.2 Ensure SSH access is limited (Scored) -- -- -- ### 5.2.3 Ensure permissions on SSH private host key files are -- ### configured (Scored) -- # TO DO: The rule sets to 640, but benchmark wants 600 -- - file_permissions_sshd_private_key -- # TO DO: check owner of private keys in /etc/ssh is root:root -- -- ### 5.2.4 Ensure permissions on SSH public host key files are configured -- ### (Scored) -- - file_permissions_sshd_pub_key -- # TO DO: check owner of pub keys in /etc/ssh is root:root -- -- ### 5.2.5 Ensure SSH LogLevel is appropriate (Scored) -- - sshd_set_loglevel_info -- -- ### 5.2.6 Ensure SSH X11 forward is disabled (Scored) -- - sshd_disable_x11_forwarding -- -- ### 5.2.7 Ensure SSH MaxAuthTries is set to 4 or less (Scored) -- - sshd_max_auth_tries_value=4 -- - sshd_set_max_auth_tries -- -- ### 5.2.8 Ensure SSH IgnoreRhosts is enabled (Scored) -- - sshd_disable_rhosts -- -- ### 5.2.9 Ensure SSH HostbasedAuthentication is disabled (Scored) -- - disable_host_auth -- -- ### 5.2.10 Ensure SSH root login is disabled (Scored) -- - sshd_disable_root_login -- -- ### 5.2.11 Ensure SSH PermitEmptyPasswords is disabled (Scored) -- - sshd_disable_empty_passwords -- -- ### 5.2.12 Ensure SSH PermitUserEnvironment is disabled (Scored) -- - sshd_do_not_permit_user_env -- -- ### 5.2.13 Ensure SSH Idle Timeout Interval is configured (Scored) -- # ClientAliveInterval 300 -- - sshd_idle_timeout_value=5_minutes -- - sshd_set_idle_timeout -- -- # ClientAliveCountMax 0 -- - var_sshd_set_keepalive=0 -- - sshd_set_keepalive_0 -- -- ### 5.2.14 Ensure SSH LoginGraceTime is set to one minute -- ### or less (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5525 -- -- ### 5.2.15 Ensure SSH warning banner is configured (Scored) -- - sshd_enable_warning_banner -- -- ### 5.2.16 Ensure SSH PAM is enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5526 -- -- ### 5.2.17 Ensure SSH AllowTcpForwarding is disabled (Scored) -- - sshd_disable_tcp_forwarding -- -- ### 5.2.18 Ensure SSH MaxStartups is configured (Scored) -- - sshd_set_maxstartups -- - var_sshd_set_maxstartups=10:30:60 -- -- ### 5.2.19 Ensure SSH MaxSessions is set to 4 or less (Scored) -- - sshd_set_max_sessions -- - var_sshd_max_sessions=4 -- -- ### 5.2.20 Ensure system-wide crypto policy is not over-ridden (Scored) -- - configure_ssh_crypto_policy -- -- ## 5.3 Configure authselect -- -- -- ### 5.3.1 Create custom authselectet profile (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5530 -- -- ### 5.3.2 Select authselect profile (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5531 -- -- ### 5.3.3 Ensure authselect includes with-faillock (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5532 -- -- ## 5.4 Configure PAM -- -- ### 5.4.1 Ensure password creation requirements are configured (Scored) -- # NEEDS RULE: try_first_pass - https://github.com/ComplianceAsCode/content/issues/5533 -- - accounts_password_pam_retry -- - var_password_pam_minlen=14 -- - accounts_password_pam_minlen -- - var_password_pam_minclass=4 -- - accounts_password_pam_minclass -- -- ### 5.4.2 Ensure lockout for failed password attempts is -- ### configured (Scored) -- - var_accounts_passwords_pam_faillock_unlock_time=900 -- - var_accounts_passwords_pam_faillock_deny=5 -- - accounts_passwords_pam_faillock_unlock_time -- - accounts_passwords_pam_faillock_deny -- -- ### 5.4.3 Ensure password reuse is limited (Scored) -- - var_password_pam_unix_remember=5 -- - accounts_password_pam_unix_remember -- -- ### 5.4.4 Ensure password hashing algorithm is SHA-512 (Scored) -- - set_password_hashing_algorithm_systemauth -- -- ## 5.5 User Accounts and Environment -- -- ### 5.5.1 Set Shadow Password Suite Parameters -- -- #### 5.5.1 Ensure password expiration is 365 days or less (Scored) -- - var_accounts_maximum_age_login_defs=365 -- - accounts_maximum_age_login_defs -- -- #### 5.5.1.2 Ensure minimum days between password changes is 7 -- #### or more (Scored) -- - var_accounts_minimum_age_login_defs=7 -- - accounts_minimum_age_login_defs -- -- #### 5.5.1.3 Ensure password expiration warning days is -- #### 7 or more (Scored) -- - var_accounts_password_warn_age_login_defs=7 -- - accounts_password_warn_age_login_defs -- -- #### 5.5.1.4 Ensure inactive password lock is 30 days or less (Scored) -- # TODO: Rule doesn't check list of users -- # https://github.com/ComplianceAsCode/content/issues/5536 -- - var_account_disable_post_pw_expiration=30 -- - account_disable_post_pw_expiration -- -- #### 5.5.1.5 Ensure all users last password change date is -- #### in the past (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5537 -- -- ### 5.5.2 Ensure system accounts are secured (Scored) -- - no_shelllogin_for_systemaccounts -- -- ### 5.5.3 Ensure default user shell timeout is 900 seconds -- ### or less (Scored) -- - var_accounts_tmout=15_min -- - accounts_tmout -- -- ### 5.5.4 Ensure default group for the root account is -- ### GID 0 (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5539 -- -- ### 5.5.5 Ensure default user mask is 027 or more restrictive (Scored) -- - var_accounts_user_umask=027 -- - accounts_umask_etc_bashrc -- - accounts_umask_etc_profile -- -- ## 5.6 Ensure root login is restricted to system console (Not Scored) -- - securetty_root_login_console_only -- - no_direct_root_logins -- -- ## 5.7 Ensure access to the su command is restricted (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5541 -- -- # System Maintenance -- -- ## 6.1 System File Permissions -- -- ### 6.1.1 Audit system file permissions (Not Scored) -- - rpm_verify_permissions -- - rpm_verify_ownership -- -- ### 6.1.2 Ensure permissions on /etc/passwd are configured (Scored) -- # chown root:root /etc/passwd -- - file_owner_etc_passwd -- - file_groupowner_etc_passwd -- -- # chmod 644 /etc/passwd -- - file_permissions_etc_passwd -- -- ### 6.1.3 Ensure permissions on /etc/shadow are configured (Scored) -- # chown root:root /etc/shadow -- - file_owner_etc_shadow -- - file_groupowner_etc_shadow -- -- # chmod o-rwx,g-wx /etc/shadow -- - file_permissions_etc_shadow -- -- ### 6.1.4 Ensure permissions on /etc/group are configured (Scored) -- # chown root:root /etc/group -- - file_owner_etc_group -- - file_groupowner_etc_group -- -- # chmod 644 /etc/group -- - file_permissions_etc_group -- -- ### 6.1.5 Ensure permissions on /etc/gshadow are configured (Scored) -- # chown root:root /etc/gshadow -- - file_owner_etc_gshadow -- - file_groupowner_etc_gshadow -- -- # chmod o-rwx,g-rw /etc/gshadow -- - file_permissions_etc_gshadow -- -- ### 6.1.6 Ensure permissions on /etc/passwd- are configured (Scored) -- # chown root:root /etc/passwd- -- - file_owner_backup_etc_passwd -- - file_groupowner_backup_etc_passwd -- -- # chmod 644 /etc/passwd- -- - file_permissions_backup_etc_passwd -- -- ### 6.1.7 Ensure permissions on /etc/shadow- are configured (Scored) -- # chown root:root /etc/shadow- -- - file_owner_backup_etc_shadow -- - file_groupowner_backup_etc_shadow -- -- # chmod 0000 /etc/shadow- -- - file_permissions_backup_etc_shadow -- -- ### 6.1.8 Ensure permissions on /etc/group- are configured (Scored) -- # chown root:root /etc/group- -- - file_owner_backup_etc_group -- - file_groupowner_backup_etc_group -- -- # chmod 644 /etc/group- -- - file_permissions_backup_etc_group -- -- ### 6.1.9 Ensure permissions on /etc/gshadow- are configured (Scored) -- # chown root:root /etc/gshadow- -- - file_owner_backup_etc_gshadow -- - file_groupowner_backup_etc_gshadow -- -- # chmod 0000 /etc/gshadow- -- - file_permissions_backup_etc_gshadow -- -- ### 6.1.10 Ensure no world writable files exist (Scored) -- - file_permissions_unauthorized_world_writable -- -- ### 6.1.11 Ensure no unowned files or directories exist (Scored) -- - no_files_unowned_by_user -- -- ### 6.1.12 Ensure no ungrouped files or directories exist (Scored) -- - file_permissions_ungroupowned -- -- ### 6.1.13 Audit SUID executables (Not Scored) -- - file_permissions_unauthorized_suid -- -- ### 6.1.14 Audit SGID executables (Not Scored) -- - file_permissions_unauthorized_sgid -- -- ## 6.2 User and Group Settings -- -- ### 6.2.2 Ensure no legacy "+" entries exist in /etc/passwd (Scored) -- - no_legacy_plus_entries_etc_passwd -- -- ### 6.2.4 Ensure no legacy "+" entries exist in /etc/shadow (Scored) -- - no_legacy_plus_entries_etc_shadow -- -- ### 6.2.5 Ensure no legacy "+" entries exist in /etc/group (Scored) -- - no_legacy_plus_entries_etc_group -- -- ### 6.2.6 Ensure root is the only UID 0 account (Scored) -- - accounts_no_uid_except_zero -- -- ### 6.2.7 Ensure users' home directories permissions are 750 -- ### or more restrictive (Scored) -- - file_permissions_home_dirs -- -- ### 6.2.8 Ensure users own their home directories (Scored) -- # NEEDS RULE for user owner @ https://github.com/ComplianceAsCode/content/issues/5507 -- - file_groupownership_home_directories -- -- ### 6.2.9 Ensure users' dot files are not group or world -- ### writable (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5506 -- -- ### 6.2.10 Ensure no users have .forward files (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5505 -- -- ### 6.2.11 Ensure no users have .netrc files (Scored) -- - no_netrc_files -- -- ### 6.2.12 Ensure users' .netrc Files are not group or -- ### world accessible (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5504 -- -- ### 6.2.13 Ensure no users have .rhosts files (Scored) -- - no_rsh_trust_files -- -- ### 6.2.14 Ensure all groups in /etc/passwd exist in -- ### /etc/group (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5503 -- -- ### 6.2.15 Ensure no duplicate UIDs exist (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5502 -- -- ### 6.2.16 Ensure no duplicate GIDs exist (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5501 -- -- ### 6.2.17 Ensure no duplicate user names exist (Scored) -- - account_unique_name -- -- ### 6.2.18 Ensure no duplicate group names exist (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5500 -- -- ### 6.2.19 Ensure shadow group is empty (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5499 -- -- ### 6.2.20 Ensure all users' home directories exist (Scored) -- - accounts_user_interactive_home_directory_exists -+ - cis_rhel8:all:l2_server -diff --git a/products/rhel8/profiles/cis_server_l1.profile b/products/rhel8/profiles/cis_server_l1.profile -new file mode 100644 -index 00000000000..7b4518e15a5 ---- /dev/null -+++ b/products/rhel8/profiles/cis_server_l1.profile -@@ -0,0 +1,22 @@ -+documentation_complete: true -+ -+metadata: -+ version: 1.0.1 -+ SMEs: -+ - vojtapolasek -+ - yuumasato -+ -+reference: https://www.cisecurity.org/benchmark/red_hat_linux/ -+ -+title: 'CIS Red Hat Enterprise Linux 8 Benchmark for Level 1 - Server' -+ -+description: |- -+ This profile defines a baseline that aligns to the "Level 1 - Server" -+ configuration from the Center for Internet Security® Red Hat Enterprise -+ Linux 8 Benchmark™, v1.0.1, released 2021-05-19. -+ -+ This profile includes Center for Internet Security® -+ Red Hat Enterprise Linux 8 CIS Benchmarks™ content. -+ -+selections: -+ - cis_rhel8:all:l1_server -diff --git a/products/rhel8/profiles/cis_workstation_l1.profile b/products/rhel8/profiles/cis_workstation_l1.profile -new file mode 100644 -index 00000000000..230e4c2f0ba ---- /dev/null -+++ b/products/rhel8/profiles/cis_workstation_l1.profile -@@ -0,0 +1,22 @@ -+documentation_complete: true -+ -+metadata: -+ version: 1.0.1 -+ SMEs: -+ - vojtapolasek -+ - yuumasato -+ -+reference: https://www.cisecurity.org/benchmark/red_hat_linux/ -+ -+title: 'CIS Red Hat Enterprise Linux 8 Benchmark for Level 1 - Workstation' -+ -+description: |- -+ This profile defines a baseline that aligns to the "Level 1 - Workstation" -+ configuration from the Center for Internet Security® Red Hat Enterprise -+ Linux 8 Benchmark™, v1.0.1, released 2021-05-19. -+ -+ This profile includes Center for Internet Security® -+ Red Hat Enterprise Linux 8 CIS Benchmarks™ content. -+ -+selections: -+ - cis_rhel8:all:l1_workstation -diff --git a/products/rhel8/profiles/cis_workstation_l2.profile b/products/rhel8/profiles/cis_workstation_l2.profile -new file mode 100644 -index 00000000000..c0d1698c2f0 ---- /dev/null -+++ b/products/rhel8/profiles/cis_workstation_l2.profile -@@ -0,0 +1,22 @@ -+documentation_complete: true -+ -+metadata: -+ version: 1.0.1 -+ SMEs: -+ - vojtapolasek -+ - yuumasato -+ -+reference: https://www.cisecurity.org/benchmark/red_hat_linux/ -+ -+title: 'CIS Red Hat Enterprise Linux 8 Benchmark for Level 2 - Workstation' -+ -+description: |- -+ This profile defines a baseline that aligns to the "Level 2 - Workstation" -+ configuration from the Center for Internet Security® Red Hat Enterprise -+ Linux 8 Benchmark™, v1.0.1, released 2021-05-19. -+ -+ This profile includes Center for Internet Security® -+ Red Hat Enterprise Linux 8 CIS Benchmarks™ content. -+ -+selections: -+ - cis_rhel8:all:l2_workstation - -From e53bf4c6b479608b155bcfcc8426ac20ca4c9291 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 1 Jul 2021 16:35:19 +0100 -Subject: [PATCH 02/55] Add CIS control file for RHEL 8 - ---- - controls/cis_rhel8.yml | 758 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 758 insertions(+) - create mode 100644 controls/cis_rhel8.yml - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -new file mode 100644 -index 00000000000..a84bb078e34 ---- /dev/null -+++ b/controls/cis_rhel8.yml -@@ -0,0 +1,758 @@ -+policy: 'CIS Benchmark for Red Hat Enterprise Linux 8' -+title: 'CIS Benchmark for Red Hat Enterprise Linux 8' -+id: cis_rhel8 -+version: '1.0.1' -+source: https://www.cisecurity.org/cis-benchmarks/#red_hat_linux -+levels: -+ - id: l1_server -+ - id: l2_server -+ inherits_from: -+ - l1_server -+ - id: l1_workstation -+ - id: l2_workstation -+ inherits_from: -+ - l1_workstation -+ -+controls: -+ - id: reload_dconf_db -+ title: Reload Dconf database -+ levels: -+ - l1_server -+ - l1_workstation -+ notes: <- -+ This is a helper rule to reload Dconf datbase correctly. -+ automated: yes -+ rules: -+ - dconf_db_up_to_date -+ -+ - id: 1.1.1.1 -+ title: Ensure mounting of cramfs filesystems is disabled (Automated) -+ levels: -+ - l1_workstation -+ - l1_server -+ automated: yes -+ rules: -+ - kernel_module_cramfs_disabled -+ -+ - id: 1.1.1.2 -+ title: Ensure mounting of vFAT filesystems is limited (Manual) -+ levels: -+ - l2_workstation -+ - l2_server -+ automated: no -+ related_rules: -+ - kernel_module_vfat_disabled -+ -+ - id: 1.1.1.3 -+ title: Ensure mounting of squashfs filesystems is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - kernel_module_squashfs_disabled -+ -+ - id: 1.1.1.4 -+ title: Ensure mounting of udf filesystems is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - kernel_module_udf_disabled -+ -+ - id: 1.1.2 -+ title: Ensure /tmp is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - partition_for_tmp -+ -+ - id: 1.1.3 -+ title: Ensure nodev option set on /tmp partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_tmp_nodev -+ -+ - id: 1.1.4 -+ title: Ensure nosuid option set on /tmp partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_tmp_nosuid -+ -+ - id: 1.1.5 -+ title: Ensure noexec option set on /tmp partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_tmp_noexec -+ -+ - id: 1.1.6 -+ title: Ensure separate partition exists for /var (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - partition_for_var -+ -+ - id: 1.1.7 -+ title: Ensure separate partition exists for /var/tmp (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - partition_for_var_tmp -+ -+ - id: 1.1.8 -+ title: Ensure nodev option set on /var/tmp partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_var_tmp_nodev -+ -+ - id: 1.1.9 -+ title: Ensure nosuid option set on /var/tmp partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_var_tmp_nosuid -+ -+ - id: 1.1.10 -+ title: Ensure noexec option set on /var/tmp partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_var_tmp_noexec -+ -+ - id: 1.1.11 -+ title: Ensure separate partition exists for /var/log (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - partition_for_var_log -+ -+ - id: 1.1.12 -+ title: Ensure separate partition exists for /var/log/audit (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - partition_for_var_log_audit -+ -+ - id: 1.1.13 -+ title: Ensure separate partition exists for /home (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - partition_for_home -+ -+ - id: 1.1.18 -+ title: Ensure nodev option set on /home partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_home_nodev -+ -+ - id: 1.1.15 -+ title: Ensure nodev option set on /dev/shm partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_dev_shm_nodev -+ -+ - id: 1.1.16 -+ title: Ensure nosuid option set on /dev/shm partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_dev_shm_nosuid -+ -+ - id: 1.1.17 -+ title: Ensure noexec option set on /dev/shm partition (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - mount_option_dev_shm_noexec -+ -+ - id: 1.1.18 -+ title: Ensure nodev option set on removable media partitions (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ rules: -+ - mount_option_nodev_removable_partitions -+ -+ - id: 1.1.19 -+ title: Ensure nosuid option set on removable media partitions (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ rules: -+ - mount_option_nosuid_removable_partitions -+ -+ - id: 1.1.20 -+ title: Ensure noexec option set on removable media partitions (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ rules: -+ - mount_option_noexec_removable_partitions -+ -+ - id: 1.1.22 -+ title: Disable Automounting (Automated) -+ levels: -+ - l1_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - service_autofs_disabled -+ -+ - id: 1.1.23 -+ title: Disable USB Storage (Automated) -+ levels: -+ - l1_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - kernel_module_usb-storage_disabled -+ -+ - id: 1.2.1 -+ title: Ensure Red Hat Subscription Manager connection is configured (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 1.2.2 -+ title: Disable the rhnsd Daemon (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ related_rules: -+ - service_rhnsd_disabled -+ -+ - id: 1.2.3 -+ title: Ensure GPG keys are configured (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ related_rules: -+ - ensure_redhat_gpgkey_installed -+ -+ - id: 1.2.4 -+ title: Ensure gpgcheck is globally activated (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - ensure_gpgcheck_globally_activated -+ -+ - id: 1.2.5 -+ title: Ensure package manager repositories are configured (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 1.3.1 -+ title: Ensure sudo is installed (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_sudo_installed -+ -+ - id: 1.3.2 -+ title: Ensure sudo commands use pty (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sudo_add_use_pty -+ -+ - id: 1.3.3 -+ title: Ensure sudo log file exists (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sudo_custom_logfile -+ -+ - id: 1.4.1 -+ title: Ensure AIDE is installed (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_aide_installed -+ -+ - id: 1.4.2 -+ title: Ensure filesystem integrity is regularly checked (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - aide_periodic_cron_checking -+ -+ - id: 1.5.1 -+ title: Ensure permissions on bootloader config are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_owner_grub2_cfg -+ - file_groupowner_grub2_cfg -+ - file_permissions_grub2_cfg -+ -+ - id: 1.5.1 -+ title: Ensure bootloader password is set (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - grub2_password -+ -+ - id: 1.5.3 -+ title: Ensure authentication required for single user mode (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - require_singleuser_auth -+ - require_emergency_target_auth -+ -+ - id: 1.6.1 -+ title: Ensure core dumps are restricted (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - disable_users_coredumps -+ - sysctl_fs_suid_dumpable -+ - coredump_disable_backtraces -+ - coredump_disable_storage -+ -+ - id: 1.6.2 -+ title: Ensure address space layout randomization (ASLR) is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_kernel_randomize_va_space -+ -+ - id: 1.7.1.1 -+ title: Ensure SELinux is installed (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - package_libselinux_installed -+ -+ - id: 1.7.1.1 -+ title: Ensure SELinux is installed (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - package_libselinux_installed -+ -+ - id: 1.7.1.2 -+ title: Ensure SELinux is not disabled in bootloader configuration (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - grub2_enable_selinux -+ -+ - id: 1.7.1.3 -+ title: Ensure SELinux policy is configured (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - var_selinux_policy_name=targeted -+ - selinux_policytype -+ -+ - id: 1.7.1.4 -+ title: Ensure the SELinux state is enforcing (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - var_selinux_state=enforcing -+ - selinux_state -+ -+ - id: 1.7.1.5 -+ title: Ensure no unconfined services exist (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - selinux_confinement_of_daemons -+ -+ - id: 1.7.1.6 -+ title: Ensure SETroubleshoot is not installed (Automated) -+ levels: -+ - l2_server -+ automated: yes -+ rules: -+ - package_setroubleshoot_removed -+ -+ - id: 1.7.1.7 -+ title: Ensure the MCS Translation Service (mcstrans) is not installed (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - package_mcstrans_removed -+ -+ - id: 1.8.1.1 -+ title: Ensure message of the day is configured properly (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - banner_etc_motd -+ -+ - id: 1.8.1.2 -+ title: Ensure local login warning banner is configured properly (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - banner_etc_issue -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5225 -+ - id: 1.8.1.3 -+ title: Ensure remote login warning banner is configured properly (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 1.8.1.4 -+ title: Ensure permissions on /etc/motd are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_permissions_etc_motd -+ -+ - id: 1.8.1.5 -+ title: Ensure permissions on /etc/issue are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_permissions_etc_issue -+ -+ - id: 1.8.2 -+ title: Ensure GDM login banner is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - dconf_gnome_banner_enabled -+ - dconf_gnome_login_banner_text -+ -+ - id: 1.9 -+ title: Ensure updates, patches, and additional security software are installed (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ related_rules: -+ - security_patches_up_to_date -+ -+ - id: 1.10 -+ title: Ensure system-wide crypto policy is not legacy (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - configure_crypto_policy -+ -+ # This rule works in conjunction with the configure_crypto_policy above. -+ # If a system is remediated to CIS Level 1, just the rule above will apply -+ # and will enforce the default value for var_system_crypto_policy (DEFAULT). -+ # If the system is remediated to Level 2 then this rule will be selected, -+ # and the value applied by the rule above will will be overridden to -+ # FUTURE through the var_system_crypto_policy variable. -+ - id: 1.11 -+ title: Ensure system-wide crypto policy is FUTURE or FIPS (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - var_system_crypto_policy=future -+ -+ - id: 2.1.1 -+ title: Ensure xinetd is not installed (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_xinetd_removed -+ -+ - id: 2.2.1.1 -+ title: Ensure time synchronization is in use (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ related_rules: -+ - package_chrony_installed -+ -+ - id: 2.1.1 -+ title: Ensure chrony is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_chronyd_enabled -+ - chronyd_specify_remote_server -+ - chronyd_run_as_chrony_user -+ -+ - id: 2.2.2 -+ title: Ensure chrony is configured (Automated) -+ levels: -+ - l1_server -+ automated: yes -+ rules: -+ - package_xorg-x11-server-common_removed -+ - xwindows_runlevel_target -+ -+ - id: 2.2.3 -+ title: Ensure rsync service is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_rsyncd_disabled -+ -+ - id: 2.2.4 -+ title: Ensure Avahi Server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_avahi-daemon_disabled -+ -+ - id: 2.2.5 -+ title: Ensure SNMP Server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_snmpd_disabled -+ -+ - id: 2.2.6 -+ title: Ensure HTTP Proxy Server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_squid_removed -+ -+ - id: 2.2.7 -+ title: Ensure Samba is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_smb_disabled -+ -+ - id: 2.2.8 -+ title: Ensure IMAP and POP3 server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_dovecot_disabled -+ -+ - id: 2.2.9 -+ title: Ensure HTTP server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_httpd_disabled -+ -+ - id: 2.2.10 -+ title: Ensure FTP Server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_vsftpd_disabled -+ -+ - id: 2.2.11 -+ title: Ensure DNS Server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_named_disabled -+ -+ - id: 2.2.12 -+ title: Ensure NFS is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_nfs_disabled -+ -+ - id: 2.2.13 -+ title: Ensure RPC is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_rpcbind_disabled -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5231 -+ - id: 2.2.14 -+ title: Ensure RPC is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 2.2.15 -+ title: Ensure DHCP Server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_dhcpd_disabled -+ -+ - id: 2.2.16 -+ title: Ensure CUPS is not enabled (Automated) -+ levels: -+ - l1_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - service_cups_disabled -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5232 -+ - id: 2.2.17 -+ title: Ensure NIS Server is not enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 2.2.18 -+ title: Ensure mail transfer agent is configured for local-only mode (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - postfix_network_listening_disabled -+ -+ - id: 2.3.1 -+ title: Ensure NIS Client is not installed (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_ypbind_removed -+ -+ - id: 2.3.2 -+ title: Ensure telnet client is not installed (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_telnet_removed -+ -+ - id: 2.3.3 -+ title: Ensure LDAP client is not installed (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_openldap-clients_removed - -From 7cb13c16162f057e8cf7d9f140c9b27abadce947 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 2 Jul 2021 20:47:49 +0100 -Subject: [PATCH 03/55] Add RHEL 8 Sections 3 & 4 to CIS control file - ---- - controls/cis_rhel8.yml | 728 ++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 726 insertions(+), 2 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index a84bb078e34..b63dc6cf9e1 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -712,8 +712,8 @@ controls: - rules: - - service_cups_disabled - -- # NEEDS RULE -- # https://github.com/ComplianceAsCode/content/issues/5232 -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5232 - - id: 2.2.17 - title: Ensure NIS Server is not enabled (Automated) - levels: -@@ -756,3 +756,727 @@ controls: - automated: yes - rules: - - package_openldap-clients_removed -+ -+ - id: 3.1.1 -+ title: Ensure IP forwarding is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_ip_forward -+ - sysctl_net_ipv6_conf_all_forwarding -+ -+ - id: 3.1.2 -+ title: Ensure packet redirect sending is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_conf_all_send_redirects -+ - sysctl_net_ipv4_conf_default_send_redirects -+ -+ - id: 3.2.1 -+ title: Ensure source routed packets are not accepted (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_conf_all_accept_source_route -+ - sysctl_net_ipv4_conf_default_accept_source_route -+ - sysctl_net_ipv6_conf_all_accept_source_route -+ - sysctl_net_ipv6_conf_default_accept_source_route -+ -+ - id: 3.2.2 -+ title: Ensure ICMP redirects are not accepted (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_conf_all_accept_redirects -+ - sysctl_net_ipv4_conf_default_accept_redirects -+ - sysctl_net_ipv6_conf_all_accept_redirects -+ - sysctl_net_ipv6_conf_default_accept_redirects -+ -+ - id: 3.2.3 -+ title: Ensure secure ICMP redirects are not accepted (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_conf_all_secure_redirects -+ - sysctl_net_ipv4_conf_default_secure_redirects -+ -+ - id: 3.2.4 -+ title: Ensure suspicious packets are logged (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_conf_all_log_martians -+ - sysctl_net_ipv4_conf_default_log_martians -+ -+ - id: 3.2.5 -+ title: Ensure broadcast ICMP requests are ignored (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_icmp_echo_ignore_broadcasts -+ -+ - id: 3.2.6 -+ title: Ensure bogus ICMP responses are ignored (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_icmp_ignore_bogus_error_responses -+ -+ - id: 3.2.7 -+ title: Ensure Reverse Path Filtering is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_conf_all_rp_filter -+ - sysctl_net_ipv4_conf_default_rp_filter -+ -+ - id: 3.2.8 -+ title: Ensure TCP SYN Cookies is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_tcp_syncookies -+ -+ - id: 3.2.8 -+ title: Ensure TCP SYN Cookies is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv4_tcp_syncookies -+ -+ - id: 3.2.9 -+ title: Ensure IPv6 router advertisements are not accepted (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sysctl_net_ipv6_conf_all_accept_ra -+ - sysctl_net_ipv6_conf_default_accept_ra -+ -+ - id: 3.3.1 -+ title: Ensure DCCP is disabled (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - kernel_module_dccp_disabled -+ -+ - id: 3.3.2 -+ title: Ensure SCTP is disabled (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - kernel_module_sctp_disabled -+ -+ - id: 3.3.3 -+ title: Ensure RDS is disabled (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - kernel_module_rds_disabled -+ -+ - id: 3.3.4 -+ title: Ensure TIPC is disabled (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - kernel_module_tipc_disabled -+ -+ # NEEDS RULE -+ # This rule is currently quite opinionated and expects firewalld -+ # as the installed firewall package. But, as per the CIS control, -+ # this rule should also be satisfied by nftables or iptables. -+ - id: 3.4.1.1 -+ title: Ensure a Firewall package is installed (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_firewalld_installed -+ -+ - id: 3.4.2.1 -+ title: Ensure firewalld service is enabled and running (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_firewalld_enabled -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5238 -+ - id: 3.4.2.2 -+ title: Ensure iptables service is not enabled with firewalld (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5239 -+ - id: 3.4.2.3 -+ title: Ensure nftables is not enabled with firewalld (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 3.4.2.4 -+ title: Ensure firewalld default zone is set (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - set_firewalld_default_zone -+ -+ - id: 3.4.2.5 -+ title: Ensure network interfaces are assigned to appropriate zone (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 3.4.2.6 -+ title: Ensure firewalld drops unnecessary services and ports (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 3.4.3.1 -+ title: Ensure iptables are flushed with nftables (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5244 -+ - id: 3.4.3.2 -+ title: Ensure an nftables table exists (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5245 -+ - id: 3.4.3.3 -+ title: Ensure nftables base chains exist (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5246 -+ - id: 3.4.3.4 -+ title: Ensure nftables loopback traffic is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 3.4.3.5 -+ title: Ensure nftables outbound and established connections are configured (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5248 -+ - id: 3.4.3.6 -+ title: Ensure nftables default deny firewall policy (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5249 -+ - id: 3.4.3.7 -+ title: Ensure nftables service is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5250 -+ - id: 3.4.3.8 -+ title: Ensure nftables rules are permanent (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5252 -+ - id: 3.4.4.1.1 -+ title: Ensure iptables default deny firewall policy (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5253 -+ - id: 3.4.4.1.2 -+ title: Ensure iptables loopback traffic is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 3.4.4.1.3 -+ title: Ensure iptables outbound and established connections are configured (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5255 -+ - id: 3.4.4.1.4 -+ title: Ensure iptables firewall rules exist for all open ports (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7190 -+ - id: 3.4.4.1.5 -+ title: Ensure iptables is enabled and active (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5257 -+ - id: 3.4.4.2.1 -+ title: Ensure ip6tables default deny firewall policy (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5258 -+ - id: 3.4.4.2.2 -+ title: Ensure ip6tables loopback traffic is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 3.4.4.2.3 -+ title: Ensure ip6tables outbound and established connections are configured (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7191 -+ - id: 3.4.4.2.4 -+ title: Ensure ip6tables firewall rules exist for all open ports (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7192 -+ - id: 3.4.4.2.5 -+ title: Ensure ip6tables is enabled and active (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 3.5 -+ title: Ensure wireless interfaces are disabled (Automated) -+ levels: -+ - l1_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - wireless_disable_interfaces -+ -+ - id: 3.6 -+ title: Disable IPv6 (Manual) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - kernel_module_ipv6_option_disabled -+ -+ - id: 4.1.1.1 -+ title: Ensure auditd is installed (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - package_audit_installed -+ -+ - id: 4.1.1.2 -+ title: Ensure auditd service is enabled (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - service_auditd_enabled -+ -+ - id: 4.1.1.3 -+ title: Ensure auditing for processes that start prior to auditd is enabled (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - grub2_audit_argument -+ -+ - id: 4.1.1.4 -+ title: Ensure audit_backlog_limit is sufficient (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - grub2_audit_backlog_limit_argument -+ -+ - id: 4.1.2.1 -+ title: Ensure audit log storage size is configured (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - auditd_data_retention_max_log_file -+ -+ - id: 4.1.2.2 -+ title: Ensure audit logs are not automatically deleted (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - auditd_data_retention_max_log_file_action -+ -+ - id: 4.1.2.3 -+ title: Ensure system is disabled when audit logs are full (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - auditd_data_retention_action_mail_acct -+ - auditd_data_retention_admin_space_left_action -+ - auditd_data_retention_space_left_action -+ - var_auditd_action_mail_acct=root -+ - var_auditd_admin_space_left_action=halt -+ - var_auditd_space_left_action=email -+ -+ - id: 4.1.3 -+ title: Ensure changes to system administration scope (sudoers) is collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_sysadmin_actions -+ -+ - id: 4.1.4 -+ title: Ensure login and logout events are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_login_events_faillock -+ - audit_rules_login_events_lastlog -+ -+ - id: 4.1.5 -+ title: Ensure session initiation information is collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_session_events -+ -+ - id: 4.1.6 -+ title: Ensure events that modify date and time information are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_time_adjtimex -+ - audit_rules_time_clock_settime -+ - audit_rules_time_settimeofday -+ - audit_rules_time_stime -+ - audit_rules_time_watch_localtime -+ -+ # NEEDS RULE -+ # -w /usr/share/selinux/ -p wa -+ # https://github.com/ComplianceAsCode/content/issues/5264 -+ - id: 4.1.7 -+ title: Ensure events that modify the system's Mandatory Access Controls are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_mac_modification -+ -+ - id: 4.1.8 -+ title: Ensure events that modify the system's network environment are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_networkconfig_modification -+ -+ - id: 4.1.9 -+ title: Ensure discretionary access control permission modification events are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_dac_modification_chmod -+ - audit_rules_dac_modification_chown -+ - audit_rules_dac_modification_fchmod -+ - audit_rules_dac_modification_fchmodat -+ - audit_rules_dac_modification_fchown -+ - audit_rules_dac_modification_fchownat -+ - audit_rules_dac_modification_fremovexattr -+ - audit_rules_dac_modification_fsetxattr -+ - audit_rules_dac_modification_lchown -+ - audit_rules_dac_modification_lremovexattr -+ - audit_rules_dac_modification_lsetxattr -+ - audit_rules_dac_modification_removexattr -+ - audit_rules_dac_modification_setxattr -+ -+ - id: 4.1.10 -+ title: Ensure unsuccessful unauthorized file access attempts are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_unsuccessful_file_modification_creat -+ - audit_rules_unsuccessful_file_modification_ftruncate -+ - audit_rules_unsuccessful_file_modification_open -+ - audit_rules_unsuccessful_file_modification_openat -+ - audit_rules_unsuccessful_file_modification_truncate -+ # Opinionated selection -+ - audit_rules_unsuccessful_file_modification_open_by_handle_at -+ -+ - id: 4.1.11 -+ title: Ensure events that modify user/group information are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_usergroup_modification_group -+ - audit_rules_usergroup_modification_gshadow -+ - audit_rules_usergroup_modification_opasswd -+ - audit_rules_usergroup_modification_passwd -+ - audit_rules_usergroup_modification_shadow -+ -+ - id: 4.1.12 -+ title: Ensure successful file system mounts are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_media_export -+ -+ - id: 4.1.13 -+ title: Ensure use of privileged commands is collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_privileged_commands -+ -+ - id: 4.1.14 -+ title: Ensure file deletion events by users are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_file_deletion_events_rename -+ - audit_rules_file_deletion_events_renameat -+ - audit_rules_file_deletion_events_unlink -+ - audit_rules_file_deletion_events_unlinkat -+ # Opinionated selection -+ - audit_rules_file_deletion_events_rmdir -+ -+ - id: 4.1.15 -+ title: Ensure kernel module loading and unloading is collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_kernel_module_loading -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5516 -+ - id: 4.1.16 -+ title: Ensure system administrator actions (sudolog) are collected (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: no -+ -+ - id: 4.1.17 -+ title: Ensure the audit configuration is immutable (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - audit_rules_immutable -+ -+ - id: 4.2.1.1 -+ title: Ensure rsyslog is installed (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - package_rsyslog_installed -+ -+ - id: 4.2.1.2 -+ title: Ensure rsyslog Service is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_rsyslog_enabled -+ -+ - id: 4.2.1.3 -+ title: Ensure rsyslog default file permissions configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - rsyslog_files_permissions -+ -+ - id: 4.2.1.4 -+ title: Ensure logging is configured (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 4.2.1.5 -+ title: Ensure rsyslog is configured to send logs to a remote log host (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - rsyslog_remote_loghost -+ -+ - id: 4.2.1.6 -+ title: Ensure remote rsyslog messages are only accepted on designated log hosts. (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ related_rules: -+ - rsyslog_nolisten -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5520 -+ - id: 4.2.2.1 -+ title: Ensure journald is configured to send logs to rsyslog (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5521 -+ - id: 4.2.2.2 -+ title: Ensure journald is configured to compress large log files (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5522 -+ - id: 4.2.2.3 -+ title: Ensure journald is configured to write logfiles to persistent disk (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5523 -+ - id: 4.2.3 -+ title: Ensure permissions on all logfiles are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 4.3 -+ title: Ensure logrotate is configured (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no - -From e10bc6354fdbc73b0270e52673e0b688d21386a8 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Sat, 3 Jul 2021 12:08:31 +0100 -Subject: [PATCH 04/55] Add RHEL 8 Section 5 to CIS control file - ---- - controls/cis_rhel8.yml | 460 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 460 insertions(+) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index b63dc6cf9e1..85c821bc60d 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1480,3 +1480,463 @@ controls: - - l1_server - - l1_workstation - automated: no -+ -+ - id: 5.1.1 -+ title: Ensure cron daemon is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - service_crond_enabled -+ -+ - id: 5.1.2 -+ title: Ensure permissions on /etc/crontab are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_crontab -+ - file_owner_crontab -+ - file_permissions_crontab -+ -+ - id: 5.1.3 -+ title: Ensure permissions on /etc/cron.hourly are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_cron_hourly -+ - file_owner_cron_hourly -+ - file_permissions_cron_hourly -+ -+ - id: 5.1.4 -+ title: Ensure permissions on /etc/cron.daily are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_cron_daily -+ - file_owner_cron_daily -+ - file_permissions_cron_daily -+ -+ - id: 5.1.5 -+ title: Ensure permissions on /etc/cron.weekly are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_cron_weekly -+ - file_owner_cron_weekly -+ - file_permissions_cron_weekly -+ -+ - id: 5.1.6 -+ title: Ensure permissions on /etc/cron.monthly are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_cron_monthly -+ - file_owner_cron_monthly -+ - file_permissions_cron_monthly -+ -+ - id: 5.1.7 -+ title: Ensure permissions on /etc/cron.d are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_cron_d -+ - file_owner_cron_d -+ - file_permissions_cron_d -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7195 -+ - id: 5.1.8 -+ title: Ensure at/cron is restricted to authorized users (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 5.2.1 -+ title: Ensure permissions on /etc/ssh/sshd_config are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_sshd_config -+ - file_owner_sshd_config -+ - file_permissions_sshd_config -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7196 -+ - id: 5.2.2 -+ title: Ensure SSH access is limited (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # TODO -+ # Rule sets permissions to 0640 but benchmark wants it to be 0600 -+ # -+ # TODO -+ # Check owner of private keys in /etc/ssh is root:root -+ - id: 5.2.3 -+ title: Ensure permissions on SSH private host key files are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_permissions_sshd_private_key -+ -+ # TODO -+ # Check owner of public keys in /etc/ssh is root:root -+ - id: 5.2.4 -+ title: Ensure permissions on SSH public host key files are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_permissions_sshd_pub_key -+ -+ - id: 5.2.5 -+ title: Ensure SSH LogLevel is appropriate (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_set_loglevel_info -+ -+ - id: 5.2.6 -+ title: Ensure SSH X11 forwarding is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_disable_x11_forwarding -+ -+ - id: 5.2.7 -+ title: Ensure SSH MaxAuthTries is set to 4 or less (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_max_auth_tries_value=4 -+ - sshd_set_max_auth_tries -+ -+ - id: 5.2.8 -+ title: Ensure SSH IgnoreRhosts is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_disable_rhosts -+ -+ - id: 5.2.9 -+ title: Ensure SSH HostbasedAuthentication is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - disable_host_auth -+ -+ - id: 5.2.10 -+ title: Ensure SSH root login is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_disable_root_login -+ -+ - id: 5.2.11 -+ title: Ensure SSH PermitEmptyPasswords is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_disable_empty_passwords -+ -+ - id: 5.2.12 -+ title: Ensure SSH PermitUserEnvironment is disabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_do_not_permit_user_env -+ -+ - id: 5.2.13 -+ title: Ensure SSH Idle Timeout Interval is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_idle_timeout_value=5_minutes -+ - sshd_set_idle_timeout -+ - sshd_set_keepalive_0 -+ - var_sshd_set_keepalive=0 -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5525 -+ - id: 5.2.14 -+ title: Ensure SSH LoginGraceTime is set to one minute or less (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 5.2.15 -+ title: Ensure SSH warning banner is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_enable_warning_banner -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5526 -+ - id: 5.2.16 -+ title: Ensure SSH PAM is enabled (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 5.2.17 -+ title: Ensure SSH AllowTcpForwarding is disabled (Automated) -+ levels: -+ - l2_server -+ - l2_workstation -+ automated: yes -+ rules: -+ - sshd_disable_tcp_forwarding -+ -+ - id: 5.2.18 -+ title: Ensure SSH MaxStartups is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_set_maxstartups -+ -+ - id: 5.2.19 -+ title: Ensure SSH MaxSessions is set to 4 or less (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - sshd_set_max_sessions -+ - var_sshd_max_sessions=4 -+ -+ - id: 5.2.20 -+ title: Ensure system-wide crypto policy is not over-ridden (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - configure_ssh_crypto_policy -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5530 -+ - id: 5.3.1 -+ title: Create custom authselect profile (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5531 -+ - id: 5.3.2 -+ title: Select authselect profile (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5532 -+ - id: 5.3.2 -+ title: Ensure authselect includes with-faillock (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE: try_first_pass -+ # https://github.com/ComplianceAsCode/content/issues/5533 -+ - id: 5.4.1 -+ title: Ensure password creation requirements are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_password_pam_minclass -+ - accounts_password_pam_minlen -+ - accounts_password_pam_retry -+ - var_password_pam_minclass=4 -+ - var_password_pam_minlen=14 -+ -+ - id: 5.4.2 -+ title: Ensure lockout for failed password attempts is configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_passwords_pam_faillock_deny -+ - accounts_passwords_pam_faillock_unlock_time -+ - var_accounts_passwords_pam_faillock_deny=5 -+ - var_accounts_passwords_pam_faillock_unlock_time=900 -+ -+ - id: 5.4.3 -+ title: Ensure password reuse is limited (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_password_pam_unix_remember -+ - var_password_pam_unix_remember=5 -+ -+ - id: 5.4.4 -+ title: Ensure password hashing algorithm is SHA-512 (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - set_password_hashing_algorithm_systemauth -+ -+ - id: 5.5.1.1 -+ title: Ensure password expiration is 365 days or less (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_maximum_age_login_defs -+ - var_accounts_maximum_age_login_defs=365 -+ -+ - id: 5.5.1.2 -+ title: Ensure minimum days between password changes is 7 or more (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_minimum_age_login_defs -+ - var_accounts_minimum_age_login_defs=7 -+ -+ - id: 5.5.1.3 -+ title: Ensure password expiration warning days is 7 or more (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_password_warn_age_login_defs -+ - var_accounts_password_warn_age_login_defs=7 -+ -+ # TODO -+ # Rule doesn't check list of users -+ - id: 5.5.1.4 -+ title: Ensure inactive password lock is 30 days or less (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - account_disable_post_pw_expiration -+ - var_account_disable_post_pw_expiration=30 -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5537 -+ - id: 5.5.1.5 -+ title: Ensure all users last password change date is in the past (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 5.5.2 -+ title: Ensure system accounts are secured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - no_shelllogin_for_systemaccounts -+ -+ - id: 5.5.3 -+ title: Ensure default user shell timeout is 900 seconds or less (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_tmout -+ - var_accounts_tmout=15_min -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5539 -+ - id: 5.5.4 -+ title: Ensure default group for the root account is GID 0 (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 5.5.5 -+ title: Ensure default user umask is 027 or more restrictive (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_umask_etc_bashrc -+ - accounts_umask_etc_profile -+ - var_accounts_user_umask=027 -+ -+ - id: 5.6 -+ title: Ensure root login is restricted to system console (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ related_rules: -+ - no_direct_root_logins -+ - securetty_root_login_console_only -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5541 -+ - id: 5.7 -+ title: Ensure access to the su command is restricted (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no - -From 9aa351c0c0104ec07ee9f23ceb072233992b1a5a Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Sat, 3 Jul 2021 12:33:15 +0100 -Subject: [PATCH 05/55] Add RHEL 8 Section 6 to CIS control file - ---- - controls/cis_rhel8.yml | 325 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 325 insertions(+) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 85c821bc60d..bc77e25d122 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1940,3 +1940,328 @@ controls: - - l1_server - - l1_workstation - automated: no -+ -+ - id: 6.1.1 -+ title: Audit system file permissions (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ related_rules: -+ - rpm_verify_permissions -+ - rpm_verify_ownership -+ -+ - id: 6.1.2 -+ title: Ensure permissions on /etc/passwd are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_etc_passwd -+ - file_owner_etc_passwd -+ - file_permissions_etc_passwd -+ -+ - id: 6.1.3 -+ title: Ensure permissions on /etc/passwd- are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_backup_etc_passwd -+ - file_owner_backup_etc_passwd -+ - file_permissions_backup_etc_passwd -+ -+ - id: 6.1.4 -+ title: Ensure permissions on /etc/shadow are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_owner_etc_shadow -+ - file_groupowner_etc_shadow -+ - file_permissions_etc_shadow -+ -+ - id: 6.1.5 -+ title: Ensure permissions on /etc/shadow- are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_backup_etc_shadow -+ - file_owner_backup_etc_shadow -+ - file_permissions_backup_etc_shadow -+ -+ - id: 6.1.6 -+ title: Ensure permissions on /etc/gshadow are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_etc_gshadow -+ - file_owner_etc_gshadow -+ - file_permissions_etc_gshadow -+ -+ - id: 6.1.7 -+ title: Ensure permissions on /etc/gshadow- are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_backup_etc_gshadow -+ - file_owner_backup_etc_gshadow -+ - file_permissions_backup_etc_gshadow -+ -+ - id: 6.1.8 -+ title: Ensure permissions on /etc/group are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_etc_group -+ - file_owner_etc_group -+ - file_permissions_etc_group -+ -+ - id: 6.1.9 -+ title: Ensure permissions on /etc/group- are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupowner_backup_etc_group -+ - file_owner_backup_etc_group -+ - file_permissions_backup_etc_group -+ -+ - id: 6.1.10 -+ title: Ensure no world writable files exist (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_permissions_unauthorized_world_writable -+ -+ - id: 6.1.11 -+ title: Ensure no unowned files or directories exist (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - no_files_unowned_by_user -+ -+ - id: 6.1.12 -+ title: Ensure no ungrouped files or directories exist (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_permissions_ungroupowned -+ -+ - id: 6.1.13 -+ title: Audit SUID executables (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ rules: -+ - file_permissions_unauthorized_suid -+ -+ - id: 6.1.14 -+ title: Audit SGID executables (Manual) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ rules: -+ - file_permissions_unauthorized_sgid -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7197 -+ - id: 6.2.1 -+ title: Ensure password fields are not empty (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 6.2.2 -+ title: Ensure no legacy "+" entries exist in /etc/passwd (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - no_legacy_plus_entries_etc_passwd -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7198 -+ - id: 6.2.3 -+ title: Ensure root PATH Integrity (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 6.2.4 -+ title: Ensure no legacy "+" entries exist in /etc/shadow (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - no_legacy_plus_entries_etc_shadow -+ -+ - id: 6.2.5 -+ title: Ensure no legacy "+" entries exist in /etc/group (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - no_legacy_plus_entries_etc_group -+ -+ - id: 6.2.6 -+ title: Ensure root is the only UID 0 account (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_no_uid_except_zero -+ -+ - id: 6.2.7 -+ title: Ensure users' home directories permissions are 750 or more restrictive (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_permissions_home_dirs -+ -+ # NEEDS RULE (for user ownership) -+ # https://github.com/ComplianceAsCode/content/issues/5507 -+ - id: 6.2.8 -+ title: Ensure users own their home directories (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - file_groupownership_home_directories -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5506 -+ - id: 6.2.9 -+ title: Ensure users' dot files are not group or world writable (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5505 -+ - id: 6.2.10 -+ title: Ensure no users have .forward files (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 6.2.11 -+ title: Ensure no users have .netrc files (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - no_netrc_files -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5504 -+ - id: 6.2.12 -+ title: Ensure users' .netrc Files are not group or world accessible (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 6.2.13 -+ title: Ensure no users have .rhosts files (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - no_rsh_trust_files -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5503 -+ - id: 6.2.14 -+ title: Ensure all groups in /etc/passwd exist in /etc/group (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5502 -+ - id: 6.2.15 -+ title: Ensure no duplicate UIDs exist (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5501 -+ - id: 6.2.16 -+ title: Ensure no duplicate GIDs exist (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 6.2.17 -+ title: Ensure no duplicate user names exist (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - account_unique_name -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5500 -+ - id: 6.2.18 -+ title: Ensure no duplicate group names exist (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/5499 -+ - id: 6.2.19 -+ title: Ensure shadow group is empty (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ -+ - id: 6.2.20 -+ title: Ensure shadow group is empty (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - accounts_user_interactive_home_directory_exists - -From 9328919d45d46d2402e6a6cfb8bf726c8d24b7ec Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Sat, 3 Jul 2021 12:36:01 +0100 -Subject: [PATCH 06/55] Tweak RHEL8 CIS control file to satisfy yamllint - ---- - controls/cis_rhel8.yml | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index bc77e25d122..161a2aac58e 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1,3 +1,4 @@ -+--- - policy: 'CIS Benchmark for Red Hat Enterprise Linux 8' - title: 'CIS Benchmark for Red Hat Enterprise Linux 8' - id: cis_rhel8 -@@ -1597,7 +1598,7 @@ controls: - - l1_workstation - automated: yes - rules: -- - file_permissions_sshd_private_key -+ - file_permissions_sshd_private_key - - # TODO - # Check owner of public keys in /etc/ssh is root:root -@@ -1608,7 +1609,7 @@ controls: - - l1_workstation - automated: yes - rules: -- - file_permissions_sshd_pub_key -+ - file_permissions_sshd_pub_key - - - id: 5.2.5 - title: Ensure SSH LogLevel is appropriate (Automated) -@@ -1617,7 +1618,7 @@ controls: - - l1_workstation - automated: yes - rules: -- - sshd_set_loglevel_info -+ - sshd_set_loglevel_info - - - id: 5.2.6 - title: Ensure SSH X11 forwarding is disabled (Automated) -@@ -1626,7 +1627,7 @@ controls: - - l1_workstation - automated: yes - rules: -- - sshd_disable_x11_forwarding -+ - sshd_disable_x11_forwarding - - - id: 5.2.7 - title: Ensure SSH MaxAuthTries is set to 4 or less (Automated) - -From 035dd0b7d79159f1c67ef53baf5a5d284ab79aed Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 9 Jul 2021 00:11:57 +0100 -Subject: [PATCH 07/55] Updates to address comments on RHEL 8 CIS PR - ---- - controls/cis_rhel8.yml | 45 +++++++++++++++++++++++++++++------------- - 1 file changed, 31 insertions(+), 14 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 161a2aac58e..c93d6128ca4 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -170,7 +170,7 @@ controls: - rules: - - partition_for_home - -- - id: 1.1.18 -+ - id: 1.1.14 - title: Ensure nodev option set on /home partition (Automated) - levels: - - l1_server -@@ -212,7 +212,7 @@ controls: - - l1_server - - l1_workstation - automated: no -- rules: -+ related_rules: - - mount_option_nodev_removable_partitions - - - id: 1.1.19 -@@ -221,7 +221,7 @@ controls: - - l1_server - - l1_workstation - automated: no -- rules: -+ related_rules: - - mount_option_nosuid_removable_partitions - - - id: 1.1.20 -@@ -230,9 +230,18 @@ controls: - - l1_server - - l1_workstation - automated: no -- rules: -+ related_rules: - - mount_option_noexec_removable_partitions - -+ - id: 1.1.21 -+ title: Ensure sticky bit is set on all world-writable directories (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: yes -+ rules: -+ - dir_perms_world_writable_sticky_bits -+ - - id: 1.1.22 - title: Disable Automounting (Automated) - levels: -@@ -348,7 +357,7 @@ controls: - - file_groupowner_grub2_cfg - - file_permissions_grub2_cfg - -- - id: 1.5.1 -+ - id: 1.5.2 - title: Ensure bootloader password is set (Automated) - levels: - - l1_server -@@ -356,6 +365,7 @@ controls: - automated: yes - rules: - - grub2_password -+ - grub2_uefi_password - - - id: 1.5.3 - title: Ensure authentication required for single user mode (Automated) -@@ -397,15 +407,6 @@ controls: - rules: - - package_libselinux_installed - -- - id: 1.7.1.1 -- title: Ensure SELinux is installed (Automated) -- levels: -- - l2_server -- - l2_workstation -- automated: yes -- rules: -- - package_libselinux_installed -- - - id: 1.7.1.2 - title: Ensure SELinux is not disabled in bootloader configuration (Automated) - levels: -@@ -469,6 +470,7 @@ controls: - automated: yes - rules: - - banner_etc_motd -+ - login_banner_text=usgcb_default - - - id: 1.8.1.2 - title: Ensure local login warning banner is configured properly (Automated) -@@ -478,6 +480,7 @@ controls: - automated: yes - rules: - - banner_etc_issue -+ - login_banner_text=usgcb_default - - # NEEDS RULE - # https://github.com/ComplianceAsCode/content/issues/5225 -@@ -495,6 +498,8 @@ controls: - - l1_workstation - automated: yes - rules: -+ - file_groupowner_etc_motd -+ - file_owner_etc_motd - - file_permissions_etc_motd - - - id: 1.8.1.5 -@@ -504,8 +509,19 @@ controls: - - l1_workstation - automated: yes - rules: -+ - file_groupowner_etc_issue -+ - file_owner_etc_issue - - file_permissions_etc_issue - -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7225 -+ - id: 1.8.1.6 -+ title: Ensure permissions on /etc/issue.net are configured (Automated) -+ levels: -+ - l1_server -+ - l1_workstation -+ automated: no -+ - - id: 1.8.2 - title: Ensure GDM login banner is configured (Automated) - levels: -@@ -515,6 +531,7 @@ controls: - rules: - - dconf_gnome_banner_enabled - - dconf_gnome_login_banner_text -+ - login_banner_text=usgcb_default - - - id: 1.9 - title: Ensure updates, patches, and additional security software are installed (Manual) - -From 0d2d6a378e8ce767959ffbe8b1c41c9e5ca22d01 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 16 Jul 2021 14:21:02 +0100 -Subject: [PATCH 08/55] Allow DEFAULT crypto policy for RHEL 8 CIS (conditional - on merge of #7226) - ---- - controls/cis_rhel8.yml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index c93d6128ca4..9140711fb66 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -550,6 +550,7 @@ controls: - automated: yes - rules: - - configure_crypto_policy -+ - var_system_crypto_policy=default - - # This rule works in conjunction with the configure_crypto_policy above. - # If a system is remediated to CIS Level 1, just the rule above will apply - -From 85befb58973da869943ad45b80b495c0061df01b Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 16 Jul 2021 14:34:41 +0100 -Subject: [PATCH 09/55] Update RHEL 8 CIS Section 2 rules - ---- - controls/cis_rhel8.yml | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 9140711fb66..782dc7666f3 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -585,7 +585,7 @@ controls: - related_rules: - - package_chrony_installed - -- - id: 2.1.1 -+ - id: 2.2.1.2 - title: Ensure chrony is configured (Automated) - levels: - - l1_server -@@ -597,13 +597,12 @@ controls: - - chronyd_run_as_chrony_user - - - id: 2.2.2 -- title: Ensure chrony is configured (Automated) -+ title: Ensure X Window System is not installed (Automated) - levels: - - l1_server - automated: yes - rules: -- - package_xorg-x11-server-common_removed -- - xwindows_runlevel_target -+ - xwindows_remove_packages - - - id: 2.2.3 - title: Ensure rsync service is not enabled (Automated) -@@ -639,7 +638,7 @@ controls: - - l1_workstation - automated: yes - rules: -- - package_squid_removed -+ - package_squid_disabled - - - id: 2.2.7 - title: Ensure Samba is not enabled (Automated) -@@ -707,7 +706,7 @@ controls: - # NEEDS RULE - # https://github.com/ComplianceAsCode/content/issues/5231 - - id: 2.2.14 -- title: Ensure RPC is not enabled (Automated) -+ title: Ensure LDAP server is not enabled (Automated) - levels: - - l1_server - - l1_workstation -@@ -748,6 +747,7 @@ controls: - automated: yes - rules: - - postfix_network_listening_disabled -+ - var_postfix_inet_interfaces=loopback-only - - - id: 2.3.1 - title: Ensure NIS Client is not installed (Automated) - -From fc72716acbbb503abb094a36f0cb17ab3ee58de3 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 16 Jul 2021 15:03:09 +0100 -Subject: [PATCH 10/55] Update RHEL 8 CIS Section 3 rules - ---- - controls/cis_rhel8.yml | 29 ++++++++++++++++++++--------- - 1 file changed, 20 insertions(+), 9 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 782dc7666f3..1d34337411f 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -785,6 +785,7 @@ controls: - rules: - - sysctl_net_ipv4_ip_forward - - sysctl_net_ipv6_conf_all_forwarding -+ - sysctl_net_ipv6_conf_all_forwarding_value=disabled - - - id: 3.1.2 - title: Ensure packet redirect sending is disabled (Automated) -@@ -804,9 +805,13 @@ controls: - automated: yes - rules: - - sysctl_net_ipv4_conf_all_accept_source_route -+ - sysctl_net_ipv4_conf_all_accept_source_route_value=disabled - - sysctl_net_ipv4_conf_default_accept_source_route -+ - sysctl_net_ipv4_conf_default_accept_source_route_value=disabled - - sysctl_net_ipv6_conf_all_accept_source_route -+ - sysctl_net_ipv6_conf_all_accept_source_route_value=disabled - - sysctl_net_ipv6_conf_default_accept_source_route -+ - sysctl_net_ipv6_conf_default_accept_source_route_value=disabled - - - id: 3.2.2 - title: Ensure ICMP redirects are not accepted (Automated) -@@ -816,9 +821,13 @@ controls: - automated: yes - rules: - - sysctl_net_ipv4_conf_all_accept_redirects -+ - sysctl_net_ipv4_conf_all_accept_redirects_value=disabled - - sysctl_net_ipv4_conf_default_accept_redirects -+ - sysctl_net_ipv4_conf_default_accept_redirects_value=disabled - - sysctl_net_ipv6_conf_all_accept_redirects -+ - sysctl_net_ipv6_conf_all_accept_redirects_value=disabled - - sysctl_net_ipv6_conf_default_accept_redirects -+ - sysctl_net_ipv6_conf_default_accept_redirects_value=disabled - - - id: 3.2.3 - title: Ensure secure ICMP redirects are not accepted (Automated) -@@ -828,7 +837,9 @@ controls: - automated: yes - rules: - - sysctl_net_ipv4_conf_all_secure_redirects -+ - sysctl_net_ipv4_conf_all_secure_redirects_value=disabled - - sysctl_net_ipv4_conf_default_secure_redirects -+ - sysctl_net_ipv4_conf_default_secure_redirects_value=disabled - - - id: 3.2.4 - title: Ensure suspicious packets are logged (Automated) -@@ -838,7 +849,9 @@ controls: - automated: yes - rules: - - sysctl_net_ipv4_conf_all_log_martians -+ - sysctl_net_ipv4_conf_all_log_martians_value=enabled - - sysctl_net_ipv4_conf_default_log_martians -+ - sysctl_net_ipv4_conf_default_log_martians_value=enabled - - - id: 3.2.5 - title: Ensure broadcast ICMP requests are ignored (Automated) -@@ -848,6 +861,7 @@ controls: - automated: yes - rules: - - sysctl_net_ipv4_icmp_echo_ignore_broadcasts -+ - sysctl_net_ipv4_icmp_echo_ignore_broadcasts_value=enabled - - - id: 3.2.6 - title: Ensure bogus ICMP responses are ignored (Automated) -@@ -857,6 +871,7 @@ controls: - automated: yes - rules: - - sysctl_net_ipv4_icmp_ignore_bogus_error_responses -+ - sysctl_net_ipv4_icmp_ignore_bogus_error_responses_value=enabled - - - id: 3.2.7 - title: Ensure Reverse Path Filtering is enabled (Automated) -@@ -866,7 +881,9 @@ controls: - automated: yes - rules: - - sysctl_net_ipv4_conf_all_rp_filter -+ - sysctl_net_ipv4_conf_all_rp_filter_value=enabled - - sysctl_net_ipv4_conf_default_rp_filter -+ - sysctl_net_ipv4_conf_default_rp_filter_value=enabled - - - id: 3.2.8 - title: Ensure TCP SYN Cookies is enabled (Automated) -@@ -876,15 +893,7 @@ controls: - automated: yes - rules: - - sysctl_net_ipv4_tcp_syncookies -- -- - id: 3.2.8 -- title: Ensure TCP SYN Cookies is enabled (Automated) -- levels: -- - l1_server -- - l1_workstation -- automated: yes -- rules: -- - sysctl_net_ipv4_tcp_syncookies -+ - sysctl_net_ipv4_tcp_syncookies_value=enabled - - - id: 3.2.9 - title: Ensure IPv6 router advertisements are not accepted (Automated) -@@ -894,7 +903,9 @@ controls: - automated: yes - rules: - - sysctl_net_ipv6_conf_all_accept_ra -+ - sysctl_net_ipv6_conf_all_accept_ra_value=disabled - - sysctl_net_ipv6_conf_default_accept_ra -+ - sysctl_net_ipv6_conf_default_accept_ra_value=disabled - - - id: 3.3.1 - title: Ensure DCCP is disabled (Automated) - -From 35206714177e9fac308589041449fc484254c29b Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Tue, 20 Jul 2021 08:43:10 +0100 -Subject: [PATCH 11/55] Update controls/cis_rhel8.yml - -Co-authored-by: vojtapolasek ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 1d34337411f..2acf9aef28d 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -638,7 +638,7 @@ controls: - - l1_workstation - automated: yes - rules: -- - package_squid_disabled -+ - service_squid_disabled - - - id: 2.2.7 - title: Ensure Samba is not enabled (Automated) - -From 0d1ff0c4d6ecdd1fcb3043d7e7237ef9159322ac Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 30 Jul 2021 22:13:25 +0100 -Subject: [PATCH 12/55] RHEL 8 CIS 1.5.1 is only partially automated currently - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 2acf9aef28d..e63fc57ddea 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -351,7 +351,7 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially # This rule, as implemented here, does not check for a user.cfg file - rules: - - file_owner_grub2_cfg - - file_groupowner_grub2_cfg - -From 60e7bde2e888abd847505e8f2179aadae8ee8e1a Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 30 Jul 2021 22:19:14 +0100 -Subject: [PATCH 13/55] Add EFI GRUB rules to RHEL 8 CIS control 1.5.1 - ---- - controls/cis_rhel8.yml | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index e63fc57ddea..2163655d9d3 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -353,8 +353,11 @@ controls: - - l1_workstation - automated: partially # This rule, as implemented here, does not check for a user.cfg file - rules: -- - file_owner_grub2_cfg -+ - file_groupowner_efi_grub2_cfg - - file_groupowner_grub2_cfg -+ - file_owner_efi_grub2_cfg -+ - file_owner_grub2_cfg -+ - file_permissions_efi_grub2_cfg - - file_permissions_grub2_cfg - - - id: 1.5.2 - -From 3be000366701a2772c7fe3ba7807e63fd4c03b24 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:11:38 +0100 -Subject: [PATCH 14/55] Update controls/cis_rhel8.yml - -Co-authored-by: vojtapolasek ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 2163655d9d3..aa9c2b6c809 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1655,7 +1655,7 @@ controls: - - id: 5.2.6 - title: Ensure SSH X11 forwarding is disabled (Automated) - levels: -- - l1_server -+ - l2_server - - l1_workstation - automated: yes - rules: - -From c62def9e1764d06aacb75b50886c7f4d08fe751b Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:22:44 +0100 -Subject: [PATCH 15/55] Explicitly set var_auditd_max_log_file_action - ---- - controls/cis_rhel8.yml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index aa9c2b6c809..af874fd789e 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1234,6 +1234,7 @@ controls: - automated: yes - rules: - - auditd_data_retention_max_log_file_action -+ - var_auditd_max_log_file_action=keep_logs - - - id: 4.1.2.3 - title: Ensure system is disabled when audit logs are full (Automated) - -From 860425b14b8637123b3f96aa9be319e9448f15a6 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:31:20 +0100 -Subject: [PATCH 16/55] Explicitly set the number of auditd logs to keep to 6 - ---- - controls/cis_rhel8.yml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index af874fd789e..af1314325ab 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1225,6 +1225,7 @@ controls: - automated: yes - rules: - - auditd_data_retention_max_log_file -+ - var_auditd_max_log_file=6 - - - id: 4.1.2.2 - title: Ensure audit logs are not automatically deleted (Automated) - -From 28cad027f42c4bf0f5570bf16766a7b1d402d5fe Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:36:48 +0100 -Subject: [PATCH 17/55] The audit_rules_time_settimeofday rule does not - directly align with CIS - ---- - controls/cis_rhel8.yml | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index af1314325ab..a81a9ef4605 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1284,11 +1284,10 @@ controls: - levels: - - l2_server - - l2_workstation -- automated: yes -+ automated: partial # The CAC rule audit_rules_time_settimeofday uses additional parameters compared to the CIS benchmark and so is not used here. As a result, automated coverage is only partial for this control. - rules: - - audit_rules_time_adjtimex - - audit_rules_time_clock_settime -- - audit_rules_time_settimeofday - - audit_rules_time_stime - - audit_rules_time_watch_localtime - - -From fe542405de5e73479ca8377b80fbbb7ac32be1d7 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:37:25 +0100 -Subject: [PATCH 18/55] RHEL CIS control 4.1.7 is missing a rule to achieve - full automation - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index a81a9ef4605..cba86f40c9e 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1299,7 +1299,7 @@ controls: - levels: - - l2_server - - l2_workstation -- automated: yes -+ automated: partial - rules: - - audit_rules_mac_modification - - -From ed087900ecf7230d2797a483e07a753f1733317e Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:38:54 +0100 -Subject: [PATCH 19/55] Remove opinionated rule from CIS 4.1.10 as it does not - align with the benchmark - ---- - controls/cis_rhel8.yml | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index cba86f40c9e..6e8c5cf10f0 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1345,8 +1345,6 @@ controls: - - audit_rules_unsuccessful_file_modification_open - - audit_rules_unsuccessful_file_modification_openat - - audit_rules_unsuccessful_file_modification_truncate -- # Opinionated selection -- - audit_rules_unsuccessful_file_modification_open_by_handle_at - - - id: 4.1.11 - title: Ensure events that modify user/group information are collected (Automated) - -From 47bf486ddadd79bade733fd444f3aadca4a82ad7 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:41:13 +0100 -Subject: [PATCH 20/55] Use "partially" rather than "partial" for automation - key - ---- - controls/cis_rhel8.yml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 6e8c5cf10f0..829f0515cb0 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1284,7 +1284,7 @@ controls: - levels: - - l2_server - - l2_workstation -- automated: partial # The CAC rule audit_rules_time_settimeofday uses additional parameters compared to the CIS benchmark and so is not used here. As a result, automated coverage is only partial for this control. -+ automated: partially # The CAC rule audit_rules_time_settimeofday uses additional parameters compared to the CIS benchmark and so is not used here. As a result, automated coverage is only partial for this control. - rules: - - audit_rules_time_adjtimex - - audit_rules_time_clock_settime -@@ -1299,7 +1299,7 @@ controls: - levels: - - l2_server - - l2_workstation -- automated: partial -+ automated: partially - rules: - - audit_rules_mac_modification - - -From 42e08ddcb1575fccf3ff0f0a4094a15fb445bdf1 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:42:57 +0100 -Subject: [PATCH 21/55] Disable automation for control 4.1.13 as it does not - align exactly with the benchmark - ---- - controls/cis_rhel8.yml | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 829f0515cb0..76a7c8bbfa9 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1373,8 +1373,9 @@ controls: - levels: - - l2_server - - l2_workstation -- automated: yes -- rules: -+ automated: no -+ related_rules: -+ # The rule below is almost correct but cannot be used as it does not set the perm=x flag. - - audit_rules_privileged_commands - - - id: 4.1.14 - -From 769029ec6639f26afdbb9d595f67e692dec368c2 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:44:03 +0100 -Subject: [PATCH 22/55] Remove opinionated rule from CIS 4.1.14 as it does not - align with the benchmark - ---- - controls/cis_rhel8.yml | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 76a7c8bbfa9..e6a53516666 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1389,8 +1389,6 @@ controls: - - audit_rules_file_deletion_events_renameat - - audit_rules_file_deletion_events_unlink - - audit_rules_file_deletion_events_unlinkat -- # Opinionated selection -- - audit_rules_file_deletion_events_rmdir - - - id: 4.1.15 - title: Ensure kernel module loading and unloading is collected (Automated) - -From fe163c10596ab3e24fb805267cb762cc40fd5ed0 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:47:53 +0100 -Subject: [PATCH 23/55] Disable the rsyslog_files_permissions rule as it does - not align with the benchmark - ---- - controls/cis_rhel8.yml | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index e6a53516666..327400abd65 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1435,14 +1435,15 @@ controls: - rules: - - service_rsyslog_enabled - -+ # NEEDS RULE -+ # The rsyslog_files_permissions rule is not sufficient -+ # https://github.com/ComplianceAsCode/content/issues/7332 - - id: 4.2.1.3 - title: Ensure rsyslog default file permissions configured (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -- rules: -- - rsyslog_files_permissions -+ automated: no - - - id: 4.2.1.4 - title: Ensure logging is configured (Manual) - -From 404aef23030c6286f6b3d465ca84295c5252fe7c Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:52:17 +0100 -Subject: [PATCH 24/55] Disable 4.2.1.5 and 5.2.3 as they do not align - perfectly with the benchmark - ---- - controls/cis_rhel8.yml | 19 ++++++++----------- - 1 file changed, 8 insertions(+), 11 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 327400abd65..f5a8ce45848 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1452,14 +1452,15 @@ controls: - - l1_workstation - automated: no - -+ # NEEDS RULE -+ # The rsyslog_remote_loghost rule is not sufficient -+ # https://github.com/ComplianceAsCode/content/issues/7333 - - id: 4.2.1.5 - title: Ensure rsyslog is configured to send logs to a remote log host (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -- rules: -- - rsyslog_remote_loghost -+ automated: no - - - id: 4.2.1.6 - title: Ensure remote rsyslog messages are only accepted on designated log hosts. (Manual) -@@ -1617,19 +1618,15 @@ controls: - - l1_workstation - automated: no - -- # TODO -- # Rule sets permissions to 0640 but benchmark wants it to be 0600 -- # -- # TODO -- # Check owner of private keys in /etc/ssh is root:root -+ # NEEDS RULE -+ # The file_permissions_sshd_private_key rule is not aligned with the benchmark -+ # https://github.com/ComplianceAsCode/content/issues/7334 - - id: 5.2.3 - title: Ensure permissions on SSH private host key files are configured (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -- rules: -- - file_permissions_sshd_private_key -+ automated: no - - # TODO - # Check owner of public keys in /etc/ssh is root:root - -From 012d4f8df6c68e8a7a3c2efcd139a7f9ce8ab6bb Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:53:10 +0100 -Subject: [PATCH 25/55] 5.2.4 is only partially automated - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index f5a8ce45848..0e3fa99d32e 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1635,7 +1635,7 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially - rules: - - file_permissions_sshd_pub_key - - -From e5cfc29ca52446f494a539010af31e54af51d58a Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 4 Aug 2021 16:55:32 +0100 -Subject: [PATCH 26/55] Ensure var_sshd_set_keepalive variable gets used - properly - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 0e3fa99d32e..439b3265fe9 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1721,7 +1721,7 @@ controls: - rules: - - sshd_idle_timeout_value=5_minutes - - sshd_set_idle_timeout -- - sshd_set_keepalive_0 -+ - sshd_set_keepalive - - var_sshd_set_keepalive=0 - - # NEEDS RULE - -From d21ea1b769d31bfbdcb97d1af5de9969be835ace Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 08:47:24 +0100 -Subject: [PATCH 27/55] Align RHEL 8 Chrony configuration rule more closely - with CIS benchmark - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 439b3265fe9..92ac0dd85c5 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -595,9 +595,9 @@ controls: - - l1_workstation - automated: yes - rules: -- - service_chronyd_enabled - - chronyd_specify_remote_server - - chronyd_run_as_chrony_user -+ - var_multiple_time_servers=rhel - - - id: 2.2.2 - title: Ensure X Window System is not installed (Automated) - -From ade74cf232a649645b91da9d7c007b1106e25fb4 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 08:54:14 +0100 -Subject: [PATCH 28/55] Set SSH loglevel to VERBOSE in RHEL 8 CIS controls file - ---- - controls/cis_rhel8.yml | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 92ac0dd85c5..565974817f1 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1645,7 +1645,12 @@ controls: - - l1_server - - l1_workstation - automated: yes -+ # The CIS benchmark is not opinionated about which loglevel is selected -+ # here. Here, this profile uses VERBOSE by default, as it allows for -+ # the capture of login and logout activity as well as key fingerprints. - rules: -+ - sshd_set_loglevel_verbose -+ related_rules: - - sshd_set_loglevel_info - - - id: 5.2.6 - -From 723681dedf1d88c4924684e34ea4c5e7fb8be24d Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:00:17 +0100 -Subject: [PATCH 29/55] Disable SSH warning banner rule in RHEL 8 CIS (uses - wrong path) - ---- - controls/cis_rhel8.yml | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 565974817f1..53f024fffea 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1738,14 +1738,16 @@ controls: - - l1_workstation - automated: no - -+ # NEEDS RULE -+ # The current sshd_enable_warning_banner rule uses /etc/issue instead -+ # of the /etc/issue.net that the benchmark expects. -+ # - - id: 5.2.15 - title: Ensure SSH warning banner is configured (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -- rules: -- - sshd_enable_warning_banner -+ automated: no - - # NEEDS RULE - # https://github.com/ComplianceAsCode/content/issues/5526 - -From b0615c26dd852bf817aa919752f543802ff707b0 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:00:48 +0100 -Subject: [PATCH 30/55] Add explicit variable definition for SSH MaxStartups - rule in RHEL 8 CIS profile - ---- - controls/cis_rhel8.yml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 53f024fffea..3345a37d098 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1775,6 +1775,7 @@ controls: - automated: yes - rules: - - sshd_set_maxstartups -+ - var_sshd_set_maxstartups=10:30:60 - - - id: 5.2.19 - title: Ensure SSH MaxSessions is set to 4 or less (Automated) - -From 03504b065edbaa7f23352943adc3650e59771ba1 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:19:43 +0100 -Subject: [PATCH 31/55] Update SSH MaxSessions to match the value CIS audits - for vs the one in the control title - ---- - controls/cis_rhel8.yml | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 3345a37d098..3b6219f3296 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1777,6 +1777,13 @@ controls: - - sshd_set_maxstartups - - var_sshd_set_maxstartups=10:30:60 - -+ # The title of this control does not appear to match the suggested audit and -+ # remediation in the CIS Benchmark version 1.0.1 - this profile uses the -+ # value from the audit and remediation sections of the benchmark rather than -+ # from the title. -+ # -+ # An upstream ticket has been opened about this issue: -+ # https://workbench.cisecurity.org/community/14/tickets/13414 - - id: 5.2.19 - title: Ensure SSH MaxSessions is set to 4 or less (Automated) - levels: -@@ -1785,7 +1792,7 @@ controls: - automated: yes - rules: - - sshd_set_max_sessions -- - var_sshd_max_sessions=4 -+ - var_sshd_max_sessions=10 - - - id: 5.2.20 - title: Ensure system-wide crypto policy is not over-ridden (Automated) - -From 0ef85e84670e72afb2842414369b12a1c72cd273 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:20:45 +0100 -Subject: [PATCH 32/55] Fix rule ID for 5.3.3 - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 3b6219f3296..55c8378529d 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1823,7 +1823,7 @@ controls: - - # NEEDS RULE - # https://github.com/ComplianceAsCode/content/issues/5532 -- - id: 5.3.2 -+ - id: 5.3.3 - title: Ensure authselect includes with-faillock (Automated) - levels: - - l1_server - -From 85c2fcf29b1c71f4528fabeed8c6556cf02312e7 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:23:40 +0100 -Subject: [PATCH 33/55] Remove misaligned rules from RHEL 8 CIS 5.4.2 - ---- - controls/cis_rhel8.yml | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 55c8378529d..c7f651994d6 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1845,17 +1845,14 @@ controls: - - var_password_pam_minclass=4 - - var_password_pam_minlen=14 - -+ # NEEDS RULE -+ # https://github.com/ComplianceAsCode/content/issues/7337 - - id: 5.4.2 - title: Ensure lockout for failed password attempts is configured (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -- rules: -- - accounts_passwords_pam_faillock_deny -- - accounts_passwords_pam_faillock_unlock_time -- - var_accounts_passwords_pam_faillock_deny=5 -- - var_accounts_passwords_pam_faillock_unlock_time=900 -+ automated: no - - - id: 5.4.3 - title: Ensure password reuse is limited (Automated) - -From edbd2b2264252ab1a35f872b816947e289c7d4a5 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:29:15 +0100 -Subject: [PATCH 34/55] RHEL 8 CIS 5.4.1 is only partially automated - ---- - controls/cis_rhel8.yml | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index c7f651994d6..10816e1ba35 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1830,14 +1830,15 @@ controls: - - l1_workstation - automated: no - -- # NEEDS RULE: try_first_pass -+ # NEEDS RULE -+ # try_first_pass - # https://github.com/ComplianceAsCode/content/issues/5533 - - id: 5.4.1 - title: Ensure password creation requirements are configured (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially - rules: - - accounts_password_pam_minclass - - accounts_password_pam_minlen - -From e32f46528ef2c46986fca31e700b40949096d48f Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:37:15 +0100 -Subject: [PATCH 35/55] Import logic for the "Ensure password reuse is limited" - rule from RHEL 7 - ---- - controls/cis_rhel8.yml | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 10816e1ba35..0ea36362832 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1861,9 +1861,15 @@ controls: - - l1_server - - l1_workstation - automated: yes -- rules: -- - accounts_password_pam_unix_remember -- - var_password_pam_unix_remember=5 -+ notes: |- -+ Usage of pam_unix.so module together with "remember" option is deprecated and is not supported by this policy interpretation. -+ See here for more details about pam_unix.so: -+ https://bugzilla.redhat.com/show_bug.cgi?id=1778929 -+ rules: -+ - accounts_password_pam_pwhistory_remember_password_auth -+ - accounts_password_pam_pwhistory_remember_system_auth -+ - var_password_pam_remember_control_flag=required -+ - var_password_pam_remember=5 - - - id: 5.4.4 - title: Ensure password hashing algorithm is SHA-512 (Automated) - -From c77bbff67b5e700b6785264bee3c973c343364d1 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:41:13 +0100 -Subject: [PATCH 36/55] RHEL 8 CIS 5.4.4 is only partially automated - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 0ea36362832..be46d870965 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1876,7 +1876,7 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially # The rule below does not check the /etc/pam.d/password-auth file mentioned in the benchmark. - rules: - - set_password_hashing_algorithm_systemauth - - -From be706084b1cae588b2799b38e9cea615ce8dc22f Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:42:57 +0100 -Subject: [PATCH 37/55] RHEL 8 CIS 5.5.1.1 is only partially automated - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index be46d870965..e41c2eb4dae 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1885,7 +1885,7 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially # The rule below does not validate whether all current users' PASS_MAX_DAYS setting conforms to the control. - rules: - - accounts_maximum_age_login_defs - - var_accounts_maximum_age_login_defs=365 - -From 075eb337ef12d1610626e6b92eb6b207f89e7054 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:44:17 +0100 -Subject: [PATCH 38/55] RHEL 8 CIS 5.5.1.2 is only partially automated - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index e41c2eb4dae..0b2b3d04621 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1895,7 +1895,7 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially # The rule below does not validate whether all current users' PASS_MIN_DAYS setting conforms to the control. - rules: - - accounts_minimum_age_login_defs - - var_accounts_minimum_age_login_defs=7 - -From 1e3c17e5c1f81582bf891664dd7bc7c6000030b2 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:47:22 +0100 -Subject: [PATCH 39/55] RHEL 8 CIS 5.5.1.3 is only partially automated - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 0b2b3d04621..70312f6399a 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1905,7 +1905,7 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially # The rule below does not validate whether all current users' PASS_WARN_AGE setting conforms to the control. - rules: - - accounts_password_warn_age_login_defs - - var_accounts_password_warn_age_login_defs=7 - -From 97c5ff8a7096b04c2ebdac6af58047a9b0ee194b Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Thu, 5 Aug 2021 09:47:54 +0100 -Subject: [PATCH 40/55] RHEL 8 CIS 5.5.1.4 is only partially automated - ---- - controls/cis_rhel8.yml | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 70312f6399a..42dbf14c816 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1910,14 +1910,12 @@ controls: - - accounts_password_warn_age_login_defs - - var_accounts_password_warn_age_login_defs=7 - -- # TODO -- # Rule doesn't check list of users - - id: 5.5.1.4 - title: Ensure inactive password lock is 30 days or less (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially # The rule below does not validate wheter all current users' INACTIVE setting conforms to the control. - rules: - - account_disable_post_pw_expiration - - var_account_disable_post_pw_expiration=30 - -From 2d5603c3e25f376b0351364c05b3eaccc5b36368 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 15:17:53 +0100 -Subject: [PATCH 41/55] Set SSH idle timeout to 15 minutes - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 42dbf14c816..e8e340e0c36 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1724,7 +1724,7 @@ controls: - - l1_workstation - automated: yes - rules: -- - sshd_idle_timeout_value=5_minutes -+ - sshd_idle_timeout_value=15_minutes - - sshd_set_idle_timeout - - sshd_set_keepalive - - var_sshd_set_keepalive=0 - -From da63d392814f48f17436e975cf8ccc3215eb917c Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 16:12:47 +0100 -Subject: [PATCH 42/55] RHEL 8 CIS 5.5.2 is only partially automated - ---- - controls/cis_rhel8.yml | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index e8e340e0c36..2d534d95072 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1929,12 +1929,15 @@ controls: - - l1_workstation - automated: no - -+ # NEEDS RULE -+ # We are missing the component of this control which locks non-root system accounts -+ # https://github.com/ComplianceAsCode/content/issues/7352 - - id: 5.5.2 - title: Ensure system accounts are secured (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially - rules: - - no_shelllogin_for_systemaccounts - - -From d07ec30f6cde2e6a3875170ced9004a81af6dee4 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 16:17:13 +0100 -Subject: [PATCH 43/55] RHEL 8 CIS 5.5.3 is only partially automated - ---- - controls/cis_rhel8.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 2d534d95072..784af3e0fe9 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1946,7 +1946,7 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially # The remediation for this rule does not implement the "TMOUT" variable as readonly so does not align fully with the benchmark - rules: - - accounts_tmout - - var_accounts_tmout=15_min - -From cd867062192bb635422d1f72261d4e8fbdc841e6 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 16:21:39 +0100 -Subject: [PATCH 44/55] RHEL 8 CIS 5.5.5 is only partially automated - ---- - controls/cis_rhel8.yml | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 784af3e0fe9..045e219d90f 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1965,9 +1965,10 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: partially # The rules below do not take /etc/profile.d/* into account so are not perfectly aligned with the benchmark - rules: - - accounts_umask_etc_bashrc -+ - accounts_umask_etc_login_defs - - accounts_umask_etc_profile - - var_accounts_user_umask=027 - - -From ec2d43b53d75627fd9ac33721fb8f04a5c2574df Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 16:23:32 +0100 -Subject: [PATCH 45/55] RHEL 8 CIS 5.7 can be partially satisfied by - use_pam_wheel_for_su - ---- - controls/cis_rhel8.yml | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 045e219d90f..84a3269afc6 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1989,7 +1989,9 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: no -+ automated: partially -+ rules: -+ - use_pam_wheel_for_su - - - id: 6.1.1 - title: Audit system file permissions (Manual) - -From ca3b471ce283691f423a427c84845ab55860ecfa Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 16:31:56 +0100 -Subject: [PATCH 46/55] Rules exist which satisfy RHEL 8 CIS 6.2.3 - ---- - controls/cis_rhel8.yml | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 84a3269afc6..d02f2cbbf86 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -2154,14 +2154,15 @@ controls: - rules: - - no_legacy_plus_entries_etc_passwd - -- # NEEDS RULE -- # https://github.com/ComplianceAsCode/content/issues/7198 - - id: 6.2.3 - title: Ensure root PATH Integrity (Automated) - levels: - - l1_server - - l1_workstation -- automated: no -+ automated: yes -+ rules: -+ - accounts_root_path_dirs_no_write -+ - root_path_no_dot - - - id: 6.2.4 - title: Ensure no legacy "+" entries exist in /etc/shadow (Automated) - -From 92adfbb1ca271105aee1be7044b617227e0ef93e Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 16:34:47 +0100 -Subject: [PATCH 47/55] Rules exist for RHEL 8 CIS 6.2.7 and 6.2.8 but without - OVAL checks or remediations - ---- - controls/cis_rhel8.yml | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index d02f2cbbf86..a3f3d4e6d4f 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -2196,8 +2196,8 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -- rules: -+ automated: no # The rule below exists, but does not have any OVAL checks or remediations. -+ related_rules: - - file_permissions_home_dirs - - # NEEDS RULE (for user ownership) -@@ -2207,7 +2207,7 @@ controls: - levels: - - l1_server - - l1_workstation -- automated: yes -+ automated: no # The rule below exists, but does not have any OVAL checks or remediations. - rules: - - file_groupownership_home_directories - - -From 25b0bbb11fc07f16bada862c99eb01c2d76fb582 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 16:35:23 +0100 -Subject: [PATCH 48/55] Rules exist for RHEL 8 CIS 6.2.20 but without OVAL - checks or remediations - ---- - controls/cis_rhel8.yml | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index a3f3d4e6d4f..cfefd245300 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -2311,10 +2311,10 @@ controls: - automated: no - - - id: 6.2.20 -- title: Ensure shadow group is empty (Automated) -+ title: Ensure all users' home directories exist (Automated) - levels: - - l1_server - - l1_workstation -- automated: yes -- rules: -+ automated: no # The rule below exists, but does not have any OVAL checks or remediations. -+ related_rules: - - accounts_user_interactive_home_directory_exists - -From c8d07e3ace333c4aa0098d64836596a4e4f7b772 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Fri, 6 Aug 2021 16:38:11 +0100 -Subject: [PATCH 49/55] We cannot use audit_rules_kernel_module_loading because - it also checks for finit_module syscall - ---- - controls/cis_rhel8.yml | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index cfefd245300..e8d3f24ccbb 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1397,7 +1397,11 @@ controls: - - l2_workstation - automated: yes - rules: -- - audit_rules_kernel_module_loading -+ - audit_rules_kernel_module_loading_delete -+ - audit_rules_kernel_module_loading_init -+ - audit_rules_privileged_commands_insmod -+ - audit_rules_privileged_commands_modprobe -+ - audit_rules_privileged_commands_rmmod - - # NEEDS RULE - # https://github.com/ComplianceAsCode/content/issues/5516 - -From b3a579bc7aed5519923ce99252210e4d88beda91 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Mon, 9 Aug 2021 11:49:56 +0100 -Subject: [PATCH 50/55] Use only 'related_rules' and not 'rules' when a control - is not automated - ---- - controls/cis_rhel8.yml | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index e8d3f24ccbb..a624d06cb56 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -2128,7 +2128,7 @@ controls: - - l1_server - - l1_workstation - automated: no -- rules: -+ related_rules: - - file_permissions_unauthorized_suid - - - id: 6.1.14 -@@ -2137,7 +2137,7 @@ controls: - - l1_server - - l1_workstation - automated: no -- rules: -+ related_rules: - - file_permissions_unauthorized_sgid - - # NEEDS RULE -@@ -2212,7 +2212,7 @@ controls: - - l1_server - - l1_workstation - automated: no # The rule below exists, but does not have any OVAL checks or remediations. -- rules: -+ related_rules: - - file_groupownership_home_directories - - # NEEDS RULE - -From 3f6766beb261a309eacb788bdd21fa54e800b43c Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Tue, 10 Aug 2021 09:12:18 +0100 -Subject: [PATCH 51/55] Correct value of SSH MaxSessions based on upstream - Draft Benchmark 1.1.0 - ---- - controls/cis_rhel8.yml | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index a624d06cb56..bff2200ce12 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1782,11 +1782,11 @@ controls: - - var_sshd_set_maxstartups=10:30:60 - - # The title of this control does not appear to match the suggested audit and -- # remediation in the CIS Benchmark version 1.0.1 - this profile uses the -- # value from the audit and remediation sections of the benchmark rather than -- # from the title. -+ # remediation in the CIS Benchmark version 1.0.1 -+ # -+ # As noted in the ticket below, this is resolved in Draft Benchmark 1.1.0 -+ # which confirms that '4' is the intended value for this control. - # -- # An upstream ticket has been opened about this issue: - # https://workbench.cisecurity.org/community/14/tickets/13414 - - id: 5.2.19 - title: Ensure SSH MaxSessions is set to 4 or less (Automated) -@@ -1796,7 +1796,7 @@ controls: - automated: yes - rules: - - sshd_set_max_sessions -- - var_sshd_max_sessions=10 -+ - var_sshd_max_sessions=4 - - - id: 5.2.20 - title: Ensure system-wide crypto policy is not over-ridden (Automated) - -From e9ca1baec39ff010e63a99ac479e15b7fb73c352 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Wed, 11 Aug 2021 10:37:23 +0100 -Subject: [PATCH 52/55] Control to disable IPv6 should not be automated - ---- - controls/cis_rhel8.yml | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index bff2200ce12..29d972427cf 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -1177,9 +1177,7 @@ controls: - levels: - - l2_server - - l2_workstation -- automated: yes -- rules: -- - kernel_module_ipv6_option_disabled -+ automated: no - - - id: 4.1.1.1 - title: Ensure auditd is installed (Automated) - -From a7b6c13f927d9494f65c314ea6f3ba71b9b350cb Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Tue, 17 Aug 2021 13:09:48 +0100 -Subject: [PATCH 53/55] Fix rules with missing CCEs for RHEL8 - ---- - .../accounts-session/root_paths/root_path_no_dot/rule.yml | 1 + - .../uefi/file_groupowner_efi_grub2_cfg/rule.yml | 1 + - .../bootloader-grub2/uefi/file_owner_efi_grub2_cfg/rule.yml | 1 + - .../uefi/file_permissions_efi_grub2_cfg/rule.yml | 1 + - shared/references/cce-redhat-avail.txt | 4 ---- - 5 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml b/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -index 24a0feaf0aa..748d9d9d188 100644 ---- a/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -@@ -21,6 +21,7 @@ severity: unknown - - identifiers: - cce@rhel7: CCE-80199-3 -+ cce@rhel8: CCE-85914-0 - - references: - cis-csc: 11,3,9 -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/file_groupowner_efi_grub2_cfg/rule.yml b/linux_os/guide/system/bootloader-grub2/uefi/file_groupowner_efi_grub2_cfg/rule.yml -index 288b6706b03..f44e85a059a 100644 ---- a/linux_os/guide/system/bootloader-grub2/uefi/file_groupowner_efi_grub2_cfg/rule.yml -+++ b/linux_os/guide/system/bootloader-grub2/uefi/file_groupowner_efi_grub2_cfg/rule.yml -@@ -25,6 +25,7 @@ severity: medium - - identifiers: - cce@rhel7: CCE-83430-9 -+ cce@rhel8: CCE-85915-7 - - references: - cis-csc: 12,13,14,15,16,18,3,5 -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/file_owner_efi_grub2_cfg/rule.yml b/linux_os/guide/system/bootloader-grub2/uefi/file_owner_efi_grub2_cfg/rule.yml -index edcda693591..a9468d00ddc 100644 ---- a/linux_os/guide/system/bootloader-grub2/uefi/file_owner_efi_grub2_cfg/rule.yml -+++ b/linux_os/guide/system/bootloader-grub2/uefi/file_owner_efi_grub2_cfg/rule.yml -@@ -23,6 +23,7 @@ severity: medium - - identifiers: - cce@rhel7: CCE-83429-1 -+ cce@rhel8: CCE-85913-2 - - references: - cis-csc: 12,13,14,15,16,18,3,5 -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/file_permissions_efi_grub2_cfg/rule.yml b/linux_os/guide/system/bootloader-grub2/uefi/file_permissions_efi_grub2_cfg/rule.yml -index 6e636a7caf7..bc4fdcc7e04 100644 ---- a/linux_os/guide/system/bootloader-grub2/uefi/file_permissions_efi_grub2_cfg/rule.yml -+++ b/linux_os/guide/system/bootloader-grub2/uefi/file_permissions_efi_grub2_cfg/rule.yml -@@ -21,6 +21,7 @@ severity: medium - - identifiers: - cce@rhel7: CCE-83431-7 -+ cce@rhel8: CCE-85912-4 - - references: - cis-csc: 12,13,14,15,16,18,3,5 - -From b2a35c50c402267c8e77db287187e594fe917e77 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Tue, 17 Aug 2021 13:15:15 +0100 -Subject: [PATCH 54/55] Add missing CIS references for RHEL 8 rules - ---- - .../services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml | 1 + - .../disabling_xwindows/xwindows_remove_packages/rule.yml | 1 + - .../root_logins/use_pam_wheel_for_su/rule.yml | 1 + - .../root_paths/accounts_root_path_dirs_no_write/rule.yml | 1 + - .../accounts-session/root_paths/root_path_no_dot/rule.yml | 1 + - .../user_umask/accounts_umask_etc_login_defs/rule.yml | 1 + - 6 files changed, 6 insertions(+) - -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml b/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml -index 2ffb01a3983..ee54a53dfd4 100644 ---- a/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml -@@ -27,6 +27,7 @@ identifiers: - - references: - cis@rhel7: 5.3.5 -+ cis@rhel8: 5.2.5 - disa: CCI-000067 - nerc-cip: CIP-007-3 R7.1 - nist: AC-17(a),AC-17(1),CM-6(a) -diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/rule.yml b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/rule.yml -index c548b1e3ea2..935766db26d 100644 ---- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/rule.yml -+++ b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/rule.yml -@@ -41,6 +41,7 @@ identifiers: - - references: - cis@rhel7: 2.2.2 -+ cis@rhel8: 2.2.2 - disa: CCI-000366 - nist: CM-6(b) - srg: SRG-OS-000480-GPOS-00227 -diff --git a/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml b/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -index 984a8cf333e..616a0aa0052 100644 ---- a/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -@@ -24,6 +24,7 @@ identifiers: - - references: - cis@rhel7: "5.7" -+ cis@rhel8: 5.7 - cis@sle15: '5.6' - cis@ubuntu2004: '5.6' - ospp: FMT_SMF_EXT.1.1 -diff --git a/linux_os/guide/system/accounts/accounts-session/root_paths/accounts_root_path_dirs_no_write/rule.yml b/linux_os/guide/system/accounts/accounts-session/root_paths/accounts_root_path_dirs_no_write/rule.yml -index 81c30174c71..057701075e5 100644 ---- a/linux_os/guide/system/accounts/accounts-session/root_paths/accounts_root_path_dirs_no_write/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-session/root_paths/accounts_root_path_dirs_no_write/rule.yml -@@ -23,6 +23,7 @@ identifiers: - references: - cis-csc: 11,3,9 - cis@rhel7: 6.2.10 -+ cis@rhel8: 6.2.3 - cis@sle15: 6.2.4 - cis@ubuntu2004: 6.2.3 - cobit5: BAI10.01,BAI10.02,BAI10.03,BAI10.05 -diff --git a/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml b/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -index 748d9d9d188..c94de8fa3e6 100644 ---- a/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -@@ -26,6 +26,7 @@ identifiers: - references: - cis-csc: 11,3,9 - cis@rhel7: 6.2.10 -+ cis@rhel8: 6.2.3 - cobit5: BAI10.01,BAI10.02,BAI10.03,BAI10.05 - disa: CCI-000366 - isa-62443-2009: 4.3.4.3.2,4.3.4.3.3 -diff --git a/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_login_defs/rule.yml b/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_login_defs/rule.yml -index 46e81737199..51f8e51fa6a 100644 ---- a/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_login_defs/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_login_defs/rule.yml -@@ -25,6 +25,7 @@ references: - anssi: BP28(R35) - cis-csc: 11,18,3,9 - cis@rhel7: 5.5.5 -+ cis@rhel8: 5.5.5 - cis@ubuntu2004: 5.4.4 - cobit5: APO13.01,BAI03.01,BAI03.02,BAI03.03,BAI10.01,BAI10.02,BAI10.03,BAI10.05 - disa: CCI-000366 - -From 379910b8185590bed1c620dcb07cbb28ee41ecd7 Mon Sep 17 00:00:00 2001 -From: Alex Haydock -Date: Tue, 17 Aug 2021 13:25:45 +0100 -Subject: [PATCH 55/55] Quote reference to avoid it being interpreted as an - integer - ---- - .../root_logins/use_pam_wheel_for_su/rule.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml b/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -index 616a0aa0052..08677cbb7dc 100644 ---- a/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -@@ -24,7 +24,7 @@ identifiers: - - references: - cis@rhel7: "5.7" -- cis@rhel8: 5.7 -+ cis@rhel8: "5.7" - cis@sle15: '5.6' - cis@ubuntu2004: '5.6' - ospp: FMT_SMF_EXT.1.1 diff --git a/SOURCES/scap-security-guide-0.1.58-dont_remove_all_whitespace-PR_7393.patch b/SOURCES/scap-security-guide-0.1.58-dont_remove_all_whitespace-PR_7393.patch deleted file mode 100644 index e2526fc..0000000 --- a/SOURCES/scap-security-guide-0.1.58-dont_remove_all_whitespace-PR_7393.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8466dfa2e6f0f83e848f81f3fb57ee9d97c9e358 Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Mon, 16 Aug 2021 15:26:00 +0200 -Subject: [PATCH] Remove a spurious whitespace trim - -The first line of the if- block ended up in the metadata comment. ---- - .../disable_ctrlaltdel_reboot/bash/shared.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_reboot/bash/shared.sh b/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_reboot/bash/shared.sh -index 4cbf5c8465..610da67668 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_reboot/bash/shared.sh -+++ b/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_reboot/bash/shared.sh -@@ -1,8 +1,8 @@ - # platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_wrlinux --{{%- if init_system == "systemd" -%}} -+{{% if init_system == "systemd" -%}} - systemctl disable --now ctrl-alt-del.target - systemctl mask --now ctrl-alt-del.target --{{%- else -%}} -+{{%- else %}} - # If system does not contain control-alt-delete.override, - if [ ! -f /etc/init/control-alt-delete.override ]; then - # but does have control-alt-delete.conf file, -@@ -12,4 +12,4 @@ if [ ! -f /etc/init/control-alt-delete.override ]; then - fi - fi - sed -i 's,^exec.*$,exec /usr/bin/logger -p authpriv.notice -t init "Ctrl-Alt-Del was pressed and ignored",' /etc/init/control-alt-delete.override --{{%- endif -%}} -+{{%- endif %}} diff --git a/SOURCES/scap-security-guide-0.1.58-fix_broken_link-PR_7409.patch b/SOURCES/scap-security-guide-0.1.58-fix_broken_link-PR_7409.patch deleted file mode 100644 index 7734df6..0000000 --- a/SOURCES/scap-security-guide-0.1.58-fix_broken_link-PR_7409.patch +++ /dev/null @@ -1,160 +0,0 @@ -From ac416fb6b73135b6fdeae850740ca4e10ad9fa1e Mon Sep 17 00:00:00 2001 -From: Gabriel Becker -Date: Wed, 18 Aug 2021 15:16:59 +0200 -Subject: [PATCH] Fix RHEL7 documentation links. - ---- - linux_os/guide/services/ldap/openldap_client/group.yml | 2 +- - linux_os/guide/services/ldap/openldap_server/group.yml | 2 +- - .../ntp/chronyd_or_ntpd_specify_multiple_servers/rule.yml | 2 +- - .../ntp/chronyd_or_ntpd_specify_remote_server/rule.yml | 2 +- - linux_os/guide/services/ntp/group.yml | 2 +- - .../services/ntp/service_chronyd_or_ntpd_enabled/rule.yml | 2 +- - linux_os/guide/services/sssd/group.yml | 2 +- - .../screen_locking/smart_card_login/smartcard_auth/rule.yml | 4 +--- - linux_os/guide/system/auditing/group.yml | 2 +- - .../software/disk_partitioning/encrypt_partitions/rule.yml | 2 +- - .../guide/system/software/gnome/gnome_login_screen/group.yml | 2 +- - 11 files changed, 11 insertions(+), 13 deletions(-) - -diff --git a/linux_os/guide/services/ldap/openldap_client/group.yml b/linux_os/guide/services/ldap/openldap_client/group.yml -index bf17a053cd5..a64f105395f 100644 ---- a/linux_os/guide/services/ldap/openldap_client/group.yml -+++ b/linux_os/guide/services/ldap/openldap_client/group.yml -@@ -13,7 +13,7 @@ description: |- - files, which is useful when trying to use SSL cleanly across several protocols. - Installation and configuration of OpenLDAP on {{{ full_name }}} is available at - {{% if product == "rhel7" %}} -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System-Level_Authentication_Guide/openldap.html") }}}. -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/openldap") }}}. - {{% elif product == "ol7" %}} - {{{ weblink(link="https://docs.oracle.com/en/operating-systems/oracle-linux/7/userauth/ol7-auth.html#ol7-s9-auth") }}}. - {{% endif %}} -diff --git a/linux_os/guide/services/ldap/openldap_server/group.yml b/linux_os/guide/services/ldap/openldap_server/group.yml -index c180820e9fc..d571867a7f8 100644 ---- a/linux_os/guide/services/ldap/openldap_server/group.yml -+++ b/linux_os/guide/services/ldap/openldap_server/group.yml -@@ -7,5 +7,5 @@ description: |- - for an OpenLDAP server. - {{% if product == "rhel7" %}} - Installation and configuration of OpenLDAP on Red Hat Enterprise Linux 7 is available at: -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System-Level_Authentication_Guide/openldap.html") }}}. -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/openldap") }}}. - {{% endif %}} -diff --git a/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_multiple_servers/rule.yml b/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_multiple_servers/rule.yml -index 8f939356ab1..7dc188589ee 100644 ---- a/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_multiple_servers/rule.yml -+++ b/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_multiple_servers/rule.yml -@@ -14,7 +14,7 @@ description: |- - {{% elif product == "ol8" %}} - {{{ weblink(link="https://docs.oracle.com/en/operating-systems/oracle-linux/8/network/ol-nettime.html") }}} - {{% else %}} -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Configuring_NTP_Using_the_chrony_Suite.html") }}} -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite") }}} - {{% endif %}} - for more detailed comparison of the features of both of the choices, and for - further guidance how to choose between the two NTP daemons. -diff --git a/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_remote_server/rule.yml b/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_remote_server/rule.yml -index 503aecc0de2..27df8595efa 100644 ---- a/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_remote_server/rule.yml -+++ b/linux_os/guide/services/ntp/chronyd_or_ntpd_specify_remote_server/rule.yml -@@ -14,7 +14,7 @@ description: |- - {{% elif product == "ol8" %}} - {{{ weblink(link="https://docs.oracle.com/en/operating-systems/oracle-linux/8/network/ol-nettime.html") }}} - {{% else %}} -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Configuring_NTP_Using_the_chrony_Suite.html") }}} -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite") }}} - {{% endif %}} - for more detailed comparison of the features of both of the choices, and for - further guidance how to choose between the two NTP daemons. -diff --git a/linux_os/guide/services/ntp/group.yml b/linux_os/guide/services/ntp/group.yml -index 181b10dfd65..b944ee03116 100644 ---- a/linux_os/guide/services/ntp/group.yml -+++ b/linux_os/guide/services/ntp/group.yml -@@ -54,7 +54,7 @@ description: |- - {{% elif product == "ol8" %}} - {{{ weblink(link="https://docs.oracle.com/en/operating-systems/oracle-linux/8/network/ol-nettime.html") }}} - {{% elif product == "rhel7" %}} -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Configuring_NTP_Using_the_chrony_Suite.html") }}} -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite") }}} - {{% elif "ubuntu" in product %}} - {{{ weblink(link="https://help.ubuntu.com/lts/serverguide/NTP.html") }}} - {{% elif "debian" in product %}} -diff --git a/linux_os/guide/services/ntp/service_chronyd_or_ntpd_enabled/rule.yml b/linux_os/guide/services/ntp/service_chronyd_or_ntpd_enabled/rule.yml -index 065cf301b95..00739816f5e 100644 ---- a/linux_os/guide/services/ntp/service_chronyd_or_ntpd_enabled/rule.yml -+++ b/linux_os/guide/services/ntp/service_chronyd_or_ntpd_enabled/rule.yml -@@ -17,7 +17,7 @@ description: |- - {{% elif product == "ol8" %}} - {{{ weblink(link="https://docs.oracle.com/en/operating-systems/oracle-linux/8/network/ol-nettime.html") }}} - {{% else %}} -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Configuring_NTP_Using_the_chrony_Suite.html") }}} -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite") }}} - {{% endif %}} - for guidance which NTP daemon to choose depending on the environment used. - -diff --git a/linux_os/guide/services/sssd/group.yml b/linux_os/guide/services/sssd/group.yml -index 5b0caf7d64b..3f4eced7ca7 100644 ---- a/linux_os/guide/services/sssd/group.yml -+++ b/linux_os/guide/services/sssd/group.yml -@@ -11,7 +11,7 @@ description: |- -

- For more information, see - {{%- if product == "rhel7" -%}} -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System-Level_Authentication_Guide/SSSD.html") }}} -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/sssd") }}} - {{%- elif product == "rhel8" -%}} - {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/installing_identity_management/installing-an-ipa-client-basic-scenario_installing-identity-management#sssd-deployment-operations_install-client-basic") }}} - {{%- elif product == "ol7" -%}} -diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/smartcard_auth/rule.yml b/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/smartcard_auth/rule.yml -index fc7f149bf40..62a343cf396 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/smartcard_auth/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/smartcard_auth/rule.yml -@@ -8,9 +8,7 @@ description: |- - To enable smart card authentication, consult the documentation at: -
    - {{% if product == "rhel7" %}} --
  • {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System-Level_Authentication_Guide/smartcards.html#authconfig-smartcards") }}}
  • -- {{% elif product == "rhel8" %}} --
  • {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System-Level_Authentication_Guide/smartcards.html#authconfig-smartcards") }}}
  • -+
  • {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/smartcards.html#authconfig-smartcards") }}}
  • - {{% elif product == "ol7" %}} -
  • {{{ weblink(link="https://docs.oracle.com/en/operating-systems/oracle-linux/7/userauth/ol7-auth.html#ol7-s4-auth") }}}
  • - {{% endif %}} -diff --git a/linux_os/guide/system/auditing/group.yml b/linux_os/guide/system/auditing/group.yml -index 82f87e81c47..5fce88db032 100644 ---- a/linux_os/guide/system/auditing/group.yml -+++ b/linux_os/guide/system/auditing/group.yml -@@ -38,7 +38,7 @@ description: |- - Examining some example audit records demonstrates how the Linux audit system - satisfies common requirements. - The following example from Fedora Documentation available at -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/sect-Security-Enhanced_Linux-Troubleshooting-Fixing_Problems.html#sect-Security-Enhanced_Linux-Fixing_Problems-Raw_Audit_Messages") }}} -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/selinux_users_and_administrators_guide/index#sect-Security-Enhanced_Linux-Fixing_Problems-Raw_Audit_Messages") }}} - shows the substantial amount of information captured in a - two typical "raw" audit messages, followed by a breakdown of the most important - fields. In this example the message is SELinux-related and reports an AVC -diff --git a/linux_os/guide/system/software/disk_partitioning/encrypt_partitions/rule.yml b/linux_os/guide/system/software/disk_partitioning/encrypt_partitions/rule.yml -index add0a41fa94..cd07fb4c0ca 100644 ---- a/linux_os/guide/system/software/disk_partitioning/encrypt_partitions/rule.yml -+++ b/linux_os/guide/system/software/disk_partitioning/encrypt_partitions/rule.yml -@@ -38,7 +38,7 @@ description: |- - {{% elif product in ["sle12", "sle15"] %}} - {{{ weblink(link="https://www.suse.com/documentation/sled-12/book_security/data/sec_security_cryptofs_y2.html") }}} - {{% elif product == "rhel7" %}} -- {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Encryption.html") }}}. -+ {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/sec-encryption") }}}. - {{% else %}} - {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/encrypting-block-devices-using-luks_security-hardening") }}}. - {{% endif %}} -diff --git a/linux_os/guide/system/software/gnome/gnome_login_screen/group.yml b/linux_os/guide/system/software/gnome/gnome_login_screen/group.yml -index 8e8b32f1d79..299b96c0592 100644 ---- a/linux_os/guide/system/software/gnome/gnome_login_screen/group.yml -+++ b/linux_os/guide/system/software/gnome/gnome_login_screen/group.yml -@@ -14,5 +14,5 @@ description: |- - the man page dconf(1). - {{% else %}} - For more information about enforcing preferences in the GNOME3 environment using the DConf -- configuration system, see {{{ weblink(link="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Desktop_Migration_and_Administration_Guide/index.html") }}}/> and the man page dconf(1). -+ configuration system, see {{{ weblink(link="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide") }}}/> and the man page dconf(1). - {{% endif %}} diff --git a/SOURCES/scap-security-guide-0.1.58-fix_gpgkey-PR_7321.patch b/SOURCES/scap-security-guide-0.1.58-fix_gpgkey-PR_7321.patch deleted file mode 100644 index a1a7742..0000000 --- a/SOURCES/scap-security-guide-0.1.58-fix_gpgkey-PR_7321.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 041c151df78653f807249cb7cc6cfc3f46a7b168 Mon Sep 17 00:00:00 2001 -From: Vojtech Polasek -Date: Tue, 3 Aug 2021 16:50:23 +0200 -Subject: [PATCH] add details about gpgkey package for rhel9 - ---- - products/rhel9/product.yml | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/products/rhel9/product.yml b/products/rhel9/product.yml -index 78c65fd805..4ceb332adf 100644 ---- a/products/rhel9/product.yml -+++ b/products/rhel9/product.yml -@@ -13,10 +13,10 @@ init_system: "systemd" - dconf_gdm_dir: "distro.d" - - # The fingerprints below are retrieved from https://access.redhat.com/security/team/key --pkg_release: "" --pkg_version: "" --aux_pkg_release: "" --aux_pkg_version: "" -+pkg_release: "4ae0493b" -+pkg_version: "fd431d51" -+aux_pkg_release: "5b32db75" -+aux_pkg_version: "d4082792" - - release_key_fingerprint: "567E347AD0044ADE55BA8A5F199E2F91FD431D51" - auxiliary_key_fingerprint: "6A6AA7C97C8890AEC6AEBFE2F76F66C3D4082792" diff --git a/SOURCES/scap-security-guide-0.1.58-fix_service_disabled-PR_7296.patch b/SOURCES/scap-security-guide-0.1.58-fix_service_disabled-PR_7296.patch deleted file mode 100644 index 79a2711..0000000 --- a/SOURCES/scap-security-guide-0.1.58-fix_service_disabled-PR_7296.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 460922d3b258ba5b437afc99b5b02d2690788db9 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Tue, 27 Jul 2021 15:20:08 -0400 -Subject: [PATCH] Remove FragmentPath check from service_disabled - -In https://github.com/systemd/systemd/issues/582 it is documented that -systemd could eventually replace FragmentPath=/dev/null (on masked -services) with the actual service path -- not the fully (symlink) -resolved path as is currently the case. - -This matches the behavior currently seen in Ubuntu (all versions) and -RHEL 9/Fedora 34. - -Per discussion with Gabriel, Matej, Richard, and Matt, it is best to -remove this check, especially since ActiveState=Masked suffices. - -Resolves: #7280 -Resolves: #7248 - -Signed-off-by: Alexander Scheel ---- - shared/templates/service_disabled/oval.template | 13 ------------- - 1 file changed, 13 deletions(-) - -diff --git a/shared/templates/service_disabled/oval.template b/shared/templates/service_disabled/oval.template -index 33b52518307..e4ccb0566e7 100644 ---- a/shared/templates/service_disabled/oval.template -+++ b/shared/templates/service_disabled/oval.template -@@ -13,7 +13,6 @@ - - - -- - - - -@@ -41,18 +40,6 @@ - masked - - -- -- -- -- -- -- ^{{{ SERVICENAME }}}\.(service|socket)$ -- FragmentPath -- -- -- /dev/null -- -- - {{% else %}} - - {{% if init_system != "systemd" %}} diff --git a/SOURCES/scap-security-guide-0.1.58-ism_ks-PR_7392.patch b/SOURCES/scap-security-guide-0.1.58-ism_ks-PR_7392.patch deleted file mode 100644 index e38943c..0000000 --- a/SOURCES/scap-security-guide-0.1.58-ism_ks-PR_7392.patch +++ /dev/null @@ -1,256 +0,0 @@ -From 86e1556555fde19d3b6bfa7e280c8d9faf6243d3 Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Mon, 16 Aug 2021 13:08:10 +0200 -Subject: [PATCH] Add ISM Official kickstarts - ---- - .../rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg | 116 ++++++++++++++++++ - .../rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg | 116 ++++++++++++++++++ - 2 files changed, 232 insertions(+) - create mode 100644 products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg - create mode 100644 products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg - -diff --git a/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg b/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg -new file mode 100644 -index 0000000000..d84d98b12d ---- /dev/null -+++ b/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg -@@ -0,0 +1,116 @@ -+# SCAP Security Guide ISM Official profile kickstart for Red Hat Enterprise Linux 8 Server -+# Version: 0.0.1 -+# Date: 2021-08-16 -+# -+# Based on: -+# https://pykickstart.readthedocs.io/en/latest/ -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart -+ -+# Specify installation method to use for installation -+# To use a different one comment out the 'url' one below, update -+# the selected choice with proper options & un-comment it -+# -+# Install from an installation tree on a remote server via FTP or HTTP: -+# --url the URL to install from -+# -+# Example: -+# -+# url --url=http://192.168.122.1/image -+# -+# Modify concrete URL in the above example appropriately to reflect the actual -+# environment machine is to be installed in -+# -+# Other possible / supported installation methods: -+# * install from the first CD-ROM/DVD drive on the system: -+# -+# cdrom -+# -+# * install from a directory of ISO images on a local drive: -+# -+# harddrive --partition=hdb2 --dir=/tmp/install-tree -+# -+# * install from provided NFS server: -+# -+# nfs --server= --dir= [--opts=] -+# -+ -+# Set language to use during installation and the default language to use on the installed system (required) -+lang en_US.UTF-8 -+ -+# Set system keyboard type / layout (required) -+keyboard us -+ -+# Configure network information for target system and activate network devices in the installer environment (optional) -+# --onboot enable device at a boot time -+# --device device to be activated and / or configured with the network command -+# --bootproto method to obtain networking configuration for device (default dhcp) -+# --noipv6 disable IPv6 on this device -+# -+# -+network --onboot yes --device eth0 --bootproto dhcp --noipv6 -+ -+# Set the system's root password (required) -+# Plaintext password is: server -+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create -+# encrypted password form for different plaintext password -+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0 -+ -+# The selected profile will restrict root login -+# Add a user that can login and escalate privileges -+# Plaintext password is: admin123 -+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted -+ -+# Configure firewall settings for the system (optional) -+# --enabled reject incoming connections that are not in response to outbound requests -+# --ssh allow sshd service through the firewall -+firewall --enabled --ssh -+ -+# Set up the authentication options for the system (required) -+# sssd profile sets sha512 to hash passwords -+# passwords are shadowed by default -+# See the manual page for authselect-profile for a complete list of possible options. -+authselect select sssd -+ -+# State of SELinux on the installed system (optional) -+# Defaults to enforcing -+selinux --enforcing -+ -+# Set the system time zone (required) -+timezone --utc America/New_York -+ -+# Specify how the bootloader should be installed (required) -+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" -+ -+# Initialize (format) all disks (optional) -+zerombr -+ -+# The following partition layout scheme assumes disk of size 20GB or larger -+# Modify size of partitions appropriately to reflect actual machine's hardware -+# -+# Remove Linux partitions from the system prior to creating new ones (optional) -+# --linux erase all Linux partitions -+# --initlabel initialize the disk label to the default based on the underlying architecture -+clearpart --linux --initlabel -+ -+# Create primary system partitions (required for installs) -+autopart -+ -+# Harden installation with Essential Eight profile -+# For more details and configuration options see -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program -+%addon org_fedora_oscap -+ content-type = scap-security-guide -+ profile = xccdf_org.ssgproject.content_profile_ism_o -+%end -+ -+# Packages selection (%packages section is required) -+%packages -+ -+# Require @Base -+@Base -+ -+%end # End of %packages section -+ -+# Reboot after the installation is complete (optional) -+# --eject attempt to eject CD or DVD media before rebooting -+reboot --eject -diff --git a/products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg -new file mode 100644 -index 0000000000..517919539a ---- /dev/null -+++ b/products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg -@@ -0,0 +1,116 @@ -+# SCAP Security Guide ISM Official profile kickstart for Red Hat Enterprise Linux 9 Server -+# Version: 0.0.1 -+# Date: 2021-08-16 -+# -+# Based on: -+# https://pykickstart.readthedocs.io/en/latest/ -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart -+ -+# Specify installation method to use for installation -+# To use a different one comment out the 'url' one below, update -+# the selected choice with proper options & un-comment it -+# -+# Install from an installation tree on a remote server via FTP or HTTP: -+# --url the URL to install from -+# -+# Example: -+# -+# url --url=http://192.168.122.1/image -+# -+# Modify concrete URL in the above example appropriately to reflect the actual -+# environment machine is to be installed in -+# -+# Other possible / supported installation methods: -+# * install from the first CD-ROM/DVD drive on the system: -+# -+# cdrom -+# -+# * install from a directory of ISO images on a local drive: -+# -+# harddrive --partition=hdb2 --dir=/tmp/install-tree -+# -+# * install from provided NFS server: -+# -+# nfs --server= --dir= [--opts=] -+# -+ -+# Set language to use during installation and the default language to use on the installed system (required) -+lang en_US.UTF-8 -+ -+# Set system keyboard type / layout (required) -+keyboard us -+ -+# Configure network information for target system and activate network devices in the installer environment (optional) -+# --onboot enable device at a boot time -+# --device device to be activated and / or configured with the network command -+# --bootproto method to obtain networking configuration for device (default dhcp) -+# --noipv6 disable IPv6 on this device -+# -+# -+network --onboot yes --device eth0 --bootproto dhcp --noipv6 -+ -+# Set the system's root password (required) -+# Plaintext password is: server -+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create -+# encrypted password form for different plaintext password -+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0 -+ -+# The selected profile will restrict root login -+# Add a user that can login and escalate privileges -+# Plaintext password is: admin123 -+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted -+ -+# Configure firewall settings for the system (optional) -+# --enabled reject incoming connections that are not in response to outbound requests -+# --ssh allow sshd service through the firewall -+firewall --enabled --ssh -+ -+# Set up the authentication options for the system (required) -+# sssd profile sets sha512 to hash passwords -+# passwords are shadowed by default -+# See the manual page for authselect-profile for a complete list of possible options. -+authselect select sssd -+ -+# State of SELinux on the installed system (optional) -+# Defaults to enforcing -+selinux --enforcing -+ -+# Set the system time zone (required) -+timezone --utc America/New_York -+ -+# Specify how the bootloader should be installed (required) -+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" -+ -+# Initialize (format) all disks (optional) -+zerombr -+ -+# The following partition layout scheme assumes disk of size 20GB or larger -+# Modify size of partitions appropriately to reflect actual machine's hardware -+# -+# Remove Linux partitions from the system prior to creating new ones (optional) -+# --linux erase all Linux partitions -+# --initlabel initialize the disk label to the default based on the underlying architecture -+clearpart --linux --initlabel -+ -+# Create primary system partitions (required for installs) -+autopart -+ -+# Harden installation with Essential Eight profile -+# For more details and configuration options see -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program -+%addon com_redhat_oscap -+ content-type = scap-security-guide -+ profile = xccdf_org.ssgproject.content_profile_ism_o -+%end -+ -+# Packages selection (%packages section is required) -+%packages -+ -+# Require @Base -+@Base -+ -+%end # End of %packages section -+ -+# Reboot after the installation is complete (optional) -+# --eject attempt to eject CD or DVD media before rebooting -+reboot --eject diff --git a/SOURCES/scap-security-guide-0.1.58-rhel9_cis-PR_7415.patch b/SOURCES/scap-security-guide-0.1.58-rhel9_cis-PR_7415.patch deleted file mode 100644 index 164c3c6..0000000 --- a/SOURCES/scap-security-guide-0.1.58-rhel9_cis-PR_7415.patch +++ /dev/null @@ -1,1834 +0,0 @@ -From e3844b648a537ae2d28aeb66b30522363e26c8c0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Thu, 19 Aug 2021 15:58:08 +0200 -Subject: [PATCH 1/4] Base the RHEL9 CIS preview on RHEL8 - -Harness the policy files to get a RHEL9 projection of the RHEL8 CIS. ---- - products/rhel9/profiles/cis.profile | 1079 +---------------- - products/rhel9/profiles/cis_server_l1.profile | 19 + - .../rhel9/profiles/cis_workstation_l1.profile | 19 + - .../rhel9/profiles/cis_workstation_l2.profile | 19 + - 4 files changed, 63 insertions(+), 1073 deletions(-) - create mode 100644 products/rhel9/profiles/cis_server_l1.profile - create mode 100644 products/rhel9/profiles/cis_workstation_l1.profile - create mode 100644 products/rhel9/profiles/cis_workstation_l2.profile - -diff --git a/products/rhel9/profiles/cis.profile b/products/rhel9/profiles/cis.profile -index 8d7816e5e2..4240f743df 100644 ---- a/products/rhel9/profiles/cis.profile -+++ b/products/rhel9/profiles/cis.profile -@@ -1,1086 +1,19 @@ - documentation_complete: true - - metadata: -- version: 0.0.0 -+ version: 1.0.1 - SMEs: - - vojtapolasek - - yuumasato - - reference: https://www.cisecurity.org/benchmark/red_hat_linux/ - --title: '[DRAFT] CIS Red Hat Enterprise Linux 9 Benchmark' -+title: '[DRAFT] CIS Red Hat Enterprise Linux 9 Benchmark for Level 2 - Server' - - description: |- -- This is a draft CIS profile based on the RHEL8 CIS -+ This is a draft profile based on its RHEL8 version for experimental purposes. -+ It is not based on the CIS benchmark for RHEL9, because this one was not available at time of -+ the release. - - selections: -- # Necessary for dconf rules -- - dconf_db_up_to_date -- -- ### Partitioning -- - mount_option_home_nodev -- -- ## 1.1 Filesystem Configuration -- -- ### 1.1.1 Disable unused filesystems -- -- #### 1.1.1.1 Ensure mounting cramfs filesystems is disabled (Scored) -- - kernel_module_cramfs_disabled -- -- #### 1.1.1.2 Ensure mounting of vFAT filesystems is limited (Not Scored) -- -- -- #### 1.1.1.3 Ensure mounting of squashfs filesystems is disabled (Scored) -- - kernel_module_squashfs_disabled -- -- #### 1.1.1.4 Ensure mounting of udf filesystems is disabled (Scored) -- - kernel_module_udf_disabled -- -- ### 1.1.2 Ensure /tmp is configured (Scored) -- - partition_for_tmp -- -- ### 1.1.3 Ensure nodev option set on /tmp partition (Scored) -- - mount_option_tmp_nodev -- -- ### 1.1.4 Ensure nosuid option set on /tmp partition (Scored) -- - mount_option_tmp_nosuid -- -- ### 1.1.5 Ensure noexec option set on /tmp partition (Scored) -- - mount_option_tmp_noexec -- -- ### 1.1.6 Ensure separate partition exists for /var (Scored) -- - partition_for_var -- -- ### 1.1.7 Ensure separate partition exists for /var/tmp (Scored) -- - partition_for_var_tmp -- -- ### 1.1.8 Ensure nodev option set on /var/tmp partition (Scored) -- - mount_option_var_tmp_nodev -- -- ### 1.1.9 Ensure nosuid option set on /var/tmp partition (Scored) -- - mount_option_var_tmp_nosuid -- -- ### 1.1.10 Ensure noexec option set on /var/tmp partition (Scored) -- - mount_option_var_tmp_noexec -- -- ### 1.1.11 Ensure separate partition exists for /var/log (Scored) -- - partition_for_var_log -- -- ### 1.1.12 Ensure separate partition exists for /var/log/audit (Scored) -- - partition_for_var_log_audit -- -- ### 1.1.13 Ensure separate partition exists for /home (Scored) -- - partition_for_home -- -- ### 1.1.14 Ensure nodev option set on /home partition (Scored) -- - mount_option_home_nodev -- -- ### 1.1.15 Ensure nodev option set on /dev/shm partition (Scored) -- - mount_option_dev_shm_nodev -- -- ### 1.1.16 Ensure nosuid option set on /dev/shm partition (Scored) -- - mount_option_dev_shm_nosuid -- -- ### 1.1.17 Ensure noexec option set on /dev/shm partition (Scored) -- - mount_option_dev_shm_noexec -- -- ### 1.1.18 Ensure nodev option set on removable media partitions (Not Scored) -- - mount_option_nodev_removable_partitions -- -- ### 1.1.19 Ensure nosuid option set on removable media partitions (Not Scored) -- - mount_option_nosuid_removable_partitions -- -- ### 1.1.20 Ensure noexec option set on removable media partitions (Not Scored) -- - mount_option_noexec_removable_partitions -- -- ### 1.1.21 Ensure sticky bit is set on all world-writable directories (Scored) -- - dir_perms_world_writable_sticky_bits -- -- ### 1.1.22 Disable Automounting (Scored) -- - service_autofs_disabled -- -- ### 1.1.23 Disable USB Storage (Scored) -- - kernel_module_usb-storage_disabled -- -- ## 1.2 Configure Software Updates -- -- ### 1.2.1 Ensure Red Hat Subscription Manager connection is configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5218 -- -- ### 1.2.2 Disable the rhnsd Daemon (Not Scored) -- - service_rhnsd_disabled -- -- ### 1.2.3 Ensure GPG keys are configured (Not Scored) -- - ensure_redhat_gpgkey_installed -- -- ### 1.2.4 Ensure gpgcheck is globally activated (Scored) -- - ensure_gpgcheck_globally_activated -- -- ### 1.2.5 Ensure package manager repositories are configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5219 -- -- ## 1.3 Configure sudo -- -- ### 1.3.1 Ensure sudo is installed (Scored) -- - package_sudo_installed -- -- ### 1.3.2 Ensure sudo commands use pty (Scored) -- - sudo_add_use_pty -- -- ### 1.3.3 Ensure sudo log file exists (Scored) -- - sudo_custom_logfile -- -- ## 1.4 Filesystem Integrity Checking -- -- ### 1.4.1 Ensure AIDE is installed (Scored) -- - package_aide_installed -- -- ### 1.4.2 Ensure filesystem integrity is regularly checked (Scored) -- - aide_periodic_cron_checking -- -- ## Secure Boot Settings -- -- ### 1.5.1 Ensure permissions on bootloader config are configured (Scored) -- #### chown root:root /boot/grub2/grub.cfg -- - file_owner_grub2_cfg -- - file_groupowner_grub2_cfg -- -- #### chmod og-rwx /boot/grub2/grub.cfg -- - file_permissions_grub2_cfg -- -- #### chown root:root /boot/grub2/grubenv -- # NEED RULE - https://github.com/ComplianceAsCode/content/issues/5222 -- -- #### chmod og-rwx /boot/grub2/grubenv -- # NEED RULE - https://github.com/ComplianceAsCode/content/issues/5222 -- -- ### 1.5.2 Ensure bootloader password is set (Scored) -- - grub2_password -- -- ### 1.5.3 Ensure authentication required for single user mode (Scored) -- #### ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue -- - require_singleuser_auth -- -- #### ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency -- - require_emergency_target_auth -- -- ## 1.6 Additional Process Hardening -- -- ### 1.6.1 Ensure core dumps are restricted (Scored) -- #### * hard core 0 -- - disable_users_coredumps -- -- #### fs.suid_dumpable = 0 -- - sysctl_fs_suid_dumpable -- -- #### ProcessSizeMax=0 -- - coredump_disable_backtraces -- -- #### Storage=none -- - coredump_disable_storage -- -- ### 1.6.2 Ensure address space layout randomization (ASLR) is enabled -- - sysctl_kernel_randomize_va_space -- -- ## 1.7 Mandatory Access Control -- -- ### 1.7.1 Configure SELinux -- -- #### 1.7.1.1 Ensure SELinux is installed (Scored) -- - package_libselinux_installed -- -- #### 1.7.1.2 Ensure SELinux is not disabled in bootloader configuration (Scored) -- - grub2_enable_selinux -- -- #### 1.7.1.3 Ensure SELinux policy is configured (Scored) -- - var_selinux_policy_name=targeted -- - selinux_policytype -- -- #### 1.7.1.4 Ensure the SELinux state is enforcing (Scored) -- - var_selinux_state=enforcing -- - selinux_state -- -- #### 1.7.1.5 Ensure no unconfied services exist (Scored) -- - selinux_confinement_of_daemons -- -- #### 1.7.1.6 Ensure SETroubleshoot is not installed (Scored) -- - package_setroubleshoot_removed -- -- #### 1.7.1.7 Ensure the MCS Translation Service (mcstrans) is not installed (Scored) -- - package_mcstrans_removed -- -- ## Warning Banners -- -- ### 1.8.1 Command Line Warning Baners -- -- #### 1.8.1.1 Ensure message of the day is configured properly (Scored) -- - banner_etc_motd -- -- #### 1.8.1.2 Ensure local login warning banner is configured properly (Scored) -- - banner_etc_issue -- -- #### 1.8.1.3 Ensure remote login warning banner is configured properly (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5225 -- -- #### 1.8.1.4 Ensure permissions on /etc/motd are configured (Scored) -- # chmod u-x,go-wx /etc/motd -- - file_permissions_etc_motd -- -- #### 1.8.1.5 Ensure permissions on /etc/issue are configured (Scored) -- # chmod u-x,go-wx /etc/issue -- - file_permissions_etc_issue -- -- #### 1.8.1.6 Ensure permissions on /etc/issue.net are configured (Scored) -- # Previously addressed via 'rpm_verify_permissions' rule -- -- ### 1.8.2 Ensure GDM login banner is configured (Scored) -- #### banner-message-enable=true -- - dconf_gnome_banner_enabled -- -- #### banner-message-text='' -- - dconf_gnome_login_banner_text -- -- ## 1.9 Ensure updates, patches, and additional security software are installed (Scored) -- - security_patches_up_to_date -- -- ## 1.10 Ensure system-wide crypto policy is not legacy (Scored) -- - var_system_crypto_policy=future -- - configure_crypto_policy -- -- ## 1.11 Ensure system-wide crytpo policy is FUTURE or FIPS (Scored) -- # Previously addressed via 'configure_crypto_policy' rule -- -- # Services -- -- ## 2.1 inetd Services -- -- ### 2.1.1 Ensure xinetd is not installed (Scored) -- - package_xinetd_removed -- -- ## 2.2 Special Purpose Services -- -- ### 2.2.1 Time Synchronization -- -- #### 2.2.1.1 Ensure time synchronization is in use (Not Scored) -- - package_chrony_installed -- -- #### 2.2.1.2 Ensure chrony is configured (Scored) -- - service_chronyd_enabled -- - chronyd_specify_remote_server -- - chronyd_run_as_chrony_user -- -- ### 2.2.2 Ensure X Window System is not installed (Scored) -- - package_xorg-x11-server-common_removed -- - xwindows_runlevel_target -- -- ### 2.2.3 Ensure rsync service is not enabled (Scored) -- - service_rsyncd_disabled -- -- ### 2.2.4 Ensure Avahi Server is not enabled (Scored) -- - service_avahi-daemon_disabled -- -- ### 2.2.5 Ensure SNMP Server is not enabled (Scored) -- - service_snmpd_disabled -- -- ### 2.2.6 Ensure HTTP Proxy Server is not enabled (Scored) -- - package_squid_removed -- -- ### 2.2.7 Ensure Samba is not enabled (Scored) -- - service_smb_disabled -- -- ### 2.2.8 Ensure IMAP and POP3 server is not enabled (Scored) -- - service_dovecot_disabled -- -- ### 2.2.9 Ensure HTTP server is not enabled (Scored) -- - service_httpd_disabled -- -- ### 2.2.10 Ensure FTP Server is not enabled (Scored) -- - service_vsftpd_disabled -- -- ### 2.2.11 Ensure DNS Server is not enabled (Scored) -- - service_named_disabled -- -- ### 2.2.12 Ensure NFS is not enabled (Scored) -- - service_nfs_disabled -- -- ### 2.2.13 Ensure RPC is not enabled (Scored) -- - service_rpcbind_disabled -- -- ### 2.2.14 Ensure LDAP service is not enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5231 -- -- ### 2.2.15 Ensure DHCP Server is not enabled (Scored) -- - service_dhcpd_disabled -- -- ### 2.2.16 Ensure CUPS is not enabled (Scored) -- - service_cups_disabled -- -- ### 2.2.17 Ensure NIS Server is not enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5232 -- -- ### 2.2.18 Ensure mail transfer agent is configured for -- ### local-only mode (Scored) -- - postfix_network_listening_disabled -- -- ## 2.3 Service Clients -- -- ### 2.3.1 Ensure NIS Client is not installed (Scored) -- - package_ypbind_removed -- -- ### 2.3.2 Ensure telnet client is not installed (Scored) -- - package_telnet_removed -- -- ### Ensure LDAP client is not installed -- - package_openldap-clients_removed -- -- # 3 Network Configuration -- -- ## 3.1 Network Parameters (Host Only) -- -- ### 3.1.1 Ensure IP forwarding is disabled (Scored) -- #### net.ipv4.ip_forward = 0 -- - sysctl_net_ipv4_ip_forward -- -- #### net.ipv6.conf.all.forwarding = 0 -- - sysctl_net_ipv6_conf_all_forwarding -- -- ### 3.1.2 Ensure packet redirect sending is disabled (Scored) -- #### net.ipv4.conf.all.send_redirects = 0 -- - sysctl_net_ipv4_conf_all_send_redirects -- -- #### net.ipv4.conf.default.send_redirects = 0 -- - sysctl_net_ipv4_conf_default_send_redirects -- -- ## 3.2 Network Parameters (Host and Router) -- -- ### 3.2.1 Ensure source routed packets are not accepted (Scored) -- #### net.ipv4.conf.all.accept_source_route = 0 -- - sysctl_net_ipv4_conf_all_accept_source_route -- -- #### net.ipv4.conf.default.accept_source_route = 0 -- - sysctl_net_ipv4_conf_default_accept_source_route -- -- #### net.ipv6.conf.all.accept_source_route = 0 -- - sysctl_net_ipv6_conf_all_accept_source_route -- -- #### net.ipv6.conf.default.accept_source_route = 0 -- - sysctl_net_ipv6_conf_default_accept_source_route -- -- ### 3.2.2 Ensure ICMP redirects are not accepted (Scored) -- #### net.ipv4.conf.all.accept_redirects = 0 -- - sysctl_net_ipv4_conf_all_accept_redirects -- -- #### net.ipv4.conf.default.accept_redirects -- - sysctl_net_ipv4_conf_default_accept_redirects -- -- #### net.ipv6.conf.all.accept_redirects = 0 -- - sysctl_net_ipv6_conf_all_accept_redirects -- -- #### net.ipv6.conf.defaults.accept_redirects = 0 -- - sysctl_net_ipv6_conf_default_accept_redirects -- -- ### 3.2.3 Ensure secure ICMP redirects are not accepted (Scored) -- #### net.ipv4.conf.all.secure_redirects = 0 -- - sysctl_net_ipv4_conf_all_secure_redirects -- -- #### net.ipv4.cof.default.secure_redirects = 0 -- - sysctl_net_ipv4_conf_default_secure_redirects -- -- ### 3.2.4 Ensure suspicious packets are logged (Scored) -- #### net.ipv4.conf.all.log_martians = 1 -- - sysctl_net_ipv4_conf_all_log_martians -- -- #### net.ipv4.conf.default.log_martians = 1 -- - sysctl_net_ipv4_conf_default_log_martians -- -- ### 3.2.5 Ensure broadcast ICMP requests are ignored (Scored) -- - sysctl_net_ipv4_icmp_echo_ignore_broadcasts -- -- ### 3.2.6 Ensure bogus ICMP responses are ignored (Scored) -- - sysctl_net_ipv4_icmp_ignore_bogus_error_responses -- -- ### 3.2.7 Ensure Reverse Path Filtering is enabled (Scored) -- #### net.ipv4.conf.all.rp_filter = 1 -- - sysctl_net_ipv4_conf_all_rp_filter -- -- #### net.ipv4.conf.default.rp_filter = 1 -- - sysctl_net_ipv4_conf_default_rp_filter -- -- ### 3.2.8 Ensure TCP SYN Cookies is enabled (Scored) -- - sysctl_net_ipv4_tcp_syncookies -- -- ### 3.2.9 Ensure IPv6 router advertisements are not accepted (Scored) -- #### net.ipv6.conf.all.accept_ra = 0 -- - sysctl_net_ipv6_conf_all_accept_ra -- -- #### net.ipv6.conf.default.accept_ra = 0 -- - sysctl_net_ipv6_conf_default_accept_ra -- -- ## 3.3 Uncommon Network Protocols -- -- ### 3.3.1 Ensure DCCP is disabled (Scored) -- - kernel_module_dccp_disabled -- -- ### Ensure SCTP is disabled (Scored) -- - kernel_module_sctp_disabled -- -- ### 3.3.3 Ensure RDS is disabled (Scored) -- - kernel_module_rds_disabled -- -- ### 3.3.4 Ensure TIPC is disabled (Scored) -- - kernel_module_tipc_disabled -- -- ## 3.4 Firewall Configuration -- -- ### 3.4.1 Ensure Firewall software is installed -- -- #### 3.4.1.1 Ensure a Firewall package is installed (Scored) -- ##### firewalld -- - package_firewalld_installed -- -- ##### nftables -- #NEED RULE - https://github.com/ComplianceAsCode/content/issues/5237 -- -- ##### iptables -- #- package_iptables_installed -- -- ### 3.4.2 Configure firewalld -- -- #### 3.4.2.1 Ensure firewalld service is enabled and running (Scored) -- - service_firewalld_enabled -- -- #### 3.4.2.2 Ensure iptables is not enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5238 -- -- #### 3.4.2.3 Ensure nftables is not enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5239 -- -- #### 3.4.2.4 Ensure default zone is set (Scored) -- - set_firewalld_default_zone -- -- #### 3.4.2.5 Ensure network interfaces are assigned to -- #### appropriate zone (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5240 -- -- #### 3.4.2.6 Ensure unnecessary services and ports are not -- #### accepted (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5241 -- -- ### 3.4.3 Configure nftables -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5242 -- -- #### 3.4.3.1 Ensure iptables are flushed (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5243 -- -- #### 3.4.3.2 Ensure a table exists (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5244 -- -- #### 3.4.3.3 Ensure base chains exist (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5245 -- -- #### 3.4.3.4 Ensure loopback traffic is configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5246 -- -- #### 3.4.3.5 Ensure outbound and established connections are -- #### configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5247 -- -- #### 3.4.3.6 Ensure default deny firewall policy (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5248 -- -- #### 3.4.3.7 Ensure nftables service is enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5249 -- -- #### 3.4.3.8 Ensure nftables rules are permanent (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5250 -- -- ### 3.4.4 Configure iptables -- -- #### 3.4.4.1 Configure IPv4 iptables -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5251 -- -- ##### 3.4.4.1.1 Ensure default deny firewall policy (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5252 -- -- ##### 3.4.4.1.2 Ensure loopback traffic is configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5253 -- -- ##### 3.4.4.1.3 Ensure outbound and established connections are -- ##### configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5254 -- -- ##### 3.4.4.1.4 Ensure firewall rules exist for all open ports (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5255 -- -- #### 3.4.4.2 Configure IPv6 ip6tables -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5256 -- -- ##### 3.4.4.2.1 Ensure IPv6 default deny firewall policy (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5257 -- -- ##### 3.4.4.2.2 Ensure IPv6 loopback traffic is configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5258 -- -- ##### 3.4.4.2.3 Ensure IPv6 outbound and established connections are -- ##### configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5260 -- -- ## 3.5 Ensure wireless interfaces are disabled (Scored) -- - wireless_disable_interfaces -- -- ## 3.6 Disable IPv6 (Not Scored) -- - kernel_module_ipv6_option_disabled -- -- # Logging and Auditing -- -- ## 4.1 Configure System Accounting (auditd) -- -- ### 4.1.1 Ensure auditing is enabled -- -- #### 4.1.1.1 Ensure auditd is installed (Scored) -- - package_audit_installed -- -- #### 4.1.1.2 Ensure auditd service is enabled (Scored) -- - service_auditd_enabled -- -- #### 4.1.1.3 Ensure auditing for processes that start prior to audit -- #### is enabled (Scored) -- - grub2_audit_argument -- -- #### 4.1.1.4 Ensure audit_backlog_limit is sufficient (Scored) -- - grub2_audit_backlog_limit_argument -- -- ### 4.1.2 Configure Data Retention -- -- #### 4.1.2.1 Ensure audit log storage size is configured (Scored) -- - auditd_data_retention_max_log_file -- -- #### 4.1.2.2 Ensure audit logs are not automatically deleted (Scored) -- - auditd_data_retention_max_log_file_action -- -- #### 4.1.2.3 Ensure system is disabled when audit logs are full (Scored) -- - var_auditd_space_left_action=email -- - auditd_data_retention_space_left_action -- -- ##### action_mail_acct = root -- - var_auditd_action_mail_acct=root -- - auditd_data_retention_action_mail_acct -- -- ##### admin_space_left_action = halt -- - var_auditd_admin_space_left_action=halt -- - auditd_data_retention_admin_space_left_action -- -- ### 4.1.3 Ensure changes to system administration scope -- ### (sudoers) is collected (Scored) -- - audit_rules_sysadmin_actions -- -- ### 4.1.4 Ensure login and logout events are collected (Scored) -- - audit_rules_login_events_faillock -- - audit_rules_login_events_lastlog -- -- ### 4.1.5 Ensure session initiation information is collected (Scored) -- - audit_rules_session_events -- -- ### 4.1.6 Ensure events that modify date and time information -- ### are collected (Scored) -- #### adjtimex -- - audit_rules_time_adjtimex -- -- #### settimeofday -- - audit_rules_time_settimeofday -- -- #### stime -- - audit_rules_time_stime -- -- #### clock_settime -- - audit_rules_time_clock_settime -- -- #### -w /etc/localtime -p wa -- - audit_rules_time_watch_localtime -- -- ### 4.1.7 Ensure events that modify the system's Mandatory -- ### Access Control are collected (Scored) -- #### -w /etc/selinux/ -p wa -- - audit_rules_mac_modification -- -- #### -w /usr/share/selinux/ -p wa -- # NEED RULE - https://github.com/ComplianceAsCode/content/issues/5264 -- -- ### 4.1.8 Ensure events that modify the system's network -- ### enironment are collected (Scored) -- - audit_rules_networkconfig_modification -- -- ### 4.1.9 Ensure discretionary access control permission modification -- ### events are collected (Scored) -- - audit_rules_dac_modification_chmod -- - audit_rules_dac_modification_fchmod -- - audit_rules_dac_modification_fchmodat -- - audit_rules_dac_modification_chown -- - audit_rules_dac_modification_fchown -- - audit_rules_dac_modification_fchownat -- - audit_rules_dac_modification_lchown -- - audit_rules_dac_modification_setxattr -- - audit_rules_dac_modification_lsetxattr -- - audit_rules_dac_modification_fsetxattr -- - audit_rules_dac_modification_removexattr -- - audit_rules_dac_modification_lremovexattr -- - audit_rules_dac_modification_fremovexattr -- -- ### 4.1.10 Ensure unsuccessful unauthorized file access attempts are -- ### collected (Scored) -- - audit_rules_unsuccessful_file_modification_creat -- - audit_rules_unsuccessful_file_modification_open -- - audit_rules_unsuccessful_file_modification_openat -- - audit_rules_unsuccessful_file_modification_truncate -- - audit_rules_unsuccessful_file_modification_ftruncate -- # Opinionated selection -- - audit_rules_unsuccessful_file_modification_open_by_handle_at -- -- ### 4.1.11 Ensure events that modify user/group information are -- ### collected (Scored) -- - audit_rules_usergroup_modification_passwd -- - audit_rules_usergroup_modification_group -- - audit_rules_usergroup_modification_gshadow -- - audit_rules_usergroup_modification_shadow -- - audit_rules_usergroup_modification_opasswd -- -- ### 4.1.12 Ensure successful file system mounts are collected (Scored) -- - audit_rules_media_export -- -- ### 4.1.13 Ensure use of privileged commands is collected (Scored) -- - audit_rules_privileged_commands -- -- ### 4.1.14 Ensure file deletion events by users are collected -- ### (Scored) -- - audit_rules_file_deletion_events_unlink -- - audit_rules_file_deletion_events_unlinkat -- - audit_rules_file_deletion_events_rename -- - audit_rules_file_deletion_events_renameat -- # Opinionated selection -- - audit_rules_file_deletion_events_rmdir -- -- ### 4.1.15 Ensure kernel module loading and unloading is collected -- ### (Scored) -- - audit_rules_kernel_module_loading -- -- ### 4.1.16 Ensure system administrator actions (sudolog) are -- ### collected (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5516 -- -- ### 4.1.17 Ensure the audit configuration is immutable (Scored) -- - audit_rules_immutable -- -- ## 4.2 Configure Logging -- -- ### 4.2.1 Configure rsyslog -- -- #### 4.2.1.1 Ensure rsyslog is installed (Scored) -- - package_rsyslog_installed -- -- #### 4.2.1.2 Ensure rsyslog Service is enabled (Scored) -- - service_rsyslog_enabled -- -- #### 4.2.1.3 Ensure rsyslog default file permissions configured (Scored) -- - rsyslog_files_permissions -- -- #### 4.2.1.4 Ensure logging is configured (Not Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5519 -- -- #### 4.2.1.5 Ensure rsyslog is configured to send logs to a remote -- #### log host (Scored) -- - rsyslog_remote_loghost -- -- #### 4.2.1.6 Ensure remote rsyslog messages are only accepted on -- #### designated log hosts (Not Scored) -- - rsyslog_nolisten -- -- ### 4.2.2 Configure journald -- -- #### 4.2.2.1 Ensure journald is configured to send logs to -- #### rsyslog (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5520 -- -- #### 4.2.2.2 Ensure journald is configured to compress large -- #### log files (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5521 -- -- -- #### 4.2.2.3 Ensure journald is configured to write logfiles to -- #### persistent disk (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5522 -- -- ### 4.2.3 Ensure permissions on all logfiles are configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5523 -- -- ## 4.3 Ensure logrotate is configured (Not Scored) -- -- # 5 Access, Authentication and Authorization -- -- ## 5.1 Configure cron -- -- ### 5.1.1 Ensure cron daemon is enabled (Scored) -- - service_crond_enabled -- -- -- ### 5.1.2 Ensure permissions on /etc/crontab are configured (Scored) -- # chown root:root /etc/crontab -- - file_owner_crontab -- - file_groupowner_crontab -- # chmod og-rwx /etc/crontab -- - file_permissions_crontab -- -- ### 5.1.3 Ensure permissions on /etc/cron.hourly are configured (Scored) -- # chown root:root /etc/cron.hourly -- - file_owner_cron_hourly -- - file_groupowner_cron_hourly -- # chmod og-rwx /etc/cron.hourly -- - file_permissions_cron_hourly -- -- ### 5.1.4 Ensure permissions on /etc/cron.daily are configured (Scored) -- # chown root:root /etc/cron.daily -- - file_owner_cron_daily -- - file_groupowner_cron_daily -- # chmod og-rwx /etc/cron.daily -- - file_permissions_cron_daily -- -- ### 5.1.5 Ensure permissions on /etc/cron.weekly are configured (Scored) -- # chown root:root /etc/cron.weekly -- - file_owner_cron_weekly -- - file_groupowner_cron_weekly -- # chmod og-rwx /etc/cron.weekly -- - file_permissions_cron_weekly -- -- ### 5.1.6 Ensure permissions on /etc/cron.monthly are configured (Scored) -- # chown root:root /etc/cron.monthly -- - file_owner_cron_monthly -- - file_groupowner_cron_monthly -- # chmod og-rwx /etc/cron.monthly -- - file_permissions_cron_monthly -- -- ### 5.1.7 Ensure permissions on /etc/cron.d are configured (Scored) -- # chown root:root /etc/cron.d -- - file_owner_cron_d -- - file_groupowner_cron_d -- # chmod og-rwx /etc/cron.d -- - file_permissions_cron_d -- -- ### 5.1.8 Ensure at/cron is restricted to authorized users (Scored) -- -- -- ## 5.2 SSH Server Configuration -- -- ### 5.2.1 Ensure permissions on /etc/ssh/sshd_config are configured (Scored) -- # chown root:root /etc/ssh/sshd_config -- - file_owner_sshd_config -- - file_groupowner_sshd_config -- -- # chmod og-rwx /etc/ssh/sshd_config -- - file_permissions_sshd_config -- -- ### 5.2.2 Ensure SSH access is limited (Scored) -- -- -- ### 5.2.3 Ensure permissions on SSH private host key files are -- ### configured (Scored) -- # TO DO: The rule sets to 640, but benchmark wants 600 -- - file_permissions_sshd_private_key -- # TO DO: check owner of private keys in /etc/ssh is root:root -- -- ### 5.2.4 Ensure permissions on SSH public host key files are configured -- ### (Scored) -- - file_permissions_sshd_pub_key -- # TO DO: check owner of pub keys in /etc/ssh is root:root -- -- # Ensure that the configuration is done the right way -- - sshd_use_directory_configuration -- ### 5.2.5 Ensure SSH LogLevel is appropriate (Scored) -- - sshd_set_loglevel_info -- -- ### 5.2.6 Ensure SSH X11 forward is disabled (Scored) -- - sshd_disable_x11_forwarding -- -- ### 5.2.7 Ensure SSH MaxAuthTries is set to 4 or less (Scored) -- - sshd_max_auth_tries_value=4 -- - sshd_set_max_auth_tries -- -- ### 5.2.8 Ensure SSH IgnoreRhosts is enabled (Scored) -- - sshd_disable_rhosts -- -- ### 5.2.9 Ensure SSH HostbasedAuthentication is disabled (Scored) -- - disable_host_auth -- -- ### 5.2.10 Ensure SSH root login is disabled (Scored) -- - sshd_disable_root_login -- -- ### 5.2.11 Ensure SSH PermitEmptyPasswords is disabled (Scored) -- - sshd_disable_empty_passwords -- -- ### 5.2.12 Ensure SSH PermitUserEnvironment is disabled (Scored) -- - sshd_do_not_permit_user_env -- -- ### 5.2.13 Ensure SSH Idle Timeout Interval is configured (Scored) -- # ClientAliveInterval 300 -- - sshd_idle_timeout_value=5_minutes -- - sshd_set_idle_timeout -- -- # ClientAliveCountMax 0 -- - var_sshd_set_keepalive=0 -- -- ### 5.2.14 Ensure SSH LoginGraceTime is set to one minute -- ### or less (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5525 -- -- ### 5.2.15 Ensure SSH warning banner is configured (Scored) -- - sshd_enable_warning_banner -- -- ### 5.2.16 Ensure SSH PAM is enabled (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5526 -- -- ### 5.2.17 Ensure SSH AllowTcpForwarding is disabled (Scored) -- - sshd_disable_tcp_forwarding -- -- ### 5.2.18 Ensure SSH MaxStarups is configured (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5528 -- -- ### 5.2.19 Ensure SSH MaxSessions is set to 4 or less (Scored) -- - sshd_set_max_sessions -- - var_sshd_max_sessions=4 -- -- ### 5.2.20 Ensure system-wide crypto policy is not over-ridden (Scored) -- - configure_ssh_crypto_policy -- -- ## 5.3 Configure authselect -- -- -- ### 5.3.1 Create custom authselectet profile (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5530 -- -- ### 5.3.2 Select authselect profile (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5531 -- -- ### 5.3.3 Ensure authselect includes with-faillock (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5532 -- -- ## 5.4 Configure PAM -- -- ### 5.4.1 Ensure password creation requirements are configured (Scored) -- # NEEDS RULE: try_first_pass - https://github.com/ComplianceAsCode/content/issues/5533 -- - accounts_password_pam_retry -- - var_password_pam_minlen=14 -- - accounts_password_pam_minlen -- - var_password_pam_minclass=4 -- - accounts_password_pam_minclass -- -- ### 5.4.2 Ensure lockout for failed password attempts is -- ### configured (Scored) -- - var_accounts_passwords_pam_faillock_unlock_time=900 -- - var_accounts_passwords_pam_faillock_deny=5 -- - accounts_passwords_pam_faillock_unlock_time -- - accounts_passwords_pam_faillock_deny -- -- ### 5.4.3 Ensure password reuse is limited (Scored) -- - var_password_pam_unix_remember=5 -- - accounts_password_pam_unix_remember -- -- ### 5.4.4 Ensure password hashing algorithm is SHA-512 (Scored) -- - set_password_hashing_algorithm_systemauth -- -- ## 5.5 User Accounts and Environment -- -- ### 5.5.1 Set Shadow Password Suite Parameters -- -- #### 5.5.1 Ensure password expiration is 365 days or less (Scored) -- - var_accounts_maximum_age_login_defs=365 -- - accounts_maximum_age_login_defs -- -- #### 5.5.1.2 Ensure minimum days between password changes is 7 -- #### or more (Scored) -- - var_accounts_minimum_age_login_defs=7 -- - accounts_minimum_age_login_defs -- -- #### 5.5.1.3 Ensure password expiration warning days is -- #### 7 or more (Scored) -- - var_accounts_password_warn_age_login_defs=7 -- - accounts_password_warn_age_login_defs -- -- #### 5.5.1.4 Ensure inactive password lock is 30 days or less (Scored) -- # TODO: Rule doesn't check list of users -- # https://github.com/ComplianceAsCode/content/issues/5536 -- - var_account_disable_post_pw_expiration=30 -- - account_disable_post_pw_expiration -- -- #### 5.5.1.5 Ensure all users last password change date is -- #### in the past (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5537 -- -- ### 5.5.2 Ensure system accounts are secured (Scored) -- - no_shelllogin_for_systemaccounts -- -- ### 5.5.3 Ensure default user shell timeout is 900 seconds -- ### or less (Scored) -- - var_accounts_tmout=15_min -- - accounts_tmout -- -- ### 5.5.4 Ensure default group for the root account is -- ### GID 0 (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5539 -- -- ### 5.5.5 Ensure default user mask is 027 or more restrictive (Scored) -- - var_accounts_user_umask=027 -- - accounts_umask_etc_bashrc -- - accounts_umask_etc_profile -- -- ## 5.6 Ensure root login is restricted to system console (Not Scored) -- - securetty_root_login_console_only -- - no_direct_root_logins -- -- ## 5.7 Ensure access to the su command is restricted (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5541 -- -- # System Maintenance -- -- ## 6.1 System File Permissions -- -- ### 6.1.1 Audit system file permissions (Not Scored) -- - rpm_verify_permissions -- - rpm_verify_ownership -- -- ### 6.1.2 Ensure permissions on /etc/passwd are configured (Scored) -- # chown root:root /etc/passwd -- - file_owner_etc_passwd -- - file_groupowner_etc_passwd -- -- # chmod 644 /etc/passwd -- - file_permissions_etc_passwd -- -- ### 6.1.3 Ensure permissions on /etc/shadow are configured (Scored) -- # chown root:root /etc/shadow -- - file_owner_etc_shadow -- - file_groupowner_etc_shadow -- -- # chmod o-rwx,g-wx /etc/shadow -- - file_permissions_etc_shadow -- -- ### 6.1.4 Ensure permissions on /etc/group are configured (Scored) -- # chown root:root /etc/group -- - file_owner_etc_group -- - file_groupowner_etc_group -- -- # chmod 644 /etc/group -- - file_permissions_etc_group -- -- ### 6.1.5 Ensure permissions on /etc/gshadow are configured (Scored) -- # chown root:root /etc/gshadow -- - file_owner_etc_gshadow -- - file_groupowner_etc_gshadow -- -- # chmod o-rwx,g-rw /etc/gshadow -- - file_permissions_etc_gshadow -- -- ### 6.1.6 Ensure permissions on /etc/passwd- are configured (Scored) -- # chown root:root /etc/passwd- -- - file_owner_backup_etc_passwd -- - file_groupowner_backup_etc_passwd -- -- # chmod 644 /etc/passwd- -- - file_permissions_backup_etc_passwd -- -- ### 6.1.7 Ensure permissions on /etc/shadow- are configured (Scored) -- # chown root:root /etc/shadow- -- - file_owner_backup_etc_shadow -- - file_groupowner_backup_etc_shadow -- -- # chmod 0000 /etc/shadow- -- - file_permissions_backup_etc_shadow -- -- ### 6.1.8 Ensure permissions on /etc/group- are configured (Scored) -- # chown root:root /etc/group- -- - file_owner_backup_etc_group -- - file_groupowner_backup_etc_group -- -- # chmod 644 /etc/group- -- - file_permissions_backup_etc_group -- -- ### 6.1.9 Ensure permissions on /etc/gshadow- are configured (Scored) -- # chown root:root /etc/gshadow- -- - file_owner_backup_etc_gshadow -- - file_groupowner_backup_etc_gshadow -- -- # chmod 0000 /etc/gshadow- -- - file_permissions_backup_etc_gshadow -- -- ### 6.1.10 Ensure no world writable files exist (Scored) -- - file_permissions_unauthorized_world_writable -- -- ### 6.1.11 Ensure no unowned files or directories exist (Scored) -- - no_files_unowned_by_user -- -- ### 6.1.12 Ensure no ungrouped files or directories exist (Scored) -- - file_permissions_ungroupowned -- -- ### 6.1.13 Audit SUID executables (Not Scored) -- - file_permissions_unauthorized_suid -- -- ### 6.1.14 Audit SGID executables (Not Scored) -- - file_permissions_unauthorized_sgid -- -- ## 6.2 User and Group Settings -- -- ### 6.2.2 Ensure no legacy "+" entries exist in /etc/passwd (Scored) -- - no_legacy_plus_entries_etc_passwd -- -- ### 6.2.4 Ensure no legacy "+" entries exist in /etc/shadow (Scored) -- - no_legacy_plus_entries_etc_shadow -- -- ### 6.2.5 Ensure no legacy "+" entries exist in /etc/group (Scored) -- - no_legacy_plus_entries_etc_group -- -- ### 6.2.6 Ensure root is the only UID 0 account (Scored) -- - accounts_no_uid_except_zero -- -- ### 6.2.7 Ensure users' home directories permissions are 750 -- ### or more restrictive (Scored) -- - file_permissions_home_dirs -- -- ### 6.2.8 Ensure users own their home directories (Scored) -- # NEEDS RULE for user owner @ https://github.com/ComplianceAsCode/content/issues/5507 -- - file_groupownership_home_directories -- -- ### 6.2.9 Ensure users' dot files are not group or world -- ### writable (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5506 -- -- ### 6.2.10 Ensure no users have .forward files (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5505 -- -- ### 6.2.11 Ensure no users have .netrc files (Scored) -- - no_netrc_files -- -- ### 6.2.12 Ensure users' .netrc Files are not group or -- ### world accessible (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5504 -- -- ### 6.2.13 Ensure no users have .rhosts files (Scored) -- - no_rsh_trust_files -- -- ### 6.2.14 Ensure all groups in /etc/passwd exist in -- ### /etc/group (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5503 -- -- ### 6.2.15 Ensure no duplicate UIDs exist (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5502 -- -- ### 6.2.16 Ensure no duplicate GIDs exist (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5501 -- -- ### 6.2.17 Ensure no duplicate user names exist (Scored) -- - account_unique_name -- -- ### 6.2.18 Ensure no duplicate group names exist (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5500 -- -- ### 6.2.19 Ensure shadow group is empty (Scored) -- # NEEDS RULE - https://github.com/ComplianceAsCode/content/issues/5499 -- -- ### 6.2.20 Ensure all users' home directories exist (Scored) -- - accounts_user_interactive_home_directory_exists -+ - cis_rhel8:all:l2_server -diff --git a/products/rhel9/profiles/cis_server_l1.profile b/products/rhel9/profiles/cis_server_l1.profile -new file mode 100644 -index 0000000000..18314d9c46 ---- /dev/null -+++ b/products/rhel9/profiles/cis_server_l1.profile -@@ -0,0 +1,19 @@ -+documentation_complete: true -+ -+metadata: -+ version: 1.0.1 -+ SMEs: -+ - vojtapolasek -+ - yuumasato -+ -+reference: https://www.cisecurity.org/benchmark/red_hat_linux/ -+ -+title: '[DRAFT] CIS Red Hat Enterprise Linux 9 Benchmark for Level 1 - Server' -+ -+description: |- -+ This is a draft profile based on its RHEL8 version for experimental purposes. -+ It is not based on the CIS benchmark for RHEL9, because this one was not available at time of -+ the release. -+ -+selections: -+ - cis_rhel8:all:l1_server -diff --git a/products/rhel9/profiles/cis_workstation_l1.profile b/products/rhel9/profiles/cis_workstation_l1.profile -new file mode 100644 -index 0000000000..3ce1c80089 ---- /dev/null -+++ b/products/rhel9/profiles/cis_workstation_l1.profile -@@ -0,0 +1,19 @@ -+documentation_complete: true -+ -+metadata: -+ version: 1.0.1 -+ SMEs: -+ - vojtapolasek -+ - yuumasato -+ -+reference: https://www.cisecurity.org/benchmark/red_hat_linux/ -+ -+title: '[DRAFT] CIS Red Hat Enterprise Linux 9 Benchmark for Level 1 - Workstation' -+ -+description: |- -+ This is a draft profile based on its RHEL8 version for experimental purposes. -+ It is not based on the CIS benchmark for RHEL9, because this one was not available at time of -+ the release. -+ -+selections: -+ - cis_rhel8:all:l1_workstation -diff --git a/products/rhel9/profiles/cis_workstation_l2.profile b/products/rhel9/profiles/cis_workstation_l2.profile -new file mode 100644 -index 0000000000..84d76b801f ---- /dev/null -+++ b/products/rhel9/profiles/cis_workstation_l2.profile -@@ -0,0 +1,19 @@ -+documentation_complete: true -+ -+metadata: -+ version: 1.0.1 -+ SMEs: -+ - vojtapolasek -+ - yuumasato -+ -+reference: https://www.cisecurity.org/benchmark/red_hat_linux/ -+ -+title: '[DRAFT] CIS Red Hat Enterprise Linux 9 Benchmark for Level 2 - Workstation' -+ -+description: |- -+ This is a draft profile based on its RHEL8 version for experimental purposes. -+ It is not based on the CIS benchmark for RHEL9, because this one was not available at time of -+ the release. -+ -+selections: -+ - cis_rhel8:all:l2_workstation - -From 11c06fcbc1c75bcc17a765d611449af66efcf3e0 Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Fri, 20 Aug 2021 17:35:21 +0200 -Subject: [PATCH 2/4] Add RHEL9 CIS kickstarts - -Those are based on their RHEL8 counterparts ---- - products/rhel9/kickstart/ssg-rhel9-cis-ks.cfg | 6 +- - .../kickstart/ssg-rhel9-cis_server_l1-ks.cfg | 133 ++++++++++++++++ - .../ssg-rhel9-cis_workstation_l1-ks.cfg | 133 ++++++++++++++++ - .../ssg-rhel9-cis_workstation_l2-ks.cfg | 143 ++++++++++++++++++ - 4 files changed, 412 insertions(+), 3 deletions(-) - create mode 100644 products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg - create mode 100644 products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg - create mode 100644 products/rhel9/kickstart/ssg-rhel9-cis_workstation_l2-ks.cfg - -diff --git a/products/rhel9/kickstart/ssg-rhel9-cis-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-cis-ks.cfg -index 47685726dd..88290ff977 100644 ---- a/products/rhel9/kickstart/ssg-rhel9-cis-ks.cfg -+++ b/products/rhel9/kickstart/ssg-rhel9-cis-ks.cfg -@@ -1,6 +1,6 @@ --# SCAP Security Guide CIS profile kickstart for Red Hat Enterprise Linux 9 Server -+# SCAP Security Guide CIS profile (Level 2 - Server) kickstart for Red Hat Enterprise Linux 9 Server - # Version: 0.0.1 --# Date: 2021-07-13 -+# Date: 2021-08-12 - # - # Based on: - # https://pykickstart.readthedocs.io/en/latest/ -@@ -124,7 +124,7 @@ logvol swap --name=lv_swap --vgname=VolGroup --size=2016 - - # Harden installation with CIS profile - # For more details and configuration options see --# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-com_redhat_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program - %addon com_redhat_oscap - content-type = scap-security-guide - profile = xccdf_org.ssgproject.content_profile_cis -diff --git a/products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg -new file mode 100644 -index 0000000000..d8d24e4394 ---- /dev/null -+++ b/products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg -@@ -0,0 +1,133 @@ -+# SCAP Security Guide CIS profile (Level 1 - Server) kickstart for Red Hat Enterprise Linux 9 Server -+# Version: 0.0.1 -+# Date: 2021-08-12 -+# -+# Based on: -+# https://pykickstart.readthedocs.io/en/latest/ -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart -+ -+# Specify installation method to use for installation -+# To use a different one comment out the 'url' one below, update -+# the selected choice with proper options & un-comment it -+# -+# Install from an installation tree on a remote server via FTP or HTTP: -+# --url the URL to install from -+# -+# Example: -+# -+# url --url=http://192.168.122.1/image -+# -+# Modify concrete URL in the above example appropriately to reflect the actual -+# environment machine is to be installed in -+# -+# Other possible / supported installation methods: -+# * install from the first CD-ROM/DVD drive on the system: -+# -+# cdrom -+# -+# * install from a directory of ISO images on a local drive: -+# -+# harddrive --partition=hdb2 --dir=/tmp/install-tree -+# -+# * install from provided NFS server: -+# -+# nfs --server= --dir= [--opts=] -+# -+ -+# Set language to use during installation and the default language to use on the installed system (required) -+lang en_US.UTF-8 -+ -+# Set system keyboard type / layout (required) -+keyboard us -+ -+# Configure network information for target system and activate network devices in the installer environment (optional) -+# --onboot enable device at a boot time -+# --device device to be activated and / or configured with the network command -+# --bootproto method to obtain networking configuration for device (default dhcp) -+# --noipv6 disable IPv6 on this device -+# -+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration, -+# "--bootproto=static" must be used. For example: -+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1 -+# -+network --onboot yes --device eth0 --bootproto dhcp --noipv6 -+ -+# Set the system's root password (required) -+# Plaintext password is: server -+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create -+# encrypted password form for different plaintext password -+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0 -+ -+# The selected profile will restrict root login -+# Add a user that can login and escalate privileges -+# Plaintext password is: admin123 -+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted -+ -+# Configure firewall settings for the system (optional) -+# --enabled reject incoming connections that are not in response to outbound requests -+# --ssh allow sshd service through the firewall -+firewall --enabled --ssh -+ -+# Set up the authentication options for the system (required) -+# sssd profile sets sha512 to hash passwords -+# passwords are shadowed by default -+# See the manual page for authselect-profile for a complete list of possible options. -+authselect select sssd -+ -+# State of SELinux on the installed system (optional) -+# Defaults to enforcing -+selinux --enforcing -+ -+# Set the system time zone (required) -+timezone --utc America/New_York -+ -+# Specify how the bootloader should be installed (required) -+# Plaintext password is: password -+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create -+# encrypted password form for different plaintext password -+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0 -+ -+# Initialize (format) all disks (optional) -+zerombr -+ -+# The following partition layout scheme assumes disk of size 20GB or larger -+# Modify size of partitions appropriately to reflect actual machine's hardware -+# -+# Remove Linux partitions from the system prior to creating new ones (optional) -+# --linux erase all Linux partitions -+# --initlabel initialize the disk label to the default based on the underlying architecture -+clearpart --linux --initlabel -+ -+# Create primary system partitions (required for installs) -+part /boot --fstype=xfs --size=512 -+part pv.01 --grow --size=1 -+ -+# Create a Logical Volume Management (LVM) group (optional) -+volgroup VolGroup --pesize=4096 pv.01 -+ -+# Create particular logical volumes (optional) -+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=10240 --grow -+# Ensure /tmp Located On Separate Partition -+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid" -+logvol swap --name=lv_swap --vgname=VolGroup --size=2016 -+ -+ -+# Harden installation with CIS profile -+# For more details and configuration options see -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program -+%addon com_redhat_oscap -+ content-type = scap-security-guide -+ profile = xccdf_org.ssgproject.content_profile_cis_server_l1 -+%end -+ -+# Packages selection (%packages section is required) -+%packages -+ -+# Require @Base -+@Base -+ -+%end # End of %packages section -+ -+# Reboot after the installation is complete (optional) -+# --eject attempt to eject CD or DVD media before rebooting -+reboot --eject -diff --git a/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg -new file mode 100644 -index 0000000000..fb6d0ab9a4 ---- /dev/null -+++ b/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg -@@ -0,0 +1,133 @@ -+# SCAP Security Guide CIS profile (Level 1 - Workstation) kickstart for Red Hat Enterprise Linux 9 Server -+# Version: 0.0.1 -+# Date: 2021-08-12 -+# -+# Based on: -+# https://pykickstart.readthedocs.io/en/latest/ -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart -+ -+# Specify installation method to use for installation -+# To use a different one comment out the 'url' one below, update -+# the selected choice with proper options & un-comment it -+# -+# Install from an installation tree on a remote server via FTP or HTTP: -+# --url the URL to install from -+# -+# Example: -+# -+# url --url=http://192.168.122.1/image -+# -+# Modify concrete URL in the above example appropriately to reflect the actual -+# environment machine is to be installed in -+# -+# Other possible / supported installation methods: -+# * install from the first CD-ROM/DVD drive on the system: -+# -+# cdrom -+# -+# * install from a directory of ISO images on a local drive: -+# -+# harddrive --partition=hdb2 --dir=/tmp/install-tree -+# -+# * install from provided NFS server: -+# -+# nfs --server= --dir= [--opts=] -+# -+ -+# Set language to use during installation and the default language to use on the installed system (required) -+lang en_US.UTF-8 -+ -+# Set system keyboard type / layout (required) -+keyboard us -+ -+# Configure network information for target system and activate network devices in the installer environment (optional) -+# --onboot enable device at a boot time -+# --device device to be activated and / or configured with the network command -+# --bootproto method to obtain networking configuration for device (default dhcp) -+# --noipv6 disable IPv6 on this device -+# -+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration, -+# "--bootproto=static" must be used. For example: -+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1 -+# -+network --onboot yes --device eth0 --bootproto dhcp --noipv6 -+ -+# Set the system's root password (required) -+# Plaintext password is: server -+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create -+# encrypted password form for different plaintext password -+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0 -+ -+# The selected profile will restrict root login -+# Add a user that can login and escalate privileges -+# Plaintext password is: admin123 -+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted -+ -+# Configure firewall settings for the system (optional) -+# --enabled reject incoming connections that are not in response to outbound requests -+# --ssh allow sshd service through the firewall -+firewall --enabled --ssh -+ -+# Set up the authentication options for the system (required) -+# sssd profile sets sha512 to hash passwords -+# passwords are shadowed by default -+# See the manual page for authselect-profile for a complete list of possible options. -+authselect select sssd -+ -+# State of SELinux on the installed system (optional) -+# Defaults to enforcing -+selinux --enforcing -+ -+# Set the system time zone (required) -+timezone --utc America/New_York -+ -+# Specify how the bootloader should be installed (required) -+# Plaintext password is: password -+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create -+# encrypted password form for different plaintext password -+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0 -+ -+# Initialize (format) all disks (optional) -+zerombr -+ -+# The following partition layout scheme assumes disk of size 20GB or larger -+# Modify size of partitions appropriately to reflect actual machine's hardware -+# -+# Remove Linux partitions from the system prior to creating new ones (optional) -+# --linux erase all Linux partitions -+# --initlabel initialize the disk label to the default based on the underlying architecture -+clearpart --linux --initlabel -+ -+# Create primary system partitions (required for installs) -+part /boot --fstype=xfs --size=512 -+part pv.01 --grow --size=1 -+ -+# Create a Logical Volume Management (LVM) group (optional) -+volgroup VolGroup --pesize=4096 pv.01 -+ -+# Create particular logical volumes (optional) -+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=10240 --grow -+# Ensure /tmp Located On Separate Partition -+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid" -+logvol swap --name=lv_swap --vgname=VolGroup --size=2016 -+ -+ -+# Harden installation with CIS profile -+# For more details and configuration options see -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program -+%addon com_redhat_oscap -+ content-type = scap-security-guide -+ profile = xccdf_org.ssgproject.content_profile_cis_workstation_l1 -+%end -+ -+# Packages selection (%packages section is required) -+%packages -+ -+# Require @Base -+@Base -+ -+%end # End of %packages section -+ -+# Reboot after the installation is complete (optional) -+# --eject attempt to eject CD or DVD media before rebooting -+reboot --eject -diff --git a/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l2-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l2-ks.cfg -new file mode 100644 -index 0000000000..037de3a1b9 ---- /dev/null -+++ b/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l2-ks.cfg -@@ -0,0 +1,143 @@ -+# SCAP Security Guide CIS profile (Level 2 - Workstation) kickstart for Red Hat Enterprise Linux 9 Server -+# Version: 0.0.1 -+# Date: 2021-08-12 -+# -+# Based on: -+# https://pykickstart.readthedocs.io/en/latest/ -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart -+ -+# Specify installation method to use for installation -+# To use a different one comment out the 'url' one below, update -+# the selected choice with proper options & un-comment it -+# -+# Install from an installation tree on a remote server via FTP or HTTP: -+# --url the URL to install from -+# -+# Example: -+# -+# url --url=http://192.168.122.1/image -+# -+# Modify concrete URL in the above example appropriately to reflect the actual -+# environment machine is to be installed in -+# -+# Other possible / supported installation methods: -+# * install from the first CD-ROM/DVD drive on the system: -+# -+# cdrom -+# -+# * install from a directory of ISO images on a local drive: -+# -+# harddrive --partition=hdb2 --dir=/tmp/install-tree -+# -+# * install from provided NFS server: -+# -+# nfs --server= --dir= [--opts=] -+# -+ -+# Set language to use during installation and the default language to use on the installed system (required) -+lang en_US.UTF-8 -+ -+# Set system keyboard type / layout (required) -+keyboard us -+ -+# Configure network information for target system and activate network devices in the installer environment (optional) -+# --onboot enable device at a boot time -+# --device device to be activated and / or configured with the network command -+# --bootproto method to obtain networking configuration for device (default dhcp) -+# --noipv6 disable IPv6 on this device -+# -+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration, -+# "--bootproto=static" must be used. For example: -+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1 -+# -+network --onboot yes --device eth0 --bootproto dhcp --noipv6 -+ -+# Set the system's root password (required) -+# Plaintext password is: server -+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create -+# encrypted password form for different plaintext password -+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0 -+ -+# The selected profile will restrict root login -+# Add a user that can login and escalate privileges -+# Plaintext password is: admin123 -+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted -+ -+# Configure firewall settings for the system (optional) -+# --enabled reject incoming connections that are not in response to outbound requests -+# --ssh allow sshd service through the firewall -+firewall --enabled --ssh -+ -+# Set up the authentication options for the system (required) -+# sssd profile sets sha512 to hash passwords -+# passwords are shadowed by default -+# See the manual page for authselect-profile for a complete list of possible options. -+authselect select sssd -+ -+# State of SELinux on the installed system (optional) -+# Defaults to enforcing -+selinux --enforcing -+ -+# Set the system time zone (required) -+timezone --utc America/New_York -+ -+# Specify how the bootloader should be installed (required) -+# Plaintext password is: password -+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create -+# encrypted password form for different plaintext password -+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0 -+ -+# Initialize (format) all disks (optional) -+zerombr -+ -+# The following partition layout scheme assumes disk of size 20GB or larger -+# Modify size of partitions appropriately to reflect actual machine's hardware -+# -+# Remove Linux partitions from the system prior to creating new ones (optional) -+# --linux erase all Linux partitions -+# --initlabel initialize the disk label to the default based on the underlying architecture -+clearpart --linux --initlabel -+ -+# Create primary system partitions (required for installs) -+part /boot --fstype=xfs --size=512 -+part pv.01 --grow --size=1 -+ -+# Create a Logical Volume Management (LVM) group (optional) -+volgroup VolGroup --pesize=4096 pv.01 -+ -+# Create particular logical volumes (optional) -+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=10240 --grow -+# Ensure /home Located On Separate Partition -+logvol /home --fstype=xfs --name=LogVol02 --vgname=VolGroup --size=1024 --fsoptions="nodev" -+# Ensure /tmp Located On Separate Partition -+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid" -+# Ensure /var/tmp Located On Separate Partition -+logvol /var/tmp --fstype=xfs --name=LogVol7 --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec" -+# Ensure /var Located On Separate Partition -+logvol /var --fstype=xfs --name=LogVol03 --vgname=VolGroup --size=3072 -+# Ensure /var/log Located On Separate Partition -+logvol /var/log --fstype=xfs --name=LogVol04 --vgname=VolGroup --size=1024 -+# Ensure /var/log/audit Located On Separate Partition -+logvol /var/log/audit --fstype=xfs --name=LogVol05 --vgname=VolGroup --size=512 -+logvol swap --name=lv_swap --vgname=VolGroup --size=2016 -+ -+ -+# Harden installation with CIS profile -+# For more details and configuration options see -+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program -+%addon com_redhat_oscap -+ content-type = scap-security-guide -+ profile = xccdf_org.ssgproject.content_profile_cis_workstation_l2 -+%end -+ -+# Packages selection (%packages section is required) -+%packages -+ -+# Require @Base -+@Base -+ -+%end # End of %packages section -+ -+# Reboot after the installation is complete (optional) -+# --eject attempt to eject CD or DVD media before rebooting -+reboot --eject - -From 6775cda905bce1f01cc8e89245f7f5d3f53a5b8d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Mon, 23 Aug 2021 10:16:50 +0200 -Subject: [PATCH 3/4] Add CCEs - -to rules that freshly made it into the RHEL9 CIS draft. ---- - .../ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml | 1 + - .../services/ssh/ssh_server/sshd_set_maxstartups/rule.yml | 1 + - .../rule.yml | 1 + - .../rule.yml | 1 + - .../accounts-session/root_paths/root_path_no_dot/rule.yml | 1 + - .../uefi/file_permissions_efi_grub2_cfg/rule.yml | 1 + - shared/references/cce-redhat-avail.txt | 6 ------ - 7 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml b/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml -index ee54a53dfd..059d25cc7c 100644 ---- a/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml -@@ -22,6 +22,7 @@ severity: medium - identifiers: - cce@rhel7: CCE-82419-3 - cce@rhel8: CCE-82420-1 -+ cce@rhel9: CCE-86923-0 - cce@sle12: CCE-83077-8 - cce@sle15: CCE-83270-9 - -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_set_maxstartups/rule.yml b/linux_os/guide/services/ssh/ssh_server/sshd_set_maxstartups/rule.yml -index 7aec7ffb2c..5a1bf4906e 100644 ---- a/linux_os/guide/services/ssh/ssh_server/sshd_set_maxstartups/rule.yml -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_set_maxstartups/rule.yml -@@ -23,6 +23,7 @@ severity: medium - identifiers: - cce@rhel7: CCE-90714-7 - cce@rhel8: CCE-90718-8 -+ cce@rhel9: CCE-87872-8 - - references: - cis@rhel7: 5.3.21 -diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml -index 62b6f55e00..cf6c38d6f7 100644 ---- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml -@@ -22,6 +22,7 @@ severity: medium - identifiers: - cce@rhel7: CCE-83476-2 - cce@rhel8: CCE-83478-8 -+ cce@rhel9: CCE-86354-8 - - references: - cis-csc: 1,12,15,16,5 -diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_system_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_system_auth/rule.yml -index 8cc56eb876..0eae61281f 100644 ---- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_system_auth/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_system_auth/rule.yml -@@ -22,6 +22,7 @@ severity: medium - identifiers: - cce@rhel7: CCE-83479-6 - cce@rhel8: CCE-83480-4 -+ cce@rhel9: CCE-89176-2 - - references: - cis-csc: 1,12,15,16,5 -diff --git a/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml b/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -index c94de8fa3e..151ad1ebe2 100644 ---- a/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-session/root_paths/root_path_no_dot/rule.yml -@@ -22,6 +22,7 @@ severity: unknown - identifiers: - cce@rhel7: CCE-80199-3 - cce@rhel8: CCE-85914-0 -+ cce@rhel9: CCE-88059-1 - - references: - cis-csc: 11,3,9 -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/file_permissions_efi_grub2_cfg/rule.yml b/linux_os/guide/system/bootloader-grub2/uefi/file_permissions_efi_grub2_cfg/rule.yml -index bc4fdcc7e0..d9c0be8ccf 100644 ---- a/linux_os/guide/system/bootloader-grub2/uefi/file_permissions_efi_grub2_cfg/rule.yml -+++ b/linux_os/guide/system/bootloader-grub2/uefi/file_permissions_efi_grub2_cfg/rule.yml -@@ -22,6 +22,7 @@ severity: medium - identifiers: - cce@rhel7: CCE-83431-7 - cce@rhel8: CCE-85912-4 -+ cce@rhel9: CCE-85925-6 - - references: - cis-csc: 12,13,14,15,16,18,3,5 -diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt -index 6c33c2e85f..e80f25156e 100644 ---- a/shared/references/cce-redhat-avail.txt -+++ b/shared/references/cce-redhat-avail.txt -@@ -50,7 +50,6 @@ CCE-85921-5 - CCE-85922-3 - CCE-85923-1 - CCE-85924-9 --CCE-85925-6 - CCE-85926-4 - CCE-85927-2 - CCE-85928-0 -@@ -458,7 +457,6 @@ CCE-86350-6 - CCE-86351-4 - CCE-86352-2 - CCE-86353-0 --CCE-86354-8 - CCE-86355-5 - CCE-86356-3 - CCE-86357-1 -@@ -1016,7 +1014,6 @@ CCE-86919-8 - CCE-86920-6 - CCE-86921-4 - CCE-86922-2 --CCE-86923-0 - CCE-86924-8 - CCE-86925-5 - CCE-86926-3 -@@ -1947,7 +1944,6 @@ CCE-87868-6 - CCE-87869-4 - CCE-87870-2 - CCE-87871-0 --CCE-87872-8 - CCE-87873-6 - CCE-87874-4 - CCE-87875-1 -@@ -2132,7 +2128,6 @@ CCE-88055-9 - CCE-88056-7 - CCE-88057-5 - CCE-88058-3 --CCE-88059-1 - CCE-88060-9 - CCE-88061-7 - CCE-88062-5 -@@ -3226,7 +3221,6 @@ CCE-89171-3 - CCE-89172-1 - CCE-89173-9 - CCE-89174-7 --CCE-89176-2 - CCE-89177-0 - CCE-89178-8 - CCE-89179-6 - -From 6835e3d0d26ac210f2d376fdad647bb37cb22c8d Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Tue, 24 Aug 2021 10:43:22 +0200 -Subject: [PATCH 4/4] Increase partition size for CIS kickstarts - ---- - products/rhel8/kickstart/ssg-rhel8-cis_server_l1-ks.cfg | 2 +- - products/rhel8/kickstart/ssg-rhel8-cis_workstation_l1-ks.cfg | 2 +- - products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg | 2 +- - products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg -index d8d24e4394..1abcf90304 100644 ---- a/products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg -+++ b/products/rhel9/kickstart/ssg-rhel9-cis_server_l1-ks.cfg -@@ -106,7 +106,7 @@ part pv.01 --grow --size=1 - volgroup VolGroup --pesize=4096 pv.01 - - # Create particular logical volumes (optional) --logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=10240 --grow -+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=16896 --grow - # Ensure /tmp Located On Separate Partition - logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid" - logvol swap --name=lv_swap --vgname=VolGroup --size=2016 -diff --git a/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg -index fb6d0ab9a4..e18e86f474 100644 ---- a/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg -+++ b/products/rhel9/kickstart/ssg-rhel9-cis_workstation_l1-ks.cfg -@@ -106,7 +106,7 @@ part pv.01 --grow --size=1 - volgroup VolGroup --pesize=4096 pv.01 - - # Create particular logical volumes (optional) --logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=10240 --grow -+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=16896 --grow - # Ensure /tmp Located On Separate Partition - logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid" - logvol swap --name=lv_swap --vgname=VolGroup --size=2016 diff --git a/SOURCES/scap-security-guide-0.1.58-rhel9_cis_crypto_policy_default-PR_7452.patch b/SOURCES/scap-security-guide-0.1.58-rhel9_cis_crypto_policy_default-PR_7452.patch deleted file mode 100644 index 9878022..0000000 --- a/SOURCES/scap-security-guide-0.1.58-rhel9_cis_crypto_policy_default-PR_7452.patch +++ /dev/null @@ -1,39 +0,0 @@ -From bd790153e02c1d1725f59f5d88c65c77eb1421e9 Mon Sep 17 00:00:00 2001 -From: Gabriel Becker -Date: Tue, 24 Aug 2021 12:48:46 +0200 -Subject: [PATCH] Add a new selector for var_system_crypto_policy and use it - RHEL8 CIS. - -This new selector is used to select explicit DEFAULT value in RHEL8 CIS -L1 profiles. The "default" selector cannot be selected and it causes -errors if used. ---- - controls/cis_rhel8.yml | 2 +- - .../software/integrity/crypto/var_system_crypto_policy.var | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml -index 29d972427cf..c0d3f5f40de 100644 ---- a/controls/cis_rhel8.yml -+++ b/controls/cis_rhel8.yml -@@ -553,7 +553,7 @@ controls: - automated: yes - rules: - - configure_crypto_policy -- - var_system_crypto_policy=default -+ - var_system_crypto_policy=default_policy - - # This rule works in conjunction with the configure_crypto_policy above. - # If a system is remediated to CIS Level 1, just the rule above will apply -diff --git a/linux_os/guide/system/software/integrity/crypto/var_system_crypto_policy.var b/linux_os/guide/system/software/integrity/crypto/var_system_crypto_policy.var -index ce301154a39..8b89848d122 100644 ---- a/linux_os/guide/system/software/integrity/crypto/var_system_crypto_policy.var -+++ b/linux_os/guide/system/software/integrity/crypto/var_system_crypto_policy.var -@@ -13,6 +13,7 @@ interactive: false - - options: - default: DEFAULT -+ default_policy: DEFAULT - default_nosha1: "DEFAULT:NO-SHA1" - fips: FIPS - fips_ospp: "FIPS:OSPP" diff --git a/SOURCES/scap-security-guide-0.1.58-s390x_arch-PR_7385.patch b/SOURCES/scap-security-guide-0.1.58-s390x_arch-PR_7385.patch deleted file mode 100644 index 0336950..0000000 --- a/SOURCES/scap-security-guide-0.1.58-s390x_arch-PR_7385.patch +++ /dev/null @@ -1,186 +0,0 @@ -From cc74d1a5735272c7fe50bff4bb0c2fe049c1f868 Mon Sep 17 00:00:00 2001 -From: Watson Sato -Date: Thu, 12 Aug 2021 15:05:35 +0200 -Subject: [PATCH 1/3] Add cpe platform for s390x arch - ---- - .../guide/system/bootloader-zipl/group.yml | 2 +- - shared/applicability/arch.yml | 12 +++++++ - shared/applicability/general.yml | 5 --- - ...oc_sys_kernel_osrelease_arch_not_s390x.xml | 22 ++----------- - .../proc_sys_kernel_osrelease_arch_s390x.xml | 33 +++++++++++++++++++ - 5 files changed, 48 insertions(+), 26 deletions(-) - create mode 100644 shared/applicability/arch.yml - create mode 100644 shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml - -diff --git a/linux_os/guide/system/bootloader-zipl/group.yml b/linux_os/guide/system/bootloader-zipl/group.yml -index 64c6c8dffbe..4f8ce753726 100644 ---- a/linux_os/guide/system/bootloader-zipl/group.yml -+++ b/linux_os/guide/system/bootloader-zipl/group.yml -@@ -8,4 +8,4 @@ description: |- - options to it. - The default {{{ full_name }}} boot loader for s390x systems is called zIPL. - --platform: zipl -+platform: s390x_arch -diff --git a/shared/applicability/arch.yml b/shared/applicability/arch.yml -new file mode 100644 -index 00000000000..48b2aa3ef30 ---- /dev/null -+++ b/shared/applicability/arch.yml -@@ -0,0 +1,12 @@ -+cpes: -+ -+ - not_s390x_arch: -+ name: "cpe:/a:not_s390x_arch" -+ title: "System architecture is not S390X" -+ check_id: proc_sys_kernel_osrelease_arch_not_s390x -+ -+ - s390x_arch: -+ name: "cpe:/a:s390x_arch" -+ title: "System architecture is S390X" -+ check_id: proc_sys_kernel_osrelease_arch_s390x -+ -diff --git a/shared/applicability/general.yml b/shared/applicability/general.yml -index 7382b7dd302..6e3ecfd9bf9 100644 ---- a/shared/applicability/general.yml -+++ b/shared/applicability/general.yml -@@ -24,11 +24,6 @@ cpes: - title: "Package net-snmp is installed" - check_id: installed_env_has_net-snmp_package - -- - not_s390x_arch: -- name: "cpe:/a:not_s390x_arch" -- title: "System architecture is not S390X" -- check_id: proc_sys_kernel_osrelease_arch_not_s390x -- - - nss-pam-ldapd: - name: "cpe:/a:nss-pam-ldapd" - title: "Package nss-pam-ldapd is installed" -diff --git a/shared/checks/oval/proc_sys_kernel_osrelease_arch_not_s390x.xml b/shared/checks/oval/proc_sys_kernel_osrelease_arch_not_s390x.xml -index 1fc625a1e75..d95ce249c49 100644 ---- a/shared/checks/oval/proc_sys_kernel_osrelease_arch_not_s390x.xml -+++ b/shared/checks/oval/proc_sys_kernel_osrelease_arch_not_s390x.xml -@@ -9,26 +9,8 @@ - Check that architecture of kernel in /proc/sys/kernel/osrelease is not s390x - - -- -+ - - -- -- -- -- -- -- -- /proc/sys/kernel/osrelease -- ^.*\.(.*)$ -- 1 -- -- -- -- ^s390x$ -- -- - -diff --git a/shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml b/shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml -new file mode 100644 -index 00000000000..abc6f1b0b88 ---- /dev/null -+++ b/shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml -@@ -0,0 +1,33 @@ -+ -+ -+ -+ Test for different architecture than s390x -+ -+ multi_platform_all -+ -+ Check that architecture of kernel in /proc/sys/kernel/osrelease is s390x -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ /proc/sys/kernel/osrelease -+ ^.*\.(.*)$ -+ 1 -+ -+ -+ -+ ^s390x$ -+ -+ - -From 527728eb84fc152bec4ef49b244999f763dc901f Mon Sep 17 00:00:00 2001 -From: Watson Sato -Date: Thu, 12 Aug 2021 16:16:11 +0200 -Subject: [PATCH 2/3] Remove zipl CPE platform - -The package names for zipl changed recently. -As zipl is an s390 exclusive, lets use the arch check instead of -package name check. ---- - shared/applicability/bootloaders.yml | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/shared/applicability/bootloaders.yml b/shared/applicability/bootloaders.yml -index 57832118447..6856578621c 100644 ---- a/shared/applicability/bootloaders.yml -+++ b/shared/applicability/bootloaders.yml -@@ -4,8 +4,3 @@ cpes: - name: "cpe:/a:grub2" - title: "Package grub2 is installed" - check_id: installed_env_has_grub2_package -- -- - zipl: -- name: "cpe:/a:zipl" -- title: "System uses zipl" -- check_id: installed_env_has_zipl_package - -From 985090ffcf34c1d27c526760ef5009605060b3f1 Mon Sep 17 00:00:00 2001 -From: Watson Yuuma Sato -Date: Tue, 17 Aug 2021 19:53:59 +0200 -Subject: [PATCH 3/3] Fix typo in check title -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml - -Co-authored-by: Jan Černý ---- - shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml b/shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml -index abc6f1b0b88..7f416de6475 100644 ---- a/shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml -+++ b/shared/checks/oval/proc_sys_kernel_osrelease_arch_s390x.xml -@@ -2,7 +2,7 @@ - - -- Test for different architecture than s390x -+ Test that the architecture is s390x - - multi_platform_all - diff --git a/SOURCES/scap-security-guide-0.1.58-sshd_config_basename-PR_7410.patch b/SOURCES/scap-security-guide-0.1.58-sshd_config_basename-PR_7410.patch deleted file mode 100644 index 1379e75..0000000 --- a/SOURCES/scap-security-guide-0.1.58-sshd_config_basename-PR_7410.patch +++ /dev/null @@ -1,74 +0,0 @@ -From ea37df6b736d22f32fd0d64457d731aa76b656c8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Wed, 18 Aug 2021 16:17:15 +0200 -Subject: [PATCH 1/2] Come up with a better basename - -On Red Hat systems, there is 50-redhat.conf, so -60-complianceascode.conf seems to be a generally good fit. ---- - shared/templates/sshd_lineinfile/bash.template | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/shared/templates/sshd_lineinfile/bash.template b/shared/templates/sshd_lineinfile/bash.template -index eac758e310b..e15ab9521b8 100644 ---- a/shared/templates/sshd_lineinfile/bash.template -+++ b/shared/templates/sshd_lineinfile/bash.template -@@ -11,8 +11,9 @@ mkdir -p /etc/ssh/sshd_config.d - touch /etc/ssh/sshd_config.d/hardening - {{{ lineinfile_absent("/etc/ssh/sshd_config", line_regex, insensitive=true) }}} - {{{ lineinfile_absent_in_directory("/etc/ssh/sshd_config.d", line_regex, insensitive=true) }}} -+{{%- set hardening_config_basename = "00-complianceascode-hardening.conf" %}} - {{{ set_config_file( -- path="/etc/ssh/sshd_config.d/hardening", -+ path="/etc/ssh/sshd_config.d/" ~ hardening_config_basename, - parameter=PARAMETER, - value=VALUE, - create=true, - -From 9fc6f549d9494730c4d973330a24a5a2a209b1c3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Wed, 18 Aug 2021 17:51:17 +0200 -Subject: [PATCH 2/2] Fix the sshd directory config check - -The check should consider only files matching .*\.conf ---- - .../sshd_disable_pubkey_auth/tests/conflict.fail.sh | 4 ++-- - .../tests/correct_value_directory.pass.sh | 2 +- - shared/macros-oval.jinja | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/conflict.fail.sh b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/conflict.fail.sh -index 177a99e0b82..6e064ffc739 100644 ---- a/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/conflict.fail.sh -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/conflict.fail.sh -@@ -11,5 +11,5 @@ else - echo "# PubkeyAuthentication no" >> /etc/ssh/sshd_config - fi - --echo "PubkeyAuthentication no" > /etc/ssh/sshd_config.d/good_config --echo "PubkeyAuthentication yes" > /etc/ssh/sshd_config.d/rogue_config -+echo "PubkeyAuthentication no" > /etc/ssh/sshd_config.d/good_config.conf -+echo "PubkeyAuthentication yes" > /etc/ssh/sshd_config.d/rogue_config.conf -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/correct_value_directory.pass.sh b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/correct_value_directory.pass.sh -index 0aa2e775dbe..acb650915fe 100644 ---- a/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/correct_value_directory.pass.sh -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/correct_value_directory.pass.sh -@@ -11,4 +11,4 @@ else - echo "# PubkeyAuthentication no" >> /etc/ssh/sshd_config - fi - --echo "PubkeyAuthentication no" > /etc/ssh/sshd_config.d/correct -+echo "PubkeyAuthentication no" > /etc/ssh/sshd_config.d/correct.conf -diff --git a/shared/macros-oval.jinja b/shared/macros-oval.jinja -index 87e0fd7d87d..f2fa7d79fc8 100644 ---- a/shared/macros-oval.jinja -+++ b/shared/macros-oval.jinja -@@ -227,7 +227,7 @@ - {{%- endmacro %}} - - {{%- macro oval_line_in_directory_object(path='', section='', prefix_regex='^[ \\t]*', parameter='', separator_regex='[ \\t]+', missing_parameter_pass=false, multi_value=false) -%}} --{{{- oval_line_in_file_object(path=path, section=section, prefix_regex=prefix_regex, parameter=parameter, separator_regex=separator_regex, missing_parameter_pass=missing_parameter_pass, multi_value=multi_value, filepath_regex=".*", id_stem=rule_id ~ "_config_dir") -}}} -+{{{- oval_line_in_file_object(path=path, section=section, prefix_regex=prefix_regex, parameter=parameter, separator_regex=separator_regex, missing_parameter_pass=missing_parameter_pass, multi_value=multi_value, filepath_regex=".*\.conf$", id_stem=rule_id ~ "_config_dir") -}}} - {{%- endmacro %}} - - {{%- macro oval_line_in_directory_state(value='', multi_value='', quotes='') -%}} diff --git a/SOURCES/scap-security-guide-0.1.58-sshd_directory-PR_6926.patch b/SOURCES/scap-security-guide-0.1.58-sshd_directory-PR_6926.patch deleted file mode 100644 index a131424..0000000 --- a/SOURCES/scap-security-guide-0.1.58-sshd_directory-PR_6926.patch +++ /dev/null @@ -1,664 +0,0 @@ -From b951a896d3ef1e678e5d6b580521053e7a076ab0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Thu, 29 Apr 2021 16:54:03 +0200 -Subject: [PATCH 1/6] Updated checks and remediations of the sshd template. - -Configuration of sshd moves from one config file to a config directory. -Therefore, checks should consider all those files, and the remediation should aim -to deliver fixes to one of those files in the config directory. - -Tests that interact with this behavior have been added and are applicable for Fedora and RHEL9 products. ---- - .../tests/commented.fail.sh | 7 ++ - .../tests/conflict.fail.sh | 15 ++++ - .../tests/correct_value_directory.pass.sh | 14 ++++ - shared/macros-bash.jinja | 9 +++ - shared/macros-oval.jinja | 61 +++++++++++------ - .../templates/sshd_lineinfile/bash.template | 22 ++++++ - .../templates/sshd_lineinfile/oval.template | 68 +++++++++++++++++-- - 7 files changed, 168 insertions(+), 28 deletions(-) - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/commented.fail.sh - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/conflict.fail.sh - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/correct_value_directory.pass.sh - -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/commented.fail.sh b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/commented.fail.sh -new file mode 100644 -index 00000000000..484c2165532 ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/commented.fail.sh -@@ -0,0 +1,7 @@ -+#!/bin/bash -+ -+if grep -q "^PubkeyAuthentication" /etc/ssh/sshd_config; then -+ sed -i "s/^PubkeyAuthentication.*/# PubkeyAuthentication no/" /etc/ssh/sshd_config -+else -+ echo "# PubkeyAuthentication no" >> /etc/ssh/sshd_config -+fi -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/conflict.fail.sh b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/conflict.fail.sh -new file mode 100644 -index 00000000000..177a99e0b82 ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/conflict.fail.sh -@@ -0,0 +1,15 @@ -+#!/bin/bash -+ -+# platform = Fedora,Red Hat Enterprise Linux 9 -+ -+mkdir -p /etc/ssh/sshd_config.d -+touch /etc/ssh/sshd_config.d/nothing -+ -+if grep -q "^PubkeyAuthentication" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ; then -+ sed -i "s/^PubkeyAuthentication.*/# PubkeyAuthentication no/" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* -+else -+ echo "# PubkeyAuthentication no" >> /etc/ssh/sshd_config -+fi -+ -+echo "PubkeyAuthentication no" > /etc/ssh/sshd_config.d/good_config -+echo "PubkeyAuthentication yes" > /etc/ssh/sshd_config.d/rogue_config -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/correct_value_directory.pass.sh b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/correct_value_directory.pass.sh -new file mode 100644 -index 00000000000..0aa2e775dbe ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_disable_pubkey_auth/tests/correct_value_directory.pass.sh -@@ -0,0 +1,14 @@ -+#!/bin/bash -+ -+# platform = Fedora,Red Hat Enterprise Linux 9 -+ -+mkdir -p /etc/ssh/sshd_config.d -+touch /etc/ssh/sshd_config.d/nothing -+ -+if grep -q "^PubkeyAuthentication" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ; then -+ sed -i "s/^PubkeyAuthentication.*/# PubkeyAuthentication no/" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* -+else -+ echo "# PubkeyAuthentication no" >> /etc/ssh/sshd_config -+fi -+ -+echo "PubkeyAuthentication no" > /etc/ssh/sshd_config.d/correct -diff --git a/shared/macros-bash.jinja b/shared/macros-bash.jinja -index 1cd2c62b5e0..b4518d83c19 100644 ---- a/shared/macros-bash.jinja -+++ b/shared/macros-bash.jinja -@@ -471,6 +471,15 @@ fi - LC_ALL=C sed -i "/{{{ regex }}}/{{{ modifier }}}" "{{{ path }}}" - {{%- endmacro -%}} - -+{{%- macro lineinfile_absent_in_directory(dirname, regex, insensitive=true) -%}} -+ {{%- if insensitive -%}} -+ {{%- set modifier="Id" -%}} -+ {{%- else -%}} -+ {{%- set modifier="d" -%}} -+ {{%- endif -%}} -+LC_ALL=C sed -i "/{{{ regex }}}/{{{ modifier }}}" "{{{ dirname }}}"/* -+{{%- endmacro -%}} -+ - {{%- macro lineinfile_present(path, line, insert_after="", insert_before="", insensitive=true) -%}} - {{%- if insensitive -%}} - {{%- set grep_args="-q -m 1 -i" -%}} -diff --git a/shared/macros-oval.jinja b/shared/macros-oval.jinja -index be2ac268206..d38db96d9e3 100644 ---- a/shared/macros-oval.jinja -+++ b/shared/macros-oval.jinja -@@ -92,15 +92,18 @@ - - parameter (String): The parameter to be checked in the configuration file. - - missing_parameter_pass (boolean): If set, the check will also pass if the parameter is not present in the configuration file (default is applied). - #}} --{{%- macro oval_line_in_file_criterion(path='', parameter='', missing_parameter_pass=false) -%}} -+{{%- macro oval_line_in_file_criterion(path='', parameter='', missing_parameter_pass=false, comment='', id_stem=rule_id) -%}} - {{%- set suffix_id = "" -%}} - {{%- set prefix_text = "Check the" -%}} - {{%- if missing_parameter_pass %}} - {{%- set suffix_id = suffix_id_default_not_overriden -%}} - {{%- set prefix_text = prefix_text + " absence of" -%}} - {{%- endif %}} -- -+{{%- if not comment -%}} -+{{%- set comment = prefix_text ~ " " ~ parameter ~ " in " ~ path -%}} -+{{%- endif -%}} -+ - {{%- endmacro %}} - - {{# -@@ -110,7 +113,7 @@ - - parameter (String): The parameter to be checked in the configuration file. - - missing_parameter_pass (boolean): If set, the check will also pass if the parameter is not present in the configuration file (default is applied). - #}} --{{%- macro oval_line_in_file_test(path='', parameter='', missing_parameter_pass=false) -%}} -+{{%- macro oval_line_in_file_test(path='', parameter='', missing_parameter_pass=false, id_stem=rule_id) -%}} - {{%- set suffix_id = "" -%}} - {{%- if missing_parameter_pass %}} - {{%- set check_existence = "none_exist" -%}} -@@ -120,14 +123,14 @@ - {{%- set check_existence = "all_exist" -%}} - {{%- set prefix_text = "value" -%}} - {{%- endif %}} -- -- -+ id="test_{{{ id_stem }}}{{{ suffix_id }}}" version="1"> -+ - {{%- if not missing_parameter_pass %}} -- -+ - {{%- endif %}} -- -+ - {{%- endmacro %}} - - {{# -@@ -141,7 +144,7 @@ - - missing_parameter_pass (boolean): If set, the check will also pass if the parameter is not present in the configuration file (default is applied). - - multi_value (boolean): If set, it means that the parameter can accept multiple values and the expected value must be present in the current list of values. - #}} --{{%- macro oval_line_in_file_object(path='', section='', prefix_regex='^[ \\t]*', parameter='', separator_regex='[ \\t]+', missing_parameter_pass=false, multi_value=false, filepath_regex='') -%}} -+{{%- macro oval_line_in_file_object(path='', section='', prefix_regex='^[ \\t]*', parameter='', separator_regex='[ \\t]+', missing_parameter_pass=false, multi_value=false, filepath_regex='', id_stem=rule_id) -%}} - {{%- set suffix_id = "" -%}} - {{%- if multi_value -%}} - {{%- set group_regex = "([^#]*).*$" -%}} -@@ -173,16 +176,16 @@ - {{%- set regex = prefix_regex+parameter+separator_regex+group_regex -%}} - {{%- endif %}} - {{%- endif %}} -- -+ - {{%- if filepath_regex %}} -- {{{ path }}} -- {{{ filepath_regex }}} -+ {{{ path }}} -+ {{{ filepath_regex }}} - {{%- else %}} -- {{{ path }}} -+ {{{ path }}} - {{%- endif %}} -- {{{ regex }}} -- 1 -- -+ {{{ regex }}} -+ 1 -+ - {{%- endmacro %}} - - {{# -@@ -193,7 +196,7 @@ - - quotes (String): If non-empty, one level of matching quotes is considered when checking the value. Specify one or more quote types as a string. - For example, for shell quoting, specify quotes="'\""), which will make sure that value, 'value' and "value" are matched, but 'value" or '"value"' won't be. - #}} --{{%- macro oval_line_in_file_state(value='', multi_value='', quotes='') -%}} -+{{%- macro oval_line_in_file_state(value='', multi_value='', quotes='', id_stem=rule_id) -%}} - {{%- set regex = value -%}} - {{%- if quotes != "" %}} - {{%- if "\\1" in value > 0 %}} -@@ -206,9 +209,25 @@ - {{%- else %}} - {{%- set regex = "^"+regex+"$" -%}} - {{%- endif %}} -- -- {{{ regex }}} -- -+ -+ {{{ regex }}} -+ -+{{%- endmacro %}} -+ -+{{%- macro oval_line_in_directory_criterion(path='', parameter='', missing_parameter_pass=false) -%}} -+{{{- oval_line_in_file_criterion(path, parameter, missing_parameter_pass, id_stem=rule_id ~ "_config_dir") -}}} -+{{%- endmacro %}} -+ -+{{%- macro oval_line_in_directory_test(path='', parameter='', missing_parameter_pass=false) -%}} -+{{{ oval_line_in_file_test(path, parameter, missing_parameter_pass, id_stem=rule_id ~ "_config_dir") }}} -+{{%- endmacro %}} -+ -+{{%- macro oval_line_in_directory_object(path='', section='', prefix_regex='^[ \\t]*', parameter='', separator_regex='[ \\t]+', missing_parameter_pass=false, multi_value=false) -%}} -+{{{- oval_line_in_file_object(path=path, section=section, prefix_regex=prefix_regex, parameter=parameter, separator_regex=separator_regex, missing_parameter_pass=missing_parameter_pass, multi_value=multi_value, filepath_regex=".*", id_stem=rule_id ~ "_config_dir") -}}} -+{{%- endmacro %}} -+ -+{{%- macro oval_line_in_directory_state(value='', multi_value='', quotes='') -%}} -+{{{- oval_line_in_file_state(value, multi_value, quotes, id_stem=rule_id ~ "_config_dir") -}}} - {{%- endmacro %}} - - {{# -diff --git a/shared/templates/sshd_lineinfile/bash.template b/shared/templates/sshd_lineinfile/bash.template -index ca1b512bb3d..eac758e310b 100644 ---- a/shared/templates/sshd_lineinfile/bash.template -+++ b/shared/templates/sshd_lineinfile/bash.template -@@ -3,4 +3,26 @@ - # strategy = restrict - # complexity = low - # disruption = low -+{{%- if product in ("fedora", "rhel9") %}} -+{{%- set prefix_regex = "^\s*" -%}} -+{{%- set separator_regex = "\s\+" -%}} -+{{%- set line_regex = prefix_regex ~ PARAMETER ~ separator_regex %}} -+mkdir -p /etc/ssh/sshd_config.d -+touch /etc/ssh/sshd_config.d/hardening -+{{{ lineinfile_absent("/etc/ssh/sshd_config", line_regex, insensitive=true) }}} -+{{{ lineinfile_absent_in_directory("/etc/ssh/sshd_config.d", line_regex, insensitive=true) }}} -+{{{ set_config_file( -+ path="/etc/ssh/sshd_config.d/hardening", -+ parameter=PARAMETER, -+ value=VALUE, -+ create=true, -+ insert_after="", -+ insert_before="^Match", -+ insensitive=true, -+ separator=" ", -+ separator_regex=separator_regex, -+ prefix_regex=prefix_regex) -+ }}} -+{{%- else %}} - {{{ bash_sshd_config_set(parameter=PARAMETER, value=VALUE) }}} -+{{%- endif %}} -diff --git a/shared/templates/sshd_lineinfile/oval.template b/shared/templates/sshd_lineinfile/oval.template -index df63d542505..2cc38776eb2 100644 ---- a/shared/templates/sshd_lineinfile/oval.template -+++ b/shared/templates/sshd_lineinfile/oval.template -@@ -1,7 +1,61 @@ --{{{ --oval_sshd_config( -- parameter=PARAMETER, -- value=VALUE, -- missing_parameter_pass=MISSING_PARAMETER_PASS --) --}}} -+{{%- set config_path = "/etc/ssh/sshd_config" %}} -+{{%- set config_dir = "/etc/ssh/sshd_config.d" -%}} -+{{%- set products_with_distributed_configuration = ("rhel9", "fedora") -%}} -+{{%- set description = "Ensure '" ~ PARAMETER ~ "' is configured with value '" ~ VALUE ~ "' in " ~ config_path %}} -+{{%- if product in products_with_distributed_configuration %}} -+{{%- set description = description ~ " and in " ~ config_dir -%}} -+{{%- endif %}} -+{{%- set case_insensitivity_kwargs = dict(prefix_regex="^[ \\t]*(?i)", separator_regex = "(?-i)[ \\t]+") -%}} -+ -+ -+ -+ {{{ oval_metadata(description) }}} -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ {{{- oval_line_in_file_criterion(config_path, PARAMETER) | indent(8) }}} -+ {{%- if MISSING_PARAMETER_PASS %}} -+ -+ {{{- oval_line_in_file_criterion(config_path, PARAMETER, MISSING_PARAMETER_PASS) | indent(10)}}} -+ {{%- if product in products_with_distributed_configuration %}} -+ {{{- oval_line_in_directory_criterion(config_dir, PARAMETER, MISSING_PARAMETER_PASS) | indent(10) }}} -+ {{%- endif %}} -+ -+ {{%- endif %}} -+ {{%- if product in products_with_distributed_configuration %}} -+ {{{- oval_line_in_directory_criterion(config_dir, PARAMETER) | indent(8) }}} -+ {{%- endif %}} -+ -+ -+ -+ -+ {{{ oval_line_in_file_test(config_path, PARAMETER) | indent (2) }}} -+ {{{ oval_line_in_file_object(config_path, parameter=PARAMETER, ** case_insensitivity_kwargs)| indent (2) }}} -+ {{{ oval_line_in_file_state(VALUE) | indent (2) }}} -+ -+ {{%- if MISSING_PARAMETER_PASS %}} -+ {{{ oval_line_in_file_test(config_path, PARAMETER, MISSING_PARAMETER_PASS) | indent(2) }}} -+ {{{ oval_line_in_file_object(config_path, parameter=PARAMETER, missing_parameter_pass=MISSING_PARAMETER_PASS, ** case_insensitivity_kwargs) | indent(2) }}} -+ {{%- endif %}} -+ -+ {{%- if product in products_with_distributed_configuration %}} -+ {{{ oval_line_in_directory_test(config_dir, PARAMETER) | indent (2) }}} -+ {{{ oval_line_in_directory_object(config_dir, parameter=PARAMETER, ** case_insensitivity_kwargs) | indent (2) }}} -+ {{{ oval_line_in_directory_state(VALUE) | indent (2) }}} -+ -+ {{%- if MISSING_PARAMETER_PASS %}} -+ {{{ oval_line_in_directory_test(config_path, PARAMETER, MISSING_PARAMETER_PASS) | indent(2) }}} -+ {{{ oval_line_in_directory_object(config_path, parameter=PARAMETER, missing_parameter_pass=MISSING_PARAMETER_PASS, ** case_insensitivity_kwargs) | indent(2) }}} -+ {{%- endif %}} -+ {{%- endif %}} -+ - -From b0f86c11fa0fb45b32b53833b5d3565c7eb73cfe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Fri, 30 Apr 2021 11:52:22 +0200 -Subject: [PATCH 2/6] Improved the lineinfile template. - -It now escapes the text contents if parts of them could be incorrectly interpreted as regexes. ---- - shared/macros-bash.jinja | 2 +- - shared/templates/lineinfile/oval.template | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/shared/macros-bash.jinja b/shared/macros-bash.jinja -index b4518d83c19..d654a0e0e89 100644 ---- a/shared/macros-bash.jinja -+++ b/shared/macros-bash.jinja -@@ -445,7 +445,7 @@ printf '%s\n' "{{{ message | replace('"', '\\"') }}}" >&2 - # prefix_regex: regular expression describing allowed leading characters at each line - #}} - {{%- macro set_config_file(path, parameter, value, create, insert_after, insert_before, insensitive=true, separator=" ", separator_regex="\s\+", prefix_regex="^\s*") -%}} -- {{%- set line_regex = prefix_regex+parameter+separator_regex -%}} -+ {{%- set line_regex = prefix_regex + ((parameter | escape_regex) | replace("/", "\/")) + separator_regex -%}} - {{%- set new_line = parameter+separator+value -%}} - if [ -e "{{{ path }}}" ] ; then - {{{ lineinfile_absent(path, line_regex, insensitive) | indent(4) }}} -diff --git a/shared/templates/lineinfile/oval.template b/shared/templates/lineinfile/oval.template -index a38856d9177..644327b7d6e 100644 ---- a/shared/templates/lineinfile/oval.template -+++ b/shared/templates/lineinfile/oval.template -@@ -1,4 +1,4 @@ --{{%- set regex = "^[\s]*" + TEXT + "[\s]*$" -%}} -+{{%- set regex = "^[\s]*" ~ (TEXT | escape_regex) ~ "[\s]*$" -%}} - - - {{{ oval_metadata("Check presence of " + TEXT + " in " + PATH) }}} - -From 6953f74d1ab168e7ccc3f28877621edff317fef2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Fri, 30 Apr 2021 11:54:12 +0200 -Subject: [PATCH 3/6] Introduced the sshd_use_directory_configuration rule. - -The rule makes sure that the sshd configuration is distributed in the -/etc/ssh/sshd_config.d/ directory, and therefore it makes sense to scan that directory -in another rules. ---- - .../bash/shared.sh | 15 ++++++++++ - .../oval/shared.xml | 29 +++++++++++++++++++ - .../sshd_use_directory_configuration/rule.yml | 26 +++++++++++++++++ - .../tests/match.fail.sh | 4 +++ - .../tests/simple.fail.sh | 3 ++ - .../tests/simple.pass.sh | 4 +++ - shared/references/cce-redhat-avail.txt | 1 - - shared/templates/extra_ovals.yml | 6 ++++ - 8 files changed, 87 insertions(+), 1 deletion(-) - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/bash/shared.sh - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/oval/shared.xml - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/rule.yml - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/match.fail.sh - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/simple.fail.sh - create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/simple.pass.sh - -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/bash/shared.sh b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/bash/shared.sh -new file mode 100644 -index 00000000000..2ff58ec373c ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/bash/shared.sh -@@ -0,0 +1,15 @@ -+# platform = multi_platform_all -+ -+{{% set target_file = "/etc/ssh/sshd_config.d/sshd_config_original.conf" -%}} -+if test -f {{{ target_file}}}; then -+ {{{ die("Remediation probably already happened, '" ~ target_file ~ "' already exists, not doing anything.", action="false") }}} -+else -+ mkdir -p /etc/ssh/sshd_config.d -+ mv /etc/ssh/sshd_config {{{ target_file }}} -+cat > /etc/ssh/sshd_config << EOF -+# To modify the system-wide sshd configuration, create a *.conf file under -+# /etc/ssh/sshd_config.d/ which will be automatically included below -+ -+Include /etc/ssh/sshd_config.d/*.conf -+EOF -+fi -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/oval/shared.xml b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/oval/shared.xml -new file mode 100644 -index 00000000000..0ffb429adff ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/oval/shared.xml -@@ -0,0 +1,29 @@ -+{{%- set config_path = "/etc/ssh/sshd_config" %}} -+ -+ -+ -+ {{{ oval_metadata("foo") }}} -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ {{{- oval_line_in_file_criterion(config_path, "match", missing_parameter_pass=true) | indent(8) }}} -+ -+ -+ -+ -+ {{{ oval_line_in_file_test(config_path, "match", missing_parameter_pass=true) | indent (2) }}} -+ {{{ oval_line_in_file_object(config_path, parameter="match", missing_parameter_pass=true, prefix_regex="^[ \\t]*(?i)", separator_regex="(?-i)\s+\S+") | indent (2) }}} -+ -+ -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/rule.yml b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/rule.yml -new file mode 100644 -index 00000000000..8c370036e61 ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/rule.yml -@@ -0,0 +1,26 @@ -+documentation_complete: true -+ -+prodtype: fedora,rhel9 -+ -+title: 'Distribute the SSH Server configuration to multiple files in a config directory.' -+ -+description: |- -+ Make sure to have the Include /etc/ssh/sshd_config.d/*.conf line in the /etc/ssh/sshd_config file. -+ Ideally, don't have any active configuration directives in that file, and distribute the service configuration -+ to several files in the /etc/ssh/sshd_config.d directory. -+ -+rationale: |- -+ This form of distributed configuration is considered as a good practice, and as other sshd rules assume that directives in files in the /etc/ssh/sshd_config.d config directory are effective, there has to be a rule that ensures this. -+ Aside from that, having multiple configuration files makes the SSH Server configuration changes easier to partition according to the reason that they were introduced, and therefore it should help to perform merges of hardening updates. -+ -+severity: medium -+ -+identifiers: -+ cce@rhel9: CCE-87681-3 -+ -+ocil_clause: "you don't include other configuration files from the main configuration file" -+ -+ocil: |- -+ To determine whether the SSH server includes configuration files from the right directory, run the following command: -+
    $ sudo grep -i '^Include' /etc/ssh/sshd_config
    -+ If a line Include /etc/ssh/sshd_config.d/*.conf is returned, then the configuration file inclusion is set correctly. -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/match.fail.sh b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/match.fail.sh -new file mode 100644 -index 00000000000..fa2ee0654f2 ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/match.fail.sh -@@ -0,0 +1,4 @@ -+# platform = multi_platform_all -+ -+echo "Match something" >> /etc/ssh/sshd_config -+echo "Include /etc/ssh/sshd_config.d/*.conf" >> /etc/ssh/sshd_config -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/simple.fail.sh b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/simple.fail.sh -new file mode 100644 -index 00000000000..a6013ad7cfa ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/simple.fail.sh -@@ -0,0 +1,3 @@ -+# platform = multi_platform_all -+ -+echo "include /etc/ssh/sshd_config.d/.*" > /etc/ssh/sshd_config -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/simple.pass.sh b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/simple.pass.sh -new file mode 100644 -index 00000000000..7a26f521415 ---- /dev/null -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/tests/simple.pass.sh -@@ -0,0 +1,4 @@ -+# platform = multi_platform_all -+ -+# Handling of case-insensitivity of include is tricky -+echo "Include /etc/ssh/sshd_config.d/*.conf" > /etc/ssh/sshd_config -diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt -index 73d025484e6..40a2b9b5868 100644 ---- a/shared/references/cce-redhat-avail.txt -+++ b/shared/references/cce-redhat-avail.txt -@@ -1780,7 +1780,6 @@ CCE-87677-1 - CCE-87678-9 - CCE-87679-7 - CCE-87680-5 --CCE-87681-3 - CCE-87682-1 - CCE-87683-9 - CCE-87684-7 -diff --git a/shared/templates/extra_ovals.yml b/shared/templates/extra_ovals.yml -index 095d911ee1c..69062ebe541 100644 ---- a/shared/templates/extra_ovals.yml -+++ b/shared/templates/extra_ovals.yml -@@ -57,3 +57,9 @@ service_syslog_disabled: - vars: - servicename: syslog - packagename: rsyslog -+ -+sshd_includes_config_files: -+ name: lineinfile -+ vars: -+ path: /etc/ssh/sshd_config -+ text: "Include /etc/ssh/sshd_config.d/*.conf" - -From d7fcab7ad66e77bb7ccba507e3f024bc892c3864 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Tue, 11 May 2021 16:06:29 +0200 -Subject: [PATCH 4/6] Improved error reporting related to macros. - ---- - ssg/jinja.py | 22 +++++++++++++--------- - 1 file changed, 13 insertions(+), 9 deletions(-) - -diff --git a/ssg/jinja.py b/ssg/jinja.py -index a46246ad0fb..28edd9a6dcd 100644 ---- a/ssg/jinja.py -+++ b/ssg/jinja.py -@@ -153,16 +153,20 @@ def load_macros(substitutions_dict=None): - - add_python_functions(substitutions_dict) - try: -- update_substitutions_dict(JINJA_MACROS_BASE_DEFINITIONS, substitutions_dict) -- update_substitutions_dict(JINJA_MACROS_HIGHLEVEL_DEFINITIONS, substitutions_dict) -- update_substitutions_dict(JINJA_MACROS_ANSIBLE_DEFINITIONS, substitutions_dict) -- update_substitutions_dict(JINJA_MACROS_BASH_DEFINITIONS, substitutions_dict) -- update_substitutions_dict(JINJA_MACROS_OVAL_DEFINITIONS, substitutions_dict) -- update_substitutions_dict(JINJA_MACROS_IGNITION_DEFINITIONS, substitutions_dict) -- update_substitutions_dict(JINJA_MACROS_KUBERNETES_DEFINITIONS, substitutions_dict) -+ filenames = [ -+ JINJA_MACROS_BASE_DEFINITIONS, -+ JINJA_MACROS_HIGHLEVEL_DEFINITIONS, -+ JINJA_MACROS_ANSIBLE_DEFINITIONS, -+ JINJA_MACROS_BASH_DEFINITIONS, -+ JINJA_MACROS_OVAL_DEFINITIONS, -+ JINJA_MACROS_IGNITION_DEFINITIONS, -+ JINJA_MACROS_KUBERNETES_DEFINITIONS, -+ ] -+ for filename in filenames: -+ update_substitutions_dict(filename, substitutions_dict) - except Exception as exc: -- msg = ("Error extracting macro definitions: {0}" -- .format(str(exc))) -+ msg = ("Error extracting macro definitions from '{1}': {0}" -+ .format(str(exc), filename)) - raise RuntimeError(msg) - - return substitutions_dict - -From df45c3fa295a2dc5a23cc347657964df6453cbae Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= -Date: Tue, 11 May 2021 16:44:50 +0200 -Subject: [PATCH 5/6] Removed devault values that are variables from Jinja - -Support in older jinja2 packages is not in a good shape. ---- - shared/macros-oval.jinja | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/shared/macros-oval.jinja b/shared/macros-oval.jinja -index d38db96d9e3..87e0fd7d87d 100644 ---- a/shared/macros-oval.jinja -+++ b/shared/macros-oval.jinja -@@ -92,7 +92,8 @@ - - parameter (String): The parameter to be checked in the configuration file. - - missing_parameter_pass (boolean): If set, the check will also pass if the parameter is not present in the configuration file (default is applied). - #}} --{{%- macro oval_line_in_file_criterion(path='', parameter='', missing_parameter_pass=false, comment='', id_stem=rule_id) -%}} -+{{%- macro oval_line_in_file_criterion(path='', parameter='', missing_parameter_pass=false, comment='', id_stem='') -%}} -+{{%- set id_stem = id_stem or rule_id -%}} - {{%- set suffix_id = "" -%}} - {{%- set prefix_text = "Check the" -%}} - {{%- if missing_parameter_pass %}} -@@ -113,7 +114,8 @@ - - parameter (String): The parameter to be checked in the configuration file. - - missing_parameter_pass (boolean): If set, the check will also pass if the parameter is not present in the configuration file (default is applied). - #}} --{{%- macro oval_line_in_file_test(path='', parameter='', missing_parameter_pass=false, id_stem=rule_id) -%}} -+{{%- macro oval_line_in_file_test(path='', parameter='', missing_parameter_pass=false, id_stem='') -%}} -+{{%- set id_stem = id_stem or rule_id -%}} - {{%- set suffix_id = "" -%}} - {{%- if missing_parameter_pass %}} - {{%- set check_existence = "none_exist" -%}} -@@ -144,7 +146,8 @@ - - missing_parameter_pass (boolean): If set, the check will also pass if the parameter is not present in the configuration file (default is applied). - - multi_value (boolean): If set, it means that the parameter can accept multiple values and the expected value must be present in the current list of values. - #}} --{{%- macro oval_line_in_file_object(path='', section='', prefix_regex='^[ \\t]*', parameter='', separator_regex='[ \\t]+', missing_parameter_pass=false, multi_value=false, filepath_regex='', id_stem=rule_id) -%}} -+{{%- macro oval_line_in_file_object(path='', section='', prefix_regex='^[ \\t]*', parameter='', separator_regex='[ \\t]+', missing_parameter_pass=false, multi_value=false, filepath_regex='', id_stem='') -%}} -+{{%- set id_stem = id_stem or rule_id -%}} - {{%- set suffix_id = "" -%}} - {{%- if multi_value -%}} - {{%- set group_regex = "([^#]*).*$" -%}} -@@ -196,7 +199,8 @@ - - quotes (String): If non-empty, one level of matching quotes is considered when checking the value. Specify one or more quote types as a string. - For example, for shell quoting, specify quotes="'\""), which will make sure that value, 'value' and "value" are matched, but 'value" or '"value"' won't be. - #}} --{{%- macro oval_line_in_file_state(value='', multi_value='', quotes='', id_stem=rule_id) -%}} -+{{%- macro oval_line_in_file_state(value='', multi_value='', quotes='', id_stem='') -%}} -+{{%- set id_stem = id_stem or rule_id -%}} - {{%- set regex = value -%}} - {{%- if quotes != "" %}} - {{%- if "\\1" in value > 0 %}} - -From a3ec49f75ac3059d7096985e08e10005db96330a Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Fri, 30 Jul 2021 17:25:25 +0200 -Subject: [PATCH 6/6] Don't remediate when it is inappropriate - -Don't remediate when the config file already contains the include -directive. ---- - .../sshd_use_directory_configuration/bash/shared.sh | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/bash/shared.sh b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/bash/shared.sh -index 2ff58ec373c..9317b23992d 100644 ---- a/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/bash/shared.sh -+++ b/linux_os/guide/services/ssh/ssh_server/sshd_use_directory_configuration/bash/shared.sh -@@ -1,12 +1,15 @@ - # platform = multi_platform_all - - {{% set target_file = "/etc/ssh/sshd_config.d/sshd_config_original.conf" -%}} -+{{% set base_config = "/etc/ssh/sshd_config" -%}} - if test -f {{{ target_file}}}; then - {{{ die("Remediation probably already happened, '" ~ target_file ~ "' already exists, not doing anything.", action="false") }}} -+elif grep -Eq '^\s*Include\s+/etc/ssh/sshd_config\.d/\*\.conf' {{{ base_config }}} && ! grep -Eq '^\s*Match\s' {{{ base_config }}}; then -+ {{{ die("Remediation probably already happened, '" ~ base_config ~ "' already contains the include directive.", action="false") }}} - else - mkdir -p /etc/ssh/sshd_config.d -- mv /etc/ssh/sshd_config {{{ target_file }}} --cat > /etc/ssh/sshd_config << EOF -+ mv {{{ base_config }}} {{{ target_file }}} -+cat > {{{ base_config }}} << EOF - # To modify the system-wide sshd configuration, create a *.conf file under - # /etc/ssh/sshd_config.d/ which will be automatically included below - diff --git a/SOURCES/scap-security-guide-0.1.58-various_fixes-PR_7335.patch b/SOURCES/scap-security-guide-0.1.58-various_fixes-PR_7335.patch deleted file mode 100644 index 56d209c..0000000 --- a/SOURCES/scap-security-guide-0.1.58-various_fixes-PR_7335.patch +++ /dev/null @@ -1,942 +0,0 @@ -From 089c47d6301bb53bb182cbdacf72968979547994 Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Fri, 30 Jul 2021 16:57:13 +0200 -Subject: [PATCH 1/5] Enable more RHEL9 content - ---- - .../ssh/ssh_client/ssh_client_rekey_limit/rule.yml | 3 ++- - .../disable_ctrlaltdel_burstaction/bash/shared.sh | 2 +- - .../disable_ctrlaltdel_reboot/bash/shared.sh | 4 ---- - .../smart_card_login/package_pcsc-lite_installed/rule.yml | 3 ++- - .../smart_card_login/service_pcscd_enabled/rule.yml | 3 ++- - .../root_logins/use_pam_wheel_for_su/rule.yml | 3 ++- - .../user_umask/accounts_umask_etc_csh_cshrc/rule.yml | 3 ++- - .../installed_OS_is_FIPS_certified/oval/shared.xml | 1 + - .../rule.yml | 3 ++- - products/rhel9/profiles/hipaa.profile | 6 +++--- - products/rhel9/profiles/ospp.profile | 8 ++++---- - products/rhel9/profiles/pci-dss.profile | 4 ++-- - shared/references/cce-redhat-avail.txt | 6 ------ - 13 files changed, 23 insertions(+), 26 deletions(-) - -diff --git a/linux_os/guide/services/ssh/ssh_client/ssh_client_rekey_limit/rule.yml b/linux_os/guide/services/ssh/ssh_client/ssh_client_rekey_limit/rule.yml -index f43f92c2f15..c0fbe2c5e34 100644 ---- a/linux_os/guide/services/ssh/ssh_client/ssh_client_rekey_limit/rule.yml -+++ b/linux_os/guide/services/ssh/ssh_client/ssh_client_rekey_limit/rule.yml -@@ -1,6 +1,6 @@ - documentation_complete: true - --prodtype: ol8,rhel8,rhcos4 -+prodtype: ol8,rhel8,rhel9,rhcos4 - - title: 'Configure session renegotiation for SSH client' - -@@ -27,6 +27,7 @@ severity: medium - - identifiers: - cce@rhel8: CCE-82880-6 -+ cce@rhel9: CCE-87522-9 - - references: - disa: CCI-000068 -diff --git a/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_burstaction/bash/shared.sh b/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_burstaction/bash/shared.sh -index 7d4faedfb47..d8063726fb4 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_burstaction/bash/shared.sh -+++ b/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_burstaction/bash/shared.sh -@@ -1,4 +1,4 @@ --# platform = Red Hat Enterprise Linux 7,Red Hat Enterprise Linux 8,Red Hat Virtualization 4,multi_platform_fedora,multi_platform_ol -+# platform = multi_platform_rhel,Red Hat Virtualization 4,multi_platform_fedora,multi_platform_ol - - # Include source function library. - . /usr/share/scap-security-guide/remediation_functions -diff --git a/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_reboot/bash/shared.sh b/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_reboot/bash/shared.sh -index 94767ad5993..4cbf5c84651 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_reboot/bash/shared.sh -+++ b/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_reboot/bash/shared.sh -@@ -1,9 +1,5 @@ - # platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_wrlinux - {{%- if init_system == "systemd" -%}} --{{% if product in ["rhel7", "rhel8"] %}} --# The process to disable ctrl+alt+del has changed in RHEL7. --# Reference: https://access.redhat.com/solutions/1123873 --{{% endif %}} - systemctl disable --now ctrl-alt-del.target - systemctl mask --now ctrl-alt-del.target - {{%- else -%}} -diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/package_pcsc-lite_installed/rule.yml b/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/package_pcsc-lite_installed/rule.yml -index 0652fbeadaf..9c6534cf401 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/package_pcsc-lite_installed/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/package_pcsc-lite_installed/rule.yml -@@ -1,6 +1,6 @@ - documentation_complete: true - --prodtype: fedora,ol7,ol8,rhel7,rhel8,rhv4 -+prodtype: fedora,ol7,ol8,rhel7,rhel8,rhel9,rhv4 - - title: 'Install the pcsc-lite package' - -@@ -16,6 +16,7 @@ severity: medium - identifiers: - cce@rhel7: CCE-82347-6 - cce@rhel8: CCE-80993-9 -+ cce@rhel9: CCE-86280-5 - - references: - disa: CCI-001954 -diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/service_pcscd_enabled/rule.yml b/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/service_pcscd_enabled/rule.yml -index e14db48c22a..6472ade5791 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/service_pcscd_enabled/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/smart_card_login/service_pcscd_enabled/rule.yml -@@ -1,6 +1,6 @@ - documentation_complete: true - --prodtype: fedora,ol7,ol8,rhel7,rhel8,rhv4 -+prodtype: fedora,ol7,ol8,rhel7,rhel8,rhel9,rhv4 - - title: 'Enable the pcscd Service' - -@@ -24,6 +24,7 @@ severity: medium - identifiers: - cce@rhel7: CCE-80569-7 - cce@rhel8: CCE-80881-6 -+ cce@rhel9: CCE-87907-2 - - references: - disa: CCI-001954 -diff --git a/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml b/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -index a6862c2af25..984a8cf333e 100644 ---- a/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-restrictions/root_logins/use_pam_wheel_for_su/rule.yml -@@ -1,6 +1,6 @@ - documentation_complete: true - --prodtype: fedora,ol7,ol8,rhel7,rhel8,rhv4,sle15,ubuntu2004 -+prodtype: fedora,ol7,ol8,rhel7,rhel8,rhel9,rhv4,sle15,ubuntu2004 - - title: 'Enforce usage of pam_wheel for su authentication' - -@@ -20,6 +20,7 @@ severity: medium - identifiers: - cce@rhel7: CCE-85855-5 - cce@rhel8: CCE-83318-6 -+ cce@rhel9: CCE-90085-2 - - references: - cis@rhel7: "5.7" -diff --git a/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_csh_cshrc/rule.yml b/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_csh_cshrc/rule.yml -index 1b71c7d3acd..3779b396b4e 100644 ---- a/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_csh_cshrc/rule.yml -+++ b/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_csh_cshrc/rule.yml -@@ -1,6 +1,6 @@ - documentation_complete: true - --prodtype: ol7,ol8,rhcos4,rhel7,rhel8,sle15,ubuntu2004 -+prodtype: ol7,ol8,rhcos4,rhel7,rhel8,rhel9,sle15,ubuntu2004 - - title: 'Ensure the Default C Shell Umask is Set Correctly' - -@@ -20,6 +20,7 @@ identifiers: - cce@rhcos4: CCE-84261-7 - cce@rhel7: CCE-80203-3 - cce@rhel8: CCE-81037-4 -+ cce@rhel9: CCE-87721-7 - - references: - cis-csc: '18' -diff --git a/linux_os/guide/system/software/integrity/certified-vendor/installed_OS_is_FIPS_certified/oval/shared.xml b/linux_os/guide/system/software/integrity/certified-vendor/installed_OS_is_FIPS_certified/oval/shared.xml -index a65bec7348c..3a4847ff9d8 100644 ---- a/linux_os/guide/system/software/integrity/certified-vendor/installed_OS_is_FIPS_certified/oval/shared.xml -+++ b/linux_os/guide/system/software/integrity/certified-vendor/installed_OS_is_FIPS_certified/oval/shared.xml -@@ -6,6 +6,7 @@ - - - -+ - - - -diff --git a/linux_os/guide/system/software/system-tools/package_dnf-plugin-subscription-manager_installed/rule.yml b/linux_os/guide/system/software/system-tools/package_dnf-plugin-subscription-manager_installed/rule.yml -index 8b6577226fb..4f49b3b825d 100644 ---- a/linux_os/guide/system/software/system-tools/package_dnf-plugin-subscription-manager_installed/rule.yml -+++ b/linux_os/guide/system/software/system-tools/package_dnf-plugin-subscription-manager_installed/rule.yml -@@ -1,6 +1,6 @@ - documentation_complete: true - --prodtype: rhel8 -+prodtype: rhel8,rhel9 - - title: 'Install dnf-plugin-subscription-manager Package' - -@@ -17,6 +17,7 @@ severity: medium - - identifiers: - cce@rhel8: CCE-82315-3 -+ cce@rhel9: CCE-89879-1 - - references: - ism: 0940,1144,1467,1472,1483,1493,1494,1495 -diff --git a/products/rhel9/profiles/hipaa.profile b/products/rhel9/profiles/hipaa.profile -index 1e0ea047b98..797c62708e2 100644 ---- a/products/rhel9/profiles/hipaa.profile -+++ b/products/rhel9/profiles/hipaa.profile -@@ -33,9 +33,9 @@ selections: - - require_singleuser_auth - - restrict_serial_port_logins - - securetty_root_login_console_only -- - service_debug-shell_disabled # not supported in RHEL9 ATM -- - disable_ctrlaltdel_reboot # not supported in RHEL9 ATM -- - disable_ctrlaltdel_burstaction # not supported in RHEL9 ATM -+ - service_debug-shell_disabled -+ - disable_ctrlaltdel_reboot -+ - disable_ctrlaltdel_burstaction - - dconf_db_up_to_date - - dconf_gnome_remote_access_credential_prompt - - dconf_gnome_remote_access_encryption -diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile -index 0ae391c60bf..adec0cbd774 100644 ---- a/products/rhel9/profiles/ospp.profile -+++ b/products/rhel9/profiles/ospp.profile -@@ -107,7 +107,7 @@ selections: - - var_accounts_user_umask=027 - - accounts_umask_etc_profile - - accounts_umask_etc_bashrc --# - accounts_umask_etc_csh_cshrc # not supported in RHEL9 ATM -+ - accounts_umask_etc_csh_cshrc - - ### Software update - - ensure_redhat_gpgkey_installed -@@ -177,7 +177,7 @@ selections: - - package_aide_installed - - package_dnf-automatic_installed - - package_subscription-manager_installed --# - package_dnf-plugin-subscription-manager_installed # not supported in RHEL9 ATM -+ - package_dnf-plugin-subscription-manager_installed - - package_firewalld_installed - - package_openscap-scanner_installed - - package_policycoreutils_installed -@@ -221,7 +221,7 @@ selections: - - securetty_root_login_console_only - - var_password_pam_unix_remember=5 - - accounts_password_pam_unix_remember --# - use_pam_wheel_for_su # not supported in RHEL9 ATM -+ - use_pam_wheel_for_su - - ### SELinux Configuration - - var_selinux_state=enforcing -@@ -422,7 +422,7 @@ selections: - - kerberos_disable_no_keytab - - # set ssh client rekey limit --# - ssh_client_rekey_limit # not supported in RHEL9 ATM -+ - ssh_client_rekey_limit - - var_ssh_client_rekey_limit_size=1G - - var_ssh_client_rekey_limit_time=1hour - -diff --git a/products/rhel9/profiles/pci-dss.profile b/products/rhel9/profiles/pci-dss.profile -index af347501989..1fe85d39ae0 100644 ---- a/products/rhel9/profiles/pci-dss.profile -+++ b/products/rhel9/profiles/pci-dss.profile -@@ -121,8 +121,8 @@ selections: - - var_smartcard_drivers=cac - - configure_opensc_card_drivers - - force_opensc_card_drivers --# - package_pcsc-lite_installed # not supported in RHEL9 ATM --# - service_pcscd_enabled # not supported in RHEL9 ATM -+ - package_pcsc-lite_installed -+ - service_pcscd_enabled - - sssd_enable_smartcards - - set_password_hashing_algorithm_systemauth - - set_password_hashing_algorithm_logindefs -diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt -index aa0b30da834..e78838a45aa 100644 ---- a/shared/references/cce-redhat-avail.txt -+++ b/shared/references/cce-redhat-avail.txt -@@ -396,7 +396,6 @@ CCE-86276-3 - CCE-86277-1 - CCE-86278-9 - CCE-86279-7 --CCE-86280-5 - CCE-86281-3 - CCE-86282-1 - CCE-86283-9 -@@ -1618,7 +1617,6 @@ CCE-87518-7 - CCE-87519-5 - CCE-87520-3 - CCE-87521-1 --CCE-87522-9 - CCE-87523-7 - CCE-87525-2 - CCE-87526-0 -@@ -1812,7 +1810,6 @@ CCE-87717-5 - CCE-87718-3 - CCE-87719-1 - CCE-87720-9 --CCE-87721-7 - CCE-87722-5 - CCE-87723-3 - CCE-87724-1 -@@ -1994,7 +1991,6 @@ CCE-87903-1 - CCE-87904-9 - CCE-87905-6 - CCE-87906-4 --CCE-87907-2 - CCE-87908-0 - CCE-87909-8 - CCE-87910-6 -@@ -3932,7 +3928,6 @@ CCE-89874-2 - CCE-89875-9 - CCE-89877-5 - CCE-89878-3 --CCE-89879-1 - CCE-89880-9 - CCE-89881-7 - CCE-89882-5 -@@ -4135,7 +4130,6 @@ CCE-90081-1 - CCE-90082-9 - CCE-90083-7 - CCE-90084-5 --CCE-90085-2 - CCE-90086-0 - CCE-90087-8 - CCE-90088-6 - -From 190cad8bc4ef957583b9e29c1508a1be43660388 Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Wed, 4 Aug 2021 16:30:45 +0200 -Subject: [PATCH 2/5] Fix remediation platforms of RHEL9 rules - ---- - .../configure_bashrc_exec_tmux/bash/shared.sh | 2 +- - .../configure_tmux_lock_after_time/bash/shared.sh | 2 +- - .../configure_tmux_lock_command/bash/shared.sh | 2 +- - .../console_screen_locking/no_tmux_in_shells/bash/shared.sh | 2 +- - .../software/integrity/fips/enable_fips_mode/bash/shared.sh | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/bash/shared.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/bash/shared.sh -index 0c544bfbb82..737d725872d 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/bash/shared.sh -+++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/bash/shared.sh -@@ -1,4 +1,4 @@ --# platform = multi_platform_fedora,Red Hat Enterprise Linux 8,Oracle Linux 8 -+# platform = multi_platform_all - - if ! grep -x ' case "$name" in sshd|login) exec tmux ;; esac' /etc/bashrc; then - cat >> /etc/bashrc <<'EOF' -diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_tmux_lock_after_time/bash/shared.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_tmux_lock_after_time/bash/shared.sh -index 233047afcbc..947e1dd7ee5 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_tmux_lock_after_time/bash/shared.sh -+++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_tmux_lock_after_time/bash/shared.sh -@@ -1,4 +1,4 @@ --# platform = multi_platform_fedora,Red Hat Enterprise Linux 8,Oracle Linux 8 -+# platform = multi_platform_all - - tmux_conf="/etc/tmux.conf" - -diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_tmux_lock_command/bash/shared.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_tmux_lock_command/bash/shared.sh -index f2430618ab3..0c11c1224e2 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_tmux_lock_command/bash/shared.sh -+++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_tmux_lock_command/bash/shared.sh -@@ -1,4 +1,4 @@ --# platform = Oracle Linux 8,Red Hat Enterprise Linux 8,Red Hat Virtualization 4,multi_platform_fedora -+# platform = multi_platform_all - - tmux_conf="/etc/tmux.conf" - -diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/no_tmux_in_shells/bash/shared.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/no_tmux_in_shells/bash/shared.sh -index 45c43e8d374..60e0a7e34c8 100644 ---- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/no_tmux_in_shells/bash/shared.sh -+++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/no_tmux_in_shells/bash/shared.sh -@@ -1,4 +1,4 @@ --# platform = multi_platform_fedora,Red Hat Enterprise Linux 8,Oracle Linux 8 -+# platform = multi_platform_all - - if grep -q 'tmux$' /etc/shells ; then - sed -i '/tmux$/d' /etc/shells -diff --git a/linux_os/guide/system/software/integrity/fips/enable_fips_mode/bash/shared.sh b/linux_os/guide/system/software/integrity/fips/enable_fips_mode/bash/shared.sh -index 87476a7b315..c98847ded72 100644 ---- a/linux_os/guide/system/software/integrity/fips/enable_fips_mode/bash/shared.sh -+++ b/linux_os/guide/system/software/integrity/fips/enable_fips_mode/bash/shared.sh -@@ -1,3 +1,3 @@ --# platform = Red Hat Enterprise Linux 8,multi_platform_fedora,Oracle Linux 8,Red Hat Virtualization 4 -+# platform = multi_platform_rhel,multi_platform_fedora,Oracle Linux 8,Red Hat Virtualization 4 - - fips-mode-setup --enable - -From 5b23f796b261325ad27b3c1684d3c9430a42679f Mon Sep 17 00:00:00 2001 -From: Matej Tyc -Date: Wed, 4 Aug 2021 17:56:57 +0200 -Subject: [PATCH 3/5] Update the grub config path - -RHEL9 and Fedora EFI/legacy grub paths have been unified: -https://fedoraproject.org/wiki/Changes/UnifyGrubConfig - -The location of Ubuntu EFI grub paths has been estimated from -https://askubuntu.com/questions/1028742/update-grub-does-not-update-boot-efi-efi-ubuntu-grub-cfg - -Location of SLE EFI grub paths has been taken from existing rules ---- - .../grub2_uefi_admin_username/oval/shared.xml | 16 ++++--------- - .../uefi/grub2_uefi_admin_username/rule.yml | 2 +- - .../uefi/grub2_uefi_password/oval/shared.xml | 24 +++++++------------ - .../uefi/grub2_uefi_password/rule.yml | 10 ++++---- - .../uefi_no_removeable_media/oval/shared.xml | 16 ++++--------- - products/fedora/product.yml | 2 ++ - products/rhel7/product.yml | 2 ++ - products/rhel8/product.yml | 2 ++ - products/rhel9/product.yml | 2 ++ - products/sle12/product.yml | 2 ++ - products/sle15/product.yml | 1 + - products/ubuntu1604/product.yml | 1 + - products/ubuntu1804/product.yml | 1 + - products/ubuntu2004/product.yml | 1 + - ssg/constants.py | 1 + - ssg/products.py | 4 ++++ - tests/shared/grub2.sh | 10 +++++--- - 17 files changed, 50 insertions(+), 47 deletions(-) - -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/oval/shared.xml b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/oval/shared.xml -index 8545e8ab2c7..7950c15a848 100644 ---- a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/oval/shared.xml -+++ b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/oval/shared.xml -@@ -1,26 +1,20 @@ --{{% if product == "fedora" %}} --{{% set grub_cfg_prefix = "/boot/efi/EFI/fedora" %}} --{{% else %}} --{{% set grub_cfg_prefix = "/boot/efi/EFI/redhat" %}} --{{% endif %}} -- - - - {{{ oval_metadata("The grub2 boot loader superuser should have a username that is hard to guess.") }}} - - -- {{{ oval_file_absent_criterion(grub_cfg_prefix + "/grub.cfg") }}} -- -+ {{{ oval_file_absent_criterion(grub2_uefi_boot_path + "/grub.cfg") }}} -+ - - - -- {{{ oval_file_absent(grub_cfg_prefix + "/grub.cfg") }}} -+ {{{ oval_file_absent(grub2_uefi_boot_path + "/grub.cfg") }}} - -- -+ - - - -- {{{ grub_cfg_prefix + "/grub.cfg" }}} -+ {{{ grub2_uefi_boot_path + "/grub.cfg" }}} - ^[\s]*set[\s]+superusers="(?i)(?!root|admin|administrator)(?-i).*"$ - 1 - -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml -index 8a98cbdc95f..128d7cc1cb8 100644 ---- a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml -+++ b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml -@@ -20,7 +20,7 @@ description: |- - Once the superuser account has been added, - update the - grub.cfg file by running: --
    grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    -+
    grub2-mkconfig -o {{{ grub2_uefi_boot_path }}}/grub.cfg
    - - rationale: |- - Having a non-default grub superuser username makes password-guessing attacks less effective. -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/oval/shared.xml b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/oval/shared.xml -index 230aab73139..a67c8ad99bb 100644 ---- a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/oval/shared.xml -+++ b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/oval/shared.xml -@@ -1,32 +1,26 @@ --{{% if product == "fedora" %}} --{{% set grub_cfg_prefix = "/boot/efi/EFI/fedora" %}} --{{% else %}} --{{% set grub_cfg_prefix = "/boot/efi/EFI/redhat" %}} --{{% endif %}} -- - - - {{{ oval_metadata("The UEFI grub2 boot loader should have password protection enabled.") }}} - - -- {{{ oval_file_absent_criterion(grub_cfg_prefix + "/grub.cfg") }}} -+ {{{ oval_file_absent_criterion(grub2_uefi_boot_path + "/grub.cfg") }}} - - -- -- -+ -+ - -- -+ - - - - -- {{{ oval_file_absent(grub_cfg_prefix + "/grub.cfg") }}} -+ {{{ oval_file_absent(grub2_uefi_boot_path + "/grub.cfg") }}} - -- -+ - - - -- {{{ grub_cfg_prefix }}}/grub.cfg -+ {{{ grub2_uefi_boot_path }}}/grub.cfg - ^[\s]*set[\s]+superusers=("?)[a-zA-Z_]+\1$ - 1 - -@@ -35,7 +29,7 @@ - - - -- {{{ grub_cfg_prefix }}}/user.cfg -+ {{{ grub2_uefi_boot_path }}}/user.cfg - ^[\s]*GRUB2_PASSWORD=grub\.pbkdf2\.sha512.*$ - 1 - -@@ -44,7 +38,7 @@ - -
    - -- {{{ grub_cfg_prefix }}}/grub.cfg -+ {{{ grub2_uefi_boot_path }}}/grub.cfg - ^[\s]*password_pbkdf2[\s]+.*[\s]+grub\.pbkdf2\.sha512.*$ - 1 - -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml -index cb0d60c3ddf..cc68441e5ad 100644 ---- a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml -+++ b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml -@@ -31,10 +31,8 @@ description: |- - grub.cfg file by running: - {{% if "ubuntu" in product %}} -
    update-grub
    -- {{% elif product in ["sle12", "sle15"] %}} --
    grub2-mkconfig -o /boot/efi/EFI/sles/grub.cfg
    - {{% else %}} --
    grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    -+
    grub2-mkconfig -o {{{ grub2_uefi_boot_path }}}/grub.cfg
    - {{% endif %}} - - rationale: |- -@@ -91,18 +89,18 @@ ocil: |- - To verify the boot loader superuser account password has been set, - and the password encrypted, run the following command: - {{% if product in ["sle12", "sle15"] %}} --
    sudo cat /boot/efi/EFI/sles/grub.cfg
    -+
    sudo cat {{{ grub2_uefi_boot_path }}}/grub.cfg
    - The output should be similar to: -
    password_pbkdf2 superuser grub.pbkdf2.sha512.10000.C4E08AC72FBFF7E837FD267BFAD7AEB3D42DDC
    -     2C99F2A94DD5E2E75C2DC331B719FE55D9411745F82D1B6CFD9E927D61925F9BBDD1CFAA0080E0
    -     916F7AB46E0D.1302284FCCC52CD73BA3671C6C12C26FF50BA873293B24EE2A96EE3B57963E6D7
    -     0C83964B473EC8F93B07FE749AA6710269E904A9B08A6BBACB00A2D242AD828
    - {{% elif "ubuntu" in product %}} --
    grep -i password /boot/grub/grub.cfg
    -+
    grep -i password {{{ grub2_uefi_boot_path }}}/grub.cfg
    - The output should contain something similar to: -
    password_pbkdf2 root grub.pbkdf2.sha512.10000.MFU48934NJA87HF8NSD34493GDHF84NG
    - {{% else %}} --
    sudo cat /boot/efi/EFI/redhat/user.cfg
    -+
    sudo cat {{{ grub2_uefi_boot_path}}}/user.cfg
    - The output should be similar to: -
    GRUB2_PASSWORD=grub.pbkdf2.sha512.10000.C4E08AC72FBFF7E837FD267BFAD7AEB3D42DDC
    -     2C99F2A94DD5E2E75C2DC331B719FE55D9411745F82D1B6CFD9E927D61925F9BBDD1CFAA0080E0
    -diff --git a/linux_os/guide/system/bootloader-grub2/uefi/uefi_no_removeable_media/oval/shared.xml b/linux_os/guide/system/bootloader-grub2/uefi/uefi_no_removeable_media/oval/shared.xml
    -index 72872d907e3..89a9fae86ec 100644
    ---- a/linux_os/guide/system/bootloader-grub2/uefi/uefi_no_removeable_media/oval/shared.xml
    -+++ b/linux_os/guide/system/bootloader-grub2/uefi/uefi_no_removeable_media/oval/shared.xml
    -@@ -1,27 +1,21 @@
    --{{% if product == "fedora" %}}
    --{{% set grub_cfg_prefix = "/boot/efi/EFI/fedora" %}}
    --{{% else %}}
    --{{% set grub_cfg_prefix = "/boot/efi/EFI/redhat" %}}
    --{{% endif %}}
    --
    - 
    -   
    -     {{{ oval_metadata("Ensure the system is not configured to use a boot loader on removable media.") }}}
    -     
    --      
    --      {{{ oval_file_absent_criterion(grub_cfg_prefix + "/grub.cfg") }}}
    -+      
    -+      {{{ oval_file_absent_criterion(grub2_uefi_boot_path + "/grub.cfg") }}}
    -     
    -   
    - 
    -   
    -   
    -   
    -   
    - 
    -   
    --    {{{ grub_cfg_prefix + "/grub.cfg" }}}
    -+    {{{ grub2_uefi_boot_path + "/grub.cfg" }}}
    -     ^[ \t]*set root=(.+?)[ \t]*(?:$|#)
    -     1
    -   
    -@@ -30,5 +24,5 @@
    -     ^['|\(](?!fd)(?!cd)(?!usb).*['|\)]$
    -   
    - 
    --  {{{ oval_file_absent(grub_cfg_prefix + "/grub.cfg") }}}
    -+  {{{ oval_file_absent(grub2_uefi_boot_path + "/grub.cfg") }}}
    - 
    -diff --git a/products/fedora/product.yml b/products/fedora/product.yml
    -index 0cb53c5331e..ea8e98eea78 100644
    ---- a/products/fedora/product.yml
    -+++ b/products/fedora/product.yml
    -@@ -10,6 +10,8 @@ pkg_manager: "dnf"
    - 
    - init_system: "systemd"
    - 
    -+grub2_boot_path: "/boot/grub2"
    -+
    - dconf_gdm_dir: "distro.d"
    - 
    - cpes_root: "../../shared/applicability"
    -diff --git a/products/rhel7/product.yml b/products/rhel7/product.yml
    -index fb5d17786da..6438797f218 100644
    ---- a/products/rhel7/product.yml
    -+++ b/products/rhel7/product.yml
    -@@ -20,6 +20,8 @@ release_key_fingerprint: "567E347AD0044ADE55BA8A5F199E2F91FD431D51"
    - auxiliary_key_fingerprint: "43A6E49C4A38F4BE9ABF2A5345689C882FA658E0"
    - oval_feed_url: "https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml"
    - 
    -+grub2_uefi_boot_path: "/boot/efi/EFI/redhat"
    -+
    - cpes_root: "../../shared/applicability"
    - cpes:
    -   - rhel7:
    -diff --git a/products/rhel8/product.yml b/products/rhel8/product.yml
    -index 78c987b2457..f6d2102558d 100644
    ---- a/products/rhel8/product.yml
    -+++ b/products/rhel8/product.yml
    -@@ -20,6 +20,8 @@ release_key_fingerprint: "567E347AD0044ADE55BA8A5F199E2F91FD431D51"
    - auxiliary_key_fingerprint: "6A6AA7C97C8890AEC6AEBFE2F76F66C3D4082792"
    - oval_feed_url: "https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml"
    - 
    -+grub2_uefi_boot_path: "/boot/efi/EFI/redhat"
    -+
    - cpes_root: "../../shared/applicability"
    - cpes:
    -   - rhel8:
    -diff --git a/products/rhel9/product.yml b/products/rhel9/product.yml
    -index 4ceb332adf3..6b5a15d5cee 100644
    ---- a/products/rhel9/product.yml
    -+++ b/products/rhel9/product.yml
    -@@ -10,6 +10,8 @@ pkg_manager: "dnf"
    - 
    - init_system: "systemd"
    - 
    -+grub2_boot_path: "/boot/grub2"
    -+
    - dconf_gdm_dir: "distro.d"
    - 
    - # The fingerprints below are retrieved from https://access.redhat.com/security/team/key
    -diff --git a/products/sle12/product.yml b/products/sle12/product.yml
    -index d1301a17f91..b9e44e0725c 100644
    ---- a/products/sle12/product.yml
    -+++ b/products/sle12/product.yml
    -@@ -12,6 +12,8 @@ pkg_manager: "zypper"
    - pkg_manager_config_file: "/etc/zypp/zypp.conf"
    - oval_feed_url: "https://ftp.suse.com/pub/projects/security/oval/suse.linux.enterprise.12.xml"
    - 
    -+grub2_uefi_boot_path: "/boot/efi/EFI/sles"
    -+
    - cpes_root: "../../shared/applicability"
    - cpes:
    -   - sle12-server:
    -diff --git a/products/ubuntu1604/product.yml b/products/ubuntu1604/product.yml
    -index 827a875d493..36ec98397f6 100644
    ---- a/products/ubuntu1604/product.yml
    -+++ b/products/ubuntu1604/product.yml
    -@@ -12,6 +12,7 @@ init_system: "systemd"
    - oval_feed_url: "https://people.canonical.com/~ubuntu-security/oval/com.ubuntu.xenial.cve.oval.xml"
    - 
    - grub2_boot_path: "/boot/grub"
    -+grub2_uefi_boot_path: "/boot/efi/EFI/ubuntu"
    - 
    - cpes_root: "../../shared/applicability"
    - cpes:
    -diff --git a/products/ubuntu1804/product.yml b/products/ubuntu1804/product.yml
    -index 68922441a2a..f1671b8d7dd 100644
    ---- a/products/ubuntu1804/product.yml
    -+++ b/products/ubuntu1804/product.yml
    -@@ -11,6 +11,7 @@ pkg_manager: "apt_get"
    - init_system: "systemd"
    - 
    - grub2_boot_path: "/boot/grub"
    -+grub2_uefi_boot_path: "/boot/efi/EFI/ubuntu"
    - 
    - cpes_root: "../../shared/applicability"
    - cpes:
    -diff --git a/products/ubuntu2004/product.yml b/products/ubuntu2004/product.yml
    -index 15565b6748f..d75624d70a3 100644
    ---- a/products/ubuntu2004/product.yml
    -+++ b/products/ubuntu2004/product.yml
    -@@ -12,6 +12,7 @@ init_system: "systemd"
    - oval_feed_url: "https://people.canonical.com/~ubuntu-security/oval/com.ubuntu.focal.cve.oval.xml"
    - 
    - grub2_boot_path: "/boot/grub"
    -+grub2_uefi_boot_path: "/boot/efi/EFI/ubuntu"
    - 
    - cpes_root: "../../shared/applicability"
    - cpes:
    -diff --git a/ssg/constants.py b/ssg/constants.py
    -index 666d7a4d3c8..f9c978a22a2 100644
    ---- a/ssg/constants.py
    -+++ b/ssg/constants.py
    -@@ -383,4 +383,5 @@
    - # Application constants
    - DEFAULT_UID_MIN = 1000
    - DEFAULT_GRUB2_BOOT_PATH = '/boot/grub2'
    -+DEFAULT_GRUB2_UEFI_BOOT_PATH = '/boot/grub2'
    - DEFAULT_DCONF_GDM_DIR = 'gdm.d'
    -diff --git a/ssg/products.py b/ssg/products.py
    -index 25178b741b2..fb55f5c2f4b 100644
    ---- a/ssg/products.py
    -+++ b/ssg/products.py
    -@@ -9,6 +9,7 @@
    - from .constants import (product_directories,
    -                         DEFAULT_UID_MIN,
    -                         DEFAULT_GRUB2_BOOT_PATH,
    -+                        DEFAULT_GRUB2_UEFI_BOOT_PATH,
    -                         DEFAULT_DCONF_GDM_DIR,
    -                         PKG_MANAGER_TO_SYSTEM,
    -                         PKG_MANAGER_TO_CONFIG_FILE,
    -@@ -48,6 +49,9 @@ def _get_implied_properties(existing_properties):
    -     if "grub2_boot_path" not in existing_properties:
    -         result["grub2_boot_path"] = DEFAULT_GRUB2_BOOT_PATH
    - 
    -+    if "grub2_uefi_boot_path" not in existing_properties:
    -+        result["grub2_uefi_boot_path"] = DEFAULT_GRUB2_UEFI_BOOT_PATH
    -+
    -     if "dconf_gdm_dir" not in existing_properties:
    -         result["dconf_gdm_dir"] = DEFAULT_DCONF_GDM_DIR
    - 
    -diff --git a/tests/shared/grub2.sh b/tests/shared/grub2.sh
    -index bce7683a7c1..f024b3766cf 100644
    ---- a/tests/shared/grub2.sh
    -+++ b/tests/shared/grub2.sh
    -@@ -2,9 +2,13 @@ test -n "$GRUB_CFG_ROOT" || GRUB_CFG_ROOT=/boot/grub2
    - 
    - function set_grub_uefi_root {
    - 	if grep NAME /etc/os-release | grep -iq fedora; then
    --		GRUB_CFG_ROOT=/boot/efi/EFI/fedora
    --	else
    --		GRUB_CFG_ROOT=/boot/efi/EFI/redhat
    -+		GRUB_CFG_ROOT=/boot/grub2
    -+	elif grep NAME /etc/os-release | grep -iq "Red Hat"; then
    -+		if grep VERSION /etc/os-release | grep -q '9\.0'; then
    -+			GRUB_CFG_ROOT=/boot/grub2
    -+		else
    -+			GRUB_CFG_ROOT=/boot/efi/EFI/redhat
    -+		fi
    - 	fi
    - }
    - 
    -
    -From a838226fc6b082ab73990613294328db49463c2b Mon Sep 17 00:00:00 2001
    -From: Matej Tyc 
    -Date: Thu, 5 Aug 2021 17:59:39 +0200
    -Subject: [PATCH 4/5] Add the sshd directory configuration rule
    -
    -Remediations of other sshd rules assumes that sshd is configured using
    -multiple files as opposed to one huge file, and this rule
    -makes sure that the assumption is guarded.
    ----
    - controls/anssi.yml                      | 3 +++
    - products/rhel9/profiles/cis.profile     | 2 ++
    - products/rhel9/profiles/cjis.profile    | 1 +
    - products/rhel9/profiles/e8.profile      | 1 +
    - products/rhel9/profiles/hipaa.profile   | 1 +
    - products/rhel9/profiles/ism_o.profile   | 1 +
    - products/rhel9/profiles/ospp.profile    | 1 +
    - products/rhel9/profiles/pci-dss.profile | 1 +
    - products/rhel9/profiles/rht-ccp.profile | 1 +
    - 9 files changed, 12 insertions(+)
    -
    -diff --git a/controls/anssi.yml b/controls/anssi.yml
    -index 7737e67ea51..eee79cf1ef7 100644
    ---- a/controls/anssi.yml
    -+++ b/controls/anssi.yml
    -@@ -384,6 +384,9 @@ controls:
    -     - package_sudo_installed
    -     - audit_rules_privileged_commands_sudo
    - 
    -+    # This rule should be present in the profile at least once
    -+    - sshd_use_directory_configuration
    -+
    -   - id: R20
    -     levels:
    -     - enhanced
    -diff --git a/products/rhel9/profiles/cis.profile b/products/rhel9/profiles/cis.profile
    -index 622f88e3766..8d7816e5e2d 100644
    ---- a/products/rhel9/profiles/cis.profile
    -+++ b/products/rhel9/profiles/cis.profile
    -@@ -791,6 +791,8 @@ selections:
    -     - file_permissions_sshd_pub_key
    -     # TO DO: check owner of pub keys in /etc/ssh is root:root
    - 
    -+    # Ensure that the configuration is done the right way
    -+    - sshd_use_directory_configuration
    -     ### 5.2.5 Ensure SSH LogLevel is appropriate (Scored)
    -     - sshd_set_loglevel_info
    - 
    -diff --git a/products/rhel9/profiles/cjis.profile b/products/rhel9/profiles/cjis.profile
    -index b45ba19d84f..0aaf7cb0206 100644
    ---- a/products/rhel9/profiles/cjis.profile
    -+++ b/products/rhel9/profiles/cjis.profile
    -@@ -98,6 +98,7 @@ selections:
    -     - dconf_gnome_screensaver_idle_activation_enabled
    -     - dconf_gnome_screensaver_lock_enabled
    -     - dconf_gnome_screensaver_mode_blank
    -+    - sshd_use_directory_configuration
    -     - sshd_allow_only_protocol2
    -     - sshd_set_idle_timeout
    -     - var_sshd_set_keepalive=0
    -diff --git a/products/rhel9/profiles/e8.profile b/products/rhel9/profiles/e8.profile
    -index 6d87a778eee..3851255ccec 100644
    ---- a/products/rhel9/profiles/e8.profile
    -+++ b/products/rhel9/profiles/e8.profile
    -@@ -126,6 +126,7 @@ selections:
    -   - audit_rules_kernel_module_loading
    - 
    -   ### Secure access
    -+  - sshd_use_directory_configuration
    -   - sshd_disable_root_login
    -   - sshd_disable_gssapi_auth
    -   - sshd_print_last_log
    -diff --git a/products/rhel9/profiles/hipaa.profile b/products/rhel9/profiles/hipaa.profile
    -index 797c62708e2..d1dc18ba33c 100644
    ---- a/products/rhel9/profiles/hipaa.profile
    -+++ b/products/rhel9/profiles/hipaa.profile
    -@@ -39,6 +39,7 @@ selections:
    -     - dconf_db_up_to_date
    -     - dconf_gnome_remote_access_credential_prompt
    -     - dconf_gnome_remote_access_encryption
    -+    - sshd_use_directory_configuration
    -     - sshd_disable_empty_passwords
    -     - sshd_disable_root_login
    -     - libreswan_approved_tunnels
    -diff --git a/products/rhel9/profiles/ism_o.profile b/products/rhel9/profiles/ism_o.profile
    -index 82e863ad3d3..6fc919da128 100644
    ---- a/products/rhel9/profiles/ism_o.profile
    -+++ b/products/rhel9/profiles/ism_o.profile
    -@@ -56,6 +56,7 @@ selections:
    -   ## Authentication hardening
    -   ## Identifiers 1546 / 0974 / 1173 / 1504 / 1505 / 1401 / 1559 / 1560
    -   ## 1561 / 1546 / 0421 / 1557 / 0422 / 1558 / 1403 / 0431
    -+  - sshd_use_directory_configuration
    -   - sshd_max_auth_tries_value=5
    -   - disable_host_auth
    -   - require_emergency_target_auth
    -diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile
    -index adec0cbd774..08ffcccd9e2 100644
    ---- a/products/rhel9/profiles/ospp.profile
    -+++ b/products/rhel9/profiles/ospp.profile
    -@@ -58,6 +58,7 @@ selections:
    - 
    -     ### Services
    -     # sshd
    -+    - sshd_use_directory_configuration
    -     - sshd_disable_root_login
    -     - sshd_enable_strictmodes
    -     - disable_host_auth
    -diff --git a/products/rhel9/profiles/pci-dss.profile b/products/rhel9/profiles/pci-dss.profile
    -index 1fe85d39ae0..bd16dc97721 100644
    ---- a/products/rhel9/profiles/pci-dss.profile
    -+++ b/products/rhel9/profiles/pci-dss.profile
    -@@ -105,6 +105,7 @@ selections:
    -     - dconf_gnome_screensaver_idle_activation_enabled
    -     - dconf_gnome_screensaver_lock_enabled
    -     - dconf_gnome_screensaver_mode_blank
    -+    - sshd_use_directory_configuration
    -     - sshd_set_idle_timeout
    -     - var_sshd_set_keepalive=0
    -     - accounts_password_pam_minlen
    -diff --git a/products/rhel9/profiles/rht-ccp.profile b/products/rhel9/profiles/rht-ccp.profile
    -index e1d9a70b493..8576975aa54 100644
    ---- a/products/rhel9/profiles/rht-ccp.profile
    -+++ b/products/rhel9/profiles/rht-ccp.profile
    -@@ -87,6 +87,7 @@ selections:
    -     - service_telnet_disabled
    -     - package_telnet-server_removed
    -     - package_telnet_removed
    -+    - sshd_use_directory_configuration
    -     - sshd_allow_only_protocol2
    -     - sshd_set_idle_timeout
    -     - var_sshd_set_keepalive=0
    -
    -From 470e496f8335c0d017bc82646537b03947b71941 Mon Sep 17 00:00:00 2001
    -From: Matej Tyc 
    -Date: Wed, 11 Aug 2021 16:43:00 +0200
    -Subject: [PATCH 5/5] Reflect fusion of rhel9 packages
    -
    -Packages dnf-plugin-subscription-manager and subscription-manager are
    -merged to subscription-manager in RHEL9 - see
    -https://bugzilla.redhat.com/show_bug.cgi?id=1847910#c2
    ----
    - .../rule.yml                                             | 3 +--
    - .../package_subscription-manager_installed/rule.yml      | 9 ++++++++-
    - products/rhel9/profiles/ospp.profile                     | 1 -
    - 3 files changed, 9 insertions(+), 4 deletions(-)
    -
    -diff --git a/linux_os/guide/system/software/system-tools/package_dnf-plugin-subscription-manager_installed/rule.yml b/linux_os/guide/system/software/system-tools/package_dnf-plugin-subscription-manager_installed/rule.yml
    -index 4f49b3b825d..8b6577226fb 100644
    ---- a/linux_os/guide/system/software/system-tools/package_dnf-plugin-subscription-manager_installed/rule.yml
    -+++ b/linux_os/guide/system/software/system-tools/package_dnf-plugin-subscription-manager_installed/rule.yml
    -@@ -1,6 +1,6 @@
    - documentation_complete: true
    - 
    --prodtype: rhel8,rhel9
    -+prodtype: rhel8
    - 
    - title: 'Install dnf-plugin-subscription-manager Package'
    - 
    -@@ -17,7 +17,6 @@ severity: medium
    - 
    - identifiers:
    -     cce@rhel8: CCE-82315-3
    --    cce@rhel9: CCE-89879-1
    - 
    - references:
    -     ism: 0940,1144,1467,1472,1483,1493,1494,1495
    -diff --git a/linux_os/guide/system/software/system-tools/package_subscription-manager_installed/rule.yml b/linux_os/guide/system/software/system-tools/package_subscription-manager_installed/rule.yml
    -index b90a7588270..32e5ce9a129 100644
    ---- a/linux_os/guide/system/software/system-tools/package_subscription-manager_installed/rule.yml
    -+++ b/linux_os/guide/system/software/system-tools/package_subscription-manager_installed/rule.yml
    -@@ -12,7 +12,14 @@ rationale: |-
    -     and subscriptions on a local system to help manage subscription assignments.
    -     It communicates with the backend subscription service (the Customer Portal
    -     or an on-premise server such as Subscription Asset Manager) and works with
    --    content management tools such as yum.
    -+    content management tools such as {{{ package_manager }}}.
    -+
    -+    {{% if product in ["rhel9"] %}}
    -+    The package provides, among other things, {{{ package_manager }}} plugins
    -+    to interact with repositories and subscriptions
    -+    from the Red Hat entitlement platform - the subscription-manager and
    -+    product-id plugins.
    -+    {{% endif %}}
    - 
    - severity: medium
    - 
    -diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile
    -index 08ffcccd9e2..1b060c7bf07 100644
    ---- a/products/rhel9/profiles/ospp.profile
    -+++ b/products/rhel9/profiles/ospp.profile
    -@@ -178,7 +178,6 @@ selections:
    -     - package_aide_installed
    -     - package_dnf-automatic_installed
    -     - package_subscription-manager_installed
    --    - package_dnf-plugin-subscription-manager_installed
    -     - package_firewalld_installed
    -     - package_openscap-scanner_installed
    -     - package_policycoreutils_installed
    diff --git a/SOURCES/scap-security-guide-0.1.58-zipl_remediation_applicability-PR_7458.patch b/SOURCES/scap-security-guide-0.1.58-zipl_remediation_applicability-PR_7458.patch
    deleted file mode 100644
    index e4e92bb..0000000
    --- a/SOURCES/scap-security-guide-0.1.58-zipl_remediation_applicability-PR_7458.patch
    +++ /dev/null
    @@ -1,29 +0,0 @@
    -From d1c2810ca3ba0cea44cc70db34eb80e313408cb5 Mon Sep 17 00:00:00 2001
    -From: Gabriel Becker 
    -Date: Wed, 25 Aug 2021 10:59:11 +0200
    -Subject: [PATCH] Remove package applicability from s390x_arch generated
    - remediations.
    -
    -This makes sure that there will be no package applicability check in the
    -remediations of rules that use the s390x_arch platform applicability,
    -since the check is made by checking a line in file instead. At this
    -moment the build system does not allow doing such checks. The side
    -effect is that Bash and Ansible roles will apply this remediation even
    -on a system that is not s390_arch, so using OpenSCAP scanner is highly
    -recommended.
    ----
    - ssg/constants.py | 1 +
    - 1 file changed, 1 insertion(+)
    -
    -diff --git a/ssg/constants.py b/ssg/constants.py
    -index 9bb4e1b5f4..adb76bfa8f 100644
    ---- a/ssg/constants.py
    -+++ b/ssg/constants.py
    -@@ -353,6 +353,7 @@
    -   "uefi": None,
    -   "non-uefi": None,
    -   "not_s390x_arch": None,
    -+  "s390x_arch": None,
    - }
    - 
    - # _version_name_map = {
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_244-PR_8133.patch b/SOURCES/scap-security-guide-0.1.61-RC_244-PR_8133.patch
    new file mode 100644
    index 0000000..8213f9d
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_244-PR_8133.patch
    @@ -0,0 +1,24 @@
    +diff --git a/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml b/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml
    +index 9f036f83015..f94ddab2fe1 100644
    +--- a/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml
    ++++ b/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml
    +@@ -32,6 +32,7 @@ references:
    +     cis@ubuntu2004: 4.1.1.4
    +     disa: CCI-001849
    +     nist: CM-6(a)
    ++    ospp: FAU_STG.1,FAU_STG.3
    +     srg: SRG-OS-000254-GPOS-00095,SRG-OS-000341-GPOS-00132
    +     stigid@ol8: OL08-00-030602
    +     stigid@rhel8: RHEL-08-030602
    +diff --git a/linux_os/guide/system/bootloader-zipl/zipl_audit_backlog_limit_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_audit_backlog_limit_argument/rule.yml
    +index 6d76e896ffc..7396b9167c6 100644
    +--- a/linux_os/guide/system/bootloader-zipl/zipl_audit_backlog_limit_argument/rule.yml
    ++++ b/linux_os/guide/system/bootloader-zipl/zipl_audit_backlog_limit_argument/rule.yml
    +@@ -25,6 +25,7 @@ identifiers:
    + 
    + references:
    +     cis@ubuntu2004: 4.1.1.4
    ++    ospp: FAU_STG.1,FAU_STG.3
    + 
    + ocil_clause: 'audit backlog limit is not configured'
    + 
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_246_250-PR_8070.patch b/SOURCES/scap-security-guide-0.1.61-RC_246_250-PR_8070.patch
    new file mode 100644
    index 0000000..3bf02a5
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_246_250-PR_8070.patch
    @@ -0,0 +1,26 @@
    +diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_local_events/rule.yml b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_local_events/rule.yml
    +index 5841f378fe6..f4780b4ae6d 100644
    +--- a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_local_events/rule.yml
    ++++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_local_events/rule.yml
    +@@ -22,7 +22,7 @@ identifiers:
    + references:
    +     disa: CCI-000366
    +     nist: CM-6
    +-    ospp: FAU_GEN.1.1.c
    ++    ospp: FAU_GEN.1
    +     srg: SRG-OS-000062-GPOS-00031,SRG-OS-000480-GPOS-00227
    +     stigid@ol8: OL08-00-030061
    +     stigid@rhel8: RHEL-08-030061
    +diff --git a/linux_os/guide/system/auditing/policy_rules/audit_basic_configuration/rule.yml b/linux_os/guide/system/auditing/policy_rules/audit_basic_configuration/rule.yml
    +index ba60b9b2c98..19dc3320e85 100644
    +--- a/linux_os/guide/system/auditing/policy_rules/audit_basic_configuration/rule.yml
    ++++ b/linux_os/guide/system/auditing/policy_rules/audit_basic_configuration/rule.yml
    +@@ -47,7 +47,7 @@ identifiers:
    + 
    + references:
    +     nist: AU-2(a)
    +-    ospp: FAU_GEN.1.1.c
    ++    ospp: FAU_GEN.1
    +     srg: SRG-OS-000365-GPOS-00152,SRG-OS-000475-GPOS-00220
    + 
    + ocil_clause: 'the file does not exist or the content differs'
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_247-PR_8114.patch b/SOURCES/scap-security-guide-0.1.61-RC_247-PR_8114.patch
    new file mode 100644
    index 0000000..a0e2247
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_247-PR_8114.patch
    @@ -0,0 +1,13 @@
    +diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_write_logs/rule.yml b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_write_logs/rule.yml
    +index 6c39a05550c..f169cba9f6b 100644
    +--- a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_write_logs/rule.yml
    ++++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_write_logs/rule.yml
    +@@ -21,7 +21,7 @@ identifiers:
    + 
    + references:
    +     nist: CM-6
    +-    ospp: FAU_GEN.1.1.c
    ++    ospp: FAU_STG.1
    +     srg: SRG-OS-000480-GPOS-00227
    + 
    + ocil_clause: write_logs isn't set to yes
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_248_249-PR_8071.patch b/SOURCES/scap-security-guide-0.1.61-RC_248_249-PR_8071.patch
    new file mode 100644
    index 0000000..c028dff
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_248_249-PR_8071.patch
    @@ -0,0 +1,26 @@
    +diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_log_format/rule.yml b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_log_format/rule.yml
    +index 48ed2f31795..b536a68cf2a 100644
    +--- a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_log_format/rule.yml
    ++++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_log_format/rule.yml
    +@@ -23,7 +23,7 @@ identifiers:
    + references:
    +     disa: CCI-000366
    +     nist: CM-6,AU-3
    +-    ospp: FAU_GEN.1
    ++    ospp: FAU_GEN.1.2
    +     srg: SRG-OS-000255-GPOS-00096,SRG-OS-000480-GPOS-00227
    +     stigid@ol8: OL08-00-030063
    +     stigid@rhel8: RHEL-08-030063
    +diff --git a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_name_format/rule.yml b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_name_format/rule.yml
    +index a31e975c1c9..8da90cd760f 100644
    +--- a/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_name_format/rule.yml
    ++++ b/linux_os/guide/system/auditing/configure_auditd_data_retention/auditd_name_format/rule.yml
    +@@ -24,7 +24,7 @@ identifiers:
    + references:
    +     disa: CCI-001851
    +     nist: CM-6,AU-3
    +-    ospp: FAU_GEN.1
    ++    ospp: FAU_GEN.1.2
    +     srg: SRG-OS-000039-GPOS-00017,SRG-OS-000342-GPOS-00133,SRG-OS-000479-GPOS-00224
    +     stigid@ol7: OL07-00-030211
    +     stigid@ol8: OL08-00-030062
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_251-PR_8072.patch b/SOURCES/scap-security-guide-0.1.61-RC_251-PR_8072.patch
    new file mode 100644
    index 0000000..3ea3530
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_251-PR_8072.patch
    @@ -0,0 +1,13 @@
    +diff --git a/linux_os/guide/system/auditing/policy_rules/audit_immutable_login_uids/rule.yml b/linux_os/guide/system/auditing/policy_rules/audit_immutable_login_uids/rule.yml
    +index ac43b654188..70357c153be 100644
    +--- a/linux_os/guide/system/auditing/policy_rules/audit_immutable_login_uids/rule.yml
    ++++ b/linux_os/guide/system/auditing/policy_rules/audit_immutable_login_uids/rule.yml
    +@@ -37,7 +37,7 @@ identifiers:
    + references:
    +     disa: CCI-000162
    +     nist: AU-2(a)
    +-    ospp: FAU_GEN.1.1.c
    ++    ospp: FAU_GEN.1.2
    +     srg: SRG-OS-000462-GPOS-00206,SRG-OS-000475-GPOS-00220,SRG-OS-000057-GPOS-00027,SRG-OS-000058-GPOS-00028,SRG-OS-000059-GPOS-00029
    +     stigid@ol8: OL08-00-030122
    +     stigid@rhel8: RHEL-08-030122
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_253-PR_8111.patch b/SOURCES/scap-security-guide-0.1.61-RC_253-PR_8111.patch
    new file mode 100644
    index 0000000..5695dc4
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_253-PR_8111.patch
    @@ -0,0 +1,12 @@
    +diff --git a/linux_os/guide/system/logging/package_rsyslog_installed/rule.yml b/linux_os/guide/system/logging/package_rsyslog_installed/rule.yml
    +index 5af94a56910..7968d90331e 100644
    +--- a/linux_os/guide/system/logging/package_rsyslog_installed/rule.yml
    ++++ b/linux_os/guide/system/logging/package_rsyslog_installed/rule.yml
    +@@ -31,6 +31,7 @@ references:
    +     iso27001-2013: A.12.4.1,A.12.4.2,A.12.4.3,A.12.4.4,A.12.7.1
    +     nist: CM-6(a)
    +     nist-csf: PR.PT-1
    ++    ospp: FTP_ITC_EXT.1.1
    +     srg: SRG-OS-000479-GPOS-00224,SRG-OS-000051-GPOS-00024,SRG-OS-000480-GPOS-00227
    +     stigid@ol8: OL08-00-030670
    +     stigid@rhel8: RHEL-08-030670
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_254-PR_8113.patch b/SOURCES/scap-security-guide-0.1.61-RC_254-PR_8113.patch
    new file mode 100644
    index 0000000..4f77ff6
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_254-PR_8113.patch
    @@ -0,0 +1,13 @@
    +diff --git a/linux_os/guide/system/logging/rsyslog_sending_messages/rsyslog_remote_tls/rule.yml b/linux_os/guide/system/logging/rsyslog_sending_messages/rsyslog_remote_tls/rule.yml
    +index d5d49bf7426..83c6d9339de 100644
    +--- a/linux_os/guide/system/logging/rsyslog_sending_messages/rsyslog_remote_tls/rule.yml
    ++++ b/linux_os/guide/system/logging/rsyslog_sending_messages/rsyslog_remote_tls/rule.yml
    +@@ -29,7 +29,7 @@ references:
    +     anssi: BP28(R43)
    +     ism: 0988,1405
    +     nist: AU-9(3),CM-6(a)
    +-    ospp: FCS_TLSC_EXT.1,FTP_ITC_EXT.1.1
    ++    ospp: FCS_TLSC_EXT.1,FTP_ITC_EXT.1.1,FIA_X509_EXT.1.1,FMT_SMF_EXT.1.1
    +     srg: SRG-OS-000480-GPOS-00227,SRG-OS-000120-GPOS-00061
    + 
    + ocil_clause: 'omfwd is not configured with gtls and AuthMode'
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_255-PR_8112.patch b/SOURCES/scap-security-guide-0.1.61-RC_255-PR_8112.patch
    new file mode 100644
    index 0000000..d80355c
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_255-PR_8112.patch
    @@ -0,0 +1,13 @@
    +diff --git a/linux_os/guide/system/logging/rsyslog_sending_messages/rsyslog_remote_tls_cacert/rule.yml b/linux_os/guide/system/logging/rsyslog_sending_messages/rsyslog_remote_tls_cacert/rule.yml
    +index 635207b571f..818f24718a0 100644
    +--- a/linux_os/guide/system/logging/rsyslog_sending_messages/rsyslog_remote_tls_cacert/rule.yml
    ++++ b/linux_os/guide/system/logging/rsyslog_sending_messages/rsyslog_remote_tls_cacert/rule.yml
    +@@ -27,7 +27,7 @@ identifiers:
    + references:
    +     anssi: BP28(R43)
    +     ism: 0988,1405
    +-    ospp: FCS_TLSC_EXT.1,FTP_ITC_EXT.1.1
    ++    ospp: FCS_TLSC_EXT.1
    +     srg: SRG-OS-000480-GPOS-00227
    + 
    + ocil_clause: 'CA certificate for rsyslog remote logging via TLS is not set'
    diff --git a/SOURCES/scap-security-guide-0.1.61-RC_277_245-PR_8069.patch b/SOURCES/scap-security-guide-0.1.61-RC_277_245-PR_8069.patch
    new file mode 100644
    index 0000000..818f284
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-RC_277_245-PR_8069.patch
    @@ -0,0 +1,24 @@
    +diff --git a/linux_os/guide/system/auditing/package_audit_installed/rule.yml b/linux_os/guide/system/auditing/package_audit_installed/rule.yml
    +index 8b36f0c2fa3..795089c8b83 100644
    +--- a/linux_os/guide/system/auditing/package_audit_installed/rule.yml
    ++++ b/linux_os/guide/system/auditing/package_audit_installed/rule.yml
    +@@ -27,6 +27,7 @@ references:
    +     nerc-cip: CIP-004-6 R3.3,CIP-007-3 R6.5
    +     nist: AC-7(a),AU-7(1),AU-7(2),AU-14,AU-12(2),AU-2(a),CM-6(a)
    +     nist@sle12: AU-7(a),AU-7(b),AU-8(b),AU-12.1(iv),AU-12(3),AU-12(c),CM-5(1)
    ++    ospp: FAU_GEN.1
    +     srg: SRG-OS-000122-GPOS-00063,SRG-OS-000337-GPOS-00129,SRG-OS-000348-GPOS-00136,SRG-OS-000349-GPOS-00137,SRG-OS-000350-GPOS-00138,SRG-OS-000351-GPOS-00139,SRG-OS-000352-GPOS-00140,SRG-OS-000353-GPOS-00141,SRG-OS-000354-GPOS-00142,SRG-OS-000358-GPOS-00145,SRG-OS-000359-GPOS-00146,SRG-OS-000365-GPOS-00152,SRG-OS-000474-GPOS-00219,SRG-OS-000475-GPOS-00220,SRG-OS-000480-GPOS-00227,SRG-OS-000062-GPOS-00031
    +     stigid@ol8: OL08-00-030180
    +     stigid@rhel8: RHEL-08-030180
    +diff --git a/linux_os/guide/system/auditing/service_auditd_enabled/rule.yml b/linux_os/guide/system/auditing/service_auditd_enabled/rule.yml
    +index 320b69c3179..99edca3e270 100644
    +--- a/linux_os/guide/system/auditing/service_auditd_enabled/rule.yml
    ++++ b/linux_os/guide/system/auditing/service_auditd_enabled/rule.yml
    +@@ -50,6 +50,7 @@ references:
    +     nist: AC-2(g),AU-3,AU-10,AU-2(d),AU-12(c),AU-14(1),AC-6(9),CM-6(a),SI-4(23)
    +     nist-csf: DE.AE-3,DE.AE-5,DE.CM-1,DE.CM-3,DE.CM-7,ID.SC-4,PR.AC-3,PR.PT-1,PR.PT-4,RS.AN-1,RS.AN-4
    +     nist@sle12: AU-3,AU-3(1),AU-3(1).1(ii),AU-3.1,AU-6(4),AU-6(4).1,AU-7(1),AU-7(1).1,AU-7(a),AU-14(1),AU-14(1).1,CM-6(b),CM-6.1(iv),MA-4(1)(a)
    ++    ospp: FAU_GEN.1
    +     pcidss: Req-10.1
    +     srg: SRG-OS-000037-GPOS-00015,SRG-OS-000038-GPOS-00016,SRG-OS-000039-GPOS-00017,SRG-OS-000040-GPOS-00018,SRG-OS-000041-GPOS-00019,SRG-OS-000042-GPOS-00021,SRG-OS-000051-GPOS-00024,SRG-OS-000054-GPOS-00025,SRG-OS-000122-GPOS-00063,SRG-OS-000254-GPOS-00095,SRG-OS-000255-GPOS-00096,SRG-OS-000365-GPOS-00152,SRG-OS-000392-GPOS-00172,SRG-OS-000480-GPOS-00227,SRG-OS-000062-GPOS-00031
    +     stigid@ol7: OL07-00-030000
    diff --git a/SOURCES/scap-security-guide-0.1.61-add-rule-page_alloc_shuffle_argument-PR_8234.patch b/SOURCES/scap-security-guide-0.1.61-add-rule-page_alloc_shuffle_argument-PR_8234.patch
    new file mode 100644
    index 0000000..0b6d9c9
    --- /dev/null
    +++ b/SOURCES/scap-security-guide-0.1.61-add-rule-page_alloc_shuffle_argument-PR_8234.patch
    @@ -0,0 +1,146 @@
    +From 32ecdb4e8ccccf07acd8c6c82a3676ec15647b4a Mon Sep 17 00:00:00 2001
    +From: Vojtech Polasek 
    +Date: Wed, 16 Feb 2022 14:02:45 +0100
    +Subject: [PATCH 1/3] add grub2 variant
    +
    +---
    + .../rule.yml                                  | 40 +++++++++++++++++++
    + 2 files changed, 40 insertions(+), 1 deletion(-)
    + create mode 100644 linux_os/guide/system/bootloader-grub2/grub2_page_alloc_shuffle_argument/rule.yml
    +
    +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_page_alloc_shuffle_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_page_alloc_shuffle_argument/rule.yml
    +new file mode 100644
    +index 00000000000..3d0c8b95d8a
    +--- /dev/null
    ++++ b/linux_os/guide/system/bootloader-grub2/grub2_page_alloc_shuffle_argument/rule.yml
    +@@ -0,0 +1,40 @@
    ++documentation_complete: true
    ++
    ++prodtype: rhel9
    ++
    ++title: 'Enable randomization of the page allocator'
    ++
    ++description: |-
    ++    To enable randomization of the page allocator in the kernel, add the
    ++    page_alloc.shuffle=1 argument to the default GRUB 2 command line.
    ++    {{{ describe_grub2_argument("page_alloc.shuffle=1") | indent(4) }}}
    ++
    ++rationale: |-
    ++    The CONFIG_SHUFFLE_PAGE_ALLOCATOR config option is primarily
    ++    focused on improving the average utilization of a direct-mapped
    ++    memory-side-cache. Aside of this performance effect, it also reduces
    ++    predictability of page allocations in situations when the bad actor can
    ++    crash the system and somehow leverage knowledge of (page) allocation order
    ++    right after a fresh reboot, or can control the timing between a
    ++    hot-pluggable memory node (as in NUMA node) and applications allocating
    ++    memory ouf of that node. The page_alloc.shuffle=1 kernel command
    ++    line parameter then forces this functionality irrespectively of memory cache
    ++    architecture.
    ++
    ++severity: medium
    ++
    ++identifiers:
    ++    cce@rhel9: CCE-85879-5
    ++
    ++ocil_clause: 'randomization of the page allocator is not enabled in the kernel'
    ++
    ++ocil: |-
    ++    {{{ ocil_grub2_argument("page_alloc.shuffle=1") | indent(4) }}}
    ++
    ++platform: machine
    ++
    ++template:
    ++    name: grub2_bootloader_argument
    ++    vars:
    ++        arg_name: page_alloc.shuffle
    ++        arg_value: '1'
    +
    +From ccd4bee3bec201cdee883c662056fc408b2d88ad Mon Sep 17 00:00:00 2001
    +From: Vojtech Polasek 
    +Date: Wed, 16 Feb 2022 14:20:59 +0100
    +Subject: [PATCH 2/3] add zipl variant
    +
    +---
    + .../zipl_page_alloc_shuffle_argument/rule.yml | 46 +++++++++++++++++++
    + 2 files changed, 46 insertions(+), 1 deletion(-)
    + create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_page_alloc_shuffle_argument/rule.yml
    +
    +diff --git a/linux_os/guide/system/bootloader-zipl/zipl_page_alloc_shuffle_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_page_alloc_shuffle_argument/rule.yml
    +new file mode 100644
    +index 00000000000..5179b19fcc0
    +--- /dev/null
    ++++ b/linux_os/guide/system/bootloader-zipl/zipl_page_alloc_shuffle_argument/rule.yml
    +@@ -0,0 +1,46 @@
    ++documentation_complete: true
    ++
    ++prodtype: rhel9
    ++
    ++title: 'Enable randomization of the page allocator in zIPL'
    ++
    ++description: |-
    ++    To enable the randomization of the page allocator in the kernel, check that
    ++    all boot entries in /boot/loader/entries/*.conf have
    ++    page_alloc.shuffle=1 included in its options.
    ++ ++ To enable randomization of the page allocator also for newly installed ++ kernels, add page_alloc.shuffle=1 to /etc/kernel/cmdline. ++ ++rationale: |- ++ The CONFIG_SHUFFLE_PAGE_ALLOCATOR config option is primarily ++ focused on improving the average utilization of a direct-mapped ++ memory-side-cache. Aside of this performance effect, it also reduces ++ predictability of page allocations in situations when the bad actor can ++ crash the system and somehow leverage knowledge of (page) allocation order ++ right after a fresh reboot, or can control the timing between a ++ hot-pluggable memory node (as in NUMA node) and applications allocating ++ memory ouf of that node. The page_alloc.shuffle=1 kernel command ++ line parameter then forces this functionality irrespectively of memory cache ++ architecture. ++ ++severity: medium ++ ++identifiers: ++ cce@rhel9: CCE-85880-3 ++ ++ocil_clause: 'randomization of the page allocator is not enabled in the kernel' ++ ++ocil: |- ++ To check that the randomization of the page allocator in the kernel is ++ enabled, check all boot entries with following command: ++
    sudo grep -L"^options\s+.*\bpage_alloc\.shuffle=1\b" /boot/loader/entries/*.conf
    ++ No line should be returned, each line returned is a boot entry that doesn't enable audit. ++ ++platform: machine ++ ++template: ++ name: zipl_bls_entries_option ++ vars: ++ arg_name: page_alloc.shuffle ++ arg_value: '1' + +From 89671b0a5a69ccaf0a46ff1fc86db82fc822dda0 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Wed, 16 Feb 2022 14:24:32 +0100 +Subject: [PATCH 3/3] add rules to rhel9 ospp profile + +--- + products/rhel9/profiles/ospp.profile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile +index f25abd7e4c4..4bdf8d98b97 100644 +--- a/products/rhel9/profiles/ospp.profile ++++ b/products/rhel9/profiles/ospp.profile +@@ -126,6 +126,7 @@ selections: + - grub2_audit_backlog_limit_argument + - grub2_vsyscall_argument + - grub2_init_on_alloc_argument ++ - grub2_page_alloc_shuffle_argument + + ## Security Settings + - sysctl_kernel_kptr_restrict +@@ -409,3 +410,4 @@ selections: + - zipl_audit_backlog_limit_argument + - zipl_vsyscall_argument + - zipl_init_on_alloc_argument ++ - zipl_page_alloc_shuffle_argument diff --git a/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_010331-PR_8055.patch b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_010331-PR_8055.patch new file mode 100644 index 0000000..249a544 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_010331-PR_8055.patch @@ -0,0 +1,165 @@ +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/ansible/shared.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/ansible/shared.yml +index 8a28af022a7..02c69bddd27 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/ansible/shared.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/ansible/shared.yml +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle ++# platform = multi_platform_all + # reboot = false + # strategy = restrict + # complexity = high +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/rule.yml +index a7182849548..db89a5e47a1 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/rule.yml +@@ -31,6 +31,8 @@ rationale: |- + of initiating changes, including upgrades and modifications. + + identifiers: ++ cce@rhel8: CCE-88692-9 ++ cce@rhel9: CCE-88693-7 + cce@sle12: CCE-83234-5 + cce@sle15: CCE-85753-2 + +@@ -40,6 +42,8 @@ references: + disa: CCI-001499 + nerc-cip: CIP-003-8 R6 + nist: CM-5,CM-5(6),CM-5(6).1 ++ srg: SRG-OS-000259-GPOS-00100 ++ stigid@rhel8: RHEL-08-010331 + stigid@sle12: SLES-12-010872 + stigid@sle15: SLES-15-010352 + stigid@ubuntu2004: UBTU-20-010427 +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/all_dirs_ok.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/all_dirs_ok.pass.sh +index af078463b05..6e957c302ac 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/all_dirs_ok.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/all_dirs_ok.pass.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,multi_platform_ubuntu ++# platform = multi_platform_sle,multi_platform_ubuntu,multi_platform_rhel + DIRS="/lib /lib64 /usr/lib /usr/lib64" + for dirPath in $DIRS; do + find "$dirPath" -perm /022 -type d -exec chmod go-w '{}' \; +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/owner_only_writable_dir.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/owner_only_writable_dir.pass.sh +index d58616bcafb..55ff9cebd4f 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/owner_only_writable_dir.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/owner_only_writable_dir.pass.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,multi_platform_ubuntu ++# platform = multi_platform_sle,multi_platform_ubuntu,multi_platform_rhel + DIRS="/lib /lib64 /usr/lib /usr/lib64" + for dirPath in $DIRS; do + chmod -R 755 "$dirPath" +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_lib.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_lib.fail.sh +index 98d18cde3ea..c2b5b6bf029 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_lib.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_lib.fail.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,multi_platform_ubuntu ++# platform = multi_platform_sle,multi_platform_ubuntu,multi_platform_rhel + DIRS="/lib /lib64" + for dirPath in $DIRS; do + mkdir -p "$dirPath/testme" && chmod 777 "$dirPath/testme" +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_usr_lib.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_usr_lib.fail.sh +index 6df6e2f8f9b..40e6c42c829 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_usr_lib.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_usr_lib.fail.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,multi_platform_ubuntu ++# platform = multi_platform_sle,multi_platform_ubuntu,multi_platform_rhel + DIRS="/usr/lib /usr/lib64" + for dirPath in $DIRS; do + mkdir -p "$dirPath/testme" && chmod 777 "$dirPath/testme" +diff --git a/products/rhel8/profiles/cjis.profile b/products/rhel8/profiles/cjis.profile +index decba0087e8..920a55659fd 100644 +--- a/products/rhel8/profiles/cjis.profile ++++ b/products/rhel8/profiles/cjis.profile +@@ -77,6 +77,7 @@ selections: + - accounts_password_pam_difok + - accounts_max_concurrent_login_sessions + - set_password_hashing_algorithm_systemauth ++ - set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_logindefs + - set_password_hashing_algorithm_libuserconf + - file_owner_etc_shadow +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index 04f158116ee..5d98b1c894e 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -228,6 +228,9 @@ selections: + # RHEL-08-010330 + - file_permissions_library_dirs + ++ # RHEL-08-010331 ++ - dir_permissions_library_dirs ++ + # RHEL-08-010340 + - file_ownership_library_dirs + +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 8f79b22e3e4..2614504e9cd 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -229,6 +229,9 @@ selections: + # RHEL-08-010330 + - file_permissions_library_dirs + ++ # RHEL-08-010331 ++ - dir_permissions_library_dirs ++ + # RHEL-08-010340 + - file_ownership_library_dirs + +diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt +index 3f6ec5e17c4..4a926bce5de 100644 +--- a/shared/references/cce-redhat-avail.txt ++++ b/shared/references/cce-redhat-avail.txt +@@ -2645,8 +2645,6 @@ CCE-88688-7 + CCE-88689-5 + CCE-88690-3 + CCE-88691-1 +-CCE-88692-9 +-CCE-88693-7 + CCE-88694-5 + CCE-88695-2 + CCE-88696-0 +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index ed739e724f4..4df5c4a2e21 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -25,6 +25,7 @@ extends: null + metadata: + version: V1R4 + SMEs: ++ - mab879 + - ggbecker + reference: https://public.cyber.mil/stigs/downloads/?_dl_facet_stigs=operating-systems%2Cunix-linux + selections: +@@ -180,6 +181,7 @@ selections: + - dconf_gnome_screensaver_idle_delay + - dconf_gnome_screensaver_lock_enabled + - dir_group_ownership_library_dirs ++- dir_permissions_library_dirs + - dir_perms_world_writable_root_owned + - dir_perms_world_writable_sticky_bits + - directory_group_ownership_var_log_audit +diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile +index 56c3fcb9f59..98746158aed 100644 +--- a/tests/data/profile_stability/rhel8/stig_gui.profile ++++ b/tests/data/profile_stability/rhel8/stig_gui.profile +@@ -36,6 +36,7 @@ extends: null + metadata: + version: V1R4 + SMEs: ++ - mab879 + - ggbecker + reference: https://public.cyber.mil/stigs/downloads/?_dl_facet_stigs=operating-systems%2Cunix-linux + selections: +@@ -191,6 +192,7 @@ selections: + - dconf_gnome_screensaver_idle_delay + - dconf_gnome_screensaver_lock_enabled + - dir_group_ownership_library_dirs ++- dir_permissions_library_dirs + - dir_perms_world_writable_root_owned + - dir_perms_world_writable_sticky_bits + - directory_group_ownership_var_log_audit diff --git a/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_010359-PR_8131.patch b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_010359-PR_8131.patch new file mode 100644 index 0000000..1175e29 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_010359-PR_8131.patch @@ -0,0 +1,57 @@ +diff --git a/linux_os/guide/system/software/integrity/software-integrity/aide/package_aide_installed/rule.yml b/linux_os/guide/system/software/integrity/software-integrity/aide/package_aide_installed/rule.yml +index 68b353965ec..ff106996f00 100644 +--- a/linux_os/guide/system/software/integrity/software-integrity/aide/package_aide_installed/rule.yml ++++ b/linux_os/guide/system/software/integrity/software-integrity/aide/package_aide_installed/rule.yml +@@ -28,7 +28,7 @@ references: + cis@ubuntu2004: 1.4.1 + cjis: 5.10.1.3 + cobit5: APO01.06,BAI01.06,BAI02.01,BAI03.05,BAI06.01,BAI10.01,BAI10.02,BAI10.03,BAI10.05,DSS01.03,DSS03.05,DSS04.07,DSS05.02,DSS05.03,DSS05.05,DSS05.07,DSS06.02,DSS06.06 +- disa: CCI-002699,CCI-001744 ++ disa: CCI-002696,CCI-002699,CCI-001744 + isa-62443-2009: 4.3.4.3.2,4.3.4.3.3,4.3.4.4.4 + isa-62443-2013: 'SR 3.1,SR 3.3,SR 3.4,SR 3.8,SR 4.1,SR 6.2,SR 7.6' + ism: 1034,1288,1341,1417 +@@ -36,9 +36,9 @@ references: + nist: CM-6(a) + nist-csf: DE.CM-1,DE.CM-7,PR.DS-1,PR.DS-6,PR.DS-8,PR.IP-1,PR.IP-3 + pcidss: Req-11.5 +- srg: SRG-OS-000363-GPOS-00150 ++ srg: SRG-OS-000363-GPOS-00150,SRG-OS-000445-GPOS-00199 + stigid@ol8: OL08-00-010360 +- stigid@rhel8: RHEL-08-010360 ++ stigid@rhel8: RHEL-08-010359 + stigid@sle12: SLES-12-010500 + stigid@sle15: SLES-15-010420 + stigid@ubuntu2004: UBTU-20-010450 +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index ff23f83cfbf..cb72403e81a 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -239,8 +239,10 @@ selections: + - root_permissions_syslibrary_files + - dir_group_ownership_library_dirs + +- # RHEL-08-010360 ++ # RHEL-08-010359 + - package_aide_installed ++ ++ # RHEL-08-010360 + - aide_scan_notification + + # RHEL-08-010370 +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 31015d4b83c..93ecc404dc2 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -240,8 +240,10 @@ selections: + - root_permissions_syslibrary_files + - dir_group_ownership_library_dirs + +- # RHEL-08-010360 ++ # RHEL-08-010359 + - package_aide_installed ++ ++ # RHEL-08-010360 + - aide_scan_notification + + # RHEL-08-010370 diff --git a/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_0103789_include_sudoers-PR_8196.patch b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_0103789_include_sudoers-PR_8196.patch new file mode 100644 index 0000000..fc41aba --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_0103789_include_sudoers-PR_8196.patch @@ -0,0 +1,596 @@ +From 19bd5adfd804590b15e42cc75287b792706286d5 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Thu, 10 Feb 2022 15:25:06 +0100 +Subject: [PATCH 1/9] Add rule to check for default sudoers includedir + +This rule supports RHEL-08-010379. +--- + .../ansible/shared.yml | 7 ++++ + .../sudoers_default_includedir/bash/shared.sh | 11 ++++++ + .../oval/shared.xml | 23 +++++++++++ + .../sudo/sudoers_default_includedir/rule.yml | 38 +++++++++++++++++++ + .../tests/default_includedir.pass.sh | 7 ++++ + .../tests/duplicate_includedir.fail.sh | 7 ++++ + .../tests/no_includedir.fail.sh | 4 ++ + .../tests/two_includedir.fail.sh | 8 ++++ + shared/references/cce-redhat-avail.txt | 3 -- + 9 files changed, 105 insertions(+), 3 deletions(-) + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/oval/shared.xml + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/default_includedir.pass.sh + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/duplicate_includedir.fail.sh + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/no_includedir.fail.sh + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/two_includedir.fail.sh + +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml b/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml +new file mode 100644 +index 00000000000..d9d5933285f +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml +@@ -0,0 +1,7 @@ ++# platform = multi_platform_all ++# # reboot = false ++# # strategy = configure ++# # complexity = low ++# # disruption = low ++ ++{{{ ansible_only_lineinfile(msg='Ensure sudo only has the default includedir', line_regex='^#includedir.*$', path='/etc/sudoers', new_line='#includedir /etc/sudoers.d') }}} +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh +new file mode 100644 +index 00000000000..3a9e2da985b +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh +@@ -0,0 +1,11 @@ ++# platform = multi_platform_all ++ ++sudoers_config_file="/etc/sudoers" ++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" ++fi ++if [ "$sudoers_includedir_count" -eq 0 ]; then ++ echo "#includedir /etc/sudoers.d" >> "$sudoers_config_file" ++fi +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/oval/shared.xml b/linux_os/guide/system/software/sudo/sudoers_default_includedir/oval/shared.xml +new file mode 100644 +index 00000000000..5618c64291c +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/oval/shared.xml +@@ -0,0 +1,23 @@ ++ ++ ++ {{{ oval_metadata("Check if sudo includes only the default includedir") }}} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ /etc/sudoers ++ ^#includedir[\s]+(.*)$ ++ 1 ++ ++ ++ /etc/sudoers.d ++ ++ ++ +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml b/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml +new file mode 100644 +index 00000000000..5c33121f911 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml +@@ -0,0 +1,38 @@ ++documentation_complete: true ++ ++prodtype: fedora,rhel7,rhel8,rhel9 ++ ++title: 'Ensure sudo only includes the default configuration directory' ++ ++description: |- ++ Administrators can configure authorized sudo users via drop-in files, and it is possible to include ++ other directories and configuration files from the file currently being parsed. ++ ++ Make sure that /etc/sudoers only includes drop-in configuration files from /etc/sudoers.d. ++ The /etc/sudoers should contain only one #includedir directive pointing to ++ /etc/sudoers.d ++ Note that the '#' character doesn't denote a comment in the configuration file. ++ ++rationale: |- ++ Some sudo configurtion options allow users to run programs without re-authenticating. ++ Use of these configuration options makes it easier for one compromised accound to be used to ++ compromise other accounts. ++ ++severity: medium ++ ++identifiers: ++ cce@rhel7: CCE-86277-1 ++ cce@rhel8: CCE-86377-9 ++ cce@rhel9: CCE-86477-7 ++ ++references: ++ disa: CCI-000366 ++ stigid@rhel8: RHEL-08-010379 ++ ++ocil_clause: "the /etc/sudoers doesn't include /etc/sudores.d or includes other directories?" ++ ++ocil: |- ++ To determine whether sudo command includes configuration files from the appropriate directory, ++ run the following command: ++
    $ sudo grep 'include' /etc/sudoers
    ++ If only the line #includedir /etc/sudoers> is returned, then the drop-in file configuration is set correctly. +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/default_includedir.pass.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/default_includedir.pass.sh +new file mode 100644 +index 00000000000..ac0c808ccd6 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/default_includedir.pass.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++# platform = multi_platform_all ++ ++# Ensure default config is there ++if ! grep -q "#includedir /etc/sudoers.d" /etc/sudoers; then ++ echo "#includedir /etc/sudoers.d" >> /etc/sudoers ++fi +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/duplicate_includedir.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/duplicate_includedir.fail.sh +new file mode 100644 +index 00000000000..5bad8225625 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/duplicate_includedir.fail.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++# platform = multi_platform_all ++ ++# duplicate default entry ++if grep -q "#includedir /etc/sudoers.d" /etc/sudoers; then ++ echo "#includedir /etc/sudoers.d" >> /etc/sudoers ++fi +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/no_includedir.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/no_includedir.fail.sh +new file mode 100644 +index 00000000000..1e0ab8aea92 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/no_includedir.fail.sh +@@ -0,0 +1,4 @@ ++#!/bin/bash ++# platform = multi_platform_all ++ ++sed -i "/#includedir.*/d" /etc/sudoers +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/two_includedir.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/two_includedir.fail.sh +new file mode 100644 +index 00000000000..09d14eab630 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/two_includedir.fail.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++# platform = multi_platform_all ++ ++# Ensure that there are two different indludedirs ++if ! grep -q "#includedir /etc/sudoers.d" /etc/sudoers; then ++ echo "#includedir /etc/sudoers.d" >> /etc/sudoers ++fi ++echo "#includedir /opt/extra_config.d" >> /etc/sudoers +diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt +index 41caad9f0d0..f2990adb537 100644 +--- a/shared/references/cce-redhat-avail.txt ++++ b/shared/references/cce-redhat-avail.txt +@@ -340,7 +340,6 @@ CCE-86273-0 + CCE-86274-8 + CCE-86275-5 + CCE-86276-3 +-CCE-86277-1 + CCE-86278-9 + CCE-86279-7 + CCE-86281-3 +@@ -428,7 +427,6 @@ CCE-86373-8 + CCE-86374-6 + CCE-86375-3 + CCE-86376-1 +-CCE-86377-9 + CCE-86378-7 + CCE-86379-5 + CCE-86380-3 +@@ -524,7 +522,6 @@ CCE-86473-6 + CCE-86474-4 + CCE-86475-1 + CCE-86476-9 +-CCE-86477-7 + CCE-86478-5 + CCE-86479-3 + CCE-86480-1 + +From 99fe46922243e8dff5822e2ed6eb49addd000baa Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Thu, 10 Feb 2022 16:21:46 +0100 +Subject: [PATCH 2/9] Select rule in RHEL8 STIG + +Select sudoers_default_indludedir aligning to RHEL8 STIG V1R5 +--- + products/rhel8/profiles/stig.profile | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index d92bc72971c..e13bda7a787 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -271,6 +271,9 @@ selections: + # RHEL-08-010376 + - sysctl_kernel_perf_event_paranoid + ++ # RHEL-08-010379 ++ - sudoers_default_includedir ++ + # RHEL-08-010380 + - sudo_remove_nopasswd + + +From 3686fe72a6e27049f1c46d0a4efa07e1b42b6a20 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Thu, 10 Feb 2022 17:26:59 +0100 +Subject: [PATCH 3/9] Add test and fix for case when the single includedir is + wrong + +--- + .../sudo/sudoers_default_includedir/bash/shared.sh | 7 +++++-- + .../tests/wrong_includedir.fail.sh | 5 +++++ + 2 files changed, 10 insertions(+), 2 deletions(-) + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/wrong_includedir.fail.sh + +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh +index 3a9e2da985b..258af02c121 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh +@@ -5,7 +5,10 @@ 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" +-fi +-if [ "$sudoers_includedir_count" -eq 0 ]; then ++elif [ "$sudoers_includedir_count" -eq 0 ]; then + echo "#includedir /etc/sudoers.d" >> "$sudoers_config_file" ++else ++ if ! grep -q "^#includedir /etc/sudoers.d" /etc/sudoers; then ++ sed -i "s|^#includedir.*|#includedir /etc/sudoers.d|g" /etc/sudoers ++ fi + fi +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/wrong_includedir.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/wrong_includedir.fail.sh +new file mode 100644 +index 00000000000..55a072adf3c +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/wrong_includedir.fail.sh +@@ -0,0 +1,5 @@ ++#!/bin/bash ++# platform = multi_platform_all ++ ++sed -i "/#includedir.*/d" /etc/sudoers ++echo "#includedir /opt/extra_config.d" >> /etc/sudoers + +From 0b20b495ed82cead1a033170b900c13da5260603 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Mon, 14 Feb 2022 14:50:11 +0100 +Subject: [PATCH 4/9] Add tests for sudo file and dir includes in + /etc/sudoers.d + +--- + .../tests/sudoers.d_with_include.fail.sh | 9 +++++++++ + .../tests/sudoers.d_with_includedir.fail.sh | 9 +++++++++ + .../tests/sudoers_with_include.fail.sh | 11 +++++++++++ + 3 files changed, 29 insertions(+) + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_include.fail.sh + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_includedir.fail.sh + create mode 100644 linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers_with_include.fail.sh + +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_include.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_include.fail.sh +new file mode 100644 +index 00000000000..554ef2e060d +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_include.fail.sh +@@ -0,0 +1,9 @@ ++#!/bin/bash ++# platform = multi_platform_all ++ ++# Ensure default config is there ++if ! grep -q "#includedir /etc/sudoers.d" /etc/sudoers; then ++ echo "#includedir /etc/sudoers.d" >> /etc/sudoers ++fi ++ ++echo "#include /etc/my-sudoers" > /etc/sudoers.d/my-sudoers +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_includedir.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_includedir.fail.sh +new file mode 100644 +index 00000000000..516b68b5a3e +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_includedir.fail.sh +@@ -0,0 +1,9 @@ ++#!/bin/bash ++# platform = multi_platform_all ++ ++# Ensure default config is there ++if ! grep -q "#includedir /etc/sudoers.d" /etc/sudoers; then ++ echo "#includedir /etc/sudoers.d" >> /etc/sudoers ++fi ++ ++echo "#includedir /etc/my-sudoers.d" > /etc/sudoers.d/my-sudoers +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers_with_include.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers_with_include.fail.sh +new file mode 100644 +index 00000000000..ad04880e334 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers_with_include.fail.sh +@@ -0,0 +1,11 @@ ++#!/bin/bash ++# platform = multi_platform_all ++ ++# Ensure default config is there ++if ! grep -q "#includedir /etc/sudoers.d" /etc/sudoers; then ++ echo "#includedir /etc/sudoers.d" >> /etc/sudoers ++fi ++ ++if ! grep -q "#include " /etc/sudoers; then ++ echo "#include /etc/my-sudoers" >> /etc/sudoers ++fi + +From d91e3eefe6c265c27634cb15b0f276a298f81645 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Mon, 14 Feb 2022 14:59:18 +0100 +Subject: [PATCH 5/9] Update rule catch and remove other sudo includes + +Any other #include or #includedir besides: +"/etc/sudoers: #includedir /etc/sudoers.d" should be removed. +--- + .../ansible/shared.yml | 14 +++++++++++ + .../sudoers_default_includedir/bash/shared.sh | 7 ++++-- + .../oval/shared.xml | 23 +++++++++++++++++++ + .../sudo/sudoers_default_includedir/rule.yml | 7 +++--- + 4 files changed, 46 insertions(+), 5 deletions(-) + +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml b/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml +index d9d5933285f..175a447e0d9 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml +@@ -5,3 +5,17 @@ + # # disruption = low + + {{{ ansible_only_lineinfile(msg='Ensure sudo only has the default includedir', line_regex='^#includedir.*$', path='/etc/sudoers', new_line='#includedir /etc/sudoers.d') }}} ++{{{ ansible_lineinfile(msg='Ensure sudoers doesn\'t include other non-default file', regex='^#include[\s]+.*$', path='/etc/sudoers', state='absent') }}} ++- name: "Find out if /etc/sudoers.d/* files contain file or directory includes" ++ find: ++ path: "/etc/sudoers.d" ++ patterns: "*" ++ contains: '^#include(dir)?\s.*$' ++ register: sudoers_d_includes ++ ++- name: "Remove found occurrences of file and directory inclues from /etc/sudoers.d/* files" ++ lineinfile: ++ path: "{{ item.path }}" ++ regexp: '^#include(dir)?\s.*$' ++ state: absent ++ with_items: "{{ sudoers_d_includes.files }}" +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh +index 258af02c121..2d00b471677 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh +@@ -1,6 +1,7 @@ + # platform = multi_platform_all + + 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" +@@ -8,7 +9,9 @@ if [ "$sudoers_includedir_count" -gt 1 ]; then + elif [ "$sudoers_includedir_count" -eq 0 ]; then + echo "#includedir /etc/sudoers.d" >> "$sudoers_config_file" + else +- if ! grep -q "^#includedir /etc/sudoers.d" /etc/sudoers; then +- sed -i "s|^#includedir.*|#includedir /etc/sudoers.d|g" /etc/sudoers ++ 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 -i "/^#include\s\+.*/d" "$sudoers_config_file" "${sudoers_config_dir}"/* ++sed -i "/^#includedir\s\+.*/d" "${sudoers_config_dir}"/* +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/oval/shared.xml b/linux_os/guide/system/software/sudo/sudoers_default_includedir/oval/shared.xml +index 5618c64291c..59cab0b89de 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/oval/shared.xml ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/oval/shared.xml +@@ -3,6 +3,8 @@ + {{{ oval_metadata("Check if sudo includes only the default includedir") }}} + + ++ ++ + + + +@@ -20,4 +22,25 @@ + /etc/sudoers.d + + ++ ++ ++ ++ ++ /etc/sudoers ++ ^#include[\s]+.*$ ++ 1 ++ ++ ++ ++ ++ ++ ++ /etc/sudoers.d/ ++ .* ++ ^#include(dir)?[\s]+.*$ ++ 1 ++ ++ + +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml b/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml +index 5c33121f911..3a8c22ac8af 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml +@@ -10,7 +10,7 @@ description: |- + + Make sure that /etc/sudoers only includes drop-in configuration files from /etc/sudoers.d. + The /etc/sudoers should contain only one #includedir directive pointing to +- /etc/sudoers.d ++ /etc/sudoers.d, and no file in /etc/sudoers.d/ should include other files or directories. + Note that the '#' character doesn't denote a comment in the configuration file. + + rationale: |- +@@ -34,5 +34,6 @@ ocil_clause: "the /etc/sudoers doesn't include /etc/sudores.d or includes other + ocil: |- + To determine whether sudo command includes configuration files from the appropriate directory, + run the following command: +-
    $ sudo grep 'include' /etc/sudoers
    +- If only the line #includedir /etc/sudoers> is returned, then the drop-in file configuration is set correctly. ++
    $ sudo grep -rP '^#include(dir)?' /etc/sudoers /etc/sudoers.d
    ++ If only the line /etc/sudoers:#includedir /etc/sudoers.d is returned, then the drop-in include configuration is set correctly. ++ Any other line returned is a finding. + +From ead72b744f1fc03893184079c079df27780044c2 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Mon, 14 Feb 2022 15:00:46 +0100 +Subject: [PATCH 6/9] Add SRG to sudoers_default_includedir + +--- + .../system/software/sudo/sudoers_default_includedir/rule.yml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml b/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml +index 3a8c22ac8af..a97bd3efb2c 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/rule.yml +@@ -27,6 +27,7 @@ identifiers: + + references: + disa: CCI-000366 ++ srg: SRG-OS-000480-GPOS-00227 + stigid@rhel8: RHEL-08-010379 + + ocil_clause: "the /etc/sudoers doesn't include /etc/sudores.d or includes other directories?" + +From c1a08fe6b8e6388b89b190ca74e57af06e7c999c Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Mon, 14 Feb 2022 16:12:32 +0100 +Subject: [PATCH 7/9] Update RHEL8 STIG profile stability data + +--- + tests/data/profile_stability/rhel8/stig.profile | 1 + + tests/data/profile_stability/rhel8/stig_gui.profile | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index e4fee44f9f9..974b28757e9 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -365,6 +365,7 @@ selections: + - sudo_remove_nopasswd + - sudo_require_reauthentication + - sudo_restrict_privilege_elevation_to_authorized ++- sudoers_default_includedir + - sudoers_validate_passwd + - sysctl_crypto_fips_enabled + - sysctl_fs_protected_hardlinks +diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile +index 83d04775e3a..99e0af4f5a6 100644 +--- a/tests/data/profile_stability/rhel8/stig_gui.profile ++++ b/tests/data/profile_stability/rhel8/stig_gui.profile +@@ -376,6 +376,7 @@ selections: + - sudo_remove_nopasswd + - sudo_require_reauthentication + - sudo_restrict_privilege_elevation_to_authorized ++- sudoers_default_includedir + - sudoers_validate_passwd + - sysctl_crypto_fips_enabled + - sysctl_fs_protected_hardlinks + +From adae3ecbda4362e23cd1f30e053db37d6a1d403b Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Mon, 14 Feb 2022 16:59:22 +0100 +Subject: [PATCH 8/9] Fix Ansible remediation metadata + +--- + .../sudo/sudoers_default_includedir/ansible/shared.yml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml b/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml +index 175a447e0d9..0d8c9e75184 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/ansible/shared.yml +@@ -1,8 +1,8 @@ + # platform = multi_platform_all +-# # reboot = false +-# # strategy = configure +-# # complexity = low +-# # disruption = low ++# reboot = false ++# strategy = configure ++# complexity = low ++# disruption = low + + {{{ ansible_only_lineinfile(msg='Ensure sudo only has the default includedir', line_regex='^#includedir.*$', path='/etc/sudoers', new_line='#includedir /etc/sudoers.d') }}} + {{{ ansible_lineinfile(msg='Ensure sudoers doesn\'t include other non-default file', regex='^#include[\s]+.*$', path='/etc/sudoers', state='absent') }}} + +From d3f048456908b316c0dcc0bff2328cf87fe6e7de Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Mon, 14 Feb 2022 17:39:39 +0100 +Subject: [PATCH 9/9] Handle case when /etc/sudoers.d doesn't exist + +The remediation skips the directory, and the test scenarios create the +dir to ensure the test scenario works. +--- + .../sudo/sudoers_default_includedir/bash/shared.sh | 8 ++++++-- + .../tests/sudoers.d_with_include.fail.sh | 1 + + .../tests/sudoers.d_with_includedir.fail.sh | 1 + + 3 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh +index 2d00b471677..fbff5eb6f30 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/bash/shared.sh +@@ -13,5 +13,9 @@ else + sed -i "s|^#includedir.*|#includedir /etc/sudoers.d|g" "$sudoers_config_file" + fi + fi +-sed -i "/^#include\s\+.*/d" "$sudoers_config_file" "${sudoers_config_dir}"/* +-sed -i "/^#includedir\s\+.*/d" "${sudoers_config_dir}"/* ++ ++sed -i "/^#include\s\+.*/d" "$sudoers_config_file" ++ ++if grep -Pr "^#include(dir)? .*" "$sudoers_config_dir" ; then ++ sed -i "/^#include\(dir\)\?\s\+.*/d" "$sudoers_config_dir"/* ++fi +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_include.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_include.fail.sh +index 554ef2e060d..3f14ecc1627 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_include.fail.sh ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_include.fail.sh +@@ -1,6 +1,7 @@ + #!/bin/bash + # platform = multi_platform_all + ++mkdir -p /etc/sudoers.d + # Ensure default config is there + if ! grep -q "#includedir /etc/sudoers.d" /etc/sudoers; then + echo "#includedir /etc/sudoers.d" >> /etc/sudoers +diff --git a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_includedir.fail.sh b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_includedir.fail.sh +index 516b68b5a3e..89515076ff1 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_includedir.fail.sh ++++ b/linux_os/guide/system/software/sudo/sudoers_default_includedir/tests/sudoers.d_with_includedir.fail.sh +@@ -1,6 +1,7 @@ + #!/bin/bash + # platform = multi_platform_all + ++mkdir -p /etc/sudoers.d + # Ensure default config is there + if ! grep -q "#includedir /etc/sudoers.d" /etc/sudoers; then + echo "#includedir /etc/sudoers.d" >> /etc/sudoers diff --git a/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_020221-PR_8173.patch b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_020221-PR_8173.patch new file mode 100644 index 0000000..1b3a98b --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_020221-PR_8173.patch @@ -0,0 +1,13 @@ +diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml +index 5353f60975c..69a36c4959a 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml ++++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml +@@ -43,7 +43,7 @@ references: + stigid@ol7: OL07-00-010270 + stigid@ol8: OL08-00-020220 + stigid@rhel7: RHEL-07-010270 +- stigid@rhel8: RHEL-08-020220 ++ stigid@rhel8: RHEL-08-020221 + vmmsrg: SRG-OS-000077-VMM-000440 + + ocil_clause: |- diff --git a/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_040321-PR_8169.patch b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_040321-PR_8169.patch new file mode 100644 index 0000000..c4167f3 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-add_RHEL_08_040321-PR_8169.patch @@ -0,0 +1,49 @@ +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_runlevel_target/rule.yml b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_runlevel_target/rule.yml +index de0e359a44e..df56a30be80 100644 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_runlevel_target/rule.yml ++++ b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_runlevel_target/rule.yml +@@ -39,6 +39,7 @@ references: + nist: CM-7(a),CM-7(b),CM-6(a) + nist-csf: PR.AC-3,PR.PT-4 + srg: SRG-OS-000480-GPOS-00227 ++ stigid@rhel8: RHEL-08-040321 + + ocil_clause: 'the X windows display server is running and/or has not been disabled' + +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index 09fa85df181..ffca983d0bd 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -1169,6 +1169,9 @@ selections: + # RHEL-08-040320 + - xwindows_remove_packages + ++ # RHEL-08-040321 ++ - xwindows_runlevel_target ++ + # RHEL-08-040330 + - network_sniffer_disabled + +diff --git a/products/rhel8/profiles/stig_gui.profile b/products/rhel8/profiles/stig_gui.profile +index d1577215b07..d29ceb9c54e 100644 +--- a/products/rhel8/profiles/stig_gui.profile ++++ b/products/rhel8/profiles/stig_gui.profile +@@ -35,3 +35,6 @@ extends: stig + selections: + # RHEL-08-040320 + - '!xwindows_remove_packages' ++ ++ # RHEL-08-040321 ++ - '!xwindows_runlevel_target' +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index 9c05c27117c..e4fee44f9f9 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -398,6 +398,7 @@ selections: + - usbguard_generate_policy + - wireless_disable_interfaces + - xwindows_remove_packages ++- xwindows_runlevel_target + - var_rekey_limit_size=1G + - var_rekey_limit_time=1hour + - var_accounts_user_umask=077 diff --git a/SOURCES/scap-security-guide-0.1.61-add_missing_srgs-PR_8218.patch b/SOURCES/scap-security-guide-0.1.61-add_missing_srgs-PR_8218.patch new file mode 100644 index 0000000..2ff9d14 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-add_missing_srgs-PR_8218.patch @@ -0,0 +1,38 @@ +From 8605b236665b1022c7379e87d9445c9ca42e78f3 Mon Sep 17 00:00:00 2001 +From: Gabriel Becker +Date: Mon, 14 Feb 2022 11:41:15 +0100 +Subject: [PATCH] Add SRG references to STIG rules. + +Rules accounts_password_pam_pwquality_password_auth and accounts_password_pam_pwquality_system_auth +were missing SRG required references. +--- + .../accounts_password_pam_pwquality_password_auth/rule.yml | 2 ++ + .../accounts_password_pam_pwquality_system_auth/rule.yml | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/rule.yml +index 6c7bb1ad7a0..34dd6e2fcca 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/rule.yml ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/rule.yml +@@ -22,6 +22,8 @@ identifiers: + cce@rhel9: CCE-85878-7 + + references: ++ disa: CCI-000366 ++ srg: SRG-OS-000480-GPOS-00227 + stigid@rhel8: RHEL-08-020100 + + ocil_clause: 'pam_pwquality.so is not enabled in password-auth' +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/rule.yml +index ea42ff9b07a..a5189c61608 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/rule.yml ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/rule.yml +@@ -22,6 +22,8 @@ identifiers: + cce@rhel9: CCE-85873-8 + + references: ++ disa: CCI-000366 ++ srg: SRG-OS-000480-GPOS-00227 + stigid@rhel8: RHEL-08-020101 + + ocil_clause: 'pam_pwquality.so is not enabled in system-auth' diff --git a/SOURCES/scap-security-guide-0.1.61-chrony_maxpoll-PR_8187.patch b/SOURCES/scap-security-guide-0.1.61-chrony_maxpoll-PR_8187.patch new file mode 100644 index 0000000..f8f14d1 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-chrony_maxpoll-PR_8187.patch @@ -0,0 +1,369 @@ +From bbafe0a7b4b9eb50bc622d9f9f3c0074fca932f9 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Wed, 9 Feb 2022 16:17:52 +0100 +Subject: [PATCH 1/2] Pass the rule when no time server nor pool is set + +If no time server or pool is configured, there is no entry to add +maxpoll option to, so the rule should evaluate to pass. +--- + .../oval/shared.xml | 50 +++++++++++++++---- + .../ntp/chronyd_or_ntpd_set_maxpoll/rule.yml | 2 + + .../tests/chrony_no_pool_nor_servers.pass.sh | 12 +++++ + 3 files changed, 54 insertions(+), 10 deletions(-) + create mode 100644 linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/tests/chrony_no_pool_nor_servers.pass.sh + +diff --git a/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/oval/shared.xml b/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/oval/shared.xml +index 780c2e2d0ba..76f810123f3 100644 +--- a/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/oval/shared.xml ++++ b/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/oval/shared.xml +@@ -3,17 +3,25 @@ + {{{ oval_metadata("Configure the maxpoll setting in /etc/ntp.conf or chrony.conf + to continuously poll the time source servers.") }}} + +- +- +- ++ ++ ++ ++ ++ ++ + +- +- +- ++ ++ ++ ++ ++ ++ + + + +@@ -77,4 +85,26 @@ + maxpoll \d+ + + ++ ++ ++ ++ ++ ^/etc/chrony\.(conf|d/.+\.conf)$ ++ ^(?:server|pool).* ++ 1 ++ ++ ++ ++ ++ ++ ++ /etc/ntp.conf ++ ^server.* ++ 1 ++ ++ + +diff --git a/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/rule.yml b/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/rule.yml +index 20e7467a7b5..c115ad3c115 100644 +--- a/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/rule.yml ++++ b/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/rule.yml +@@ -13,6 +13,8 @@ description: |- +
    maxpoll {{{ xccdf_value("var_time_service_set_maxpoll") }}}
    + to
    server
    directives. If using chrony any
    pool
    directives + should be configured too. ++ If no server or pool directives are configured, the rule evaluates ++ to pass. + {{% if product == "rhcos4" %}} +

    + Note that if the remediation shipping with this content is being used, the +diff --git a/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/tests/chrony_no_pool_nor_servers.pass.sh b/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/tests/chrony_no_pool_nor_servers.pass.sh +new file mode 100644 +index 00000000000..bbae20fc696 +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_or_ntpd_set_maxpoll/tests/chrony_no_pool_nor_servers.pass.sh +@@ -0,0 +1,12 @@ ++#!/bin/bash ++# packages = chrony ++# ++# profiles = xccdf_org.ssgproject.content_profile_stig ++ ++yum remove -y ntp ++ ++# Remove all pool and server options ++sed -i "/^pool.*/d" /etc/chrony.conf ++sed -i "/^server.*/d" /etc/chrony.conf ++ ++systemctl enable chronyd.service + +From 60ef6eb2cce9e53ea256738ff2583b332155a318 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Fri, 11 Feb 2022 12:14:30 +0100 +Subject: [PATCH 2/2] Add rule ensuring Chrony only uses server directive + +This new rule only asserts that Chrony has at least one time source configured, +and that it is done with the 'server' directive. +No remediation is provided for rule, that is left for other specialized +rules. +--- + .../chronyd_server_directive/oval/shared.xml | 33 +++++++++++++++++++ + .../ntp/chronyd_server_directive/rule.yml | 32 ++++++++++++++++++ + .../tests/file_empty.fail.sh | 6 ++++ + .../tests/file_missing.fail.sh | 6 ++++ + .../tests/line_missing.fail.sh | 7 ++++ + .../tests/multiple_servers.pass.sh | 8 +++++ + .../tests/only_pool.fail.sh | 9 +++++ + .../tests/only_server.pass.sh | 6 ++++ + products/rhel8/profiles/stig.profile | 1 + + products/rhel9/profiles/stig.profile | 1 + + shared/references/cce-redhat-avail.txt | 2 -- + .../data/profile_stability/rhel8/stig.profile | 1 + + .../profile_stability/rhel8/stig_gui.profile | 1 + + 13 files changed, 111 insertions(+), 2 deletions(-) + create mode 100644 linux_os/guide/services/ntp/chronyd_server_directive/oval/shared.xml + create mode 100644 linux_os/guide/services/ntp/chronyd_server_directive/rule.yml + create mode 100644 linux_os/guide/services/ntp/chronyd_server_directive/tests/file_empty.fail.sh + create mode 100644 linux_os/guide/services/ntp/chronyd_server_directive/tests/file_missing.fail.sh + create mode 100644 linux_os/guide/services/ntp/chronyd_server_directive/tests/line_missing.fail.sh + create mode 100644 linux_os/guide/services/ntp/chronyd_server_directive/tests/multiple_servers.pass.sh + create mode 100644 linux_os/guide/services/ntp/chronyd_server_directive/tests/only_pool.fail.sh + create mode 100644 linux_os/guide/services/ntp/chronyd_server_directive/tests/only_server.pass.sh + +diff --git a/linux_os/guide/services/ntp/chronyd_server_directive/oval/shared.xml b/linux_os/guide/services/ntp/chronyd_server_directive/oval/shared.xml +new file mode 100644 +index 00000000000..2244e608047 +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_server_directive/oval/shared.xml +@@ -0,0 +1,33 @@ ++ ++ ++ {{{ oval_metadata("Ensure Chrony has time sources configured with server directive") }}} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ^/etc/chrony\.(conf|d/.+\.conf)$ ++ ^[\s]*server.*$ ++ 1 ++ ++ ++ ++ ++ ++ ++ ^/etc/chrony\.(conf|d/.+\.conf)$ ++ ^[\s]+pool.*$ ++ 1 ++ ++ +diff --git a/linux_os/guide/services/ntp/chronyd_server_directive/rule.yml b/linux_os/guide/services/ntp/chronyd_server_directive/rule.yml +new file mode 100644 +index 00000000000..6dc24f1be85 +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_server_directive/rule.yml +@@ -0,0 +1,32 @@ ++documentation_complete: true ++ ++title: 'Ensure Chrony is only configured with the server directive' ++ ++description: |- ++ Check that Chrony only has time sources configured with the server directive. ++ ++rationale: |- ++ Depending on the infrastruture being used the pool directive may not be supported. ++ ++severity: medium ++ ++platform: chrony ++ ++warnings: ++ - general: This rule doesn't come with a remediation, the time source needs to be added by the adminstrator. ++ ++identifiers: ++ cce@rhel8: CCE-86077-5 ++ cce@rhel9: CCE-87077-4 ++ ++references: ++ disa: CCI-001891 ++ srg: SRG-OS-000355-GPOS-00143,SRG-OS-000356-GPOS-00144,SRG-OS-000359-GPOS-00146 ++ stigid@rhel8: RHEL-08-030740 ++ ++ocil_clause: 'a remote time server is not configured or configured with pool directive' ++ ++ocil: |- ++ Run the following command and verify that time sources are only configure with server directive: ++

    # grep -E "^(server|pool)" /etc/chrony.conf
    ++ A line with the appropriate server should be returned, any line returned starting with pool is a finding. +diff --git a/linux_os/guide/services/ntp/chronyd_server_directive/tests/file_empty.fail.sh b/linux_os/guide/services/ntp/chronyd_server_directive/tests/file_empty.fail.sh +new file mode 100644 +index 00000000000..d1ba0755198 +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_server_directive/tests/file_empty.fail.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++# packages = chrony ++# platform = multi_platform_fedora,multi_platform_rhel ++# remediation = none ++ ++echo "" > /etc/chrony.conf +diff --git a/linux_os/guide/services/ntp/chronyd_server_directive/tests/file_missing.fail.sh b/linux_os/guide/services/ntp/chronyd_server_directive/tests/file_missing.fail.sh +new file mode 100644 +index 00000000000..12a50ebc3d2 +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_server_directive/tests/file_missing.fail.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++# packages = chrony ++# platform = multi_platform_fedora,multi_platform_rhel ++# remediation = none ++ ++rm -f /etc/chrony.conf +diff --git a/linux_os/guide/services/ntp/chronyd_server_directive/tests/line_missing.fail.sh b/linux_os/guide/services/ntp/chronyd_server_directive/tests/line_missing.fail.sh +new file mode 100644 +index 00000000000..bffa8b62b1b +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_server_directive/tests/line_missing.fail.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++# packages = chrony ++# platform = multi_platform_fedora,multi_platform_rhel ++# remediation = none ++ ++echo "some line" > /etc/chrony.conf ++echo "another line" >> /etc/chrony.conf +diff --git a/linux_os/guide/services/ntp/chronyd_server_directive/tests/multiple_servers.pass.sh b/linux_os/guide/services/ntp/chronyd_server_directive/tests/multiple_servers.pass.sh +new file mode 100644 +index 00000000000..5527f389316 +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_server_directive/tests/multiple_servers.pass.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++# packages = chrony ++# platform = multi_platform_fedora,multi_platform_rhel ++# remediation = none ++ ++sed -i "^pool.*" /etc/chrony.conf ++echo "server 0.pool.ntp.org" > /etc/chrony.conf ++echo "server 1.pool.ntp.org" >> /etc/chrony.conf +diff --git a/linux_os/guide/services/ntp/chronyd_server_directive/tests/only_pool.fail.sh b/linux_os/guide/services/ntp/chronyd_server_directive/tests/only_pool.fail.sh +new file mode 100644 +index 00000000000..616fe8844fc +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_server_directive/tests/only_pool.fail.sh +@@ -0,0 +1,9 @@ ++#!/bin/bash ++# packages = chrony ++# platform = multi_platform_fedora,multi_platform_rhel ++# remediation = none ++ ++sed -i "^server.*" /etc/chrony.conf ++if ! grep "^pool.*" /etc/chrony.conf; then ++ echo "pool 0.pool.ntp.org" > /etc/chrony.conf ++fi +diff --git a/linux_os/guide/services/ntp/chronyd_server_directive/tests/only_server.pass.sh b/linux_os/guide/services/ntp/chronyd_server_directive/tests/only_server.pass.sh +new file mode 100644 +index 00000000000..21a70dc4900 +--- /dev/null ++++ b/linux_os/guide/services/ntp/chronyd_server_directive/tests/only_server.pass.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++# packages = chrony ++# platform = multi_platform_fedora,multi_platform_rhel ++ ++sed -i "^pool.*" /etc/chrony.conf ++echo "server 0.pool.ntp.org" > /etc/chrony.conf +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index 36f606ee461..2bd1fb54316 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -909,6 +909,7 @@ selections: + # RHEL-08-030740 + # remediation fails because default configuration file contains pool instead of server keyword + - chronyd_or_ntpd_set_maxpoll ++ - chronyd_server_directive + + # RHEL-08-030741 + - chronyd_client_only +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 374932cfd32..0d4d7b0ff97 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -909,6 +909,7 @@ selections: + # RHEL-08-030740 + # remediation fails because default configuration file contains pool instead of server keyword + - chronyd_or_ntpd_set_maxpoll ++ - chronyd_server_directive + + # RHEL-08-030741 + - chronyd_client_only +diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt +index 8c59c5d3201..0081fe1938f 100644 +--- a/shared/references/cce-redhat-avail.txt ++++ b/shared/references/cce-redhat-avail.txt +@@ -152,7 +152,6 @@ CCE-86073-4 + CCE-86074-2 + CCE-86075-9 + CCE-86076-7 +-CCE-86077-5 + CCE-86078-3 + CCE-86079-1 + CCE-86080-9 +@@ -1079,7 +1078,6 @@ CCE-87073-3 + CCE-87074-1 + CCE-87075-8 + CCE-87076-6 +-CCE-87077-4 + CCE-87078-2 + CCE-87079-0 + CCE-87080-8 +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index 5b06103d72e..7d44f8910d1 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -160,6 +160,7 @@ selections: + - chronyd_client_only + - chronyd_no_chronyc_network + - chronyd_or_ntpd_set_maxpoll ++- chronyd_server_directive + - clean_components_post_updating + - configure_bashrc_exec_tmux + - configure_bind_crypto_policy +diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile +index 11e0ee9515a..91546d1d418 100644 +--- a/tests/data/profile_stability/rhel8/stig_gui.profile ++++ b/tests/data/profile_stability/rhel8/stig_gui.profile +@@ -171,6 +171,7 @@ selections: + - chronyd_client_only + - chronyd_no_chronyc_network + - chronyd_or_ntpd_set_maxpoll ++- chronyd_server_directive + - clean_components_post_updating + - configure_bashrc_exec_tmux + - configure_bind_crypto_policy diff --git a/SOURCES/scap-security-guide-0.1.61-distributed-sshd-rekeylimit-PR_8148.patch b/SOURCES/scap-security-guide-0.1.61-distributed-sshd-rekeylimit-PR_8148.patch new file mode 100644 index 0000000..d4db558 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-distributed-sshd-rekeylimit-PR_8148.patch @@ -0,0 +1,282 @@ +From f7a2fb33ad1507ad4ce3f7ec6534c06d4f6a7e83 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Fri, 4 Feb 2022 12:02:36 +0100 +Subject: [PATCH 1/3] Add tests for distributed SSHD RekeyLimit config + +--- + .../sshd_rekey_limit/tests/bad_size_directory.fail.sh | 10 ++++++++++ + .../sshd_rekey_limit/tests/bad_time_directory.fail.sh | 10 ++++++++++ + .../sshd_rekey_limit/tests/no_line_directory.fail.sh | 8 ++++++++ + .../sshd_rekey_limit/tests/rhel8_ok.pass.sh | 2 +- + .../sshd_rekey_limit/tests/rhel9_ok.pass.sh | 11 +++++++++++ + 5 files changed, 40 insertions(+), 1 deletion(-) + create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/bad_size_directory.fail.sh + create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/bad_time_directory.fail.sh + create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/no_line_directory.fail.sh + create mode 100644 linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/rhel9_ok.pass.sh + +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/bad_size_directory.fail.sh b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/bad_size_directory.fail.sh +new file mode 100644 +index 00000000000..88c6420c5ca +--- /dev/null ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/bad_size_directory.fail.sh +@@ -0,0 +1,10 @@ ++# platform = multi_platform_fedora,Red Hat Enterprise Linux 9 ++ ++mkdir -p /etc/ssh/sshd_config.d ++touch /etc/ssh/sshd_config.d/nothing ++ ++if grep -q "^\s*RekeyLimit" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ; then ++ sed -i "/^\s*RekeyLimit.*/Id" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ++fi ++ ++echo "RekeyLimit 812M 1h" > /etc/ssh/sshd_config.d/bad_config.conf +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/bad_time_directory.fail.sh b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/bad_time_directory.fail.sh +new file mode 100644 +index 00000000000..3bb0926017c +--- /dev/null ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/bad_time_directory.fail.sh +@@ -0,0 +1,10 @@ ++# platform = multi_platform_fedora,Red Hat Enterprise Linux 9 ++ ++mkdir -p /etc/ssh/sshd_config.d ++touch /etc/ssh/sshd_config.d/nothing ++ ++if grep -q "^\s*RekeyLimit" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ; then ++ sed -i "/^\s*RekeyLimit.*/Id" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ++fi ++ ++echo "RekeyLimit 512M 2h" > /etc/ssh/sshd_config.d/bad_config.conf +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/no_line_directory.fail.sh b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/no_line_directory.fail.sh +new file mode 100644 +index 00000000000..00569de1b84 +--- /dev/null ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/no_line_directory.fail.sh +@@ -0,0 +1,8 @@ ++# platform = multi_platform_fedora,Red Hat Enterprise Linux 9 ++ ++mkdir -p /etc/ssh/sshd_config.d ++touch /etc/ssh/sshd_config.d/nothing ++ ++if grep -q "^\s*RekeyLimit" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ; then ++ sed -i "/^\s*RekeyLimit.*/Id" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ++fi +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/rhel8_ok.pass.sh b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/rhel8_ok.pass.sh +index b9834e6d0b2..894c0ae4ba8 100644 +--- a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/rhel8_ok.pass.sh ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/rhel8_ok.pass.sh +@@ -1,4 +1,4 @@ +-# platform = Red Hat Enterprise Linux 8 ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9 + # profiles = xccdf_org.ssgproject.content_profile_ospp + + sed -e '/RekeyLimit/d' /etc/ssh/sshd_config +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/rhel9_ok.pass.sh b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/rhel9_ok.pass.sh +new file mode 100644 +index 00000000000..e183e8986dc +--- /dev/null ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/tests/rhel9_ok.pass.sh +@@ -0,0 +1,11 @@ ++# platform = Red Hat Enterprise Linux 9 ++# profiles = xccdf_org.ssgproject.content_profile_ospp ++ ++mkdir -p /etc/ssh/sshd_config.d ++touch /etc/ssh/sshd_config.d/nothing ++ ++if grep -q "^\s*RekeyLimit" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ; then ++ sed -i "/^\s*RekeyLimit.*/Id" /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ++fi ++ ++echo "RekeyLimit 1G 1h" >> /etc/ssh/sshd_config.d/good_config.conf + +From 782e3a6108ea377d526d0aed4e8c0cf019f3dcdd Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Fri, 4 Feb 2022 12:06:45 +0100 +Subject: [PATCH 2/3] Update rule to handle distributed config + +Based on the template sshd_lineinfile, updated rule sshd_rekey_limit to +check and remediate SSHD configuration in products that support +/etc/sshd/sshd_config.d/ + +The rule cannot use the template as it relies on two external variables. +--- + .../sshd_rekey_limit/ansible/shared.yml | 8 +++- + .../sshd_rekey_limit/bash/shared.sh | 2 +- + .../sshd_rekey_limit/oval/shared.xml | 46 ++++++++++++++----- + .../ssh/ssh_server/sshd_rekey_limit/rule.yml | 10 +++- + 4 files changed, 50 insertions(+), 16 deletions(-) + +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/ansible/shared.yml b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/ansible/shared.yml +index 84a4f084d40..f30dcdb2ed3 100644 +--- a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/ansible/shared.yml ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/ansible/shared.yml +@@ -5,4 +5,10 @@ + # disruption = low + {{{ ansible_instantiate_variables("var_rekey_limit_size", "var_rekey_limit_time") }}} + +-{{{ ansible_sshd_set(parameter="RekeyLimit", value="{{ var_rekey_limit_size }} {{ var_rekey_limit_time }}") }}} ++{{{ ++ ansible_sshd_set( ++ parameter="RekeyLimit", ++ value="{{ var_rekey_limit_size }} {{ var_rekey_limit_time }}", ++ config_is_distributed=sshd_distributed_config ++ ) ++}}} +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/bash/shared.sh b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/bash/shared.sh +index 4422f63472c..789358472a1 100644 +--- a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/bash/shared.sh ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/bash/shared.sh +@@ -2,4 +2,4 @@ + + {{{ bash_instantiate_variables("var_rekey_limit_size", "var_rekey_limit_time") }}} + +-{{{ bash_sshd_config_set(parameter='RekeyLimit', value="$var_rekey_limit_size $var_rekey_limit_time") }}} ++{{{ bash_sshd_remediation(parameter='RekeyLimit', value="$var_rekey_limit_size $var_rekey_limit_time", config_is_distributed=sshd_distributed_config) -}}} +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/oval/shared.xml b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/oval/shared.xml +index f49d9ab5275..e109cbd3124 100644 +--- a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/oval/shared.xml ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/oval/shared.xml +@@ -1,26 +1,49 @@ +-{{% set filepath = "/etc/ssh/sshd_config" -%}} +- ++{{%- set parameter = "RekeyLimit" %}} ++{{%- set sshd_config_path = "/etc/ssh/sshd_config" %}} ++{{%- set sshd_config_dir = "/etc/ssh/sshd_config.d" -%}} ++{{%- set description = "Ensure RekeyLimit is configured with the appropriate value in " ~ sshd_config_path %}} ++{{%- if sshd_distributed_config == "true" %}} ++{{%- set description = description ~ " or in " ~ sshd_config_dir -%}} ++{{%- endif %}} + + + +- {{{ oval_metadata("Ensure 'RekeyLimit' is configured with the correct value in '" + filepath + "'") }}} +- +- {{{- application_not_required_or_requirement_unset() }}} +- {{{- application_required_or_requirement_unset() }}} +- {{{- oval_line_in_file_criterion(filepath, "RekeyLimit") }}} +- +-
    ++ {{{ oval_metadata(description) }}} ++ ++ {{{- application_not_required_or_requirement_unset() }}} ++ {{{- application_required_or_requirement_unset() }}} ++ ++ {{{- oval_line_in_file_criterion(sshd_config_path, parameter) }}} ++ {{%- if sshd_distributed_config %}} ++ {{{- oval_line_in_directory_criterion(sshd_config_dir, parameter) | indent(8) }}} ++ {{%- endif %}} ++ ++ ++
    + + +- ++ + + + + +- {{{ filepath }}} ++ {{{ sshd_config_path }}} ++ ++ 1 ++ ++ ++ {{%- if sshd_distributed_config %}} ++ ++ ++ ++ ++ ++ {{{ sshd_config_dir}}} ++ .*\.conf$ + + 1 + ++ {{%- endif %}} + + + +@@ -35,4 +58,3 @@ + + + +- +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/rule.yml b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/rule.yml +index 450f244de41..702cd0506d3 100644 +--- a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/rule.yml ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/rule.yml +@@ -6,8 +6,10 @@ description: |- + The RekeyLimit parameter specifies how often + the session key of the is renegotiated, both in terms of + amount of data that may be transmitted and the time +- elapsed. To decrease the default limits, put line +- RekeyLimit {{{ xccdf_value("var_rekey_limit_size") }}} {{{ xccdf_value("var_rekey_limit_time") }}} to file /etc/ssh/sshd_config. ++ elapsed.
    ++ To decrease the default limits, add or correct the following line in ++ {{{ sshd_config_file() }}} ++
    RekeyLimit {{{ xccdf_value("var_rekey_limit_size") }}} {{{ xccdf_value("var_rekey_limit_time") }}}
    + + rationale: |- + By decreasing the limit based on the amount of data and enabling +@@ -32,6 +34,10 @@ ocil_clause: 'it is commented out or is not set' + ocil: |- + To check if RekeyLimit is set correctly, run the + following command: ++ {{% if sshd_distributed_config == "true" %}} ++
    $ sudo grep RekeyLimit /etc/ssh/sshd_config /etc/ssh/sshd_config.d/*
    ++ {{% else %}} +
    $ sudo grep RekeyLimit /etc/ssh/sshd_config
    ++ {{% endif %}} + If configured properly, output should be +
    RekeyLimit {{{ xccdf_value("var_rekey_limit_size") }}} {{{ xccdf_value("var_rekey_limit_time") }}}
    + +From 78d6d40f280b0e43e6c8fd7d60cfd81e7979fb8f Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Wed, 9 Feb 2022 16:59:53 +0100 +Subject: [PATCH 3/3] Use the Jinja variable 'parameter' where applicable + +--- + .../ssh/ssh_server/sshd_rekey_limit/oval/shared.xml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/oval/shared.xml b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/oval/shared.xml +index e109cbd3124..d79ac7f2047 100644 +--- a/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/oval/shared.xml ++++ b/linux_os/guide/services/ssh/ssh_server/sshd_rekey_limit/oval/shared.xml +@@ -1,7 +1,7 @@ + {{%- set parameter = "RekeyLimit" %}} + {{%- set sshd_config_path = "/etc/ssh/sshd_config" %}} + {{%- set sshd_config_dir = "/etc/ssh/sshd_config.d" -%}} +-{{%- set description = "Ensure RekeyLimit is configured with the appropriate value in " ~ sshd_config_path %}} ++{{%- set description = "Ensure {{{ parameter }}} is configured with the appropriate value in " ~ sshd_config_path %}} + {{%- if sshd_distributed_config == "true" %}} + {{%- set description = description ~ " or in " ~ sshd_config_dir -%}} + {{%- endif %}} +@@ -22,7 +22,7 @@ + + + +- ++ + + + +@@ -33,7 +33,7 @@ + + + {{%- if sshd_distributed_config %}} +- ++ + + + +@@ -47,7 +47,7 @@ + + + +- ^[\s]*RekeyLimit[\s]+ ++ ^[\s]*{{{ parameter }}}[\s]+ + + [\s]+ + diff --git a/SOURCES/scap-security-guide-0.1.61-file_groupowner-PR_7791.patch b/SOURCES/scap-security-guide-0.1.61-file_groupowner-PR_7791.patch new file mode 100644 index 0000000..a959133 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-file_groupowner-PR_7791.patch @@ -0,0 +1,536 @@ +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/rule.yml +new file mode 100644 +index 00000000000..de85c892704 +--- /dev/null ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/rule.yml +@@ -0,0 +1,38 @@ ++documentation_complete: true ++ ++title: 'Audit Configuration Files Must Be Owned By Group root' ++ ++description: |- ++ All audit configuration files must be owned by group root. ++
    chown :root /etc/audit/audit*.{rules,conf} /etc/audit/rules.d/*
    ++ ++rationale: |- ++ Without the capability to restrict which roles and individuals can ++ select which events are audited, unauthorized personnel may be able ++ to prevent the auditing of critical events. ++ Misconfigured audits may degrade the system's performance by ++ overwhelming the audit log. Misconfigured audits may also make it more ++ difficult to establish, correlate, and investigate the events relating ++ to an incident or identify those responsible for one. ++ ++severity: medium ++ ++references: ++ disa: CCI-000171 ++ srg: SRG-OS-000063-GPOS-00032 ++ stigid@ubuntu2004: UBTU-20-010135 ++ ++ocil: |- ++ {{{ describe_file_group_owner(file="/etc/audit/", group="root") }}} ++ {{{ describe_file_group_owner(file="/etc/audit/rules.d/", group="root") }}} ++ ++template: ++ name: file_groupowner ++ vars: ++ filepath: ++ - /etc/audit/ ++ - /etc/audit/rules.d/ ++ file_regex: ++ - ^audit(\.rules|d\.conf)$ ++ - ^.*\.rules$ ++ filegid: '0' +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/tests/correct_groupowner.pass.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/tests/correct_groupowner.pass.sh +new file mode 100644 +index 00000000000..5235e0d05a3 +--- /dev/null ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/tests/correct_groupowner.pass.sh +@@ -0,0 +1,9 @@ ++#!/bin/bash ++ ++export TESTFILE=/etc/audit/rules.d/test_rule.rules ++export AUDITFILE=/etc/audit/auditd.conf ++mkdir -p /etc/audit/rules.d/ ++touch $TESTFILE ++touch $AUDITFILE ++chgrp root $TESTFILE ++chgrp root $AUDITFILE +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/tests/incorrect_groupowner.fail.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/tests/incorrect_groupowner.fail.sh +new file mode 100644 +index 00000000000..52378d810a5 +--- /dev/null ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_groupownership_audit_configuration/tests/incorrect_groupowner.fail.sh +@@ -0,0 +1,10 @@ ++#!/bin/bash ++ ++groupadd group_test ++export TESTFILLE=/etc/audit/rules.d/test_rule.rules ++export AUDITFILE=/etc/audit/auditd.conf ++mkdir -p /etc/audit/rules.d/ ++touch $TESTFILLE ++touch $AUDITFILE ++chgrp group_test $TESTFILLE ++chgrp group_test $AUDITFILE +diff --git a/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_groupowner_var_log/rule.yml b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_groupowner_var_log/rule.yml +index 5e2cabafc34..927d08d03d4 100644 +--- a/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_groupowner_var_log/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_groupowner_var_log/rule.yml +@@ -1,8 +1,15 @@ ++{{% if 'ubuntu' in product %}} ++{{% set gid = 'syslog' %}} ++{{% else %}} ++{{% set gid = 'root' %}} ++{{% endif %}} ++ ++ + documentation_complete: true + + title: 'Verify Group Who Owns /var/log Directory' + +-description: '{{{ describe_file_group_owner(file="/var/log", group="root") }}}' ++description: '{{{ describe_file_group_owner(file="/var/log", group=gid) }}}' + + rationale: |- + The /var/log directory contains files with logs of error +@@ -22,13 +29,16 @@ references: + stigid@rhel8: RHEL-08-010260 + stigid@ubuntu2004: UBTU-20-010417 + +-ocil_clause: '{{{ ocil_clause_file_group_owner(file="/var/log", group="root") }}}' ++ocil_clause: '{{{ ocil_clause_file_group_owner(file="/var/log", group=gid) }}}' + + ocil: |- +- {{{ ocil_file_group_owner(file="/var/log", group="root") }}} ++ {{{ ocil_file_group_owner(file="/var/log", group=gid) }}} + + template: + name: file_groupowner + vars: + filepath: /var/log/ + filegid: '0' ++ filegid@ubuntu1604: '110' ++ filegid@ubuntu1804: '110' ++ filegid@ubuntu2004: '110' +diff --git a/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_groupowner_var_log_syslog/rule.yml b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_groupowner_var_log_syslog/rule.yml +new file mode 100644 +index 00000000000..f654279fe54 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_groupowner_var_log_syslog/rule.yml +@@ -0,0 +1,27 @@ ++documentation_complete: true ++ ++title: 'Verify Group Who Owns /var/log/syslog File' ++ ++description: '{{{ describe_file_group_owner(file="/var/log/syslog", group="adm") }}}' ++ ++rationale: |- ++ The /var/log/syslog file contains logs of error messages in ++ the system and should only be accessed by authorized personnel. ++ ++severity: medium ++ ++references: ++ disa: CCI-001314 ++ srg: SRG-OS-000206-GPOS-00084 ++ stigid@ubuntu2004: UBTU-20-010420 ++ ++ocil_clause: '{{{ ocil_clause_file_group_owner(file="/var/log/syslog", group="adm") }}}' ++ ++ocil: |- ++ {{{ ocil_file_group_owner(file="/var/log/syslog", group="adm") }}} ++ ++template: ++ name: file_groupowner ++ vars: ++ filepath: /var/log/syslog ++ filegid: '4' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_groupownership_binary_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_groupownership_binary_dirs/rule.yml +new file mode 100644 +index 00000000000..655b2cd1aef +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_groupownership_binary_dirs/rule.yml +@@ -0,0 +1,65 @@ ++documentation_complete: true ++ ++prodtype: ubuntu2004 ++ ++title: 'Verify that system commands directories are group owned by root' ++ ++description: |- ++ System commands files are stored in the following directories by default: ++
    /bin
    ++    /sbin
    ++    /usr/bin
    ++    /usr/sbin
    ++    /usr/local/bin
    ++    /usr/local/sbin
    ++    
    ++ All these directories should be owned by the root group. ++ If the directory is found to be owned by a group other than root correct ++ its ownership with the following command: ++
    $ sudo chgrp root DIR
    ++ ++rationale: |- ++ If the operating system allows any user to make changes to software ++ libraries, then those changes might be implemented without undergoing the ++ appropriate testing and approvals that are part of a robust change management ++ process. ++ This requirement applies to operating systems with software libraries ++ that are accessible and configurable, as in the case of interpreted languages. ++ Software libraries also include privileged programs which execute with ++ escalated privileges. Only qualified and authorized individuals must be ++ allowed to obtain access to information system components for purposes ++ of initiating changes, including upgrades and modifications. ++ ++severity: medium ++ ++references: ++ disa: CCI-001495 ++ srg: SRG-OS-000258-GPOS-00099 ++ stigid@ubuntu2004: UBTU-20-010425 ++ ++ocil_clause: 'any of these directories are not owned by root group' ++ ++ocil: |- ++ System commands are stored in the following directories: ++
    /bin
    ++    /sbin
    ++    /usr/bin
    ++    /usr/sbin
    ++    /usr/local/bin
    ++    /usr/local/sbin
    ++ For each of these directories, run the following command to find files not ++ owned by root group: ++
    $ sudo find -L $DIR ! -group root -type d \;
    ++ ++template: ++ name: file_groupowner ++ vars: ++ filepath: ++ - /bin/ ++ - /sbin/ ++ - /usr/bin/ ++ - /usr/sbin/ ++ - /usr/local/bin/ ++ - /usr/local/sbin/ ++ recursive: 'true' ++ filegid: '0' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/ansible/shared.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/ansible/shared.yml +deleted file mode 100644 +index 28df7839430..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/ansible/shared.yml ++++ /dev/null +@@ -1,23 +0,0 @@ +-# platform = multi_platform_sle +-# reboot = false +-# strategy = restrict +-# complexity = medium +-# disruption = medium +-- name: "Read list libraries without root ownership" +- find: +- paths: +- - "/usr/lib" +- - "/usr/lib64" +- - "/lib" +- - "/lib64" +- file_type: "directory" +- register: library_dirs_not_owned_by_root +- +-- name: "Set ownership of system library dirs to root" +- file: +- path: "{{ item.path }}" +- owner: "root" +- state: "directory" +- mode: "{{ item.mode }}" +- with_items: "{{ library_dirs_not_owned_by_root.files }}" +- when: library_dirs_not_owned_by_root.matched > 0 +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_audit_binaries/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_audit_binaries/rule.yml +new file mode 100644 +index 00000000000..f61a5f988dc +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_audit_binaries/rule.yml +@@ -0,0 +1,77 @@ ++documentation_complete: true ++ ++prodtype: ubuntu2004 ++ ++title: 'Verify that audit tools are owned by group root' ++ ++description: |- ++ The {{{ full_name }}} operating system audit tools must have the proper ++ ownership configured to protected against unauthorized access. ++ ++ Verify it by running the following command: ++
    $ stat -c "%n %G" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/audispd /sbin/augenrules
    ++
    ++    /sbin/auditctl root
    ++    /sbin/aureport root
    ++    /sbin/ausearch root
    ++    /sbin/autrace root
    ++    /sbin/auditd root
    ++    /sbin/audispd root
    ++    /sbin/augenrules root
    ++    
    ++ ++ Audit tools needed to successfully view and manipulate audit information ++ system activity and records. Audit tools include custom queries and report ++ generators ++ ++rationale: |- ++ 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 operation on audit information. ++ ++ Operating systems providing tools to interface with audit information ++ will leverage user permissions and roles identifying the user accessing the ++ tools and the corresponding rights the user enjoys to make access decisions ++ regarding the access to audit tools. ++ ++severity: medium ++ ++references: ++ disa: CCI-001493,CCI-001494 ++ srg: SRG-OS-000256-GPiOS-00097,SRG-OS-000257-GPOS-00098 ++ stigid@ubuntu2004: UBTU-20-010201 ++ ++ocil: |- ++ Verify it by running the following command: ++
    $ stat -c "%n %G" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/audispd /sbin/augenrules
    ++
    ++    /sbin/auditctl root
    ++    /sbin/aureport root
    ++    /sbin/ausearch root
    ++    /sbin/autrace root
    ++    /sbin/auditd root
    ++    /sbin/audispd root
    ++    /sbin/augenrules root
    ++    
    ++ ++ If the command does not return all the above lines, the missing ones ++ need to be added. ++ ++ Run the following command to correct the permissions of the missing ++ entries: ++
    $ sudo chown :root [audit_tool] 
    ++ ++ Replace "[audit_tool]" with each audit tool not group-owned by root. ++ ++template: ++ name: file_groupowner ++ vars: ++ filepath: ++ - /sbin/auditctl ++ - /sbin/aureport ++ - /sbin/ausearch ++ - /sbin/autrace ++ - /sbin/auditd ++ - /sbin/audispd ++ - /sbin/augenrules ++ filegid: '0' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/bash/shared.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/bash/shared.sh +index bb7c72550e9..a9e8c7d8e25 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/bash/shared.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/bash/shared.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,Oracle Linux 8,Red Hat Enterprise Linux 8,multi_platform_fedora ++# platform = multi_platform_sle,Oracle Linux 8,Red Hat Enterprise Linux 8,multi_platform_fedora,multi_platform_ubuntu + + for SYSCMDFILES in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin + do +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/tests/incorrect_groupownership.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/tests/incorrect_groupownership.fail.sh +index 7cf507ca5f4..33a0c85d35b 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/tests/incorrect_groupownership.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/tests/incorrect_groupownership.fail.sh +@@ -1,10 +1,12 @@ + #!/bin/bash + ++groupadd group_test ++ + for TESTFILE in /bin/test_me /sbin/test_me /usr/bin/test_me /usr/sbin/test_me /usr/local/bin/test_me /usr/local/sbin/test_me + do + if [[ ! -f $TESTFILE ]] + then + touch $TESTFILE + fi +- chown nobody.nobody $TESTFILE ++ chgrp group_test $TESTFILE + done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/ansible/shared.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/ansible/shared.yml +deleted file mode 100644 +index 08019fd48bb..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/ansible/shared.yml ++++ /dev/null +@@ -1,26 +0,0 @@ +-# platform = multi_platform_sle,Oracle Linux 8,Red Hat Enterprise Linux 8,multi_platform_fedora +-# reboot = false +-# strategy = restrict +-# complexity = high +-# disruption = medium +- +-- name: "Read list libraries without root ownership" +- find: +- paths: +- - "/usr/lib" +- - "/usr/lib64" +- - "/lib" +- - "/lib64" +- file_type: "file" +- register: library_files_not_group_owned_by_root +- +-- name: "Set group ownership of system library files to root" +- file: +- path: "{{ item.path }}" +- group: "root" +- state: "file" +- mode: "{{ item.mode }}" +- with_items: "{{ library_files_not_group_owned_by_root.files }}" +- when: +- - library_files_not_group_owned_by_root.matched > 0 +- - item.gid != 0 +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/bash/shared.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/bash/shared.sh +deleted file mode 100644 +index 3a42beafb8a..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/bash/shared.sh ++++ /dev/null +@@ -1,7 +0,0 @@ +-# platform = multi_platform_sle,Oracle Linux 8,Red Hat Enterprise Linux 8,multi_platform_fedora +- +-find /lib \ +-/lib64 \ +-/usr/lib \ +-/usr/lib64 \ +-\! -group root -type f -exec chgrp root '{}' \; +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/oval/shared.xml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/oval/shared.xml +deleted file mode 100644 +index f5ca9380b55..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/oval/shared.xml ++++ /dev/null +@@ -1,27 +0,0 @@ +- +- +- {{{ oval_metadata(" +- Checks that system-wide library files in /lib, /lib64, /usr/lib, /usr/lib64 +- are owned by root. +- ") }}} +- +- +- +- +- +- +- +- +- +- +- +- ^\/lib(|64)?$|^\/usr\/lib(|64)?$ +- ^.*$ +- group_permissions_for_system_wide_files_are_not_root +- +- +- +- 0 +- +- +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/rule.yml +index 17923f52ea6..eaf04c8d36c 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/rule.yml +@@ -1,6 +1,6 @@ + documentation_complete: true + +-prodtype: fedora,ol8,rhel8,rhel9,sle12,sle15 ++prodtype: fedora,ol8,rhel8,rhel9,sle12,sle15,ubuntu2004 + + title: |- + Verify the system-wide library files in directories +@@ -46,6 +46,7 @@ references: + stigid@rhel8: RHEL-08-010350 + stigid@sle12: SLES-12-010875 + stigid@sle15: SLES-15-010355 ++ stigid@ubuntu2004: UBTU-20-01430 + + ocil_clause: 'system wide library files are not group owned by root' + +@@ -59,3 +60,14 @@ ocil: |- + To find if system-wide library files stored in these directories are not group-owned by + root run the following command for each directory DIR: +
    $ sudo find -L DIR ! -group root -type f 
    ++ ++template: ++ name: file_groupowner ++ vars: ++ filepath: ++ - /lib/ ++ - /lib64/ ++ - /usr/lib/ ++ - /usr/lib64/ ++ file_regex: ^.*$ ++ filegid: '0' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_group.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_groupowner.pass.sh +similarity index 86% +rename from linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_group.pass.sh +rename to linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_groupowner.pass.sh +index a4ae2854db1..0e982c3b8ca 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_group.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_groupowner.pass.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,Red Hat Enterprise Linux 8,multi_platform_fedora ++# platform = multi_platform_sle,Red Hat Enterprise Linux 8,multi_platform_fedora,multi_platform_ubuntu + + for SYSLIBDIRS in /lib /lib64 /usr/lib /usr/lib64 + do +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_group.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_groupowner.fail.sh +similarity index 70% +rename from linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_group.fail.sh +rename to linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_groupowner.fail.sh +index c96f65b989c..23a7703f57d 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_group.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_groupowner.fail.sh +@@ -1,10 +1,11 @@ +-# platform = multi_platform_sle,Red Hat Enterprise Linux 8,multi_platform_fedora ++# platform = multi_platform_sle,Red Hat Enterprise Linux 8,multi_platform_fedora,multi_platform_ubuntu + ++groupadd group_test + for TESTFILE in /lib/test_me /lib64/test_me /usr/lib/test_me /usr/lib64/test_me + do + if [[ ! -f $TESTFILE ]] + then + touch $TESTFILE + fi +- chown nobody.nobody $TESTFILE ++ chgrp group_test $TESTFILE + done +diff --git a/shared/templates/file_groupowner/tests/missing_file_test.pass.sh b/shared/templates/file_groupowner/tests/missing_file_test.pass.sh +index 938e6b30819..015ff98c99d 100644 +--- a/shared/templates/file_groupowner/tests/missing_file_test.pass.sh ++++ b/shared/templates/file_groupowner/tests/missing_file_test.pass.sh +@@ -1,8 +1,20 @@ + #!/bin/bash + # + +-{{% if MISSING_FILE_PASS %}} +- rm -f {{{ FILEPATH }}} +-{{% else %}} +- true +-{{% endif %}} ++{{% for path in FILEPATH %}} ++ {{% if MISSING_FILE_PASS %}} ++ rm -f {{{ path }}} ++ {{% else %}} ++ {{% if IS_DIRECTORY and FILE_REGEX %}} ++ echo "Create specific tests for this rule because of regex" ++ {{% elif IS_DIRECTORY and RECURSIVE %}} ++ find -L {{{ path }}} -type d -exec chgrp {{{ FILEGID }}} {} \; ++ {{% else %}} ++ if [ ! -f {{{ path }}} ]; then ++ mkdir -p "$(dirname '{{{ path }}}')" ++ touch {{{ path }}} ++ fi ++ chgrp {{{ FILEGID }}} {{{ path }}} ++ {{% endif %}} ++ {{% endif %}} ++{{% endfor %}} diff --git a/SOURCES/scap-security-guide-0.1.61-file_owner-PR_7789.patch b/SOURCES/scap-security-guide-0.1.61-file_owner-PR_7789.patch new file mode 100644 index 0000000..ab14309 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-file_owner-PR_7789.patch @@ -0,0 +1,288 @@ +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/rule.yml +new file mode 100644 +index 00000000000..968ef336148 +--- /dev/null ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/rule.yml +@@ -0,0 +1,39 @@ ++documentation_complete: true ++ ++title: 'Audit Configuration Files Must Be Owned By Root' ++ ++description: |- ++ All audit configuration files must be owned by root user. ++ {{{ describe_file_owner(file="/etc/audit/", owner="root") }}} ++ {{{ describe_file_owner(file="/etc/audit/rules.d/", owner="root") }}} ++ ++rationale: |- ++ Without the capability to restrict which roles and individuals can ++ select which events are audited, unauthorized personnel may be able ++ to prevent the auditing of critical events. ++ Misconfigured audits may degrade the system's performance by ++ overwhelming the audit log. Misconfigured audits may also make it more ++ difficult to establish, correlate, and investigate the events relating ++ to an incident or identify those responsible for one. ++ ++severity: medium ++ ++references: ++ disa: CCI-000171 ++ srg: SRG-OS-000063-GPOS-00032 ++ stigid@ubuntu2004: UBTU-20-010134 ++ ++ocil: |- ++ {{{ describe_file_owner(file="/etc/audit/", owner="root") }}} ++ {{{ describe_file_owner(file="/etc/audit/rules.d/", owner="root") }}} ++ ++template: ++ name: file_owner ++ vars: ++ filepath: ++ - /etc/audit/ ++ - /etc/audit/rules.d/ ++ file_regex: ++ - ^audit(\.rules|d\.conf)$ ++ - ^.*\.rules$ ++ fileuid: '0' +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/tests/correct_owner.pass.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/tests/correct_owner.pass.sh +new file mode 100644 +index 00000000000..4d67307a1ef +--- /dev/null ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/tests/correct_owner.pass.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++# packages = audit ++ ++chown 0 /etc/audit/audit.rules ++chown 0 /etc/audit/auditd.conf ++chown 0 -R /etc/audit/rules.d/ +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/tests/incorrect_owner.fail.sh b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/tests/incorrect_owner.fail.sh +new file mode 100644 +index 00000000000..337074fab92 +--- /dev/null ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/file_ownership_audit_configuration/tests/incorrect_owner.fail.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++# packages = audit ++ ++useradd testuser_123 ++chown testuser_123 /etc/audit/audit.rules ++chown testuser_123 /etc/audit/auditd.conf ++chown testuser_123 -R /etc/audit/rules.d/ +diff --git a/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_owner_var_log_syslog/rule.yml b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_owner_var_log_syslog/rule.yml +new file mode 100644 +index 00000000000..f1bf515455d +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_owner_var_log_syslog/rule.yml +@@ -0,0 +1,27 @@ ++documentation_complete: true ++ ++title: 'Verify User Who Owns /var/log/syslog File' ++ ++description: '{{{ describe_file_owner(file="/var/log/syslog", owner="syslog") }}}' ++ ++rationale: |- ++ The /var/log/syslog file contains logs of error messages in ++ the system and should only be accessed by authorized personnel. ++ ++severity: medium ++ ++references: ++ disa: CCI-001314 ++ srg: SRG-OS-000206-GPOS-00084 ++ stigid@ubuntu2004: UBTU-20-010421 ++ ++ocil_clause: '{{{ ocil_clause_file_owner(file="/var/log/syslog", owner="syslog") }}}' ++ ++ocil: |- ++ {{{ ocil_file_owner(file="/var/log/syslog", owner="syslog") }}} ++ ++template: ++ name: file_owner ++ vars: ++ filepath: /var/log/syslog ++ fileuid: '104' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_binary_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_binary_dirs/rule.yml +new file mode 100644 +index 00000000000..e2362388678 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_binary_dirs/rule.yml +@@ -0,0 +1,55 @@ ++documentation_complete: true ++ ++title: 'Verify that System Executable Have Root Ownership' ++ ++description: |- ++
    /bin
    ++    /sbin
    ++    /usr/bin
    ++    /usr/sbin
    ++    /usr/local/bin
    ++    /usr/local/sbin
    ++ All these directories should be owned by the root user. ++ If any directory DIR in these directories is found ++ to be owned by a user other than root, correct its ownership with the ++ following command: ++
    $ sudo chown root DIR
    ++ ++rationale: |- ++ System binaries are executed by privileged users as well as system services, ++ and restrictive permissions are necessary to ensure that their ++ execution of these programs cannot be co-opted. ++ ++severity: medium ++ ++references: ++ disa: CCI-001495 ++ srg: SRG-OS-000258-GPOS-00099 ++ stigid@ubuntu2004: UBTU-20-010424 ++ ++ocil_clause: 'any system exectables directories are found to not be owned by root' ++ ++ocil: |- ++ System executables are stored in the following directories by default: ++
    /bin
    ++    /sbin
    ++    /usr/bin
    ++    /usr/local/bin
    ++    /usr/local/sbin
    ++    /usr/sbin
    ++ For each of these directories, run the following command to find files ++ not owned by root: ++
    $ sudo find -L DIR/ ! -user root -type d -exec chown root {} \;
    ++ ++template: ++ name: file_owner ++ vars: ++ filepath: ++ - /bin/ ++ - /sbin/ ++ - /usr/bin/ ++ - /usr/sbin/ ++ - /usr/local/bin/ ++ - /usr/local/sbin/ ++ recursive: 'true' ++ fileuid: '0' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_audit_binaries/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_audit_binaries/rule.yml +new file mode 100644 +index 00000000000..0c7d9b313d5 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_audit_binaries/rule.yml +@@ -0,0 +1,77 @@ ++documentation_complete: true ++ ++prodtype: ubuntu2004 ++ ++title: 'Verify that audit tools are owned by root' ++ ++description: |- ++ The {{{ full_name }}} operating system audit tools must have the proper ++ ownership configured to protected against unauthorized access. ++ ++ Verify it by running the following command: ++
    $ stat -c "%n %U" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/audispd /sbin/augenrules
    ++
    ++    /sbin/auditctl root
    ++    /sbin/aureport root
    ++    /sbin/ausearch root
    ++    /sbin/autrace root
    ++    /sbin/auditd root
    ++    /sbin/audispd root
    ++    /sbin/augenrules root
    ++    
    ++ ++ Audit tools needed to successfully view and manipulate audit information ++ system activity and records. Audit tools include custom queries and report ++ generators ++ ++rationale: |- ++ 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 operation on audit information. ++ ++ Operating systems providing tools to interface with audit information ++ will leverage user permissions and roles identifying the user accessing the ++ tools and the corresponding rights the user enjoys to make access decisions ++ regarding the access to audit tools. ++ ++severity: medium ++ ++references: ++ disa: CCI-001493,CCI-001494 ++ srg: SRG-OS-000256-GPiOS-00097,SRG-OS-000257-GPOS-00098 ++ stigid@ubuntu2004: UBTU-20-010200 ++ ++ocil: |- ++ Verify it by running the following command: ++
    $ stat -c "%n %U" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/audispd /sbin/augenrules
    ++
    ++    /sbin/auditctl root
    ++    /sbin/aureport root
    ++    /sbin/ausearch root
    ++    /sbin/autrace root
    ++    /sbin/auditd root
    ++    /sbin/audispd root
    ++    /sbin/augenrules root
    ++    
    ++ ++ If the command does not return all the above lines, the missing ones ++ need to be added. ++ ++ Run the following command to correct the permissions of the missing ++ entries: ++
    $ sudo chown root [audit_tool] 
    ++ ++ Replace "[audit_tool]" with each audit tool not owned by root. ++ ++template: ++ name: file_owner ++ vars: ++ filepath: ++ - /sbin/auditctl ++ - /sbin/aureport ++ - /sbin/ausearch ++ - /sbin/autrace ++ - /sbin/auditd ++ - /sbin/audispd ++ - /sbin/augenrules ++ fileuid: '0' +diff --git a/shared/templates/file_owner/ansible.template b/shared/templates/file_owner/ansible.template +index 80eaae8d50b..590c9fc6055 100644 +--- a/shared/templates/file_owner/ansible.template ++++ b/shared/templates/file_owner/ansible.template +@@ -25,7 +25,7 @@ + + - name: Ensure owner on {{{ path }}} recursively + file: +- paths "{{{ path }}}" ++ path: "{{{ path }}}" + state: directory + recurse: yes + owner: "{{{ FILEUID }}}" +diff --git a/shared/templates/file_owner/tests/missing_file_test.pass.sh b/shared/templates/file_owner/tests/missing_file_test.pass.sh +index 938e6b30819..4e3683f9dcf 100644 +--- a/shared/templates/file_owner/tests/missing_file_test.pass.sh ++++ b/shared/templates/file_owner/tests/missing_file_test.pass.sh +@@ -1,8 +1,18 @@ + #!/bin/bash + # + +-{{% if MISSING_FILE_PASS %}} +- rm -f {{{ FILEPATH }}} +-{{% else %}} +- true +-{{% endif %}} ++{{% for path in FILEPATH %}} ++ {{% if MISSING_FILE_PASS %}} ++ rm -f {{{ path }}} ++ {{% else %}} ++ {{% if IS_DIRECTORY and RECURSIVE %}} ++ find -L {{{ path }}} -type d -exec chown {{{ FILEUID }}} {} \; ++ {{% else %}} ++ if [ ! -f {{{ path }}} ]; then ++ mkdir -p "$(dirname '{{{ path }}}')" ++ touch {{{ path }}} ++ fi ++ chown {{{ FILEUID }}} {{{ path }}} ++ {{% endif %}} ++ {{% endif %}} ++{{% endfor %}} diff --git a/SOURCES/scap-security-guide-0.1.61-file_permissions-PR_7788.patch b/SOURCES/scap-security-guide-0.1.61-file_permissions-PR_7788.patch new file mode 100644 index 0000000..5bc9aad --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-file_permissions-PR_7788.patch @@ -0,0 +1,409 @@ +diff --git a/linux_os/guide/system/permissions/files/permissions_local_var_log/bash/ubuntu.sh b/linux_os/guide/system/permissions/files/permissions_local_var_log/bash/ubuntu.sh +new file mode 100644 +index 00000000000..93fd73e6ece +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_local_var_log/bash/ubuntu.sh +@@ -0,0 +1,14 @@ ++# platform = multi_platform_ubuntu ++ ++readarray -t files < <(find /var/log/) ++for file in "${files[@]}"; do ++ if basename $file | grep -qE '^.*$'; then ++ chmod 0640 $file ++ fi ++done ++ ++if grep -qE "^f \/var\/log\/(btmp|wtmp|lastlog)? " /usr/lib/tmpfiles.d/var.conf; then ++ sed -i --follow-symlinks "s/\(^f[[:space:]]\+\/var\/log\/btmp[[:space:]]\+\)\(\([[:digit:]]\+\)[^ $]*\)/\10640/" /usr/lib/tmpfiles.d/var.conf ++ sed -i --follow-symlinks "s/\(^f[[:space:]]\+\/var\/log\/wtmp[[:space:]]\+\)\(\([[:digit:]]\+\)[^ $]*\)/\10640/" /usr/lib/tmpfiles.d/var.conf ++ sed -i --follow-symlinks "s/\(^f[[:space:]]\+\/var\/log\/lastlog[[:space:]]\+\)\(\([[:digit:]]\+\)[^ $]*\)/\10640/" /usr/lib/tmpfiles.d/var.conf ++fi +diff --git a/linux_os/guide/system/permissions/files/permissions_local_var_log/oval/shared.xml b/linux_os/guide/system/permissions/files/permissions_local_var_log/oval/shared.xml +deleted file mode 100644 +index dd95ce05936..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_local_var_log/oval/shared.xml ++++ /dev/null +@@ -1,36 +0,0 @@ +- +- +- {{{ oval_metadata(" +- Checks that files in /var/log have permission at least 0640 +- ") }}} +- +- +- +- +- +- +- +- +- +- +- ^\/var\/log\/ +- ^.*$ +- log_files_permission_more_0640 +- var_log_symlinks +- +- +- +- +- true +- true +- true +- true +- true +- true +- +- +- +- symbolic link +- +- +- +diff --git a/linux_os/guide/system/permissions/files/permissions_local_var_log/rule.yml b/linux_os/guide/system/permissions/files/permissions_local_var_log/rule.yml +index 2b0431b7763..9ce79cfde4e 100644 +--- a/linux_os/guide/system/permissions/files/permissions_local_var_log/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_local_var_log/rule.yml +@@ -47,3 +47,10 @@ ocil: |- +
    +     sudo find /var/log -perm /137 -type f -exec stat -c "%n %a" {} \;
    +     
    ++ ++template: ++ name: file_permissions ++ vars: ++ filepath: /var/log/ ++ file_regex: '.*' ++ filemode: '0640' +diff --git a/linux_os/guide/system/permissions/files/permissions_local_var_log/tests/var_logfile_correct_mode.pass.sh b/linux_os/guide/system/permissions/files/permissions_local_var_log/tests/var_logfile_correct_mode.pass.sh +index 5317ef272b8..1793259cff5 100644 +--- a/linux_os/guide/system/permissions/files/permissions_local_var_log/tests/var_logfile_correct_mode.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_local_var_log/tests/var_logfile_correct_mode.pass.sh +@@ -1,5 +1,6 @@ + #!/bin/bash + ++chmod -R 640 /var/log + mkdir -p /var/log/testme + touch /var/log/testme/test.log + chmod 640 /var/log/testme/test.log +diff --git a/linux_os/guide/system/permissions/files/permissions_local_var_log/tests/world_writable_dir.pass.sh b/linux_os/guide/system/permissions/files/permissions_local_var_log/tests/world_writable_dir.pass.sh +index 83db1acf8d3..69b081473a5 100644 +--- a/linux_os/guide/system/permissions/files/permissions_local_var_log/tests/world_writable_dir.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_local_var_log/tests/world_writable_dir.pass.sh +@@ -1,4 +1,5 @@ + #!/bin/bash + ++chmod -R 640 /var/log/ + mkdir -p /var/log/testme + chmod 777 /var/log/testme +diff --git a/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_permissions_var_log/bash/ubuntu.sh b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_permissions_var_log/bash/ubuntu.sh +new file mode 100644 +index 00000000000..93962ea66a7 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_permissions_var_log/bash/ubuntu.sh +@@ -0,0 +1,7 @@ ++# platform = multi_platform_ubuntu ++ ++chmod 0755 /var/log/ ++ ++if grep -q "^z \/var\/log " /usr/lib/tmpfiles.d/00rsyslog.conf; then ++ sed -i --follow-symlinks "s/\(^z[[:space:]]\+\/var\/log[[:space:]]\+\)\(\([[:digit:]]\+\)[^ $]*\)/\10755/" /usr/lib/tmpfiles.d/00rsyslog.conf ++fi +diff --git a/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_permissions_var_log_syslog/rule.yml b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_permissions_var_log_syslog/rule.yml +new file mode 100644 +index 00000000000..73258d40fdc +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_var_log_dir/file_permissions_var_log_syslog/rule.yml +@@ -0,0 +1,28 @@ ++documentation_complete: true ++ ++title: 'Verify Permissions on /var/log/syslog File' ++ ++description: |- ++ {{{ describe_file_permissions(file="/var/log/syslog", perms="0640") }}} ++ ++rationale: |- ++ The /var/log/syslog file contains logs of error messages in ++ the system and should only be accessed by authorized personnel. ++ ++severity: medium ++ ++references: ++ disa: CCI-001314 ++ srg: SRG-OS-000206-GPOS-00084 ++ stigid@ubuntu2004: UBTU-20-010422 ++ ++ocil_clause: '{{{ ocil_clause_file_permissions(file="/var/log/syslog", perms="-rw-r-----") }}}' ++ ++ocil: |- ++ {{{ ocil_file_permissions(file="/var/log/syslog", perms="-rw-r-----") }}} ++ ++template: ++ name: file_permissions ++ vars: ++ filepath: /var/log/syslog ++ filemode: '0640' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_binary_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_binary_dirs/rule.yml +new file mode 100644 +index 00000000000..a666c768870 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_binary_dirs/rule.yml +@@ -0,0 +1,57 @@ ++documentation_complete: true ++ ++title: 'Verify that System Executable Directories Have Restrictive Permissions' ++ ++description: |- ++ System executables are stored in the following directories by default: ++
    /bin
    ++    /sbin
    ++    /usr/bin
    ++    /usr/sbin
    ++    /usr/local/bin
    ++    /usr/local/sbin
    ++ These directories should not be group-writable or world-writable. ++ If any directory DIR in these directories is found to be ++ group-writable or world-writable, correct its permission with the ++ following command: ++
    $ sudo chmod go-w DIR
    ++ ++rationale: |- ++ System binaries are executed by privileged users, as well as system services, ++ and restrictive permissions are necessary to ensure execution of these programs ++ cannot be co-opted. ++ ++severity: medium ++ ++references: ++ disa: CCI-001495 ++ srg: SRG-OS-000258-GPOS-00099 ++ stigid@ubuntu2004: UBTU-20-010423 ++ ++ocil_clause: 'any of these files are group-writable or world-writable' ++ ++ocil: |- ++ System executables are stored in the following directories by default: ++
    /bin
    ++    /sbin
    ++    /usr/bin
    ++    /usr/sbin
    ++    /usr/local/bin
    ++    /usr/local/sbin
    ++ To find system executables directories that are group-writable or ++ world-writable, run the following command for each directory DIR ++ which contains system executables: ++
    $ sudo find -L DIR -perm /022 -type d
    ++ ++template: ++ name: file_permissions ++ vars: ++ filepath: ++ - /bin/ ++ - /sbin/ ++ - /usr/bin/ ++ - /usr/sbin/ ++ - /usr/local/bin/ ++ - /usr/local/sbin/ ++ recursive: 'true' ++ filemode: '0755' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/all_dirs_ok.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/all_dirs_ok.pass.sh +index 3f7239deef9..af078463b05 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/all_dirs_ok.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/all_dirs_ok.pass.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle ++# platform = multi_platform_sle,multi_platform_ubuntu + DIRS="/lib /lib64 /usr/lib /usr/lib64" + for dirPath in $DIRS; do + find "$dirPath" -perm /022 -type d -exec chmod go-w '{}' \; +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/owner_only_writable_dir.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/owner_only_writable_dir.pass.sh +index 1f68586853d..d58616bcafb 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/owner_only_writable_dir.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/owner_only_writable_dir.pass.sh +@@ -1,5 +1,6 @@ +-# platform = multi_platform_sle ++# platform = multi_platform_sle,multi_platform_ubuntu + DIRS="/lib /lib64 /usr/lib /usr/lib64" + for dirPath in $DIRS; do ++ chmod -R 755 "$dirPath" + mkdir -p "$dirPath/testme" && chmod 700 "$dirPath/testme" + done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_lib.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_lib.fail.sh +index b60a7269568..98d18cde3ea 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_lib.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_lib.fail.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle ++# platform = multi_platform_sle,multi_platform_ubuntu + DIRS="/lib /lib64" + for dirPath in $DIRS; do + mkdir -p "$dirPath/testme" && chmod 777 "$dirPath/testme" +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_usr_lib.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_usr_lib.fail.sh +index 5438b51bb6a..6df6e2f8f9b 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_usr_lib.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/tests/world_writable_dir_on_usr_lib.fail.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle ++# platform = multi_platform_sle,multi_platform_ubuntu + DIRS="/usr/lib /usr/lib64" + for dirPath in $DIRS; do + mkdir -p "$dirPath/testme" && chmod 777 "$dirPath/testme" +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_audit_binaries/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_audit_binaries/rule.yml +new file mode 100644 +index 00000000000..da42e997478 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_audit_binaries/rule.yml +@@ -0,0 +1,78 @@ ++documentation_complete: true ++ ++prodtype: ubuntu2004 ++ ++title: 'Verify that audit tools Have Mode 0755 or less' ++ ++description: |- ++ The {{{ full_name }}} operating system audit tools must have the proper ++ permissions configured to protected against unauthorized access. ++ ++ Verify it by running the following command: ++
    $ stat -c "%n %a" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/audispd /sbin/augenrules
    ++
    ++    /sbin/auditctl 755
    ++    /sbin/aureport 755
    ++    /sbin/ausearch 755
    ++    /sbin/autrace 755
    ++    /sbin/auditd 755
    ++    /sbin/audispd 755
    ++    /sbin/augenrules 755
    ++    
    ++ ++ Audit tools needed to successfully view and manipulate audit information ++ system activity and records. Audit tools include custom queries and report ++ generators ++ ++rationale: |- ++ 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 operation on audit information. ++ ++ Operating systems providing tools to interface with audit information ++ will leverage user permissions and roles identifying the user accessing the ++ tools and the corresponding rights the user enjoys to make access decisions ++ regarding the access to audit tools. ++ ++severity: medium ++ ++references: ++ disa: CCI-001493,CCI-001494 ++ srg: SRG-OS-000256-GPOS-00097,SRG-OS-000257-GPOS-00098 ++ stigid@ubuntu2004: UBTU-20-010199 ++ ++ocil: |- ++ Verify it by running the following command: ++
    $ stat -c "%n %a" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/audispd /sbin/augenrules
    ++
    ++    /sbin/auditctl 755
    ++    /sbin/aureport 755
    ++    /sbin/ausearch 755
    ++    /sbin/autrace 755
    ++    /sbin/auditd 755
    ++    /sbin/audispd 755
    ++    /sbin/augenrules 755
    ++    
    ++ ++ If the command does not return all the above lines, the missing ones ++ need to be added. ++ ++ Run the following command to correct the permissions of the missing ++ entries: ++
    $ sudo chmod 0755 [audit_tool] 
    ++ ++ Replace "[audit_tool]" with the audit tool that does not have the ++ correct permissions. ++ ++template: ++ name: file_permissions ++ vars: ++ filepath: ++ - /sbin/auditctl ++ - /sbin/aureport ++ - /sbin/ausearch ++ - /sbin/autrace ++ - /sbin/auditd ++ - /sbin/audispd ++ - /sbin/augenrules ++ filemode: '0755' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/bash/shared.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/bash/shared.sh +index de2e1e98dfa..ab89b277a52 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/bash/shared.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/bash/shared.sh +@@ -1,4 +1,4 @@ +-# platform = Red Hat Virtualization 4,multi_platform_rhel,multi_platform_ol,multi_platform_sle ++# platform = Red Hat Virtualization 4,multi_platform_rhel,multi_platform_ol,multi_platform_sle,multi_platform_ubuntu + DIRS="/bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin /usr/libexec" + for dirPath in $DIRS; do + find "$dirPath" -perm /022 -exec chmod go-w '{}' \; +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/tests/correct_permissions.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/tests/correct_permissions.pass.sh +new file mode 100644 +index 00000000000..59b8838581c +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/tests/correct_permissions.pass.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++ ++DIRS="/bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin /usr/libexec" ++for dirPath in $DIRS; do ++ find "$dirPath" -perm /022 -type f -exec chmod 0755 '{}' \; ++done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/tests/incorrect_permissions.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/tests/incorrect_permissions.fail.sh +new file mode 100644 +index 00000000000..9d9ce30064b +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_binary_dirs/tests/incorrect_permissions.fail.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++ ++DIRS="/bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin /usr/libexec" ++for dirPath in $DIRS; do ++ find "$dirPath" -type f -exec chmod 0777 '{}' \; ++done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/correct_permissions.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/correct_permissions.pass.sh +new file mode 100644 +index 00000000000..de388e63325 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/correct_permissions.pass.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++ ++DIRS="/lib /lib64 /usr/lib /usr/lib64" ++for dirPath in $DIRS; do ++ chmod -R 755 "$dirPath" ++done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/incorrect_permissions.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/incorrect_permissions.fail.sh +new file mode 100644 +index 00000000000..913e75e7b17 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/incorrect_permissions.fail.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++ ++DIRS="/lib /lib64 /usr/lib /usr/lib64" ++for dirPath in $DIRS; do ++ find "$dirPath" -type d -exec chmod go-w '{}' \; ++ find "$dirPath" -type f -exec chmod go+w '{}' \; ++done +diff --git a/shared/templates/file_permissions/oval.template b/shared/templates/file_permissions/oval.template +index 89083e812c1..6b3616a7f42 100644 +--- a/shared/templates/file_permissions/oval.template ++++ b/shared/templates/file_permissions/oval.template +@@ -67,6 +67,11 @@ + #}} + state_file_permissions{{{ FILEID }}}_{{{ loop.index0 }}}_mode_not_{{{ FILEMODE }}} + {{%- endif %}} ++ exclude_symlinks_{{{ FILEID }}} + + {{% endfor %}} ++ ++ ++ symbolic link ++ + diff --git a/SOURCES/scap-security-guide-0.1.61-fix-ansible-service-disabled-task-PR_8226.patch b/SOURCES/scap-security-guide-0.1.61-fix-ansible-service-disabled-task-PR_8226.patch new file mode 100644 index 0000000..7103ed1 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-fix-ansible-service-disabled-task-PR_8226.patch @@ -0,0 +1,44 @@ +From 1c054ed40a4dbc2a48ffe7720d018c317cad8105 Mon Sep 17 00:00:00 2001 +From: Watson Sato +Date: Tue, 15 Feb 2022 14:12:55 +0100 +Subject: [PATCH] Simply mask services that should be disabled + +At some point Ansible started to return much more services in +ansible_facts.services, including services that are not installed. +This caused the task to think that the service exists, attempt to stop +and mask the service. +But systemd module fatal errors on non existing services, although the +module ends up masking the service in question. + +The bash remediations simply mask the service, even if it is not +installed. +Let's do the same with Ansible, mask the service and ignore errors. + +One down side is that every non-existing service is reported as an +error, which is ignored. But still a fatal error. +--- + shared/templates/service_disabled/ansible.template | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/shared/templates/service_disabled/ansible.template b/shared/templates/service_disabled/ansible.template +index 550ed563056..254f41ac7fd 100644 +--- a/shared/templates/service_disabled/ansible.template ++++ b/shared/templates/service_disabled/ansible.template +@@ -6,16 +6,13 @@ + {{%- if init_system == "systemd" %}} + - name: Disable service {{{ SERVICENAME }}} + block: +- - name: Gather the service facts +- service_facts: +- + - name: Disable service {{{ SERVICENAME }}} + systemd: + name: "{{{ DAEMONNAME }}}.service" + enabled: "no" + state: "stopped" + masked: "yes" +- when: '"{{{ DAEMONNAME }}}.service" in ansible_facts.services' ++ ignore_errors: 'yes' + + - name: "Unit Socket Exists - {{{ DAEMONNAME }}}.socket" + command: systemctl list-unit-files {{{ DAEMONNAME }}}.socket diff --git a/SOURCES/scap-security-guide-0.1.61-grub2_rule_desc_update-PR_8184.patch b/SOURCES/scap-security-guide-0.1.61-grub2_rule_desc_update-PR_8184.patch new file mode 100644 index 0000000..dd65877 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-grub2_rule_desc_update-PR_8184.patch @@ -0,0 +1,854 @@ +From 51a826878ade2ebb564405991937ba0e2b2b7717 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Wed, 2 Feb 2022 14:25:30 +0100 +Subject: [PATCH 1/8] create two macros + +one provides description for grub2_argument templated rules +the second provides ocil for those cases +--- + shared/macros.jinja | 56 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 56 insertions(+) + +diff --git a/shared/macros.jinja b/shared/macros.jinja +index 00358e2f67c..3d41c998b0c 100644 +--- a/shared/macros.jinja ++++ b/shared/macros.jinja +@@ -1620,3 +1620,59 @@ The audit daemon must be restarted for the changes to take effect. + - no_ovirt + {{%- endif %}} + {{% endmacro %}} ++ ++{{# ++ Describe how to configure Grub2 to add an argument to the default kernel command line. ++ The parameter should be in form `parameter=value`. ++#}} ++{{%- macro describe_grub2_argument(arg_name_value) -%}} ++{{%- if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product -%}} ++To ensure that {{{ arg_name_value }}} is added as a kernel command line ++argument to newly installed kernels, ad {{{ arg_name_value }}} to the ++default Grub2 command line for Linux operating systems. Modify the line within ++/etc/default/grub as shown below: ++
    GRUB_CMDLINE_LINUX="... {{{ arg_name_value }}} ..."
    ++Run the following command to update command line for already installed kernels: ++{{%- if 'ubuntu' in product -%}} ++
    # update-grub
    ++{{%- else -%}} ++
    # grubby --update-kernel=ALL --args="{{{ arg_name_value }}}"
    ++{{%- endif -%}} ++{{%- else -%}} ++Configure the default Grub2 kernel command line to contain {{{ arg_name_value }}} as follows: ++
    # grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) {{{ arg_name_value }}}"
    ++{{%- endif -%}} ++{{%- endmacro -%}} ++ ++{{# ++ Provide OCIL for checking if an argument for kernel command line is configured with Grub2. ++ The parameter should have form `parameter=value`. ++#}} ++{{%- macro ocil_grub2_argument(arg_name_value) -%}} ++{{%- if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product -%}} ++Inspect the form of default GRUB 2 command line for the Linux operating system ++in /etc/default/grub. If it includes {{{ arg_name_value }}}, ++then auditinng will be enabled for newly installed kernels. ++First check if the GRUB recovery is enabled: ++
    $ grep 'GRUB_DISABLE_RECOVERY' /etc/default/grub
    ++If this option is set to true, then check that a line is output by the following command: ++
    $ grep 'GRUB_CMDLINE_LINUX_DEFAULT.*{{{ arg_name_value }}}.*' /etc/default/grub
    ++If the recovery is disabled, check the line with ++
    $ grep 'GRUB_CMDLINE_LINUX.*{{{ arg_name_value }}}.*' /etc/default/grub
    . ++{{%- if 'ubuntu' in product -%}} ++Moreover, current Grub2 config file in /etc/grub2/grub.cfg must be checked. ++
    # grep vmlinuz {{{ grub2_boot_path }}}/grub.cfg | grep -v '{{{ arg_name_value }}}'
    ++This command should not return any output. ++{{%- else -%}} ++Moreover, command line parameters for currently installed kernels should be checked as well. ++Run the following command: ++
    # grubby --info=ALL | grep args | grep -v '{{{ arg_name_value }}}'
    ++The command should not return any output. ++{{%- endif -%}} ++{{%- else -%}} ++Inspect the form of default GRUB 2 command line for the Linux operating system ++in {{{ grub2_boot_path }}}/grubenv. If they include {{{ arg_name_value }}}, then auditing ++is enabled at boot time. ++
    # grep 'kernelopts.*{{{ arg_name_value }}}.*' {{{ grub2_boot_path }}}/grubenv
    ++{{%- endif -%}} ++{{%- endmacro -%}} + +From c8cb579db19bd55eebcb0bdc4b1432368a5c1b77 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Wed, 2 Feb 2022 14:26:26 +0100 +Subject: [PATCH 2/8] use new macros in grub2_audit_argument + +--- + .../auditing/grub2_audit_argument/rule.yml | 45 ++----------------- + 1 file changed, 3 insertions(+), 42 deletions(-) + +diff --git a/linux_os/guide/system/auditing/grub2_audit_argument/rule.yml b/linux_os/guide/system/auditing/grub2_audit_argument/rule.yml +index 96dbe67699e..aff0521ee73 100644 +--- a/linux_os/guide/system/auditing/grub2_audit_argument/rule.yml ++++ b/linux_os/guide/system/auditing/grub2_audit_argument/rule.yml +@@ -7,15 +7,8 @@ title: 'Enable Auditing for Processes Which Start Prior to the Audit Daemon' + description: |- + To ensure all processes can be audited, even those which start + prior to the audit daemon, add the argument audit=1 to the default +- GRUB 2 command line for the Linux operating system in +-{{% if product in ["rhel7", "ol7"] %}} +- /etc/default/grub, so that the line looks similar to +-
    GRUB_CMDLINE_LINUX="... audit=1 ..."
    +- In case the GRUB_DISABLE_RECOVERY is set to true, then the parameter should be added to the GRUB_CMDLINE_LINUX_DEFAULT instead. +-{{% else %}} +- {{{ grub2_boot_path }}}/grubenv, in the manner below: +-
    # grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) audit=1"
    +-{{% endif %}} ++ GRUB 2 command line for the Linux operating system. ++ {{{ describe_grub2_argument("audit=1") | indent(4) }}} + + rationale: |- + Each process on the system carries an "auditable" flag which indicates whether +@@ -59,39 +52,7 @@ references: + ocil_clause: 'auditing is not enabled at boot time' + + ocil: |- +-{{% if product in ["rhel7", "ol7", "sle12","sle15"] %}} +- Inspect the form of default GRUB 2 command line for the Linux operating system +- in /etc/default/grub. If it includes audit=1, then auditing +- is enabled at boot time. +- First check if the GRUB recovery is enabled: +-
    $ grep 'GRUB_DISABLE_RECOVERY' /etc/default/grub
    +- If this option is set to true, then check that a line is output by the following command: +-
    $ grep 'GRUB_CMDLINE_LINUX_DEFAULT.*audit=1.*' /etc/default/grub
    +- If the recovery is disabled, check the line with +-
    $ grep 'GRUB_CMDLINE_LINUX.*audit=1.*' /etc/default/grub
    . +- Moreover, current Grub2 config file in /etc/grub2/grub.cfg must be checked. +-
    # grep vmlinuz {{{ grub2_boot_path }}}/grub.cfg | grep -v 'audit=1'
    +- This command should not return any output. If it does, update the configuration with +-
    # grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    +-

    +- Alternatively, to ensure audit=1 is configured on all installed kernels, the +- following command may be used: +-
    +-
    $ sudo /sbin/grubby --update-kernel=ALL --args="audit=1"
    +-
    +-{{% else %}} +- Inspect the form of default GRUB 2 command line for the Linux operating system +- in {{{ grub2_boot_path }}}/grubenv. If they include audit=1, then auditing +- is enabled at boot time. +-
    # grep 'kernelopts.*audit=1.*' {{{ grub2_boot_path }}}/grubenv
    +-

    +- To ensure audit=1 is configured on all installed kernels, the +- following command may be used: +-
    +-
    # grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) audit=1"
    +-
    +-{{% endif %}} +- ++ {{{ ocil_grub2_argument("audit=1") | indent(4) }}} + + warnings: + - management: |- + +From 3ff2c245408d3fe892222eee8171e2f84868f705 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Thu, 3 Feb 2022 14:25:34 +0100 +Subject: [PATCH 3/8] fix omission in ocil jinja macro + +--- + shared/macros.jinja | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/shared/macros.jinja b/shared/macros.jinja +index 3d41c998b0c..16a0404b668 100644 +--- a/shared/macros.jinja ++++ b/shared/macros.jinja +@@ -1652,7 +1652,7 @@ Configure the default Grub2 kernel command line to contain {{{ arg_name_value }} + {{%- if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product -%}} + Inspect the form of default GRUB 2 command line for the Linux operating system + in /etc/default/grub. If it includes {{{ arg_name_value }}}, +-then auditinng will be enabled for newly installed kernels. ++then the parameter will be configured for newly installed kernels. + First check if the GRUB recovery is enabled: +
    $ grep 'GRUB_DISABLE_RECOVERY' /etc/default/grub
    + If this option is set to true, then check that a line is output by the following command: +@@ -1671,8 +1671,8 @@ The command should not return any output. + {{%- endif -%}} + {{%- else -%}} + Inspect the form of default GRUB 2 command line for the Linux operating system +-in {{{ grub2_boot_path }}}/grubenv. If they include {{{ arg_name_value }}}, then auditing +-is enabled at boot time. ++in {{{ grub2_boot_path }}}/grubenv. If they include {{{ arg_name_value }}}, then the parameter ++is configured at boot time. +
    # grep 'kernelopts.*{{{ arg_name_value }}}.*' {{{ grub2_boot_path }}}/grubenv
    + {{%- endif -%}} + {{%- endmacro -%}} + +From 976da69681d03d9b9380fc57216c30c7b4891f50 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Thu, 3 Feb 2022 14:26:33 +0100 +Subject: [PATCH 4/8] use new jinja macros in all grub2 related rules + +--- + .../rule.yml | 15 ++----- + .../grub2_enable_iommu_force/rule.yml | 9 +++- + .../grub2_init_on_alloc_argument/rule.yml | 18 ++------ + .../grub2_kernel_trust_cpu_rng/rule.yml | 11 ++--- + .../grub2_pti_argument/rule.yml | 15 ++----- + .../grub2_vsyscall_argument/rule.yml | 15 ++----- + .../grub2_ipv6_disable_argument/rule.yml | 45 ++----------------- + .../grub2_page_poison_argument/rule.yml | 15 ++----- + .../grub2_slub_debug_argument/rule.yml | 15 ++----- + 9 files changed, 33 insertions(+), 125 deletions(-) + +diff --git a/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml b/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml +index f94ddab2fe1..868d525014f 100644 +--- a/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml ++++ b/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml +@@ -7,9 +7,8 @@ title: 'Extend Audit Backlog Limit for the Audit Daemon' + description: |- + To improve the kernel capacity to queue all log events, even those which occurred + prior to the audit daemon, add the argument audit_backlog_limit=8192 to the default +- GRUB 2 command line for the Linux operating system in +- /etc/default/grub, in the manner below: +-
    GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=VolGroup/LogVol06 rd.lvm.lv=VolGroup/lv_swap rhgb quiet rd.shell=0 audit=1 audit_backlog_limit=8192"
    ++ GRUB 2 command line for the Linux operating system. ++ {{{ describe_grub2_argument("audit_backlog_limit=8192") | indent(4) }}} + + rationale: |- + audit_backlog_limit sets the queue length for audit events awaiting transfer +@@ -40,15 +39,7 @@ references: + ocil_clause: 'audit backlog limit is not configured' + + ocil: |- +- Inspect the form of default GRUB 2 command line for the Linux operating system +- in /etc/default/grub. If they include audit=1, then auditing +- is enabled at boot time. +-

    +- To ensure audit_backlog_limit=8192 is configured on all installed kernels, the +- following command may be used: +-
    +-
    $ sudo /sbin/grubby --update-kernel=ALL --args="audit_backlog_limit=8192"
    +-
    ++ {{{ ocil_grub2_argument("audit_backlog_limit=8192") | indent(4) }}} + + warnings: + - management: |- +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_enable_iommu_force/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_enable_iommu_force/rule.yml +index 0a0d76aeb23..1ff5a4d5f26 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_enable_iommu_force/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_enable_iommu_force/rule.yml +@@ -5,9 +5,10 @@ title: 'IOMMU configuration directive' + description: |- + On x86 architecture supporting VT-d, the IOMMU manages the access control policy between the hardware devices and some + of the system critical units such as the memory. ++ {{{ describe_grub2_argument("iommu=force") | indent(4) }}} + + rationale: |- +- On x86 architectures, activating the I/OMMU prevents the system from arbritrary accesses potentially made by ++ On x86 architectures, activating the I/OMMU prevents the system from arbitrary accesses potentially made by + hardware devices. + + severity: unknown +@@ -22,6 +23,12 @@ references: + + platform: machine + ++ocil_clause: 'I/OMMU is not activated' ++ ++ocil: |- ++ {{{ ocil_grub2_argument("iommu=force") | indent(4) }}} ++ ++ + warnings: + - functionality: + Depending on the hardware, devices and operating system used, enabling IOMMU can cause hardware instabilities. +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml +index a9253c74cc6..3bb645dadb7 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml +@@ -6,12 +6,8 @@ title: 'Configure kernel to zero out memory before allocation' + + description: |- + To configure the kernel to zero out memory before allocating it, add the +- init_on_alloc=1 argument to the default GRUB 2 command line for +- the Linux operating system in /etc/default/grub, in the manner +- below: +-
    GRUB_CMDLINE_LINUX="crashkernel=auto quiet rd.shell=0 audit=1 audit_backlog_limit=8192 init_on_alloc=1"
    +- Update the boot parameter for existing kernels by running the following command: +-
    # grubby --update-kernel=ALL --args="init_on_alloc=1"
    ++ init_on_alloc=1 argument to the default GRUB 2 command line. ++ {{{ describe_grub2_argument("init_on_alloc=1") | indent(4) }}} + + rationale: |- + When the kernel configuration option init_on_alloc is enabled, +@@ -27,15 +23,7 @@ identifiers: + ocil_clause: 'the kernel is not configured to zero out memory before allocation' + + ocil: |- +- Make sure that the kernel is configured to zero out memory before +- allocation. Ensure that the parameter is configured in +- /etc/default/grub: +-
    grep GRUB_CMDLINE_LINUX /etc/default/grub
    +- The output should contain init_on_alloc=1. +- Run the following command to display command line parameters of all +- installed kernels: +-
    # grubby --info=ALL | grep args
    +- Ensure that each line contains the init_on_alloc=1 parameter. ++ {{{ ocil_grub2_argument("init_on_alloc=1") | indent(4) }}} + + platform: machine + +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_kernel_trust_cpu_rng/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_kernel_trust_cpu_rng/rule.yml +index 308ae9cb735..d6bfc02f345 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_kernel_trust_cpu_rng/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_kernel_trust_cpu_rng/rule.yml +@@ -11,8 +11,8 @@ description: |- + Y, make sure that it is not overridden with the boot parameter. + There must not exist the boot parameter random.trust_cpu=off. If + the option is not compiled in, make sure that random.trust_cpu=on +- is configured as a boot parameter by running the following command: +-
    sudo grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) random.trust_cpu=on"
    ++ is configured as a boot parameter. ++ {{{ describe_grub2_argument("random.trust_cpu=on") | indent(4) }}} + + rationale: |- + The Linux kernel offers an option which signifies if the kernel should trust +@@ -44,11 +44,8 @@ ocil: |- + option is not overridden through a boot parameter: +
    sudo grep 'kernelopts.*random\.trust_cpu=off.*' {{{ grub2_boot_path }}}/grubenv
    + The command should not return any output. If the option is not compiled into +- the kernel, check that the option is configured through boot parameter with +- the following command: +-
    sudo grep 'kernelopts.*random\.trust_cpu=on.*' {{{ grub2_boot_path }}}/grubenv
    +- If the command does not return any output, then the boot parameter is +- missing. ++ the kernel, check that the option is configured through boot parameter. ++ {{{ ocil_grub2_argument("random.trust_cpu=on") | indent(4) }}} + + platform: machine + +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_pti_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_pti_argument/rule.yml +index f4f3fa39510..51b0a284746 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_pti_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_pti_argument/rule.yml +@@ -7,9 +7,8 @@ title: 'Enable Kernel Page-Table Isolation (KPTI)' + description: |- + To enable Kernel page-table isolation, + add the argument pti=on to the default +- GRUB 2 command line for the Linux operating system in +- /etc/default/grub, in the manner below: +-
    GRUB_CMDLINE_LINUX="pti=on"
    ++ GRUB 2 command line for the Linux operating system. ++ {{{ describe_grub2_argument("pti=on") | indent(4) }}} + + rationale: |- + Kernel page-table isolation is a kernel feature that mitigates +@@ -33,15 +32,7 @@ references: + ocil_clause: 'Kernel page-table isolation is not enabled' + + ocil: |- +- Inspect the form of default GRUB 2 command line for the Linux operating system +- in /etc/default/grub. If they include pti=on, +- then Kernel page-table isolation is enabled at boot time. +-

    +- To ensure pti=on is configured on all installed kernels, the +- following command may be used: +-
    +-
    $ sudo /sbin/grubby --update-kernel=ALL --args="pti=on
    +-
    ++ {{{ ocil_grub2_argument("pti=on") | indent(4) }}} + + warnings: + - management: |- +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml +index 9f38a1c13b9..1b88d13bd3c 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml +@@ -7,9 +7,8 @@ title: 'Disable vsyscalls' + description: |- + To disable use of virtual syscalls, + add the argument vsyscall=none to the default +- GRUB 2 command line for the Linux operating system in +- /etc/default/grub, in the manner below: +-
    GRUB_CMDLINE_LINUX="vsyscall=none"
    ++ GRUB 2 command line for the Linux operating system. ++ {{{ describe_grub2_argument("vsyscall=none") | indent(4) }}} + + rationale: |- + Virtual Syscalls provide an opportunity of attack for a user who has control +@@ -33,15 +32,7 @@ references: + ocil_clause: 'vsyscalls are enabled' + + ocil: |- +- Inspect the form of default GRUB 2 command line for the Linux operating system +- in /etc/default/grub. If they include vsyscall=none, +- then virtyal syscalls are not enabled at boot time. +-

    +- To ensure vsyscall=none is configured on all installed kernels, the +- following command may be used: +-
    +-
    $ sudo /sbin/grubby --update-kernel=ALL --args="vsyscall=none
    +-
    ++ {{{ ocil_grub2_argument("vsyscall=none") | indent(4) }}} + + warnings: + - management: |- +diff --git a/linux_os/guide/system/network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument/rule.yml b/linux_os/guide/system/network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument/rule.yml +index b8ff66c7d6e..c0fda343a1a 100644 +--- a/linux_os/guide/system/network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument/rule.yml ++++ b/linux_os/guide/system/network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument/rule.yml +@@ -7,20 +7,8 @@ title: 'Ensure IPv6 is disabled through kernel boot parameter' + description: |- + To disable IPv6 protocol support in the Linux kernel, + add the argument ipv6.disable=1 to the default +- GRUB2 command line for the Linux operating system in +-{{% if product in ["rhel7", "ol7"] %}} +- /etc/default/grub, so that the line looks similar to +-
    GRUB_CMDLINE_LINUX="... ipv6.disable=1 ..."
    +- In case the GRUB_DISABLE_RECOVERY is set to true, then the parameter should be added to the GRUB_CMDLINE_LINUX_DEFAULT instead. +- Run one of following command to ensure that the configuration is applied when booting currently installed kernels: +-
    sudo grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    +- or +-
    sudo /sbin/grubby --update-kernel=ALL --args="ipv6.disable=1"
    +-{{% else %}} +- {{{ grub2_boot_path }}}/grubenv, in the manner below: +-
    sudo  grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) ipv6.disable=1"
    +-{{% endif %}} +- ++ GRUB2 command line for the Linux operating system. ++ {{{ describe_grub2_argument("ipv6.disable=1") | indent(4) }}} + + rationale: |- + Any unnecessary network stacks, including IPv6, should be disabled to reduce +@@ -40,34 +28,7 @@ references: + ocil_clause: 'IPv6 is not disabled' + + ocil: |- +- {{% if product in ["rhel7", "ol7"] %}} +- Inspect the form of default GRUB2 command line for the Linux operating system +- in /etc/default/grub. Check if it includes ipv6.disable=1. +- First check if the GRUB recovery is enabled: +-
    grep 'GRUB_DISABLE_RECOVERY' /etc/default/grub
    +- If this option is set to true, then check that the following line is output by the following command: +-
    grep 'GRUB_CMDLINE_LINUX_DEFAULT.*ipv6.disable=1.*' /etc/default/grub
    +- If the recovery is disabled, check the line with +-
    grep 'GRUB_CMDLINE_LINUX.*ipv6.disable=1.*' /etc/default/grub
    . +- Moreover, current GRUB2 config file in /etc/grub2/grub.cfg must be checked. +-
    sudo grep vmlinuz {{{ grub2_boot_path }}}/grub.cfg | grep -v 'ipv6.disable=1'
    +- This command should not return any output. If it does, update the configuration with one of following commands: +-
    sudo grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    +- or +-
    sudo /sbin/grubby --update-kernel=ALL --args="ipv6.disable=1"
    +-
    +-{{% else %}} +- Inspect the form of default GRUB2 command line for the Linux operating system +- in {{{ grub2_boot_path }}}/grubenv. Check if it includes ipv6.disable=1. +-
    sudo grep 'kernelopts.*ipv6.disable=1.*' {{{ grub2_boot_path }}}/grubenv
    +-

    +- To ensure ipv6.disable=1 is configured on all installed kernels, the +- following command may be used: +-
    +-
    sudo grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) ipv6.disable=1"
    +-
    +-{{% endif %}} +- ++ {{{ ocil_grub2_argument("ipv6.disable=1") | indent(4) }}} + + warnings: + - management: |- +diff --git a/linux_os/guide/system/permissions/restrictions/poisoning/grub2_page_poison_argument/rule.yml b/linux_os/guide/system/permissions/restrictions/poisoning/grub2_page_poison_argument/rule.yml +index 3bf592fb4d8..1f4e183d9e7 100644 +--- a/linux_os/guide/system/permissions/restrictions/poisoning/grub2_page_poison_argument/rule.yml ++++ b/linux_os/guide/system/permissions/restrictions/poisoning/grub2_page_poison_argument/rule.yml +@@ -7,9 +7,8 @@ title: 'Enable page allocator poisoning' + description: |- + To enable poisoning of free pages, + add the argument page_poison=1 to the default +- GRUB 2 command line for the Linux operating system in +- /etc/default/grub, in the manner below: +-
    GRUB_CMDLINE_LINUX="page_poison=1"
    ++ GRUB 2 command line for the Linux operating system. ++ {{{ describe_grub2_argument("page_poison=1") | indent(4) }}} + + rationale: |- + Poisoning writes an arbitrary value to freed pages, so any modification or +@@ -35,15 +34,7 @@ references: + ocil_clause: 'page allocator poisoning is not enabled' + + ocil: |- +- Inspect the form of default GRUB 2 command line for the Linux operating system +- in /etc/default/grub. If they include page_poison=1, +- then page poisoning is enabled at boot time. +-

    +- To ensure page_poison=1 is configured on all installed kernels, the +- following command may be used: +-
    +-
    $ sudo /sbin/grubby --update-kernel=ALL --args="page_poison=1
    +-
    ++ {{{ ocil_grub2_argument("page_poison=1") | indent(4) }}} + + warnings: + - management: |- +diff --git a/linux_os/guide/system/permissions/restrictions/poisoning/grub2_slub_debug_argument/rule.yml b/linux_os/guide/system/permissions/restrictions/poisoning/grub2_slub_debug_argument/rule.yml +index 9964399650a..bb5dbc6c125 100644 +--- a/linux_os/guide/system/permissions/restrictions/poisoning/grub2_slub_debug_argument/rule.yml ++++ b/linux_os/guide/system/permissions/restrictions/poisoning/grub2_slub_debug_argument/rule.yml +@@ -7,9 +7,8 @@ title: 'Enable SLUB/SLAB allocator poisoning' + description: |- + To enable poisoning of SLUB/SLAB objects, + add the argument slub_debug=P to the default +- GRUB 2 command line for the Linux operating system in +- /etc/default/grub, in the manner below: +-
    GRUB_CMDLINE_LINUX="slub_debug=P"
    ++ GRUB 2 command line for the Linux operating system. ++ {{{ describe_grub2_argument("slub_debug=P") | indent(4) }}} + + rationale: |- + Poisoning writes an arbitrary value to freed objects, so any modification or +@@ -35,15 +34,7 @@ references: + ocil_clause: 'SLUB/SLAB poisoning is not enabled' + + ocil: |- +- Inspect the form of default GRUB 2 command line for the Linux operating system +- in /etc/default/grub. If they include slub_debug=P, +- then SLUB/SLAB poisoning is enabled at boot time. +-

    +- To ensure slub_debug=P is configured on all installed kernels, the +- following command may be used: +-
    +-
    $ sudo /sbin/grubby --update-kernel=ALL --args="slub_debug=P
    +-
    ++ {{{ ocil_grub2_argument("slub_debug=P") | indent(4) }}} + + warnings: + - management: |- + +From 5c39cf81d49f0eb5bb73337057fb95356784e5c6 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Wed, 9 Feb 2022 16:05:59 +0100 +Subject: [PATCH 5/8] fix an error in ubuntu version of macro + +--- + shared/macros.jinja | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/shared/macros.jinja b/shared/macros.jinja +index 16a0404b668..54d2b299a47 100644 +--- a/shared/macros.jinja ++++ b/shared/macros.jinja +@@ -1660,7 +1660,7 @@ If this option is set to true, then check that a line is output by the following + If the recovery is disabled, check the line with +
    $ grep 'GRUB_CMDLINE_LINUX.*{{{ arg_name_value }}}.*' /etc/default/grub
    . + {{%- if 'ubuntu' in product -%}} +-Moreover, current Grub2 config file in /etc/grub2/grub.cfg must be checked. ++Moreover, current Grub2 config file in {{{ grub2_boot_path }}}/grub.cfg must be checked. +
    # grep vmlinuz {{{ grub2_boot_path }}}/grub.cfg | grep -v '{{{ arg_name_value }}}'
    + This command should not return any output. + {{%- else -%}} + +From f100d190833d168127715215e788347f806736f3 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Wed, 9 Feb 2022 16:16:21 +0100 +Subject: [PATCH 6/8] remove warnings from rules + +they are no longer relevant, we do not use grub2-mkconfig anymore +--- + .../auditing/grub2_audit_argument/rule.yml | 18 ------------------ + .../rule.yml | 18 ------------------ + .../grub2_pti_argument/rule.yml | 18 ------------------ + .../grub2_vsyscall_argument/rule.yml | 18 ------------------ + .../grub2_ipv6_disable_argument/rule.yml | 18 ------------------ + .../grub2_page_poison_argument/rule.yml | 18 ------------------ + .../grub2_slub_debug_argument/rule.yml | 18 ------------------ + 7 files changed, 126 deletions(-) + +diff --git a/linux_os/guide/system/auditing/grub2_audit_argument/rule.yml b/linux_os/guide/system/auditing/grub2_audit_argument/rule.yml +index aff0521ee73..00a4ded2738 100644 +--- a/linux_os/guide/system/auditing/grub2_audit_argument/rule.yml ++++ b/linux_os/guide/system/auditing/grub2_audit_argument/rule.yml +@@ -54,24 +54,6 @@ ocil_clause: 'auditing is not enabled at boot time' + ocil: |- + {{{ ocil_grub2_argument("audit=1") | indent(4) }}} + +-warnings: +- - management: |- +- The GRUB 2 configuration file, grub.cfg, +- is automatically updated each time a new kernel is installed. Note that any +- changes to /etc/default/grub require rebuilding the grub.cfg +- file. To update the GRUB 2 configuration file manually, use the +-
    grub2-mkconfig -o
    command as follows: +-
      +-
    • On BIOS-based machines, issue the following command as root: +-
      ~]# grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    • +-
    • On UEFI-based machines, issue the following command as root: +-{{% if product in ["rhel7", "ol7", "rhel8", "ol8"] %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    • +-{{% else %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
      +-{{% endif %}} +-
    +- + platform: grub2 + + template: +diff --git a/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml b/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml +index 868d525014f..efbc3dae1c1 100644 +--- a/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml ++++ b/linux_os/guide/system/auditing/grub2_audit_backlog_limit_argument/rule.yml +@@ -41,24 +41,6 @@ ocil_clause: 'audit backlog limit is not configured' + ocil: |- + {{{ ocil_grub2_argument("audit_backlog_limit=8192") | indent(4) }}} + +-warnings: +- - management: |- +- The GRUB 2 configuration file, grub.cfg, +- is automatically updated each time a new kernel is installed. Note that any +- changes to /etc/default/grub require rebuilding the grub.cfg +- file. To update the GRUB 2 configuration file manually, use the +-
    grub2-mkconfig -o
    command as follows: +-
      +-
    • On BIOS-based machines, issue the following command as root: +-
      ~]# grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    • +-
    • On UEFI-based machines, issue the following command as root: +-{{% if product in ["rhel7", "rhel8", "ol7", "ol8"] %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    • +-{{% else %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
      +-{{% endif %}} +-
    +- + platform: grub2 + + template: +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_pti_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_pti_argument/rule.yml +index 51b0a284746..52a308e3247 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_pti_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_pti_argument/rule.yml +@@ -34,24 +34,6 @@ ocil_clause: 'Kernel page-table isolation is not enabled' + ocil: |- + {{{ ocil_grub2_argument("pti=on") | indent(4) }}} + +-warnings: +- - management: |- +- The GRUB 2 configuration file, grub.cfg, +- is automatically updated each time a new kernel is installed. Note that any +- changes to /etc/default/grub require rebuilding the grub.cfg +- file. To update the GRUB 2 configuration file manually, use the +-
    grub2-mkconfig -o
    command as follows: +-
      +-
    • On BIOS-based machines, issue the following command as root: +-
      ~]# grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    • +-
    • On UEFI-based machines, issue the following command as root: +-{{% if product in ["rhel8", "ol8"] %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    • +-{{% else %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
      +-{{% endif %}} +-
    +- + platform: machine + + template: +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml +index 1b88d13bd3c..93eb31dad7b 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml +@@ -34,24 +34,6 @@ ocil_clause: 'vsyscalls are enabled' + ocil: |- + {{{ ocil_grub2_argument("vsyscall=none") | indent(4) }}} + +-warnings: +- - management: |- +- The GRUB 2 configuration file, grub.cfg, +- is automatically updated each time a new kernel is installed. Note that any +- changes to /etc/default/grub require rebuilding the grub.cfg +- file. To update the GRUB 2 configuration file manually, use the +-
    grub2-mkconfig -o
    command as follows: +-
      +-
    • On BIOS-based machines, issue the following command as root: +-
      ~]# grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    • +-
    • On UEFI-based machines, issue the following command as root: +-{{% if product in ["rhel7", "rhel8", "ol7", "ol8"] %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    • +-{{% else %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
      +-{{% endif %}} +-
    +- + platform: machine + + template: +diff --git a/linux_os/guide/system/network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument/rule.yml b/linux_os/guide/system/network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument/rule.yml +index c0fda343a1a..9e1ca48efe0 100644 +--- a/linux_os/guide/system/network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument/rule.yml ++++ b/linux_os/guide/system/network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument/rule.yml +@@ -30,24 +30,6 @@ ocil_clause: 'IPv6 is not disabled' + ocil: |- + {{{ ocil_grub2_argument("ipv6.disable=1") | indent(4) }}} + +-warnings: +- - management: |- +- The GRUB 2 configuration file, grub.cfg, +- is automatically updated each time a new kernel is installed. Note that any +- changes to /etc/default/grub require rebuilding the grub.cfg +- file. To update the GRUB 2 configuration file manually, use the +-
    grub2-mkconfig -o
    command as follows: +-
      +-
    • On BIOS-based machines, issue the following command: +-
      sudo grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    • +-
    • On UEFI-based machines, issue the following command: +-{{% if product in ["rhel7", "ol7", "rhel8", "ol8"] %}} +-
      sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    • +-{{% else %}} +-
      sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
      +-{{% endif %}} +-
    +- + platform: grub2 + + template: +diff --git a/linux_os/guide/system/permissions/restrictions/poisoning/grub2_page_poison_argument/rule.yml b/linux_os/guide/system/permissions/restrictions/poisoning/grub2_page_poison_argument/rule.yml +index 1f4e183d9e7..1ad6c6b3c44 100644 +--- a/linux_os/guide/system/permissions/restrictions/poisoning/grub2_page_poison_argument/rule.yml ++++ b/linux_os/guide/system/permissions/restrictions/poisoning/grub2_page_poison_argument/rule.yml +@@ -36,24 +36,6 @@ ocil_clause: 'page allocator poisoning is not enabled' + ocil: |- + {{{ ocil_grub2_argument("page_poison=1") | indent(4) }}} + +-warnings: +- - management: |- +- The GRUB 2 configuration file, grub.cfg, +- is automatically updated each time a new kernel is installed. Note that any +- changes to /etc/default/grub require rebuilding the grub.cfg +- file. To update the GRUB 2 configuration file manually, use the +-
    grub2-mkconfig -o
    command as follows: +-
      +-
    • On BIOS-based machines, issue the following command as root: +-
      ~]# grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    • +-
    • On UEFI-based machines, issue the following command as root: +-{{% if product in ["rhel7", "rhel8", "ol7", "ol8"] %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    • +-{{% else %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
      +-{{% endif %}} +-
    +- + platform: grub2 + + template: +diff --git a/linux_os/guide/system/permissions/restrictions/poisoning/grub2_slub_debug_argument/rule.yml b/linux_os/guide/system/permissions/restrictions/poisoning/grub2_slub_debug_argument/rule.yml +index bb5dbc6c125..e40f5377c61 100644 +--- a/linux_os/guide/system/permissions/restrictions/poisoning/grub2_slub_debug_argument/rule.yml ++++ b/linux_os/guide/system/permissions/restrictions/poisoning/grub2_slub_debug_argument/rule.yml +@@ -36,24 +36,6 @@ ocil_clause: 'SLUB/SLAB poisoning is not enabled' + ocil: |- + {{{ ocil_grub2_argument("slub_debug=P") | indent(4) }}} + +-warnings: +- - management: |- +- The GRUB 2 configuration file, grub.cfg, +- is automatically updated each time a new kernel is installed. Note that any +- changes to /etc/default/grub require rebuilding the grub.cfg +- file. To update the GRUB 2 configuration file manually, use the +-
    grub2-mkconfig -o
    command as follows: +-
      +-
    • On BIOS-based machines, issue the following command as root: +-
      ~]# grub2-mkconfig -o {{{ grub2_boot_path }}}/grub.cfg
    • +-
    • On UEFI-based machines, issue the following command as root: +-{{% if product in ["rhel7", "rhel8", "ol7", "ol8"] %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    • +-{{% else %}} +-
      ~]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
      +-{{% endif %}} +-
    +- + platform: grub2 + + template: + +From bbc3cc093004efd0457ccb33722a4fb14b0b2fb8 Mon Sep 17 00:00:00 2001 +From: vojtapolasek +Date: Mon, 14 Feb 2022 14:29:15 +0100 +Subject: [PATCH 7/8] Update shared/macros.jinja +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Co-authored-by: Matěj Týč +--- + shared/macros.jinja | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/shared/macros.jinja b/shared/macros.jinja +index 54d2b299a47..392181e2b24 100644 +--- a/shared/macros.jinja ++++ b/shared/macros.jinja +@@ -1671,7 +1671,12 @@ The command should not return any output. + {{%- endif -%}} + {{%- else -%}} + Inspect the form of default GRUB 2 command line for the Linux operating system +-in {{{ grub2_boot_path }}}/grubenv. If they include {{{ arg_name_value }}}, then the parameter ++{{% if grub2_boot_path == grub2_uefi_boot_path or not grub2_uefi_boot_path -%}} ++in {{{ grub2_boot_path }}}/grubenv. ++{{%- else -%}} ++in grubenv that can be found either in {{{ grub2_boot_path }}} in case of legacy BIOS systems, or in {{{ grub2_uefi_boot_path }}} in case of UEFI systems. ++{{%- endif %}} ++If they include {{{ arg_name_value }}}, then the parameter + is configured at boot time. +
    # grep 'kernelopts.*{{{ arg_name_value }}}.*' {{{ grub2_boot_path }}}/grubenv
    + {{%- endif -%}} + +From 8121376668b43d21cf0f9700994bc011c3e313d7 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Mon, 14 Feb 2022 15:17:33 +0100 +Subject: [PATCH 8/8] more modifications to description and ocil + +final touches +--- + shared/macros.jinja | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/shared/macros.jinja b/shared/macros.jinja +index 392181e2b24..a89bac12f53 100644 +--- a/shared/macros.jinja ++++ b/shared/macros.jinja +@@ -1626,7 +1626,7 @@ The audit daemon must be restarted for the changes to take effect. + The parameter should be in form `parameter=value`. + #}} + {{%- macro describe_grub2_argument(arg_name_value) -%}} +-{{%- if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product -%}} ++{{%- if product in ["rhel7", "ol7", "rhel8", "ol8", "rhel9"] or 'ubuntu' in product -%}} + To ensure that {{{ arg_name_value }}} is added as a kernel command line + argument to newly installed kernels, ad {{{ arg_name_value }}} to the + default Grub2 command line for Linux operating systems. Modify the line within +@@ -1649,7 +1649,7 @@ Configure the default Grub2 kernel command line to contain {{{ arg_name_value }} + The parameter should have form `parameter=value`. + #}} + {{%- macro ocil_grub2_argument(arg_name_value) -%}} +-{{%- if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product -%}} ++{{%- if product in ["rhel7", "ol7", "rhel8", "ol8", "rhel9"] or 'ubuntu' in product -%}} + Inspect the form of default GRUB 2 command line for the Linux operating system + in /etc/default/grub. If it includes {{{ arg_name_value }}}, + then the parameter will be configured for newly installed kernels. +@@ -1660,8 +1660,12 @@ If this option is set to true, then check that a line is output by the following + If the recovery is disabled, check the line with +
    $ grep 'GRUB_CMDLINE_LINUX.*{{{ arg_name_value }}}.*' /etc/default/grub
    . + {{%- if 'ubuntu' in product -%}} +-Moreover, current Grub2 config file in {{{ grub2_boot_path }}}/grub.cfg must be checked. +-
    # grep vmlinuz {{{ grub2_boot_path }}}/grub.cfg | grep -v '{{{ arg_name_value }}}'
    ++Moreover, current Grub config file grub.cfg must be checked. The file can be found ++either in {{{ grub2_boot_path }}} in case of legacy BIOS systems, or in {{{ grub2_uefi_boot_path }}} in case of UEFI systems. ++If they include {{{ arg_name_value }}}, then the parameter ++is configured at boot time. ++
    # grep vmlinuz GRUB_CFG_FILE_PATH | grep -v '{{{ arg_name_value }}}'
    ++Fill in GRUB_CFG_FILE_PATH based on information above. + This command should not return any output. + {{%- else -%}} + Moreover, command line parameters for currently installed kernels should be checked as well. +@@ -1678,6 +1682,7 @@ in grubenv that can be found either in {{{ grub2_boot_path }}} + {{%- endif %}} + If they include {{{ arg_name_value }}}, then the parameter + is configured at boot time. +-
    # grep 'kernelopts.*{{{ arg_name_value }}}.*' {{{ grub2_boot_path }}}/grubenv
    ++
    # grep 'kernelopts.*{{{ arg_name_value }}}.*' GRUBENV_FILE_LOCATION
    ++Fill in GRUBENV_FILE_LOCATION based on information above. + {{%- endif -%}} + {{%- endmacro -%}} diff --git a/SOURCES/scap-security-guide-0.1.61-grub2_template_fix-PR_8180.patch b/SOURCES/scap-security-guide-0.1.61-grub2_template_fix-PR_8180.patch new file mode 100644 index 0000000..75a44a7 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-grub2_template_fix-PR_8180.patch @@ -0,0 +1,842 @@ +From 1bd88bbdc7ce8b6e2265f323cd3a777ef2240e6b Mon Sep 17 00:00:00 2001 +From: Matej Tyc +Date: Fri, 28 Jan 2022 17:11:56 +0100 +Subject: [PATCH 1/5] Change the grub2 bootloader argument template + +- Introduce the concept of product-specific bootloader config + properties that determine the check/remediation form. +- Expand the RHEL8 remediation with a check for update of + /etc/default/grub contents. +- Add a RHEL8 check that looks for kernelopts references in loader entries. +- Update tests. +--- + .../grub2_entries_reference_kernelopts.xml | 25 +++++ + .../ansible.template | 35 ++++++- + .../grub2_bootloader_argument/bash.template | 48 +++++++-- + .../grub2_bootloader_argument/oval.template | 97 +++++++++++++------ + .../arg_not_there_etcdefaultgrub.fail.sh | 2 +- + ....fail.sh => arg_not_there_grubenv.fail.sh} | 0 + 6 files changed, 164 insertions(+), 43 deletions(-) + create mode 100644 shared/checks/oval/grub2_entries_reference_kernelopts.xml + rename shared/templates/grub2_bootloader_argument/tests/{arg_not_there.fail.sh => arg_not_there_grubenv.fail.sh} (100%) + +diff --git a/shared/checks/oval/grub2_entries_reference_kernelopts.xml b/shared/checks/oval/grub2_entries_reference_kernelopts.xml +new file mode 100644 +index 00000000000..1aec9fe64d2 +--- /dev/null ++++ b/shared/checks/oval/grub2_entries_reference_kernelopts.xml +@@ -0,0 +1,25 @@ ++ ++ ++ {{{ oval_metadata( ++ "Ensure that grubenv-defined kernel options are referenced in individual boot loader entries", ++ title="Use $kernelopts in /boot/loader/entries/*.conf", ++ affected_platforms=["multi_platform_all"]) }}} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ /boot/loader/entries/ ++ ^.*\.conf$ ++ ^options .*\b\$kernelopts\b.*$ ++ 1 ++ ++ +diff --git a/shared/templates/grub2_bootloader_argument/ansible.template b/shared/templates/grub2_bootloader_argument/ansible.template +index 58d4fab69fa..de970879c8f 100644 +--- a/shared/templates/grub2_bootloader_argument/ansible.template ++++ b/shared/templates/grub2_bootloader_argument/ansible.template +@@ -4,7 +4,34 @@ + # complexity = medium + # disruption = low + +-{{% if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product %}} ++{{# ++ See the OVAL template for more comments. ++ Product-specific categorization should be synced across all template content types ++-#}} ++{{% set system_with_expanded_kernel_options_in_loader_entries = false -%}} ++{{% set system_with_referenced_kernel_options_in_loader_entries = false -%}} ++{{% set system_with_kernel_options_in_grubenv = false -%}} ++{{% set system_with_kernel_options_in_etc_default_grub = false -%}} ++{{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} ++ ++{{% if product in ["rhel9"] %}} ++{{% set system_with_expanded_kernel_options_in_loader_entries = true %}} ++{{% endif -%}} ++ ++{{% if product in ["rhel8"] %}} ++{{% set system_with_referenced_kernel_options_in_loader_entries = true %}} ++{{% set system_with_kernel_options_in_grubenv = true %}} ++{{% endif -%}} ++ ++{{% if product in ["rhel7", "ol7"] or 'ubuntu' in product %}} ++{{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} ++{{% endif -%}} ++ ++{{% if product in ["rhel7", "ol7", "rhel8", "ol8", "rhel9"] or 'ubuntu' in product %}} ++{{% set system_with_kernel_options_in_etc_default_grub = true %}} ++{{% endif -%}} ++ ++{{% if system_with_kernel_options_in_etc_default_grub -%}} + - name: Check {{{ ARG_NAME }}} argument exists + command: grep 'GRUB_CMDLINE_LINUX.*{{{ ARG_NAME }}}=' /etc/default/grub + failed_when: False +@@ -27,7 +54,9 @@ + - name: Update bootloader menu + command: /sbin/grubby --update-kernel=ALL --args="{{{ ARG_NAME_VALUE }}}" + +-{{% else %}} ++{{%- endif %}} ++ ++{{% if system_with_kernel_options_in_grubenv -%}} + + - name: Get current kernel parameters + ansible.builtin.shell: +@@ -50,4 +79,4 @@ + when: + - kernelopts.rc != 0 + +-{{% endif %}} ++{{%- endif %}} +diff --git a/shared/templates/grub2_bootloader_argument/bash.template b/shared/templates/grub2_bootloader_argument/bash.template +index 631e686897e..817fd1fde23 100644 +--- a/shared/templates/grub2_bootloader_argument/bash.template ++++ b/shared/templates/grub2_bootloader_argument/bash.template +@@ -1,6 +1,41 @@ + # platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_ubuntu,multi_platform_sle ++{{# ++ See the OVAL template for more comments. ++ Product-specific categorization should be synced across all template content types ++-#}} + +-{{% if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product %}} ++{{% set system_with_expanded_kernel_options_in_loader_entries = false -%}} ++{{% set system_with_referenced_kernel_options_in_loader_entries = false -%}} ++{{% set system_with_kernel_options_in_grubenv = false -%}} ++{{% set system_with_kernel_options_in_etc_default_grub = false -%}} ++{{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} ++ ++{{% if product in ["rhel9"] %}} ++{{% set system_with_expanded_kernel_options_in_loader_entries = true %}} ++{{% endif -%}} ++ ++{{% if product in ["rhel8"] %}} ++{{% set system_with_referenced_kernel_options_in_loader_entries = true %}} ++{{% set system_with_kernel_options_in_grubenv = true %}} ++{{% endif -%}} ++ ++{{% if product in ["rhel7", "ol7"] or 'ubuntu' in product %}} ++{{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} ++{{% endif -%}} ++ ++{{% if product in ["rhel7", "ol7", "rhel8", "ol8", "rhel9"] or 'ubuntu' in product %}} ++{{% set system_with_kernel_options_in_etc_default_grub = true %}} ++{{% endif -%}} ++ ++{{% macro update_etc_default_grub(arg_name_value) %}} ++{{% if 'ubuntu' in product %}} ++update-grub ++{{% else %}} ++grubby --update-kernel=ALL --args="{{{ arg_name_value }}}" ++{{% endif %}} ++{{% endmacro -%}} ++ ++{{% if system_with_kernel_options_in_etc_default_grub %}} + {{% if '/' in ARG_NAME %}} + {{{ raise("ARG_NAME (" + ARG_NAME + ") uses sed path separator (/) in " + rule_id) }}} + {{% elif '/' in ARG_NAME_VALUE %}} +@@ -14,14 +49,11 @@ else + # no {{{ ARG_NAME }}}=arg is present, append it + sed -i 's/\(^GRUB_CMDLINE_LINUX=".*\)"/\1 {{{ ARG_NAME_VALUE }}}"/' '/etc/default/grub' + fi +- +-{{% if 'ubuntu' in product %}} +-update-grub +-{{% else %}} +-# Correct the form of kernel command line for each installed kernel in the bootloader +-grubby --update-kernel=ALL --args="{{{ ARG_NAME_VALUE }}}" + {{% endif %}} +-{{% else %}} ++ ++{{{ update_etc_default_grub(ARG_NAME_VALUE) }}} ++ ++{{% if system_with_kernel_options_in_grubenv -%}} + # Correct grub2 kernelopts value using grub2-editenv + existing_kernelopts="$(grub2-editenv - list | grep kernelopts)" + if ! printf '%s' "$existing_kernelopts" | grep -qE '^kernelopts=(.*\s)?{{{ ARG_NAME_VALUE }}}(\s.*)?$'; then +diff --git a/shared/templates/grub2_bootloader_argument/oval.template b/shared/templates/grub2_bootloader_argument/oval.template +index 3ea8acb2910..24258a3bcbd 100644 +--- a/shared/templates/grub2_bootloader_argument/oval.template ++++ b/shared/templates/grub2_bootloader_argument/oval.template +@@ -1,15 +1,53 @@ ++{{#- ++ We set defaults to "off", and products should enable relevant ones depending on how the product configures grub. ++ - /boot/loader/entries/* may not exist don't exist ++ - If they exist, they can reference variables defined in grubenv, or they can contain literal args ++ - The grub cfg may either use those loader entries, or it can contain literal values as well ++ - Kernel opts can be stored in /etc/default/grub so they are persistent between kernel upgrades ++-#}} ++{{% set system_with_expanded_kernel_options_in_loader_entries = false -%}} ++{{% set system_with_referenced_kernel_options_in_loader_entries = false -%}} ++{{% set system_with_kernel_options_in_grubenv = false -%}} ++{{% set system_with_kernel_options_in_etc_default_grub = false -%}} ++{{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} ++ ++{{% if product in ["rhel9"] -%}} ++{{% set system_with_expanded_kernel_options_in_loader_entries = true %}} ++{{%- endif -%}} ++ ++{{% if product in ["rhel8"] -%}} ++{{% set system_with_referenced_kernel_options_in_loader_entries = true %}} ++{{% set system_with_kernel_options_in_grubenv = true %}} ++{{%- endif -%}} ++ ++{{% if product in ["rhel7", "ol7"] or 'ubuntu' in product -%}} ++{{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} ++{{%- endif -%}} ++ ++{{%- if product in ["rhel7", "ol7", "rhel8", "ol8", "rhel9"] or 'ubuntu' in product %}} ++{{% set system_with_kernel_options_in_etc_default_grub = true %}} ++{{%- endif -%}} ++ + + + {{{ oval_metadata("Ensure " + ARG_NAME_VALUE + " is configured in the kernel line in /etc/default/grub.") }}} + +- {{% if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product %}} +- {{% if product in ['rhel9'] %}} ++ {{% if system_with_kernel_options_in_grubenv -%}} ++ ++ {{%- endif %}} ++ {{% if system_with_referenced_kernel_options_in_loader_entries -%}} ++ ++ {{%- endif %}} ++ {{% if system_with_expanded_kernel_options_in_loader_entries -%}} + +- {{% else %}} ++ {{%- endif %}} ++ {{% if system_with_expanded_kernel_options_in_grub_cfg -%}} + +- {{% endif %}} ++ {{%- endif %}} ++ {{% if system_with_kernel_options_in_etc_default_grub -%}} + + +@@ -20,14 +58,11 @@ + comment="Check GRUB_DISABLE_RECOVERY=true in /etc/default/grub" /> + + +- {{% else %}} +- +- {{% endif %}} ++ {{%- endif %}} + + + +-{{% if product in ["rhel7", "ol7", "rhel9"] or 'ubuntu' in product %}} ++{{%- if system_with_kernel_options_in_etc_default_grub %}} + +@@ -54,8 +89,25 @@ + ^\s*GRUB_CMDLINE_LINUX_DEFAULT="(.*)"$ + 1 + ++{{%- endif %}} ++ ++{{%- if system_with_kernel_options_in_grubenv %}} ++ ++ ++ ++ + +- {{% if product in ["rhel9"] %}} ++ ++ {{{ grub2_boot_path }}}/grubenv ++ ^kernelopts=(.*)$ ++ 1 ++ ++{{%- endif %}} ++ ++{{%- if system_with_expanded_kernel_options_in_loader_entries %}} + +@@ -69,7 +121,9 @@ + ^options (.*)$ + 1 + +- {{% else %}} ++{{%- endif %}} ++ ++{{%- if system_with_expanded_kernel_options_in_grub_cfg %}} + +@@ -87,26 +141,7 @@ + {{% endif %}} + 1 + +- +- {{% endif %}} +- +-{{% else %}} +- +- +- +- +- +- +- +- {{{ grub2_boot_path }}}/grubenv +- ^kernelopts=(.*)$ +- 1 +- +- +-{{% endif %}} ++{{%- endif %}} + + +diff --git a/shared/templates/grub2_bootloader_argument/tests/arg_not_there_etcdefaultgrub.fail.sh b/shared/templates/grub2_bootloader_argument/tests/arg_not_there_etcdefaultgrub.fail.sh +index a56e6d09235..a270be45952 100644 +--- a/shared/templates/grub2_bootloader_argument/tests/arg_not_there_etcdefaultgrub.fail.sh ++++ b/shared/templates/grub2_bootloader_argument/tests/arg_not_there_etcdefaultgrub.fail.sh +@@ -1,6 +1,6 @@ + #!/bin/bash + +-# platform = Red Hat Enterprise Linux 7,Red Hat Enterprise Linux 9 ++# platform = Red Hat Enterprise Linux 7,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9 + + # Removes argument from kernel command line in /etc/default/grub + if grep -q '^GRUB_CMDLINE_LINUX=.*{{{ARG_NAME}}}=.*"' '/etc/default/grub' ; then +diff --git a/shared/templates/grub2_bootloader_argument/tests/arg_not_there.fail.sh b/shared/templates/grub2_bootloader_argument/tests/arg_not_there_grubenv.fail.sh +similarity index 100% +rename from shared/templates/grub2_bootloader_argument/tests/arg_not_there.fail.sh +rename to shared/templates/grub2_bootloader_argument/tests/arg_not_there_grubenv.fail.sh + +From 0d10bf751d5e1d7f024cd7301f8b02b38c0e3b9c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= +Date: Wed, 9 Feb 2022 11:19:06 +0100 +Subject: [PATCH 2/5] Change the default product setting + +Assume that every product stores kernel opts in the /etc/default/grub +--- + shared/templates/grub2_bootloader_argument/ansible.template | 6 +----- + shared/templates/grub2_bootloader_argument/bash.template | 6 +----- + shared/templates/grub2_bootloader_argument/oval.template | 6 +----- + 3 files changed, 3 insertions(+), 15 deletions(-) + +diff --git a/shared/templates/grub2_bootloader_argument/ansible.template b/shared/templates/grub2_bootloader_argument/ansible.template +index de970879c8f..46de9b465c2 100644 +--- a/shared/templates/grub2_bootloader_argument/ansible.template ++++ b/shared/templates/grub2_bootloader_argument/ansible.template +@@ -11,7 +11,7 @@ + {{% set system_with_expanded_kernel_options_in_loader_entries = false -%}} + {{% set system_with_referenced_kernel_options_in_loader_entries = false -%}} + {{% set system_with_kernel_options_in_grubenv = false -%}} +-{{% set system_with_kernel_options_in_etc_default_grub = false -%}} ++{{% set system_with_kernel_options_in_etc_default_grub = true -%}} + {{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} + + {{% if product in ["rhel9"] %}} +@@ -27,10 +27,6 @@ + {{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} + {{% endif -%}} + +-{{% if product in ["rhel7", "ol7", "rhel8", "ol8", "rhel9"] or 'ubuntu' in product %}} +-{{% set system_with_kernel_options_in_etc_default_grub = true %}} +-{{% endif -%}} +- + {{% if system_with_kernel_options_in_etc_default_grub -%}} + - name: Check {{{ ARG_NAME }}} argument exists + command: grep 'GRUB_CMDLINE_LINUX.*{{{ ARG_NAME }}}=' /etc/default/grub +diff --git a/shared/templates/grub2_bootloader_argument/bash.template b/shared/templates/grub2_bootloader_argument/bash.template +index 817fd1fde23..b188d1e3689 100644 +--- a/shared/templates/grub2_bootloader_argument/bash.template ++++ b/shared/templates/grub2_bootloader_argument/bash.template +@@ -7,7 +7,7 @@ + {{% set system_with_expanded_kernel_options_in_loader_entries = false -%}} + {{% set system_with_referenced_kernel_options_in_loader_entries = false -%}} + {{% set system_with_kernel_options_in_grubenv = false -%}} +-{{% set system_with_kernel_options_in_etc_default_grub = false -%}} ++{{% set system_with_kernel_options_in_etc_default_grub = true -%}} + {{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} + + {{% if product in ["rhel9"] %}} +@@ -23,10 +23,6 @@ + {{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} + {{% endif -%}} + +-{{% if product in ["rhel7", "ol7", "rhel8", "ol8", "rhel9"] or 'ubuntu' in product %}} +-{{% set system_with_kernel_options_in_etc_default_grub = true %}} +-{{% endif -%}} +- + {{% macro update_etc_default_grub(arg_name_value) %}} + {{% if 'ubuntu' in product %}} + update-grub +diff --git a/shared/templates/grub2_bootloader_argument/oval.template b/shared/templates/grub2_bootloader_argument/oval.template +index 24258a3bcbd..88fa7b7a3ee 100644 +--- a/shared/templates/grub2_bootloader_argument/oval.template ++++ b/shared/templates/grub2_bootloader_argument/oval.template +@@ -8,7 +8,7 @@ + {{% set system_with_expanded_kernel_options_in_loader_entries = false -%}} + {{% set system_with_referenced_kernel_options_in_loader_entries = false -%}} + {{% set system_with_kernel_options_in_grubenv = false -%}} +-{{% set system_with_kernel_options_in_etc_default_grub = false -%}} ++{{% set system_with_kernel_options_in_etc_default_grub = true -%}} + {{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} + + {{% if product in ["rhel9"] -%}} +@@ -24,10 +24,6 @@ + {{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} + {{%- endif -%}} + +-{{%- if product in ["rhel7", "ol7", "rhel8", "ol8", "rhel9"] or 'ubuntu' in product %}} +-{{% set system_with_kernel_options_in_etc_default_grub = true %}} +-{{%- endif -%}} +- + + + {{{ oval_metadata("Ensure " + ARG_NAME_VALUE + " is configured in the kernel line in /etc/default/grub.") }}} + +From fac0aeb351d7acab1112482d11a0be73df662496 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= +Date: Fri, 11 Feb 2022 14:55:53 +0100 +Subject: [PATCH 3/5] Improve the template further + +- Fix the $kernelopts regex - $ is not a word char. +- Use grubby exclusively on RHEL systems and structure remediations differently than OVAL checks +- Exclude the rescue.conf loader entry from checks, as it is not a boot entry for general use. +--- + .../grub2_entries_reference_kernelopts.xml | 2 +- + .../ansible.template | 72 +------------------ + .../grub2_bootloader_argument/bash.template | 67 +++++------------ + .../grub2_bootloader_argument/oval.template | 7 +- + .../tests/invalid_rescue.pass.sh | 6 ++ + tests/test_rule_in_container.sh | 2 +- + 6 files changed, 33 insertions(+), 123 deletions(-) + create mode 100644 shared/templates/grub2_bootloader_argument/tests/invalid_rescue.pass.sh + +diff --git a/shared/checks/oval/grub2_entries_reference_kernelopts.xml b/shared/checks/oval/grub2_entries_reference_kernelopts.xml +index 1aec9fe64d2..30f3965a037 100644 +--- a/shared/checks/oval/grub2_entries_reference_kernelopts.xml ++++ b/shared/checks/oval/grub2_entries_reference_kernelopts.xml +@@ -19,7 +19,7 @@ + + /boot/loader/entries/ + ^.*\.conf$ +- ^options .*\b\$kernelopts\b.*$ ++ ^options(?:\s+.*)?\s+\$kernelopts\b.*$ + 1 + + +diff --git a/shared/templates/grub2_bootloader_argument/ansible.template b/shared/templates/grub2_bootloader_argument/ansible.template +index 46de9b465c2..db3b4430d4b 100644 +--- a/shared/templates/grub2_bootloader_argument/ansible.template ++++ b/shared/templates/grub2_bootloader_argument/ansible.template +@@ -4,75 +4,5 @@ + # complexity = medium + # disruption = low + +-{{# +- See the OVAL template for more comments. +- Product-specific categorization should be synced across all template content types +--#}} +-{{% set system_with_expanded_kernel_options_in_loader_entries = false -%}} +-{{% set system_with_referenced_kernel_options_in_loader_entries = false -%}} +-{{% set system_with_kernel_options_in_grubenv = false -%}} +-{{% set system_with_kernel_options_in_etc_default_grub = true -%}} +-{{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} +- +-{{% if product in ["rhel9"] %}} +-{{% set system_with_expanded_kernel_options_in_loader_entries = true %}} +-{{% endif -%}} +- +-{{% if product in ["rhel8"] %}} +-{{% set system_with_referenced_kernel_options_in_loader_entries = true %}} +-{{% set system_with_kernel_options_in_grubenv = true %}} +-{{% endif -%}} +- +-{{% if product in ["rhel7", "ol7"] or 'ubuntu' in product %}} +-{{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} +-{{% endif -%}} +- +-{{% if system_with_kernel_options_in_etc_default_grub -%}} +-- name: Check {{{ ARG_NAME }}} argument exists +- command: grep 'GRUB_CMDLINE_LINUX.*{{{ ARG_NAME }}}=' /etc/default/grub +- failed_when: False +- register: argcheck +- +-- name: Replace existing {{{ ARG_NAME }}} argument +- replace: +- path: /etc/default/grub +- regexp: '{{{ ARG_NAME }}}=\w+' +- replace: '{{{ ARG_NAME_VALUE }}}' +- when: argcheck.rc == 0 +- +-- name: Add {{{ ARG_NAME }}} argument +- replace: +- path: /etc/default/grub +- regexp: '(GRUB_CMDLINE_LINUX=.*)"' +- replace: '\1 {{{ ARG_NAME_VALUE }}}"' +- when: argcheck.rc != 0 +- +-- name: Update bootloader menu ++- name: Update grub defaults and the bootloader menu + command: /sbin/grubby --update-kernel=ALL --args="{{{ ARG_NAME_VALUE }}}" +- +-{{%- endif %}} +- +-{{% if system_with_kernel_options_in_grubenv -%}} +- +-- name: Get current kernel parameters +- ansible.builtin.shell: +- cmd: '/usr/bin/grub2-editenv - list | grep "kernelopts="' +- register: kernelopts +- ignore_errors: yes +- changed_when: False +- +-- name: Update the bootloader menu +- command: /usr/bin/grub2-editenv - set "{{ item }} {{{ ARG_NAME_VALUE }}}" +- with_items: "{{ kernelopts.stdout_lines | select('match', '^kernelopts.*') | list }}" +- when: +- - kernelopts.rc == 0 +- - kernelopts.stdout_lines is defined +- - kernelopts.stdout_lines | length > 0 +- - kernelopts.stdout | regex_search('^kernelopts=(?:.*\s)?{{{ ARG_NAME_VALUE }}}(?:\s.*)?$', multiline=True) is none +- +-- name: Update the bootloader menu when there are no entries previously set +- command: /usr/bin/grub2-editenv - set "kernelopts={{{ ARG_NAME_VALUE }}}" +- when: +- - kernelopts.rc != 0 +- +-{{%- endif %}} +diff --git a/shared/templates/grub2_bootloader_argument/bash.template b/shared/templates/grub2_bootloader_argument/bash.template +index b188d1e3689..5f97efd498f 100644 +--- a/shared/templates/grub2_bootloader_argument/bash.template ++++ b/shared/templates/grub2_bootloader_argument/bash.template +@@ -4,59 +4,28 @@ + Product-specific categorization should be synced across all template content types + -#}} + +-{{% set system_with_expanded_kernel_options_in_loader_entries = false -%}} +-{{% set system_with_referenced_kernel_options_in_loader_entries = false -%}} +-{{% set system_with_kernel_options_in_grubenv = false -%}} +-{{% set system_with_kernel_options_in_etc_default_grub = true -%}} +-{{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} ++{{% set grub_helper_executable = "grubby" -%}} ++{{% set grub_helper_args = ["--update-kernel=ALL", "--args=" ~ ARG_NAME_VALUE] -%}} + +-{{% if product in ["rhel9"] %}} +-{{% set system_with_expanded_kernel_options_in_loader_entries = true %}} +-{{% endif -%}} +- +-{{% if product in ["rhel8"] %}} +-{{% set system_with_referenced_kernel_options_in_loader_entries = true %}} +-{{% set system_with_kernel_options_in_grubenv = true %}} +-{{% endif -%}} +- +-{{% if product in ["rhel7", "ol7"] or 'ubuntu' in product %}} +-{{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} +-{{% endif -%}} +- +-{{% macro update_etc_default_grub(arg_name_value) %}} +-{{% if 'ubuntu' in product %}} +-update-grub +-{{% else %}} +-grubby --update-kernel=ALL --args="{{{ arg_name_value }}}" +-{{% endif %}} +-{{% endmacro -%}} +- +-{{% if system_with_kernel_options_in_etc_default_grub %}} +-{{% if '/' in ARG_NAME %}} +-{{{ raise("ARG_NAME (" + ARG_NAME + ") uses sed path separator (/) in " + rule_id) }}} +-{{% elif '/' in ARG_NAME_VALUE %}} +-{{{ raise("ARG_NAME_VALUE (" + ARG_NAME_VALUE + ") uses sed path separator (/) in " + rule_id) }}} +-{{% endif %}} ++{{%- macro update_etc_default_grub_manually() -%}} + # Correct the form of default kernel command line in GRUB + if grep -q '^GRUB_CMDLINE_LINUX=.*{{{ ARG_NAME }}}=.*"' '/etc/default/grub' ; then +- # modify the GRUB command-line if an {{{ ARG_NAME }}}= arg already exists +- sed -i 's/\(^GRUB_CMDLINE_LINUX=".*\){{{ ARG_NAME }}}=[^[:space:]]*\(.*"\)/\1 {{{ ARG_NAME_VALUE }}} \2/' '/etc/default/grub' ++ # modify the GRUB command-line if an {{{ ARG_NAME }}}= arg already exists ++ sed -i 's/\(^GRUB_CMDLINE_LINUX=".*\){{{ ARG_NAME }}}=[^[:space:]]*\(.*"\)/\1 {{{ ARG_NAME_VALUE }}} \2/' '/etc/default/grub' + else +- # no {{{ ARG_NAME }}}=arg is present, append it +- sed -i 's/\(^GRUB_CMDLINE_LINUX=".*\)"/\1 {{{ ARG_NAME_VALUE }}}"/' '/etc/default/grub' ++ # no {{{ ARG_NAME }}}=arg is present, append it ++ sed -i 's/\(^GRUB_CMDLINE_LINUX=".*\)"/\1 {{{ ARG_NAME_VALUE }}}"/' '/etc/default/grub' + fi +-{{% endif %}} ++{{%- endmacro %}} ++ ++{{% if 'ubuntu' in product %}} ++{{{ update_etc_default_grub_manually() }}} ++{{% set grub_helper_executable = "update-grub" -%}} ++{{% endif -%}} + +-{{{ update_etc_default_grub(ARG_NAME_VALUE) }}} ++{{% if product in ["rhel8", "ol8"] %}} ++{{# Suppress the None output of append -#}} ++{{{ grub_helper_args.append("--env=/boot/grub2/grubenv") or "" -}}} ++{{% endif -%}} + +-{{% if system_with_kernel_options_in_grubenv -%}} +-# Correct grub2 kernelopts value using grub2-editenv +-existing_kernelopts="$(grub2-editenv - list | grep kernelopts)" +-if ! printf '%s' "$existing_kernelopts" | grep -qE '^kernelopts=(.*\s)?{{{ ARG_NAME_VALUE }}}(\s.*)?$'; then +- if test -n "$existing_kernelopts"; then +- grub2-editenv - set "$existing_kernelopts {{{ ARG_NAME_VALUE }}}" +- else +- grub2-editenv - set "kernelopts={{{ ARG_NAME_VALUE }}}" +- fi +-fi +-{{% endif %}} ++{{{ grub_helper_executable }}} {{{ " ".join(grub_helper_args) }}} +diff --git a/shared/templates/grub2_bootloader_argument/oval.template b/shared/templates/grub2_bootloader_argument/oval.template +index 88fa7b7a3ee..6981cc14045 100644 +--- a/shared/templates/grub2_bootloader_argument/oval.template ++++ b/shared/templates/grub2_bootloader_argument/oval.template +@@ -1,6 +1,6 @@ + {{#- + We set defaults to "off", and products should enable relevant ones depending on how the product configures grub. +- - /boot/loader/entries/* may not exist don't exist ++ - /boot/loader/entries/* may not exist. + - If they exist, they can reference variables defined in grubenv, or they can contain literal args + - The grub cfg may either use those loader entries, or it can contain literal values as well + - Kernel opts can be stored in /etc/default/grub so they are persistent between kernel upgrades +@@ -116,7 +116,12 @@ + ^.*\.conf$ + ^options (.*)$ + 1 ++ state_grub2_rescue_entry_for_{{{ _RULE_ID }}} + ++ ++ ++ rescue.conf ++ + {{%- endif %}} + + {{%- if system_with_expanded_kernel_options_in_grub_cfg %}} +diff --git a/shared/templates/grub2_bootloader_argument/tests/invalid_rescue.pass.sh b/shared/templates/grub2_bootloader_argument/tests/invalid_rescue.pass.sh +new file mode 100644 +index 00000000000..ee6e2c67f34 +--- /dev/null ++++ b/shared/templates/grub2_bootloader_argument/tests/invalid_rescue.pass.sh +@@ -0,0 +1,6 @@ ++# platform = Red Hat Enterprise Linux 7,Red Hat Enterprise Linux 9 ++# packages = grub2,grubby ++ ++{{{ grub2_bootloader_argument_remediation(ARG_NAME, ARG_NAME_VALUE) }}} ++ ++echo "I am an invalid boot entry, but nobody should care, because I am rescue" > /boot/loader/entries/trololol-rescue.conf +diff --git a/tests/test_rule_in_container.sh b/tests/test_rule_in_container.sh +index 395fc4e856c..a8691ca7463 100755 +--- a/tests/test_rule_in_container.sh ++++ b/tests/test_rule_in_container.sh +@@ -221,7 +221,7 @@ additional_args=() + test "$_arg_dontclean" = on && additional_args+=(--dontclean) + + # Don't act on the default value. +-test -n "$_arg_scenarios" && additional_args+=(--scenario "'$_arg_scenarios'") ++test -n "$_arg_scenarios" && additional_args+=(--scenario "$_arg_scenarios") + + test -n "$_arg_datastream" && additional_args+=(--datastream "$_arg_datastream") + + +From 8dda6030dea885c7c7e7e8f1024f5f2edf5bc36c Mon Sep 17 00:00:00 2001 +From: Matej Tyc +Date: Mon, 14 Feb 2022 13:45:09 +0100 +Subject: [PATCH 4/5] Add support for checks of both BIOS/UEFI systems + +--- + .../grub2_bootloader_argument/oval.template | 57 +++++++++++++++---- + 1 file changed, 46 insertions(+), 11 deletions(-) + +diff --git a/shared/templates/grub2_bootloader_argument/oval.template b/shared/templates/grub2_bootloader_argument/oval.template +index 6981cc14045..71367465663 100644 +--- a/shared/templates/grub2_bootloader_argument/oval.template ++++ b/shared/templates/grub2_bootloader_argument/oval.template +@@ -10,6 +10,7 @@ + {{% set system_with_kernel_options_in_grubenv = false -%}} + {{% set system_with_kernel_options_in_etc_default_grub = true -%}} + {{% set system_with_expanded_kernel_options_in_grub_cfg = false -%}} ++{{% set system_with_bios_and_uefi_support = false -%}} + + {{% if product in ["rhel9"] -%}} + {{% set system_with_expanded_kernel_options_in_loader_entries = true %}} +@@ -24,13 +25,25 @@ + {{% set system_with_expanded_kernel_options_in_grub_cfg = true %}} + {{%- endif -%}} + ++{{% if grub2_uefi_boot_path and grub2_uefi_boot_path != grub2_boot_path -%}} ++{{% set system_with_bios_and_uefi_support = true %}} ++{{%- endif -%}} ++ + + + {{{ oval_metadata("Ensure " + ARG_NAME_VALUE + " is configured in the kernel line in /etc/default/grub.") }}} + + {{% if system_with_kernel_options_in_grubenv -%}} ++ {{% if system_with_bios_and_uefi_support -%}} ++ ++ {{%- endif %}} + ++ {{% if system_with_bios_and_uefi_support -%}} ++ ++ ++ {{%- endif %}} + {{%- endif %}} + {{% if system_with_referenced_kernel_options_in_loader_entries -%}} + +@@ -40,8 +53,16 @@ + comment="Check if {{{ ARG_NAME_VALUE }}} is present in the boot parameters in the /boot/loader/entries/*.conf" /> + {{%- endif %}} + {{% if system_with_expanded_kernel_options_in_grub_cfg -%}} ++ {{% if system_with_bios_and_uefi_support -%}} ++ ++ {{%- endif %}} + ++ {{% if system_with_bios_and_uefi_support -%}} ++ ++ ++ {{%- endif %}} + {{%- endif %}} + {{% if system_with_kernel_options_in_etc_default_grub -%}} + +@@ -88,19 +109,26 @@ + {{%- endif %}} + + {{%- if system_with_kernel_options_in_grubenv %}} +- +- ++ + + + +- +- {{{ grub2_boot_path }}}/grubenv ++ {{{ path }}} + ^kernelopts=(.*)$ + 1 + ++{{%- endmacro %}} ++ ++{{{ test_and_object_for_kernel_options_grub_env("grub2_" ~ SANITIZED_ARG_NAME ~ "_argument_grub_env", grub2_boot_path ~ "/grubenv") }}} ++{{% if system_with_bios_and_uefi_support -%}} ++{{{ test_and_object_for_kernel_options_grub_env("grub2_" ~ SANITIZED_ARG_NAME ~ "_argument_grub_env_uefi", grub2_uefi_boot_path ~ "/grubenv") }}} ++{{%- endif %}} + {{%- endif %}} + + {{%- if system_with_expanded_kernel_options_in_loader_entries %}} +@@ -120,21 +148,22 @@ + + + +- rescue.conf ++ .*rescue.conf$ + + {{%- endif %}} + + {{%- if system_with_expanded_kernel_options_in_grub_cfg %}} +- +- ++ + + + +- +- {{{ grub2_boot_path }}}/grub.cfg ++ {{{ path }}} + {{% if product in ["rhel7"] or 'ubuntu' in product %}} + ^.*/vmlinuz.*(root=.*)$ + {{% else %}} +@@ -142,6 +171,12 @@ + {{% endif %}} + 1 + ++{{%- endmacro %}} ++ ++{{{ test_and_object_for_kernel_options_grub_cfg("grub2_" + SANITIZED_ARG_NAME + "_argument_grub_cfg", grub2_boot_path ~ "/grub.cfg") }}} ++{{% if system_with_bios_and_uefi_support -%}} ++{{{ test_and_object_for_kernel_options_grub_cfg("grub2_" + SANITIZED_ARG_NAME + "_argument_grub_cfg_uefi", grub2_uefi_boot_path ~ "/grub.cfg") }}} ++{{%- endif %}} + {{%- endif %}} + + +Date: Mon, 14 Feb 2022 14:49:34 +0100 +Subject: [PATCH 5/5] Correct test scenario metadata + +- Grubenv doesn't relate to anything else than RHEL8 +- The grubby remediation has different behavior in corner-cases + that are technically unsupported, so the corresponding test scenario has been dropped. +--- + .../grub2_audit_argument/tests/blank_grubenv_rhel8.fail.sh | 1 + + .../auditing/grub2_audit_argument/tests/correct_grubenv.pass.sh | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/linux_os/guide/system/auditing/grub2_audit_argument/tests/blank_grubenv_rhel8.fail.sh b/linux_os/guide/system/auditing/grub2_audit_argument/tests/blank_grubenv_rhel8.fail.sh +index 5af2acc317e..956c8ac79fd 100644 +--- a/linux_os/guide/system/auditing/grub2_audit_argument/tests/blank_grubenv_rhel8.fail.sh ++++ b/linux_os/guide/system/auditing/grub2_audit_argument/tests/blank_grubenv_rhel8.fail.sh +@@ -1,6 +1,7 @@ + #!/bin/bash + + # platform = Red Hat Enterprise Linux 8 ++# remediation = none + + # Removes audit argument from kernel command line in /boot/grub2/grubenv + file="/boot/grub2/grubenv" +diff --git a/linux_os/guide/system/auditing/grub2_audit_argument/tests/correct_grubenv.pass.sh b/linux_os/guide/system/auditing/grub2_audit_argument/tests/correct_grubenv.pass.sh +index 0ec9a1d6e38..9823b08dff9 100644 +--- a/linux_os/guide/system/auditing/grub2_audit_argument/tests/correct_grubenv.pass.sh ++++ b/linux_os/guide/system/auditing/grub2_audit_argument/tests/correct_grubenv.pass.sh +@@ -1,4 +1,4 @@ + #!/bin/bash +-# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9 ++# platform = Red Hat Enterprise Linux 8 + + grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) audit=1" diff --git a/SOURCES/scap-security-guide-0.1.61-ospp-audit.conf-rules-PR_8188.patch b/SOURCES/scap-security-guide-0.1.61-ospp-audit.conf-rules-PR_8188.patch new file mode 100644 index 0000000..3e4ae71 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-ospp-audit.conf-rules-PR_8188.patch @@ -0,0 +1,22 @@ +From 1ff5b861e51e62602386524820b4382976540f03 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Wed, 9 Feb 2022 19:26:54 +0100 +Subject: [PATCH] drop not needed rules + +--- + products/rhel9/profiles/ospp.profile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile +index 065681d93a7..c3f4e2d26eb 100644 +--- a/products/rhel9/profiles/ospp.profile ++++ b/products/rhel9/profiles/ospp.profile +@@ -149,8 +149,6 @@ selections: + - service_auditd_enabled + - var_auditd_flush=incremental_async + - auditd_data_retention_flush +- - auditd_local_events +- - auditd_write_logs + - auditd_log_format + - auditd_freq + - auditd_name_format diff --git a/SOURCES/scap-security-guide-0.1.61-ospp-boot-parametersb-PR_8092.patch b/SOURCES/scap-security-guide-0.1.61-ospp-boot-parametersb-PR_8092.patch new file mode 100644 index 0000000..a90c8d5 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-ospp-boot-parametersb-PR_8092.patch @@ -0,0 +1,397 @@ +From 742e103392746dac771663247d169cfe498ee658 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Fri, 21 Jan 2022 14:02:16 +0100 +Subject: [PATCH 1/7] modify vsyscall rules according to rhel9 ospp + +add references +make rules scored in th e profile +--- + .../system/bootloader-grub2/grub2_vsyscall_argument/rule.yml | 1 + + .../system/bootloader-zipl/zipl_vsyscall_argument/rule.yml | 3 +++ + products/rhel9/profiles/ospp.profile | 4 ---- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml +index 1dd26fea9b6..9f38a1c13b9 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml +@@ -25,6 +25,7 @@ identifiers: + references: + disa: CCI-001084 + nist: CM-7(a) ++ ospp: FPT_ASLR_EXT.1 + srg: SRG-OS-000480-GPOS-00227,SRG-OS-000134-GPOS-00068 + stigid@ol8: OL08-00-010422 + stigid@rhel8: RHEL-08-010422 +diff --git a/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml +index 52b192ffc52..9d645c8876e 100644 +--- a/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml +@@ -21,6 +21,9 @@ identifiers: + cce@rhel8: CCE-83381-4 + cce@rhel9: CCE-84100-7 + ++references: ++ ospp: FPT_ASLR_EXT.1 ++ + ocil_clause: 'vsyscalls are enabled' + + ocil: |- +diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile +index 287a28c43c5..f0b850a4ced 100644 +--- a/products/rhel9/profiles/ospp.profile ++++ b/products/rhel9/profiles/ospp.profile +@@ -128,8 +128,6 @@ selections: + - grub2_slub_debug_argument + - grub2_page_poison_argument + - grub2_vsyscall_argument +- - grub2_vsyscall_argument.role=unscored +- - grub2_vsyscall_argument.severity=info + - grub2_pti_argument + - grub2_kernel_trust_cpu_rng + +@@ -421,5 +419,3 @@ selections: + - zipl_slub_debug_argument + - zipl_page_poison_argument + - zipl_vsyscall_argument +- - zipl_vsyscall_argument.role=unscored +- - zipl_vsyscall_argument.severity=info + +From d167658d46accbc75200a5d145a746322f1c2d4a Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Fri, 21 Jan 2022 14:05:24 +0100 +Subject: [PATCH 2/7] add ospp references to fips rules + +--- + .../software/integrity/fips/enable_dracut_fips_module/rule.yml | 1 + + .../system/software/integrity/fips/enable_fips_mode/rule.yml | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/linux_os/guide/system/software/integrity/fips/enable_dracut_fips_module/rule.yml b/linux_os/guide/system/software/integrity/fips/enable_dracut_fips_module/rule.yml +index f342b9b8d95..3b7c3229b6f 100644 +--- a/linux_os/guide/system/software/integrity/fips/enable_dracut_fips_module/rule.yml ++++ b/linux_os/guide/system/software/integrity/fips/enable_dracut_fips_module/rule.yml +@@ -29,6 +29,7 @@ references: + ism: "1446" + nerc-cip: CIP-003-8 R4.2,CIP-007-3 R5.1 + nist: SC-12(2),SC-12(3),IA-7,SC-13,CM-6(a),SC-12 ++ ospp: FCS_RBG_EXT.1 + srg: SRG-OS-000478-GPOS-00223 + stigid@ol8: OL08-00-010020 + stigid@rhel8: RHEL-08-010020 +diff --git a/linux_os/guide/system/software/integrity/fips/enable_fips_mode/rule.yml b/linux_os/guide/system/software/integrity/fips/enable_fips_mode/rule.yml +index 7559e61600d..9d89114b07f 100644 +--- a/linux_os/guide/system/software/integrity/fips/enable_fips_mode/rule.yml ++++ b/linux_os/guide/system/software/integrity/fips/enable_fips_mode/rule.yml +@@ -39,7 +39,7 @@ references: + ism: "1446" + nerc-cip: CIP-003-8 R4.2,CIP-007-3 R5.1 + nist: SC-12(2),SC-12(3),IA-7,SC-13,CM-6(a),SC-12 +- ospp: FCS_COP.1(1),FCS_COP.1(2),FCS_COP.1(3),FCS_COP.1(4),FCS_CKM.1,FCS_CKM.2,FCS_TLSC_EXT.1 ++ ospp: FCS_COP.1(1),FCS_COP.1(2),FCS_COP.1(3),FCS_COP.1(4),FCS_CKM.1,FCS_CKM.2,FCS_TLSC_EXT.1,FCS_RBG_EXT.1 + srg: SRG-OS-000478-GPOS-00223,SRG-OS-000396-GPOS-00176 + stigid@ol8: OL08-00-010020 + stigid@rhel8: RHEL-08-010020 + +From f05e895bb96b64a5142e62e3dd0f7208633d5c23 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Fri, 21 Jan 2022 14:08:36 +0100 +Subject: [PATCH 3/7] drop no longer needed rules from ospp rhel9 profile + +--- + products/rhel9/profiles/ospp.profile | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile +index f0b850a4ced..7e30054bc98 100644 +--- a/products/rhel9/profiles/ospp.profile ++++ b/products/rhel9/profiles/ospp.profile +@@ -125,11 +125,7 @@ selections: + ## Boot prompt + - grub2_audit_argument + - grub2_audit_backlog_limit_argument +- - grub2_slub_debug_argument +- - grub2_page_poison_argument + - grub2_vsyscall_argument +- - grub2_pti_argument +- - grub2_kernel_trust_cpu_rng + + ## Security Settings + - sysctl_kernel_kptr_restrict +@@ -416,6 +412,4 @@ selections: + - zipl_bootmap_is_up_to_date + - zipl_audit_argument + - zipl_audit_backlog_limit_argument +- - zipl_slub_debug_argument +- - zipl_page_poison_argument + - zipl_vsyscall_argument + +From 972ae269eff95de8a6914056d38e58b7aeafb8c3 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Fri, 21 Jan 2022 15:12:46 +0100 +Subject: [PATCH 4/7] add grub2_init_on_alloc rule + +--- + .../grub2_init_on_alloc_argument/rule.yml | 46 +++++++++++++++++++ + shared/references/cce-redhat-avail.txt | 1 - + 2 files changed, 46 insertions(+), 1 deletion(-) + create mode 100644 linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml + +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml +new file mode 100644 +index 00000000000..592e2fb117d +--- /dev/null ++++ b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml +@@ -0,0 +1,46 @@ ++documentation_complete: true ++ ++prodtype: rhel9 ++ ++title: 'Configure kernel to zero out memory before allocation (through Grub2)' ++ ++description: |- ++ To configure the kernel to zero out memory before allocating it, add the ++ init_on_alloc=1 argument to the default GRUB 2 command line for ++ the Linux operating system in /etc/default/grub, in the manner ++ below: ++
    GRUB_CMDLINE_LINUX="crashkernel=auto quiet rd.shell=0 audit=1 audit_backlog_limit=8192 init_on_alloc=1"
    ++ Update the boot parameter for existing kernels by running the following command: ++
    # grubby --update-kernel=ALL --args="init_on_alloc=1"
    ++ ++rationale: |- ++ When the kernel configuration option init_on_alloc is enabled, ++ all page allocator and slab allocator memory will be zeroed when allocated, ++ eliminating many kinds of "uninitialized heap memory" flaws, effectively ++ preventing data leaks. ++ ++severity: medium ++ ++identifiers: ++ cce@rhel9: CCE-85867-0 ++ ++ocil_clause: 'the kernel is not configured to zero out memory before allocation' ++ ++ocil: |- ++ Make sure that the kernel is configured to zero out memory before ++ allocation. Ensure that the parameter is configured in ++ /etc/default/grub: ++
    grep GRUB_CMDLINE_LINUX /etc/default/grub
    ++ The output should contain init_on_alloc=1. ++ Run the following command to display command line parameters of all ++ installed kernels: ++
    # grubby --info=ALL | grep args
    ++ Ensure that each line contains the init_on_alloc=1 parameter. ++ ++platform: machine ++ ++template: ++ name: grub2_bootloader_argument ++ vars: ++ arg_name: init_on_alloc ++ arg_value: '1' +diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt +index 8aad24b20f7..6835189cd99 100644 +--- a/shared/references/cce-redhat-avail.txt ++++ b/shared/references/cce-redhat-avail.txt +@@ -1,4 +1,3 @@ +-CCE-85867-0 + CCE-85868-8 + CCE-85872-0 + CCE-85873-8 + +From a865514257c85d79aaf7e4286d8723aa1ad8de03 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Mon, 24 Jan 2022 10:01:23 +0100 +Subject: [PATCH 5/7] add zipl_init_on_alloc_argument rule + +--- + .../zipl_init_on_alloc_argument/rule.yml | 41 +++++++++++++++++++ + .../tests/correct_option.pass.sh | 15 +++++++ + .../tests/missing_in_cmdline.fail.sh | 13 ++++++ + .../tests/missing_in_entry.fail.sh | 13 ++++++ + shared/references/cce-redhat-avail.txt | 1 - + 5 files changed, 82 insertions(+), 1 deletion(-) + create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml + create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/correct_option.pass.sh + create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_cmdline.fail.sh + create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_entry.fail.sh + +diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml +new file mode 100644 +index 00000000000..b47a7757327 +--- /dev/null ++++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml +@@ -0,0 +1,41 @@ ++documentation_complete: true ++ ++prodtype: rhel9 ++ ++title: 'Configure kernel to zero out memory before allocation (through zIPl)' ++ ++description: |- ++ To ensure that the kernel is configured to zero out memory before ++ allocation, check that all boot entries in ++ /boot/loader/entries/*.conf have init_on_alloc=1 ++ included in its options.
    ++ ++ To ensure that new kernels and boot entries continue to zero out memory ++ before allocation, add init_on_alloc=1 to /etc/kernel/cmdline. ++ ++rationale: |- ++ When the kernel configuration option init_on_alloc is enabled, ++ all page allocator and slab allocator memory will be zeroed when allocated, ++ eliminating many kinds of "uninitialized heap memory" flaws, effectively ++ preventing data leaks. ++ ++severity: medium ++ ++identifiers: ++ cce@rhel9: CCE-85868-8 ++ ++ocil_clause: 'the kernel is not configured to zero out memory before allocation' ++ ++ocil: |- ++ To check that the kernel is configured to zero out memory before allocation ++ time, check all boot entries with following command: ++
    sudo grep -L"^options\s+.*\binit_on_alloc=1\b" /boot/loader/entries/*.conf
    ++ No line should be returned, each line returned is a boot entry that doesn't enable audit. ++ ++platform: machine ++ ++template: ++ name: zipl_bls_entries_option ++ vars: ++ arg_name: init_on_alloc ++ arg_value: '1' +diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/correct_option.pass.sh b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/correct_option.pass.sh +new file mode 100644 +index 00000000000..50cf1b78f70 +--- /dev/null ++++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/correct_option.pass.sh +@@ -0,0 +1,15 @@ ++#!/bin/bash ++# platform = multi_platform_fedora,Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 ++ ++# Make sure boot loader entries contain init_on_alloc=1 ++for file in /boot/loader/entries/*.conf ++do ++ if ! grep -q '^options.*init_on_alloc=1.*$' "$file" ; then ++ sed -i '/^options / s/$/ init_on_alloc=1/' "$file" ++ fi ++done ++ ++# Make sure /etc/kernel/cmdline contains init_on_alloc=1 ++if ! grep -qs '^(.*\s)?init_on_alloc=1(\s.*)?$' /etc/kernel/cmdline ; then ++ echo "init_on_alloc=1" >> /etc/kernel/cmdline ++fi +diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_cmdline.fail.sh b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_cmdline.fail.sh +new file mode 100644 +index 00000000000..7c0d9154776 +--- /dev/null ++++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_cmdline.fail.sh +@@ -0,0 +1,13 @@ ++#!/bin/bash ++# platform = multi_platform_fedora,Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 ++ ++# Make sure boot loader entries contain init_on_alloc=1 ++for file in /boot/loader/entries/*.conf ++do ++ if ! grep -q '^options.*init_on_alloc=1.*$' "$file" ; then ++ sed -i '/^options / s/$/ init_on_alloc=1/' "$file" ++ fi ++done ++ ++# Make sure /etc/kernel/cmdline doesn't contain init_on_alloc=1 ++sed -Ei 's/(^.*)init_on_alloc=1(.*?)$/\1\2/' /etc/kernel/cmdline || true +diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_entry.fail.sh b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_entry.fail.sh +new file mode 100644 +index 00000000000..9d330c9192d +--- /dev/null ++++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_entry.fail.sh +@@ -0,0 +1,13 @@ ++#!/bin/bash ++# platform = multi_platform_fedora,Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 ++ ++# Remove init_on_alloc=1 from all boot entries ++sed -Ei 's/(^options.*\s)init_on_alloc=1(.*?)$/\1\2/' /boot/loader/entries/* ++# But make sure one boot loader entry contains init_on_alloc=1 ++sed -i '/^options / s/$/ init_on_alloc=1/' /boot/loader/entries/*rescue.conf ++sed -Ei 's/(^options.*\s)\$kernelopts(.*?)$/\1\2/' /boot/loader/entries/*rescue.conf ++ ++# Make sure /etc/kernel/cmdline contains init_on_alloc=1 ++if ! grep -qs '^(.*\s)?init_on_alloc=1(\s.*)?$' /etc/kernel/cmdline ; then ++ echo "init_on_alloc=1" >> /etc/kernel/cmdline ++fi +diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt +index 6835189cd99..05a641aeaf0 100644 +--- a/shared/references/cce-redhat-avail.txt ++++ b/shared/references/cce-redhat-avail.txt +@@ -1,4 +1,3 @@ +-CCE-85868-8 + CCE-85872-0 + CCE-85873-8 + CCE-85874-6 + +From 9ca5ec04e734941b1c401369b6da6672b42824b1 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Mon, 24 Jan 2022 10:07:24 +0100 +Subject: [PATCH 6/7] add new rules to rhel9 ospp + +--- + products/rhel9/profiles/ospp.profile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile +index 7e30054bc98..28c7e92d298 100644 +--- a/products/rhel9/profiles/ospp.profile ++++ b/products/rhel9/profiles/ospp.profile +@@ -126,6 +126,7 @@ selections: + - grub2_audit_argument + - grub2_audit_backlog_limit_argument + - grub2_vsyscall_argument ++ - grub2_init_on_alloc_argument + + ## Security Settings + - sysctl_kernel_kptr_restrict +@@ -413,3 +414,4 @@ selections: + - zipl_audit_argument + - zipl_audit_backlog_limit_argument + - zipl_vsyscall_argument ++ - zipl_init_on_alloc_argument + +From 42a118bcc615051ae4cd268a5fc758aa5d75108d Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Thu, 27 Jan 2022 14:08:20 +0100 +Subject: [PATCH 7/7] make rule names consistent + +--- + .../bootloader-grub2/grub2_init_on_alloc_argument/rule.yml | 2 +- + .../system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml +index 592e2fb117d..a9253c74cc6 100644 +--- a/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml +@@ -2,7 +2,7 @@ documentation_complete: true + + prodtype: rhel9 + +-title: 'Configure kernel to zero out memory before allocation (through Grub2)' ++title: 'Configure kernel to zero out memory before allocation' + + description: |- + To configure the kernel to zero out memory before allocating it, add the +diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml +index b47a7757327..fa272250a28 100644 +--- a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml ++++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml +@@ -2,7 +2,7 @@ documentation_complete: true + + prodtype: rhel9 + +-title: 'Configure kernel to zero out memory before allocation (through zIPl)' ++title: 'Configure kernel to zero out memory before allocation in zIPL' + + description: |- + To ensure that the kernel is configured to zero out memory before diff --git a/SOURCES/scap-security-guide-0.1.61-ospp-remove-kernel-disable-rules-PR_8093.patch b/SOURCES/scap-security-guide-0.1.61-ospp-remove-kernel-disable-rules-PR_8093.patch new file mode 100644 index 0000000..a663525 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-ospp-remove-kernel-disable-rules-PR_8093.patch @@ -0,0 +1,25 @@ +From e38df8801bd2c1bb1e419151f4f0fe8923287bfc Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Mon, 24 Jan 2022 10:13:13 +0100 +Subject: [PATCH] drop rules + +--- + products/rhel9/profiles/ospp.profile | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile +index 287a28c43c5..436ea1f3a49 100644 +--- a/products/rhel9/profiles/ospp.profile ++++ b/products/rhel9/profiles/ospp.profile +@@ -161,11 +161,8 @@ selections: + - auditd_name_format + + ### Module Blacklist +- - kernel_module_cramfs_disabled + - kernel_module_bluetooth_disabled + - kernel_module_sctp_disabled +- - kernel_module_firewire-core_disabled +- - kernel_module_atm_disabled + - kernel_module_can_disabled + - kernel_module_tipc_disabled + diff --git a/SOURCES/scap-security-guide-0.1.61-pwquality-PR_8185.patch b/SOURCES/scap-security-guide-0.1.61-pwquality-PR_8185.patch new file mode 100644 index 0000000..3e38e50 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-pwquality-PR_8185.patch @@ -0,0 +1,855 @@ +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/ansible/shared.yml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/ansible/shared.yml +new file mode 100644 +index 00000000000..b44c91cbf4a +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/ansible/shared.yml +@@ -0,0 +1,150 @@ ++# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel ++# reboot = false ++# strategy = configure ++# complexity = low ++# disruption = medium ++ ++- name: Check for existing pam_pwquality.so entry ++ ansible.builtin.lineinfile: ++ path: "/etc/pam.d/password-auth" ++ create: no ++ regexp: '^password.*pam_pwquality.so.*' ++ state: absent ++ check_mode: true ++ changed_when: false ++ register: result_pam_pwquality_present ++ ++- name: Check if system relies on authselect ++ ansible.builtin.stat: ++ path: /usr/bin/authselect ++ register: result_authselect_present ++ ++- name: "Remediation where authselect tool is present" ++ block: ++ - name: Check the integrity of the current authselect profile ++ ansible.builtin.command: ++ cmd: authselect check ++ register: result_authselect_check_cmd ++ changed_when: false ++ ignore_errors: true ++ ++ - name: Informative message based on the authselect integrity check result ++ ansible.builtin.assert: ++ that: ++ - result_authselect_check_cmd is success ++ fail_msg: ++ - authselect integrity check failed. Remediation aborted! ++ - This remediation could not be applied because the authselect profile is not intact. ++ - It is not recommended to manually edit the PAM files when authselect is available. ++ - In cases where the default authselect profile does not cover a specific demand, a custom authselect profile is recommended. ++ success_msg: ++ - authselect integrity check passed ++ ++ - name: Get authselect current profile ++ ansible.builtin.shell: ++ cmd: authselect current -r | awk '{ print $1 }' ++ register: result_authselect_profile ++ changed_when: false ++ when: ++ - result_authselect_check_cmd is success ++ ++ - name: Define the current authselect profile as a local fact ++ ansible.builtin.set_fact: ++ authselect_current_profile: "{{ result_authselect_profile.stdout }}" ++ authselect_custom_profile: "{{ result_authselect_profile.stdout }}" ++ when: ++ - result_authselect_profile is not skipped ++ - result_authselect_profile.stdout is match("custom/") ++ ++ - name: Define the new authselect custom profile as a local fact ++ ansible.builtin.set_fact: ++ authselect_current_profile: "{{ result_authselect_profile.stdout }}" ++ authselect_custom_profile: "custom/hardening" ++ when: ++ - result_authselect_profile is not skipped ++ - result_authselect_profile.stdout is not match("custom/") ++ ++ - name: Get authselect current features to also enable them in the custom profile ++ ansible.builtin.shell: ++ cmd: authselect current | tail -n+3 | awk '{ print $2 }' ++ register: result_authselect_features ++ changed_when: false ++ when: ++ - result_authselect_profile is not skipped ++ - authselect_current_profile is not match("custom/") ++ ++ - name: Check if any custom profile with the same name was already created in the past ++ ansible.builtin.stat: ++ path: /etc/authselect/{{ authselect_custom_profile }} ++ register: result_authselect_custom_profile_present ++ changed_when: false ++ when: ++ - authselect_current_profile is not match("custom/") ++ ++ - name: Create a custom profile based on the current profile ++ ansible.builtin.command: ++ cmd: authselect create-profile hardening -b sssd ++ when: ++ - result_authselect_check_cmd is success ++ - authselect_current_profile is not match("custom/") ++ - not result_authselect_custom_profile_present.stat.exists ++ ++ - name: Ensure the desired configuration is present in the custom profile ++ ansible.builtin.lineinfile: ++ dest: "/etc/authselect/{{ authselect_custom_profile }}/password-auth" ++ insertbefore: ^password.*sufficient.*pam_unix.so.* ++ line: "password requisite pam_pwquality.so" ++ when: ++ - result_authselect_profile is not skipped ++ - result_pam_pwquality_present.found == 0 ++ ++ - name: Ensure a backup of current authselect profile before selecting the custom profile ++ ansible.builtin.command: ++ cmd: authselect apply-changes -b --backup=before-pwquality-hardening.backup ++ register: result_authselect_backup ++ when: ++ - result_authselect_check_cmd is success ++ - result_authselect_profile is not skipped ++ - authselect_current_profile is not match("custom/") ++ - authselect_custom_profile is not match(authselect_current_profile) ++ ++ - name: Ensure the custom profile is selected ++ ansible.builtin.command: ++ cmd: authselect select {{ authselect_custom_profile }} --force ++ register: result_pam_authselect_select_profile ++ when: ++ - result_authselect_check_cmd is success ++ - result_authselect_profile is not skipped ++ - authselect_current_profile is not match("custom/") ++ - authselect_custom_profile is not match(authselect_current_profile) ++ ++ - name: Restore the authselect features in the custom profile ++ ansible.builtin.command: ++ cmd: authselect enable-feature {{ item }} ++ loop: "{{ result_authselect_features.stdout_lines }}" ++ when: ++ - result_authselect_profile is not skipped ++ - result_authselect_features is not skipped ++ - result_pam_authselect_select_profile is not skipped ++ ++ - name: Ensure the custom profile changes are applied ++ ansible.builtin.command: ++ cmd: authselect apply-changes -b --backup=after-pwquality-hardening.backup ++ when: ++ - result_authselect_check_cmd is success ++ - result_authselect_profile is not skipped ++ when: ++ - result_authselect_present.stat.exists ++ ++# For systems without authselect ++- name: "Remediation where authselect tool is not present and PAM files are directly edited" ++ block: ++ - name: Ensure the desired configuration is present in the custom profile ++ ansible.builtin.lineinfile: ++ dest: "/etc/pam.d/password-auth" ++ insertbefore: ^password.*sufficient.*pam_unix.so.* ++ line: "password requisite pam_pwquality.so" ++ when: ++ - result_pam_pwquality_present.found == 0 ++ when: ++ - not result_authselect_present.stat.exists +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/bash/shared.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/bash/shared.sh +new file mode 100644 +index 00000000000..d2fca2a79ca +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/bash/shared.sh +@@ -0,0 +1,41 @@ ++# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel ++ ++PAM_FILE="password-auth" ++ ++if [ -f /usr/bin/authselect ]; then ++ if authselect check; then ++ CURRENT_PROFILE=$(authselect current -r | awk '{ print $1 }') ++ # Standard profiles delivered with authselect should not be modified. ++ # If not already in use, a custom profile is created preserving the enabled features. ++ if [[ ! $CURRENT_PROFILE == custom/* ]]; then ++ ENABLED_FEATURES=$(authselect current | tail -n+3 | awk '{ print $2 }') ++ authselect create-profile hardening -b $CURRENT_PROFILE ++ CURRENT_PROFILE="custom/hardening" ++ # Ensure a backup before changing the profile ++ authselect apply-changes -b --backup=before-pwquality-hardening.backup ++ authselect select $CURRENT_PROFILE ++ for feature in $ENABLED_FEATURES; do ++ authselect enable-feature $feature; ++ done ++ fi ++ # Include the desired configuration in the custom profile ++ CUSTOM_FILE="/etc/authselect/$CURRENT_PROFILE/$PAM_FILE" ++ # The line should be included on the top password section ++ if [ $(grep -c "^\s*password.*requisite.*pam_pwquality.so" $CUSTOM_FILE) -eq 0 ]; then ++ sed -i --follow-symlinks '0,/^password.*/s/^password.*/password requisite pam_pwquality.so\n&/' $CUSTOM_FILE ++ fi ++ authselect apply-changes -b --backup=after-pwquality-hardening.backup ++ else ++ echo " ++authselect integrity check failed. Remediation aborted! ++This remediation could not be applied because the authselect profile is not intact. ++It is not recommended to manually edit the PAM files when authselect is available. ++In cases where the default authselect profile does not cover a specific demand, a custom authselect profile is recommended." ++ false ++ fi ++else ++ FILE_PATH="/etc/pam.d/$PAM_FILE" ++ if [ $(grep -c "^\s*password.*requisite.*pam_pwquality.so" $FILE_PATH) -eq 0 ]; then ++ sed -i --follow-symlinks '0,/^password.*/s/^password.*/password requisite pam_pwquality.so\n&/' $FILE_PATH ++ fi ++fi +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/oval/shared.xml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/oval/shared.xml +new file mode 100644 +index 00000000000..84f32456beb +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/oval/shared.xml +@@ -0,0 +1,21 @@ ++ ++ ++ {{{ oval_metadata("The PAM module pam_pwquality is used in password-auth") }}} ++ ++ ++ ++ ++ ++ ++ /etc/pam.d/password-auth ++ ^password[\s]*requisite[\s]*pam_pwquality\.so ++ 1 ++ ++ ++ ++ ++ ++ +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/rule.yml +new file mode 100644 +index 00000000000..6c7bb1ad7a0 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/rule.yml +@@ -0,0 +1,35 @@ ++documentation_complete: true ++ ++prodtype: fedora,rhel7,rhel8,rhel9,rhv4 ++ ++title: 'Ensure PAM password complexity module is enabled in password-auth' ++ ++description: |- ++ To enable PAM password complexity in password-auth file: ++ Edit the password section in ++ /etc/pam.d/password-auth to show ++ password requisite pam_pwquality.so. ++ ++rationale: |- ++ Enabling PAM password complexity permits to enforce strong passwords and consequently ++ makes the system less prone to dictionary attacks. ++ ++severity: medium ++ ++identifiers: ++ cce@rhel7: CCE-85876-1 ++ cce@rhel8: CCE-85877-9 ++ cce@rhel9: CCE-85878-7 ++ ++references: ++ stigid@rhel8: RHEL-08-020100 ++ ++ocil_clause: 'pam_pwquality.so is not enabled in password-auth' ++ ++ocil: |- ++ To check if pam_pwhistory.so is enabled in password-auth, run the following command: ++
    $ grep pam_pwquality /etc/pam.d/password-auth
    ++ The output should be similar to the following: ++
    password    requisite                                    pam_pwquality.so
    ++ ++platform: pam +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_commented_entry.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_commented_entry.fail.sh +new file mode 100644 +index 00000000000..3d696c36b76 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_commented_entry.fail.sh +@@ -0,0 +1,11 @@ ++#!/bin/bash ++# packages = authselect ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora ++ ++authselect create-profile hardening -b sssd ++CUSTOM_PROFILE="custom/hardening" ++authselect select $CUSTOM_PROFILE --force ++ ++CUSTOM_SYSTEM_AUTH="/etc/authselect/$CUSTOM_PROFILE/password-auth" ++sed -i --follow-symlinks -e '/^password\s*requisite\s*pam_pwquality\.so/ s/^#*/#/g' $CUSTOM_SYSTEM_AUTH ++authselect apply-changes -b +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_correct_entry.pass.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_correct_entry.pass.sh +new file mode 100644 +index 00000000000..0435899262b +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_correct_entry.pass.sh +@@ -0,0 +1,13 @@ ++#!/bin/bash ++# packages = authselect ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora ++ ++authselect create-profile hardening -b sssd ++CUSTOM_PROFILE="custom/hardening" ++authselect select $CUSTOM_PROFILE --force ++ ++CUSTOM_SYSTEM_AUTH="/etc/authselect/$CUSTOM_PROFILE/password-auth" ++if [ $(grep -c "^\s*password.*requisite.*pam_pwquality.so" $CUSTOM_SYSTEM_AUTH) -eq 0 ]; then ++ sed -i --follow-symlinks '0,/^password.*/s/^password.*/password requisite pam_pwquality.so\n&/' $CUSTOM_SYSTEM_AUTH ++fi ++authselect apply-changes -b +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_missing_entry.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_missing_entry.fail.sh +new file mode 100644 +index 00000000000..472616a51f6 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_missing_entry.fail.sh +@@ -0,0 +1,11 @@ ++#!/bin/bash ++# packages = authselect ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora ++ ++authselect create-profile hardening -b sssd ++CUSTOM_PROFILE="custom/hardening" ++authselect select $CUSTOM_PROFILE --force ++ ++CUSTOM_SYSTEM_AUTH="/etc/authselect/$CUSTOM_PROFILE/password-auth" ++sed -i --follow-symlinks '/^password\s*requisite\s*pam_pwquality\.so/d' $CUSTOM_SYSTEM_AUTH ++authselect apply-changes -b +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_modified_pam.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_modified_pam.fail.sh +new file mode 100644 +index 00000000000..59f9d6f77c4 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/authselect_modified_pam.fail.sh +@@ -0,0 +1,9 @@ ++#!/bin/bash ++# packages = authselect ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora ++# remediation = none ++ ++SYSTEM_AUTH_FILE="/etc/pam.d/password-auth" ++ ++# This modification will break the integrity checks done by authselect. ++sed -i --follow-symlinks -e '/^password\s*requisite\s*pam_pwquality\.so/ s/^#*/#/g' $SYSTEM_AUTH_FILE +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/correct_entry.pass.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/correct_entry.pass.sh +new file mode 100644 +index 00000000000..71f87b19045 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/correct_entry.pass.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++# packages = pam ++# platform = Red Hat Enterprise Linux 7,Red Hat Virtualization 4,multi_platform_fedora ++ ++config_file=/etc/pam.d/password-auth ++if [ $(grep -c "^\s*password.*requisite.*pam_pwquality.so" $config_file) -eq 0 ]; then ++ sed -i --follow-symlinks '0,/^password.*/s/^password.*/password requisite pam_pwquality.so\n&/' $config_file ++fi +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/missing_entry.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/missing_entry.fail.sh +new file mode 100644 +index 00000000000..95b73b24d26 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_password_auth/tests/missing_entry.fail.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++# platform = Red Hat Enterprise Linux 7,Red Hat Virtualization 4,multi_platform_fedora ++# packages = pam ++ ++config_file=/etc/pam.d/password-auth ++ ++sed -i --follow-symlinks '/^password\s*requisite\s*pam_pwquality\.so/d' $config_file +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/ansible/shared.yml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/ansible/shared.yml +new file mode 100644 +index 00000000000..13cd20458ed +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/ansible/shared.yml +@@ -0,0 +1,150 @@ ++# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel ++# reboot = false ++# strategy = configure ++# complexity = low ++# disruption = medium ++ ++- name: Check for existing pam_pwquality.so entry ++ ansible.builtin.lineinfile: ++ path: "/etc/pam.d/system-auth" ++ create: no ++ regexp: '^password.*pam_pwquality.so.*' ++ state: absent ++ check_mode: true ++ changed_when: false ++ register: result_pam_pwquality_present ++ ++- name: Check if system relies on authselect ++ ansible.builtin.stat: ++ path: /usr/bin/authselect ++ register: result_authselect_present ++ ++- name: "Remediation where authselect tool is present" ++ block: ++ - name: Check the integrity of the current authselect profile ++ ansible.builtin.command: ++ cmd: authselect check ++ register: result_authselect_check_cmd ++ changed_when: false ++ ignore_errors: true ++ ++ - name: Informative message based on the authselect integrity check result ++ ansible.builtin.assert: ++ that: ++ - result_authselect_check_cmd is success ++ fail_msg: ++ - authselect integrity check failed. Remediation aborted! ++ - This remediation could not be applied because the authselect profile is not intact. ++ - It is not recommended to manually edit the PAM files when authselect is available. ++ - In cases where the default authselect profile does not cover a specific demand, a custom authselect profile is recommended. ++ success_msg: ++ - authselect integrity check passed ++ ++ - name: Get authselect current profile ++ ansible.builtin.shell: ++ cmd: authselect current -r | awk '{ print $1 }' ++ register: result_authselect_profile ++ changed_when: false ++ when: ++ - result_authselect_check_cmd is success ++ ++ - name: Define the current authselect profile as a local fact ++ ansible.builtin.set_fact: ++ authselect_current_profile: "{{ result_authselect_profile.stdout }}" ++ authselect_custom_profile: "{{ result_authselect_profile.stdout }}" ++ when: ++ - result_authselect_profile is not skipped ++ - result_authselect_profile.stdout is match("custom/") ++ ++ - name: Define the new authselect custom profile as a local fact ++ ansible.builtin.set_fact: ++ authselect_current_profile: "{{ result_authselect_profile.stdout }}" ++ authselect_custom_profile: "custom/hardening" ++ when: ++ - result_authselect_profile is not skipped ++ - result_authselect_profile.stdout is not match("custom/") ++ ++ - name: Get authselect current features to also enable them in the custom profile ++ ansible.builtin.shell: ++ cmd: authselect current | tail -n+3 | awk '{ print $2 }' ++ register: result_authselect_features ++ changed_when: false ++ when: ++ - result_authselect_profile is not skipped ++ - authselect_current_profile is not match("custom/") ++ ++ - name: Check if any custom profile with the same name was already created in the past ++ ansible.builtin.stat: ++ path: /etc/authselect/{{ authselect_custom_profile }} ++ register: result_authselect_custom_profile_present ++ changed_when: false ++ when: ++ - authselect_current_profile is not match("custom/") ++ ++ - name: Create a custom profile based on the current profile ++ ansible.builtin.command: ++ cmd: authselect create-profile hardening -b sssd ++ when: ++ - result_authselect_check_cmd is success ++ - authselect_current_profile is not match("custom/") ++ - not result_authselect_custom_profile_present.stat.exists ++ ++ - name: Ensure the desired configuration is present in the custom profile ++ ansible.builtin.lineinfile: ++ dest: "/etc/authselect/{{ authselect_custom_profile }}/system-auth" ++ insertbefore: ^password.*sufficient.*pam_unix.so.* ++ line: "password requisite pam_pwquality.so" ++ when: ++ - result_authselect_profile is not skipped ++ - result_pam_pwquality_present.found == 0 ++ ++ - name: Ensure a backup of current authselect profile before selecting the custom profile ++ ansible.builtin.command: ++ cmd: authselect apply-changes -b --backup=before-pwquality-hardening.backup ++ register: result_authselect_backup ++ when: ++ - result_authselect_check_cmd is success ++ - result_authselect_profile is not skipped ++ - authselect_current_profile is not match("custom/") ++ - authselect_custom_profile is not match(authselect_current_profile) ++ ++ - name: Ensure the custom profile is selected ++ ansible.builtin.command: ++ cmd: authselect select {{ authselect_custom_profile }} --force ++ register: result_pam_authselect_select_profile ++ when: ++ - result_authselect_check_cmd is success ++ - result_authselect_profile is not skipped ++ - authselect_current_profile is not match("custom/") ++ - authselect_custom_profile is not match(authselect_current_profile) ++ ++ - name: Restore the authselect features in the custom profile ++ ansible.builtin.command: ++ cmd: authselect enable-feature {{ item }} ++ loop: "{{ result_authselect_features.stdout_lines }}" ++ when: ++ - result_authselect_profile is not skipped ++ - result_authselect_features is not skipped ++ - result_pam_authselect_select_profile is not skipped ++ ++ - name: Ensure the custom profile changes are applied ++ ansible.builtin.command: ++ cmd: authselect apply-changes -b --backup=after-pwquality-hardening.backup ++ when: ++ - result_authselect_check_cmd is success ++ - result_authselect_profile is not skipped ++ when: ++ - result_authselect_present.stat.exists ++ ++# For systems without authselect ++- name: "Remediation where authselect tool is not present and PAM files are directly edited" ++ block: ++ - name: Ensure the desired configuration is present in the custom profile ++ ansible.builtin.lineinfile: ++ dest: "/etc/pam.d/system-auth" ++ insertbefore: ^password.*sufficient.*pam_unix.so.* ++ line: "password requisite pam_pwquality.so" ++ when: ++ - result_pam_pwquality_present.found == 0 ++ when: ++ - not result_authselect_present.stat.exists +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/bash/shared.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/bash/shared.sh +new file mode 100644 +index 00000000000..9a7972a3f93 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/bash/shared.sh +@@ -0,0 +1,41 @@ ++# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel ++ ++PAM_FILE="system-auth" ++ ++if [ -f /usr/bin/authselect ]; then ++ if authselect check; then ++ CURRENT_PROFILE=$(authselect current -r | awk '{ print $1 }') ++ # Standard profiles delivered with authselect should not be modified. ++ # If not already in use, a custom profile is created preserving the enabled features. ++ if [[ ! $CURRENT_PROFILE == custom/* ]]; then ++ ENABLED_FEATURES=$(authselect current | tail -n+3 | awk '{ print $2 }') ++ authselect create-profile hardening -b $CURRENT_PROFILE ++ CURRENT_PROFILE="custom/hardening" ++ # Ensure a backup before changing the profile ++ authselect apply-changes -b --backup=before-pwquality-hardening.backup ++ authselect select $CURRENT_PROFILE ++ for feature in $ENABLED_FEATURES; do ++ authselect enable-feature $feature; ++ done ++ fi ++ # Include the desired configuration in the custom profile ++ CUSTOM_FILE="/etc/authselect/$CURRENT_PROFILE/$PAM_FILE" ++ # The line should be included on the top password section ++ if [ $(grep -c "^\s*password.*requisite.*pam_pwquality.so" $CUSTOM_FILE) -eq 0 ]; then ++ sed -i --follow-symlinks '0,/^password.*/s/^password.*/password requisite pam_pwquality.so\n&/' $CUSTOM_FILE ++ fi ++ authselect apply-changes -b --backup=after-pwquality-hardening.backup ++ else ++ echo " ++authselect integrity check failed. Remediation aborted! ++This remediation could not be applied because the authselect profile is not intact. ++It is not recommended to manually edit the PAM files when authselect is available. ++In cases where the default authselect profile does not cover a specific demand, a custom authselect profile is recommended." ++ false ++ fi ++else ++ FILE_PATH="/etc/pam.d/$PAM_FILE" ++ if [ $(grep -c "^\s*password.*requisite.*pam_pwquality.so" $FILE_PATH) -eq 0 ]; then ++ sed -i --follow-symlinks '0,/^password.*/s/^password.*/password requisite pam_pwquality.so\n&/' $FILE_PATH ++ fi ++fi +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/oval/shared.xml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/oval/shared.xml +new file mode 100644 +index 00000000000..f8d241f1ff2 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/oval/shared.xml +@@ -0,0 +1,21 @@ ++ ++ ++ {{{ oval_metadata("The PAM module pam_pwquality is used in system-auth") }}} ++ ++ ++ ++ ++ ++ ++ /etc/pam.d/system-auth ++ ^password[\s]*requisite[\s]*pam_pwquality\.so ++ 1 ++ ++ ++ ++ ++ ++ +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/rule.yml +new file mode 100644 +index 00000000000..ea42ff9b07a +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/rule.yml +@@ -0,0 +1,35 @@ ++documentation_complete: true ++ ++prodtype: fedora,rhel7,rhel8,rhel9,rhv4 ++ ++title: 'Ensure PAM password complexity module is enabled in system-auth' ++ ++description: |- ++ To enable PAM password complexity in system-auth file: ++ Edit the password section in ++ /etc/pam.d/system-auth to show ++ password requisite pam_pwquality.so. ++ ++rationale: |- ++ Enabling PAM password complexity permits to enforce strong passwords and consequently ++ makes the system less prone to dictionary attacks. ++ ++severity: medium ++ ++identifiers: ++ cce@rhel7: CCE-85874-6 ++ cce@rhel8: CCE-85872-0 ++ cce@rhel9: CCE-85873-8 ++ ++references: ++ stigid@rhel8: RHEL-08-020101 ++ ++ocil_clause: 'pam_pwquality.so is not enabled in system-auth' ++ ++ocil: |- ++ To check if pam_pwhistory.so is enabled in system-auth, run the following command: ++
    $ grep pam_pwquality /etc/pam.d/system-auth
    ++ The output should be similar to the following: ++
    password    requisite                                    pam_pwquality.so
    ++ ++platform: pam +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_commented_entry.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_commented_entry.fail.sh +new file mode 100644 +index 00000000000..849f16d0f93 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_commented_entry.fail.sh +@@ -0,0 +1,11 @@ ++#!/bin/bash ++# packages = authselect ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora ++ ++authselect create-profile hardening -b sssd ++CUSTOM_PROFILE="custom/hardening" ++authselect select $CUSTOM_PROFILE --force ++ ++CUSTOM_SYSTEM_AUTH="/etc/authselect/$CUSTOM_PROFILE/system-auth" ++sed -i --follow-symlinks -e '/^password\s*requisite\s*pam_pwquality\.so/ s/^#*/#/g' $CUSTOM_SYSTEM_AUTH ++authselect apply-changes -b +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_correct_entry.pass.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_correct_entry.pass.sh +new file mode 100644 +index 00000000000..6a98c244980 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_correct_entry.pass.sh +@@ -0,0 +1,13 @@ ++#!/bin/bash ++# packages = authselect ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora ++ ++authselect create-profile hardening -b sssd ++CUSTOM_PROFILE="custom/hardening" ++authselect select $CUSTOM_PROFILE --force ++ ++CUSTOM_SYSTEM_AUTH="/etc/authselect/$CUSTOM_PROFILE/system-auth" ++if [ $(grep -c "^\s*password.*requisite.*pam_pwquality.so" $CUSTOM_SYSTEM_AUTH) -eq 0 ]; then ++ sed -i --follow-symlinks '0,/^password.*/s/^password.*/password requisite pam_pwquality.so\n&/' $CUSTOM_SYSTEM_AUTH ++fi ++authselect apply-changes -b +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_missing_entry.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_missing_entry.fail.sh +new file mode 100644 +index 00000000000..6786f6c13d7 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_missing_entry.fail.sh +@@ -0,0 +1,11 @@ ++#!/bin/bash ++# packages = authselect ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora ++ ++authselect create-profile hardening -b sssd ++CUSTOM_PROFILE="custom/hardening" ++authselect select $CUSTOM_PROFILE --force ++ ++CUSTOM_SYSTEM_AUTH="/etc/authselect/$CUSTOM_PROFILE/system-auth" ++sed -i --follow-symlinks '/^password\s*requisite\s*pam_pwquality\.so/d' $CUSTOM_SYSTEM_AUTH ++authselect apply-changes -b +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_modified_pam.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_modified_pam.fail.sh +new file mode 100644 +index 00000000000..b3d9e5884f5 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/authselect_modified_pam.fail.sh +@@ -0,0 +1,9 @@ ++#!/bin/bash ++# packages = authselect ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora ++# remediation = none ++ ++SYSTEM_AUTH_FILE="/etc/pam.d/system-auth" ++ ++# This modification will break the integrity checks done by authselect. ++sed -i --follow-symlinks -e '/^password\s*requisite\s*pam_pwquality\.so/ s/^#*/#/g' $SYSTEM_AUTH_FILE +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/correct_entry.pass.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/correct_entry.pass.sh +new file mode 100644 +index 00000000000..71f87b19045 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/correct_entry.pass.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++# packages = pam ++# platform = Red Hat Enterprise Linux 7,Red Hat Virtualization 4,multi_platform_fedora ++ ++config_file=/etc/pam.d/password-auth ++if [ $(grep -c "^\s*password.*requisite.*pam_pwquality.so" $config_file) -eq 0 ]; then ++ sed -i --follow-symlinks '0,/^password.*/s/^password.*/password requisite pam_pwquality.so\n&/' $config_file ++fi +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/missing_entry.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/missing_entry.fail.sh +new file mode 100644 +index 00000000000..3c8f6f79fe9 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_pwquality_system_auth/tests/missing_entry.fail.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++# platform = Red Hat Enterprise Linux 7,Red Hat Virtualization 4,multi_platform_fedora ++# packages = pam ++ ++config_file=/etc/pam.d/system-auth ++ ++sed -i --follow-symlinks '/^password\s*requisite\s*pam_pwquality\.so/d' $config_file +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/rule.yml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/rule.yml +index eeb55a6ff5c..6b2219a3eab 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/rule.yml ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/rule.yml +@@ -6,13 +6,16 @@ title: 'Ensure PAM Enforces Password Requirements - Authentication Retry Prompts + + description: |- + To configure the number of retry prompts that are permitted per-session: ++ {{% if product in ['rhel8', 'rhel9'] %}} ++ Edit the /etc/security/pwquality.conf to include ++ {{% else %}} + Edit the pam_pwquality.so statement in + {{% if 'ubuntu' not in product %}} +- /etc/pam.d/system-auth {{% if product in ['rhel8', 'rhel9'] %}} and +- /etc/pam.d/password-auth {{% endif %}} to show ++ /etc/pam.d/system-auth to show + {{% else %}} + /etc/pam.d/common-password to show + {{% endif %}} ++ {{% endif %}} + retry={{{xccdf_value("var_password_pam_retry") }}}, or a lower value if site + policy is more restrictive. The DoD requirement is a maximum of 3 prompts + per session. +@@ -48,17 +51,21 @@ references: + stigid@ol7: OL07-00-010119 + stigid@ol8: OL08-00-020100 + stigid@rhel7: RHEL-07-010119 +- stigid@rhel8: RHEL-08-020100 ++ stigid@rhel8: RHEL-08-020104 + stigid@ubuntu2004: UBTU-20-010057 + + ocil_clause: 'it is not the required value' + + ocil: |- + To check how many retry attempts are permitted on a per-session basis, run the following command: ++ {{% if product in ['rhel8', 'rhel9'] %}} ++
    $ grep retry /etc/security/pwquality.conf
    ++ {{% else %}} + {{% if 'ubuntu' in product %}} +
    $ grep pam_pwquality /etc/pam.d/common-password
    + {{% else %}} +-
    $ grep pam_pwquality /etc/pam.d/system-auth {{% if product in ['rhel8', 'rhel9'] %}}/etc/pam.d/password-auth{{% endif %}}
    ++
    $ grep pam_pwquality /etc/pam.d/system-auth
    ++ {{% endif %}} + {{% endif %}} + The retry parameter will indicate how many attempts are permitted. + The DoD required value is less than or equal to 3. +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index d92bc72971c..62fc512f05e 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -523,6 +523,20 @@ selections: + - sssd_enable_certmap + + # RHEL-08-020100 ++ - accounts_password_pam_pwquality_password_auth ++ ++ # RHEL-08-020101 ++ - accounts_password_pam_pwquality_system_auth ++ ++ # RHEL-08-020102 ++ # This is only required for RHEL8 systems below version 8.4 where the ++ # retry parameter was not yet available on /etc/security/pwquality.conf. ++ ++ # RHEL-08-020103 ++ # This is only required for RHEL8 systems below version 8.4 where the ++ # retry parameter was not yet available on /etc/security/pwquality.conf. ++ ++ # RHEL-08-020104 + - accounts_password_pam_retry + + # RHEL-08-020110 +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 42c6d0e9aca..ad08a6d3410 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -524,6 +524,20 @@ selections: + - sssd_enable_certmap + + # RHEL-08-020100 ++ - accounts_password_pam_pwquality_password_auth ++ ++ # RHEL-08-020101 ++ - accounts_password_pam_pwquality_system_auth ++ ++ # RHEL-08-020102 ++ # This is only required for RHEL8 systems below version 8.4 where the ++ # retry parameter was not yet available on /etc/security/pwquality.conf. ++ ++ # RHEL-08-020103 ++ # This is only required for RHEL8 systems below version 8.4 where the ++ # retry parameter was not yet available on /etc/security/pwquality.conf. ++ ++ # RHEL-08-020104 + - accounts_password_pam_retry + + # RHEL-08-020110 +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index e4fee44f9f9..33e82401c3d 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -53,6 +53,8 @@ selections: + - accounts_password_pam_ocredit + - accounts_password_pam_pwhistory_remember_password_auth + - accounts_password_pam_pwhistory_remember_system_auth ++- accounts_password_pam_pwquality_password_auth ++- accounts_password_pam_pwquality_system_auth + - accounts_password_pam_retry + - accounts_password_pam_ucredit + - accounts_password_pam_unix_rounds_password_auth +diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile +index 83d04775e3a..5beeb4f28af 100644 +--- a/tests/data/profile_stability/rhel8/stig_gui.profile ++++ b/tests/data/profile_stability/rhel8/stig_gui.profile +@@ -64,6 +64,8 @@ selections: + - accounts_password_pam_ocredit + - accounts_password_pam_pwhistory_remember_password_auth + - accounts_password_pam_pwhistory_remember_system_auth ++- accounts_password_pam_pwquality_password_auth ++- accounts_password_pam_pwquality_system_auth + - accounts_password_pam_retry + - accounts_password_pam_ucredit + - accounts_password_pam_unix_rounds_password_auth diff --git a/SOURCES/scap-security-guide-0.1.61-rear_not_applicable_aarch64-PR_8221.patch b/SOURCES/scap-security-guide-0.1.61-rear_not_applicable_aarch64-PR_8221.patch new file mode 100644 index 0000000..c5bc6f7 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-rear_not_applicable_aarch64-PR_8221.patch @@ -0,0 +1,126 @@ +From 622558873703704bd97fde1874a9a782d4cb8b0e Mon Sep 17 00:00:00 2001 +From: Gabriel Becker +Date: Mon, 14 Feb 2022 17:51:50 +0100 +Subject: [PATCH] Introduce CPE for aarch64 and make package_rear_installed n/a + aarch64. + +This rule is not applicable for RHEL9 only. +--- + .../package_rear_installed/rule.yml | 4 +++ + shared/applicability/arch.yml | 12 +++++++ + ...proc_sys_kernel_osrelease_arch_aarch64.xml | 33 +++++++++++++++++++ + ..._sys_kernel_osrelease_arch_not_aarch64.xml | 16 +++++++++ + ssg/constants.py | 2 ++ + 5 files changed, 67 insertions(+) + create mode 100644 shared/checks/oval/proc_sys_kernel_osrelease_arch_aarch64.xml + create mode 100644 shared/checks/oval/proc_sys_kernel_osrelease_arch_not_aarch64.xml + +diff --git a/linux_os/guide/system/software/system-tools/package_rear_installed/rule.yml b/linux_os/guide/system/software/system-tools/package_rear_installed/rule.yml +index 6e3c11e5749..efb591654a9 100644 +--- a/linux_os/guide/system/software/system-tools/package_rear_installed/rule.yml ++++ b/linux_os/guide/system/software/system-tools/package_rear_installed/rule.yml +@@ -25,6 +25,10 @@ ocil: '{{{ ocil_package(package="rear") }}}' + # The package is not available for s309x on RHEL<8.5 + # platform: not_s390x_arch + ++{{%- if product == "rhel9" %}} ++platform: not_aarch64_arch ++{{%- endif %}} ++ + template: + name: package_installed + vars: +diff --git a/shared/applicability/arch.yml b/shared/applicability/arch.yml +index d2cbd102310..9ac05317a95 100644 +--- a/shared/applicability/arch.yml ++++ b/shared/applicability/arch.yml +@@ -12,3 +12,15 @@ cpes: + check_id: proc_sys_kernel_osrelease_arch_s390x + bash_conditional: 'grep -q s390x /proc/sys/kernel/osrelease' + ++ - not_aarch64_arch: ++ name: "cpe:/a:not_aarch64_arch" ++ title: "System architecture is not AARCH64" ++ check_id: proc_sys_kernel_osrelease_arch_not_aarch64 ++ bash_conditional: "! grep -q aarch64 /proc/sys/kernel/osrelease" ++ ++ - aarch64_arch: ++ name: "cpe:/a:aarch64_arch" ++ title: "System architecture is AARCH64" ++ check_id: proc_sys_kernel_osrelease_arch_aarch64 ++ bash_conditional: 'grep -q aarch64 /proc/sys/kernel/osrelease' ++ +diff --git a/shared/checks/oval/proc_sys_kernel_osrelease_arch_aarch64.xml b/shared/checks/oval/proc_sys_kernel_osrelease_arch_aarch64.xml +new file mode 100644 +index 00000000000..3d54f81e6d4 +--- /dev/null ++++ b/shared/checks/oval/proc_sys_kernel_osrelease_arch_aarch64.xml +@@ -0,0 +1,33 @@ ++ ++ ++ ++ Test that the architecture is aarch64 ++ ++ multi_platform_all ++ ++ Check that architecture of kernel in /proc/sys/kernel/osrelease is aarch64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ /proc/sys/kernel/osrelease ++ ^.*\.(.*)$ ++ 1 ++ ++ ++ ++ ^aarch64$ ++ ++ +diff --git a/shared/checks/oval/proc_sys_kernel_osrelease_arch_not_aarch64.xml b/shared/checks/oval/proc_sys_kernel_osrelease_arch_not_aarch64.xml +new file mode 100644 +index 00000000000..3fce66ee00a +--- /dev/null ++++ b/shared/checks/oval/proc_sys_kernel_osrelease_arch_not_aarch64.xml +@@ -0,0 +1,16 @@ ++ ++ ++ ++ Test for different architecture than aarch64 ++ ++ multi_platform_all ++ ++ Check that architecture of kernel in /proc/sys/kernel/osrelease is not aarch64 ++ ++ ++ ++ ++ ++ +diff --git a/ssg/constants.py b/ssg/constants.py +index 64d7d36c989..92cc2f8de34 100644 +--- a/ssg/constants.py ++++ b/ssg/constants.py +@@ -424,6 +424,8 @@ + "non-uefi": None, + "not_s390x_arch": None, + "s390x_arch": None, ++ "not_aarch64_arch": None, ++ "aarch64_arch": None, + "ovirt": None, + "no_ovirt": None, + } diff --git a/SOURCES/scap-security-guide-0.1.61-remove_RHEL_08_010560-PR_8145.patch b/SOURCES/scap-security-guide-0.1.61-remove_RHEL_08_010560-PR_8145.patch new file mode 100644 index 0000000..2351cfc --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-remove_RHEL_08_010560-PR_8145.patch @@ -0,0 +1,44 @@ +diff --git a/controls/stig_rhel8.yml b/controls/stig_rhel8.yml +index d7821c2e3b8..fe6b0f01186 100644 +--- a/controls/stig_rhel8.yml ++++ b/controls/stig_rhel8.yml +@@ -584,11 +584,6 @@ controls: + rules: + - sshd_disable_root_login + status: automated +- - id: RHEL-08-010560 +- levels: +- - medium +- title: The auditd service must be running in RHEL 8. +- status: pending + - id: RHEL-08-010561 + levels: + - medium +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index 7c89bcbf659..09fa85df181 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -368,9 +368,6 @@ selections: + # RHEL-08-010550 + - sshd_disable_root_login + +- # RHEL-08-010560 +- - service_auditd_enabled +- + # RHEL-08-010561 + - service_rsyslog_enabled + +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 690991f697b..eb2cac913bd 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -369,9 +369,6 @@ selections: + # RHEL-08-010550 + - sshd_disable_root_login + +- # RHEL-08-010560 +- - service_auditd_enabled +- + # RHEL-08-010561 + - service_rsyslog_enabled + diff --git a/SOURCES/scap-security-guide-0.1.61-remove_client_alive_max-PR_8197.patch b/SOURCES/scap-security-guide-0.1.61-remove_client_alive_max-PR_8197.patch new file mode 100644 index 0000000..e9f7e42 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-remove_client_alive_max-PR_8197.patch @@ -0,0 +1,106 @@ +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index d92bc72971c..98cabee38dd 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -51,7 +51,7 @@ selections: + - var_password_pam_lcredit=1 + - var_password_pam_retry=3 + - var_password_pam_minlen=15 +- - var_sshd_set_keepalive=0 ++ # - var_sshd_set_keepalive=0 + - sshd_approved_macs=stig + - sshd_approved_ciphers=stig + - sshd_idle_timeout_value=10_minutes +@@ -170,11 +170,13 @@ selections: + # RHEL-08-010190 + - dir_perms_world_writable_sticky_bits + +- # RHEL-08-010200 +- - sshd_set_keepalive_0 +- +- # RHEL-08-010201 +- - sshd_set_idle_timeout ++ # These two items don't behave as they used to in RHEL8.6 and RHEL9 ++ # anymore. They will be disabled for now until an alternative ++ # solution is found. ++ # # RHEL-08-010200 ++ # - sshd_set_keepalive_0 ++ # # RHEL-08-010201 ++ # - sshd_set_idle_timeout + + # RHEL-08-010210 + - file_permissions_var_log_messages +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 42c6d0e9aca..842f17c7021 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -52,7 +52,7 @@ selections: + - var_password_pam_lcredit=1 + - var_password_pam_retry=3 + - var_password_pam_minlen=15 +- - var_sshd_set_keepalive=0 ++ # - var_sshd_set_keepalive=0 + - sshd_approved_macs=stig + - sshd_approved_ciphers=stig + - sshd_idle_timeout_value=10_minutes +@@ -171,11 +171,13 @@ selections: + # RHEL-08-010190 + - dir_perms_world_writable_sticky_bits + +- # RHEL-08-010200 +- - sshd_set_keepalive_0 +- +- # RHEL-08-010201 +- - sshd_set_idle_timeout ++ # These two items don't behave as they used to in RHEL8.6 and RHEL9 ++ # anymore. They will be disabled for now until an alternative ++ # solution is found. ++ # # RHEL-08-010200 ++ # - sshd_set_keepalive_0 ++ # # RHEL-08-010201 ++ # - sshd_set_idle_timeout + + # RHEL-08-010210 + - file_permissions_var_log_messages +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index e4fee44f9f9..e3c8ebfc9a5 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -353,8 +353,6 @@ selections: + - sshd_enable_warning_banner + - sshd_print_last_log + - sshd_rekey_limit +-- sshd_set_idle_timeout +-- sshd_set_keepalive_0 + - sshd_use_strong_rng + - sshd_x11_use_localhost + - sssd_certificate_verification +@@ -423,7 +421,6 @@ selections: + - var_password_pam_ucredit=1 + - var_password_pam_lcredit=1 + - var_password_pam_retry=3 +-- var_sshd_set_keepalive=0 + - sshd_approved_macs=stig + - sshd_approved_ciphers=stig + - sshd_idle_timeout_value=10_minutes +diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile +index 83d04775e3a..8ef48e0654b 100644 +--- a/tests/data/profile_stability/rhel8/stig_gui.profile ++++ b/tests/data/profile_stability/rhel8/stig_gui.profile +@@ -364,8 +364,6 @@ selections: + - sshd_enable_warning_banner + - sshd_print_last_log + - sshd_rekey_limit +-- sshd_set_idle_timeout +-- sshd_set_keepalive_0 + - sshd_use_strong_rng + - sshd_x11_use_localhost + - sssd_certificate_verification +@@ -432,7 +430,6 @@ selections: + - var_password_pam_ucredit=1 + - var_password_pam_lcredit=1 + - var_password_pam_retry=3 +-- var_sshd_set_keepalive=0 + - sshd_approved_macs=stig + - sshd_approved_ciphers=stig + - sshd_idle_timeout_value=10_minutes diff --git a/SOURCES/scap-security-guide-0.1.61-rhel86_ospp_fix_audit_ospp_general-PR_8152.patch b/SOURCES/scap-security-guide-0.1.61-rhel86_ospp_fix_audit_ospp_general-PR_8152.patch new file mode 100644 index 0000000..85f12d9 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-rhel86_ospp_fix_audit_ospp_general-PR_8152.patch @@ -0,0 +1,285 @@ +diff --git a/linux_os/guide/system/auditing/policy_rules/audit_access_failed/rule.yml b/linux_os/guide/system/auditing/policy_rules/audit_access_failed/rule.yml +index 09dc1566bbf..26c7eea79d1 100644 +--- a/linux_os/guide/system/auditing/policy_rules/audit_access_failed/rule.yml ++++ b/linux_os/guide/system/auditing/policy_rules/audit_access_failed/rule.yml +@@ -6,10 +6,10 @@ title: 'Configure auditing of unsuccessful file accesses' + + {{% set file_contents_audit_access_failed = + "## Unsuccessful file access (any other opens) This has to go last. +--a always,exit -F arch=b32 -S open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=unsuccessful-access +--a always,exit -F arch=b64 -S open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=unsuccessful-access +--a always,exit -F arch=b32 -S open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=unsuccessful-access +--a always,exit -F arch=b64 -S open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=unsuccessful-access" %}} ++-a always,exit -F arch=b32 -S open,openat,openat2,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=unsuccessful-access ++-a always,exit -F arch=b64 -S open,openat,openat2,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=unsuccessful-access ++-a always,exit -F arch=b32 -S open,openat,openat2,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=unsuccessful-access ++-a always,exit -F arch=b64 -S open,openat,openat2,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=unsuccessful-access" %}} + + description: |- + Ensure that unsuccessful attempts to access a file are audited. +diff --git a/linux_os/guide/system/auditing/policy_rules/audit_access_success/rule.yml b/linux_os/guide/system/auditing/policy_rules/audit_access_success/rule.yml +index 5ce9fe6799c..262cf290ec0 100644 +--- a/linux_os/guide/system/auditing/policy_rules/audit_access_success/rule.yml ++++ b/linux_os/guide/system/auditing/policy_rules/audit_access_success/rule.yml +@@ -7,8 +7,8 @@ title: 'Configure auditing of successful file accesses' + {{% set file_contents_audit_access_success = + "## Successful file access (any other opens) This has to go last. + ## These next two are likely to result in a whole lot of events +--a always,exit -F arch=b32 -S open,openat,open_by_handle_at -F success=1 -F auid>=1000 -F auid!=unset -F key=successful-access +--a always,exit -F arch=b64 -S open,openat,open_by_handle_at -F success=1 -F auid>=1000 -F auid!=unset -F key=successful-access" %}} ++-a always,exit -F arch=b32 -S open,openat,openat2,open_by_handle_at -F success=1 -F auid>=1000 -F auid!=unset -F key=successful-access ++-a always,exit -F arch=b64 -S open,openat,openat2,open_by_handle_at -F success=1 -F auid>=1000 -F auid!=unset -F key=successful-access" %}} + + description: |- + Ensure that successful attempts to access a file are audited. +diff --git a/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/rule.yml b/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/rule.yml +index e37291c68a1..bdc59faa5f7 100644 +--- a/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/rule.yml ++++ b/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/rule.yml +@@ -4,7 +4,7 @@ prodtype: ol8,rhcos4,rhel8,rhel9 + + title: 'Perform general configuration of Audit for OSPP' + +-{{% if product == "rhel9" %}} ++ + {{% set file_contents_audit_ospp_general = + "## The purpose of these rules is to meet the requirements for Operating + ## System Protection Profile (OSPP)v4.2. These rules depends on having +@@ -90,89 +90,7 @@ title: 'Perform general configuration of Audit for OSPP' + ## state results from that policy. This would be handled entirely by + ## that daemon. + " %}} +-{{% else %}} +-{{% set file_contents_audit_ospp_general = +-"## The purpose of these rules is to meet the requirements for Operating +-## System Protection Profile (OSPP)v4.2. These rules depends on having +-## the following rule files copied to /etc/audit/rules.d: +-## +-## 10-base-config.rules, 11-loginuid.rules, +-## 30-ospp-v42-1-create-failed.rules, 30-ospp-v42-1-create-success.rules, +-## 30-ospp-v42-2-modify-failed.rules, 30-ospp-v42-2-modify-success.rules, +-## 30-ospp-v42-3-access-failed.rules, 30-ospp-v42-3-access-success.rules, +-## 30-ospp-v42-4-delete-failed.rules, 30-ospp-v42-4-delete-success.rules, +-## 30-ospp-v42-5-perm-change-failed.rules, +-## 30-ospp-v42-5-perm-change-success.rules, +-## 30-ospp-v42-6-owner-change-failed.rules, +-## 30-ospp-v42-6-owner-change-success.rules +-## +-## original copies may be found in /usr/share/audit/sample-rules/ +- +- +-## User add delete modify. This is covered by pam. However, someone could +-## open a file and directly create or modify a user, so we'll watch passwd and +-## shadow for writes +--a always,exit -F arch=b32 -S openat,open_by_handle_at -F a2&03 -F path=/etc/passwd -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b64 -S openat,open_by_handle_at -F a2&03 -F path=/etc/passwd -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b32 -S open -F a1&03 -F path=/etc/passwd -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b64 -S open -F a1&03 -F path=/etc/passwd -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b32 -S openat,open_by_handle_at -F a2&03 -F path=/etc/shadow -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b64 -S openat,open_by_handle_at -F a2&03 -F path=/etc/shadow -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b32 -S open -F a1&03 -F path=/etc/shadow -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b64 -S open -F a1&03 -F path=/etc/shadow -F auid>=1000 -F auid!=unset -F key=user-modify +- +-## User enable and disable. This is entirely handled by pam. +- +-## Group add delete modify. This is covered by pam. However, someone could +-## open a file and directly create or modify a user, so we'll watch group and +-## gshadow for writes +--a always,exit -F path=/etc/passwd -F perm=wa -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F path=/etc/shadow -F perm=wa -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F path=/etc/group -F perm=wa -F auid>=1000 -F auid!=unset -F key=group-modify +--a always,exit -F path=/etc/gshadow -F perm=wa -F auid>=1000 -F auid!=unset -F key=group-modify +- + +-## Use of special rights for config changes. This would be use of setuid +-## programs that relate to user accts. This is not all setuid apps because +-## requirements are only for ones that affect system configuration. +--a always,exit -F path=/usr/sbin/unix_chkpwd -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/sbin/usernetctl -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/sbin/userhelper -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/sbin/seunshare -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/mount -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/newgrp -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/newuidmap -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/gpasswd -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/newgidmap -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/umount -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/passwd -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/crontab -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/at -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +- +-## Privilege escalation via su or sudo. This is entirely handled by pam. +- +-## Audit log access +--a always,exit -F dir=/var/log/audit/ -F perm=r -F auid>=1000 -F auid!=unset -F key=access-audit-trail +-## Attempts to Alter Process and Session Initiation Information +--a always,exit -F path=/var/run/utmp -F perm=wa -F auid>=1000 -F auid!=unset -F key=session +--a always,exit -F path=/var/log/btmp -F perm=wa -F auid>=1000 -F auid!=unset -F key=session +--a always,exit -F path=/var/log/wtmp -F perm=wa -F auid>=1000 -F auid!=unset -F key=session +- +-## Attempts to modify MAC controls +--a always,exit -F dir=/etc/selinux/ -F perm=wa -F auid>=1000 -F auid!=unset -F key=MAC-policy +- +-## Software updates. This is entirely handled by rpm. +- +-## System start and shutdown. This is entirely handled by systemd +- +-## Kernel Module loading. This is handled in 43-module-load.rules +- +-## Application invocation. The requirements list an optional requirement +-## FPT_SRP_EXT.1 Software Restriction Policies. This event is intended to +-## state results from that policy. This would be handled entirely by +-## that daemon. +-" %}} +-{{% endif %}} + + description: |- + Configure some basic Audit parameters specific for OSPP profile. +diff --git a/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/tests/correct_rules.pass.sh b/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/tests/correct_rules.pass.sh +index ffe2344db56..c59e7e5e1f2 100644 +--- a/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/tests/correct_rules.pass.sh ++++ b/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/tests/correct_rules.pass.sh +@@ -1,3 +1,3 @@ +-# platform = Red Hat Enterprise Linux 8 ++# platform = Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9 + + cp $SHARED/audit/30-ospp-v42.rules /etc/audit/rules.d/ +diff --git a/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/tests/correct_rules_rhel9.pass.sh b/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/tests/correct_rules_rhel9.pass.sh +deleted file mode 100644 +index 96ef5ae0a23..00000000000 +--- a/linux_os/guide/system/auditing/policy_rules/audit_ospp_general/tests/correct_rules_rhel9.pass.sh ++++ /dev/null +@@ -1,3 +0,0 @@ +-# platform = Red Hat Enterprise Linux 9 +- +-cp $SHARED/audit/30-ospp-v42_rhel9.rules /etc/audit/rules.d/30-ospp-v42.rules +diff --git a/tests/shared/audit/30-ospp-v42-3-access-failed.rules b/tests/shared/audit/30-ospp-v42-3-access-failed.rules +index a5aad3a95ce..39ac7a883ca 100644 +--- a/tests/shared/audit/30-ospp-v42-3-access-failed.rules ++++ b/tests/shared/audit/30-ospp-v42-3-access-failed.rules +@@ -1,5 +1,5 @@ + ## Unsuccessful file access (any other opens) This has to go last. +--a always,exit -F arch=b32 -S open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=unsuccessful-access +--a always,exit -F arch=b64 -S open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=unsuccessful-access +--a always,exit -F arch=b32 -S open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=unsuccessful-access +--a always,exit -F arch=b64 -S open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=unsuccessful-access ++-a always,exit -F arch=b32 -S open,openat,openat2,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=unsuccessful-access ++-a always,exit -F arch=b64 -S open,openat,openat2,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=unsuccessful-access ++-a always,exit -F arch=b32 -S open,openat,openat2,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=unsuccessful-access ++-a always,exit -F arch=b64 -S open,openat,openat2,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=unsuccessful-access +diff --git a/tests/shared/audit/30-ospp-v42-3-access-success.rules b/tests/shared/audit/30-ospp-v42-3-access-success.rules +index 0c8a6b65760..79004ce0c21 100644 +--- a/tests/shared/audit/30-ospp-v42-3-access-success.rules ++++ b/tests/shared/audit/30-ospp-v42-3-access-success.rules +@@ -1,4 +1,4 @@ + ## Successful file access (any other opens) This has to go last. + ## These next two are likely to result in a whole lot of events +--a always,exit -F arch=b32 -S open,openat,open_by_handle_at -F success=1 -F auid>=1000 -F auid!=unset -F key=successful-access +--a always,exit -F arch=b64 -S open,openat,open_by_handle_at -F success=1 -F auid>=1000 -F auid!=unset -F key=successful-access ++-a always,exit -F arch=b32 -S open,openat,openat2,open_by_handle_at -F success=1 -F auid>=1000 -F auid!=unset -F key=successful-access ++-a always,exit -F arch=b64 -S open,openat,openat2,open_by_handle_at -F success=1 -F auid>=1000 -F auid!=unset -F key=successful-access +diff --git a/tests/shared/audit/30-ospp-v42.rules b/tests/shared/audit/30-ospp-v42.rules +index 3dced17255c..2d3c48265b6 100644 +--- a/tests/shared/audit/30-ospp-v42.rules ++++ b/tests/shared/audit/30-ospp-v42.rules +@@ -57,6 +57,10 @@ + + ## Privilege escalation via su or sudo. This is entirely handled by pam. + ++## Watch for configuration changes to privilege escalation. ++-a always,exit -F path=/etc/sudoers -F perm=wa -F key=special-config-changes ++-a always,exit -F dir=/etc/sudoers.d/ -F perm=wa -F key=special-config-changes ++ + ## Audit log access + -a always,exit -F dir=/var/log/audit/ -F perm=r -F auid>=1000 -F auid!=unset -F key=access-audit-trail + ## Attempts to Alter Process and Session Initiation Information +diff --git a/tests/shared/audit/30-ospp-v42_rhel9.rules b/tests/shared/audit/30-ospp-v42_rhel9.rules +deleted file mode 100644 +index 2d3c48265b6..00000000000 +--- a/tests/shared/audit/30-ospp-v42_rhel9.rules ++++ /dev/null +@@ -1,84 +0,0 @@ +-## The purpose of these rules is to meet the requirements for Operating +-## System Protection Profile (OSPP)v4.2. These rules depends on having +-## the following rule files copied to /etc/audit/rules.d: +-## +-## 10-base-config.rules, 11-loginuid.rules, +-## 30-ospp-v42-1-create-failed.rules, 30-ospp-v42-1-create-success.rules, +-## 30-ospp-v42-2-modify-failed.rules, 30-ospp-v42-2-modify-success.rules, +-## 30-ospp-v42-3-access-failed.rules, 30-ospp-v42-3-access-success.rules, +-## 30-ospp-v42-4-delete-failed.rules, 30-ospp-v42-4-delete-success.rules, +-## 30-ospp-v42-5-perm-change-failed.rules, +-## 30-ospp-v42-5-perm-change-success.rules, +-## 30-ospp-v42-6-owner-change-failed.rules, +-## 30-ospp-v42-6-owner-change-success.rules +-## +-## original copies may be found in /usr/share/audit/sample-rules/ +- +- +-## User add delete modify. This is covered by pam. However, someone could +-## open a file and directly create or modify a user, so we'll watch passwd and +-## shadow for writes +--a always,exit -F arch=b32 -S openat,open_by_handle_at -F a2&03 -F path=/etc/passwd -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b64 -S openat,open_by_handle_at -F a2&03 -F path=/etc/passwd -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b32 -S open -F a1&03 -F path=/etc/passwd -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b64 -S open -F a1&03 -F path=/etc/passwd -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b32 -S openat,open_by_handle_at -F a2&03 -F path=/etc/shadow -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b64 -S openat,open_by_handle_at -F a2&03 -F path=/etc/shadow -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b32 -S open -F a1&03 -F path=/etc/shadow -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F arch=b64 -S open -F a1&03 -F path=/etc/shadow -F auid>=1000 -F auid!=unset -F key=user-modify +- +-## User enable and disable. This is entirely handled by pam. +- +-## Group add delete modify. This is covered by pam. However, someone could +-## open a file and directly create or modify a user, so we'll watch group and +-## gshadow for writes +--a always,exit -F path=/etc/passwd -F perm=wa -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F path=/etc/shadow -F perm=wa -F auid>=1000 -F auid!=unset -F key=user-modify +--a always,exit -F path=/etc/group -F perm=wa -F auid>=1000 -F auid!=unset -F key=group-modify +--a always,exit -F path=/etc/gshadow -F perm=wa -F auid>=1000 -F auid!=unset -F key=group-modify +- +- +-## Use of special rights for config changes. This would be use of setuid +-## programs that relate to user accts. This is not all setuid apps because +-## requirements are only for ones that affect system configuration. +--a always,exit -F path=/usr/sbin/unix_chkpwd -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/sbin/usernetctl -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/sbin/userhelper -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/sbin/seunshare -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/mount -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/newgrp -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/newuidmap -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/gpasswd -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/newgidmap -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/umount -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/passwd -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/crontab -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +--a always,exit -F path=/usr/bin/at -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes +- +-## Privilege escalation via su or sudo. This is entirely handled by pam. +- +-## Watch for configuration changes to privilege escalation. +--a always,exit -F path=/etc/sudoers -F perm=wa -F key=special-config-changes +--a always,exit -F dir=/etc/sudoers.d/ -F perm=wa -F key=special-config-changes +- +-## Audit log access +--a always,exit -F dir=/var/log/audit/ -F perm=r -F auid>=1000 -F auid!=unset -F key=access-audit-trail +-## Attempts to Alter Process and Session Initiation Information +--a always,exit -F path=/var/run/utmp -F perm=wa -F auid>=1000 -F auid!=unset -F key=session +--a always,exit -F path=/var/log/btmp -F perm=wa -F auid>=1000 -F auid!=unset -F key=session +--a always,exit -F path=/var/log/wtmp -F perm=wa -F auid>=1000 -F auid!=unset -F key=session +- +-## Attempts to modify MAC controls +--a always,exit -F dir=/etc/selinux/ -F perm=wa -F auid>=1000 -F auid!=unset -F key=MAC-policy +- +-## Software updates. This is entirely handled by rpm. +- +-## System start and shutdown. This is entirely handled by systemd +- +-## Kernel Module loading. This is handled in 43-module-load.rules +- +-## Application invocation. The requirements list an optional requirement +-## FPT_SRP_EXT.1 Software Restriction Policies. This event is intended to +-## state results from that policy. This would be handled entirely by +-## that daemon. +- diff --git a/SOURCES/scap-security-guide-0.1.61-rhel8_stig_audit_rules-PR_8174.patch b/SOURCES/scap-security-guide-0.1.61-rhel8_stig_audit_rules-PR_8174.patch new file mode 100644 index 0000000..8b785cd --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-rhel8_stig_audit_rules-PR_8174.patch @@ -0,0 +1,493 @@ +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchmod/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchmod/rule.yml +index a0b3efcbf79..1bc7afbb224 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchmod/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchmod/rule.yml +@@ -58,7 +58,7 @@ references: + stigid@ol7: OL07-00-030410 + stigid@ol8: OL08-00-030540 + stigid@rhel7: RHEL-07-030420 +- stigid@rhel8: RHEL-08-030540 ++ stigid@rhel8: RHEL-08-030490 + stigid@sle12: SLES-12-020470 + stigid@sle15: SLES-15-030300 + stigid@ubuntu2004: UBTU-20-010153 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchmodat/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchmodat/rule.yml +index 83dd57f2b6d..dc8211684f2 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchmodat/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchmodat/rule.yml +@@ -58,7 +58,7 @@ references: + stigid@ol7: OL07-00-030410 + stigid@ol8: OL08-00-030530 + stigid@rhel7: RHEL-07-030430 +- stigid@rhel8: RHEL-08-030530 ++ stigid@rhel8: RHEL-08-030490 + stigid@sle12: SLES-12-020480 + stigid@sle15: SLES-15-030310 + stigid@ubuntu2004: UBTU-20-010154 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchown/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchown/rule.yml +index 1b78aab4a1a..07592bb2fd9 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchown/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchown/rule.yml +@@ -61,7 +61,7 @@ references: + stigid@ol7: OL07-00-030370 + stigid@ol8: OL08-00-030520 + stigid@rhel7: RHEL-07-030380 +- stigid@rhel8: RHEL-08-030520 ++ stigid@rhel8: RHEL-08-030480 + stigid@sle12: SLES-12-020430 + stigid@sle15: SLES-15-030260 + stigid@ubuntu2004: UBTU-20-010149 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchownat/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchownat/rule.yml +index 360c60de06d..084970765b2 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchownat/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fchownat/rule.yml +@@ -58,7 +58,7 @@ references: + stigid@ol7: OL07-00-030370 + stigid@ol8: OL08-00-030510 + stigid@rhel7: RHEL-07-030400 +- stigid@rhel8: RHEL-08-030510 ++ stigid@rhel8: RHEL-08-030480 + stigid@sle12: SLES-12-020450 + stigid@sle15: SLES-15-030280 + stigid@ubuntu2004: UBTU-20-010150 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fremovexattr/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fremovexattr/rule.yml +index 19bf8a5b981..5695440ad7d 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fremovexattr/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fremovexattr/rule.yml +@@ -75,7 +75,7 @@ references: + stigid@ol7: OL07-00-030440 + stigid@ol8: OL08-00-030240 + stigid@rhel7: RHEL-07-030480 +- stigid@rhel8: RHEL-08-030240 ++ stigid@rhel8: RHEL-08-030200 + stigid@sle12: SLES-12-020410 + stigid@sle15: SLES-15-030210 + stigid@ubuntu2004: UBTU-20-010147 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fsetxattr/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fsetxattr/rule.yml +index 40cd114042e..ab536a8ae0a 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fsetxattr/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_fsetxattr/rule.yml +@@ -70,7 +70,7 @@ references: + stigid@ol7: OL07-00-030440 + stigid@ol8: OL08-00-030230 + stigid@rhel7: RHEL-07-030450 +- stigid@rhel8: RHEL-08-030230 ++ stigid@rhel8: RHEL-08-030200 + stigid@sle12: SLES-12-020380 + stigid@sle15: SLES-15-030230 + stigid@ubuntu2004: UBTU-20-010144 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_lchown/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_lchown/rule.yml +index 81dddd9fb71..d1f4ee35ccb 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_lchown/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_lchown/rule.yml +@@ -58,7 +58,7 @@ references: + stigid@ol7: OL07-00-030370 + stigid@ol8: OL08-00-030500 + stigid@rhel7: RHEL-07-030390 +- stigid@rhel8: RHEL-08-030500 ++ stigid@rhel8: RHEL-08-030480 + stigid@sle12: SLES-12-020440 + stigid@sle15: SLES-15-030270 + stigid@ubuntu2004: UBTU-20-010151 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_lsetxattr/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_lsetxattr/rule.yml +index fa15012b05f..a2425e373bc 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_lsetxattr/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_lsetxattr/rule.yml +@@ -69,7 +69,7 @@ references: + stigid@ol7: OL07-00-030440 + stigid@ol8: OL08-00-030220 + stigid@rhel7: RHEL-07-030460 +- stigid@rhel8: RHEL-08-030220 ++ stigid@rhel8: RHEL-08-030200 + stigid@sle15: SLES-15-030240 + stigid@ubuntu2004: UBTU-20-010143 + vmmsrg: SRG-OS-000458-VMM-001810,SRG-OS-000474-VMM-001940 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_removexattr/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_removexattr/rule.yml +index 6d15eecee2c..0be27fbe860 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_removexattr/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_removexattr/rule.yml +@@ -74,7 +74,7 @@ references: + stigid@ol7: OL07-00-030440 + stigid@ol8: OL08-00-030210 + stigid@rhel7: RHEL-07-030470 +- stigid@rhel8: RHEL-08-030210 ++ stigid@rhel8: RHEL-08-030200 + stigid@sle12: SLES-12-020390 + stigid@sle15: SLES-15-030190 + stigid@ubuntu2004: UBTU-20-010145 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_setxattr/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_setxattr/rule.yml +index 6f7cea26e16..5dc13a0a43a 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_setxattr/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_dac_actions/audit_rules_dac_modification_setxattr/rule.yml +@@ -70,7 +70,7 @@ references: + stigid@ol7: OL07-00-030440 + stigid@ol8: OL08-00-030270 + stigid@rhel7: RHEL-07-030440 +- stigid@rhel8: RHEL-08-030270 ++ stigid@rhel8: RHEL-08-030200 + stigid@sle12: SLES-12-020370 + stigid@sle15: SLES-15-030220 + stigid@ubuntu2004: UBTU-20-010142 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_renameat/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_renameat/rule.yml +index 718dcb8a9d9..120d6fa84d3 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_renameat/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_renameat/rule.yml +@@ -52,7 +52,7 @@ references: + stigid@ol7: OL07-00-030910 + stigid@ol8: OL08-00-030362 + stigid@rhel7: RHEL-07-030890 +- stigid@rhel8: RHEL-08-030362 ++ stigid@rhel8: RHEL-08-030361 + stigid@ubuntu2004: UBTU-20-010270 + vmmsrg: SRG-OS-000466-VMM-001870,SRG-OS-000468-VMM-001890 + +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_rmdir/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_rmdir/rule.yml +index 643f075f46a..4caa7c66986 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_rmdir/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_rmdir/rule.yml +@@ -49,7 +49,7 @@ references: + stigid@ol7: OL07-00-030910 + stigid@ol8: OL08-00-030363 + stigid@rhel7: RHEL-07-030900 +- stigid@rhel8: RHEL-08-030363 ++ stigid@rhel8: RHEL-08-030361 + vmmsrg: SRG-OS-000466-VMM-001870,SRG-OS-000468-VMM-001890 + + {{{ complete_ocil_entry_audit_syscall(syscall="rmdir") }}} +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlink/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlink/rule.yml +index 9cf3c4668bc..8fea9dc4582 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlink/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlink/rule.yml +@@ -52,7 +52,7 @@ references: + stigid@ol7: OL07-00-030910 + stigid@ol8: OL08-00-030364 + stigid@rhel7: RHEL-07-030910 +- stigid@rhel8: RHEL-08-030364 ++ stigid@rhel8: RHEL-08-030361 + stigid@ubuntu2004: UBTU-20-010267 + vmmsrg: SRG-OS-000466-VMM-001870,SRG-OS-000468-VMM-001890 + +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlinkat/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlinkat/rule.yml +index d0ebbdbd723..bee18e99b52 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlinkat/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_deletion_events/audit_rules_file_deletion_events_unlinkat/rule.yml +@@ -52,7 +52,7 @@ references: + stigid@ol7: OL07-00-030910 + stigid@ol8: OL08-00-030365 + stigid@rhel7: RHEL-07-030920 +- stigid@rhel8: RHEL-08-030365 ++ stigid@rhel8: RHEL-08-030361 + stigid@ubuntu2004: UBTU-20-010268 + vmmsrg: SRG-OS-000466-VMM-001870,SRG-OS-000468-VMM-001890 + +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_creat/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_creat/rule.yml +index 373b12525e1..736c6643b57 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_creat/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_creat/rule.yml +@@ -63,7 +63,7 @@ references: + stigid@ol7: OL07-00-030510 + stigid@ol8: OL08-00-030470 + stigid@rhel7: RHEL-07-030500 +- stigid@rhel8: RHEL-08-030470 ++ stigid@rhel8: RHEL-08-030420 + stigid@sle12: SLES-12-020520 + stigid@sle15: SLES-15-030160 + stigid@ubuntu2004: UBTU-20-010158 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_ftruncate/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_ftruncate/rule.yml +index 2b2d82a736b..6b4176d53e3 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_ftruncate/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_ftruncate/rule.yml +@@ -66,7 +66,7 @@ references: + stigid@ol7: OL07-00-030510 + stigid@ol8: OL08-00-030460 + stigid@rhel7: RHEL-07-030550 +- stigid@rhel8: RHEL-08-030460 ++ stigid@rhel8: RHEL-08-030420 + stigid@sle12: SLES-12-020510 + stigid@sle15: SLES-15-030320 + stigid@ubuntu2004: UBTU-20-010157 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_open/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_open/rule.yml +index dcb3d0f0525..90d45b6787e 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_open/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_open/rule.yml +@@ -66,7 +66,7 @@ references: + stigid@ol7: OL07-00-030510 + stigid@ol8: OL08-00-030440 + stigid@rhel7: RHEL-07-030510 +- stigid@rhel8: RHEL-08-030440 ++ stigid@rhel8: RHEL-08-030420 + stigid@sle12: SLES-12-020490 + stigid@sle15: SLES-15-030150 + stigid@ubuntu2004: UBTU-20-010155 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_open_by_handle_at/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_open_by_handle_at/rule.yml +index e68d892bb90..6df936e489c 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_open_by_handle_at/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_open_by_handle_at/rule.yml +@@ -60,7 +60,7 @@ references: + stigid@ol7: OL07-00-030510 + stigid@ol8: OL08-00-030450 + stigid@rhel7: RHEL-07-030530 +- stigid@rhel8: RHEL-08-030450 ++ stigid@rhel8: RHEL-08-030420 + stigid@sle12: SLES-12-020540 + stigid@sle15: SLES-15-030180 + stigid@ubuntu2004: UBTU-20-010160 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_openat/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_openat/rule.yml +index cd6bd545e71..1b6ae818e48 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_openat/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_file_modification/audit_rules_unsuccessful_file_modification_openat/rule.yml +@@ -66,7 +66,7 @@ references: + stigid@ol7: OL07-00-030510 + stigid@ol8: OL08-00-030430 + stigid@rhel7: RHEL-07-030520 +- stigid@rhel8: RHEL-08-030430 ++ stigid@rhel8: RHEL-08-030420 + stigid@sle12: SLES-12-020530 + stigid@sle15: SLES-15-030170 + stigid@ubuntu2004: UBTU-20-010159 +diff --git a/linux_os/guide/system/auditing/auditd_configure_rules/audit_kernel_module_loading/audit_rules_kernel_module_loading_finit/rule.yml b/linux_os/guide/system/auditing/auditd_configure_rules/audit_kernel_module_loading/audit_rules_kernel_module_loading_finit/rule.yml +index 50e5b4e4f02..2f1c6d0bf22 100644 +--- a/linux_os/guide/system/auditing/auditd_configure_rules/audit_kernel_module_loading/audit_rules_kernel_module_loading_finit/rule.yml ++++ b/linux_os/guide/system/auditing/auditd_configure_rules/audit_kernel_module_loading/audit_rules_kernel_module_loading_finit/rule.yml +@@ -51,7 +51,7 @@ references: + stigid@ol7: OL07-00-030820 + stigid@ol8: OL08-00-030380 + stigid@rhel7: RHEL-07-030821 +- stigid@rhel8: RHEL-08-030380 ++ stigid@rhel8: RHEL-08-030360 + stigid@sle12: SLES-12-020740 + stigid@sle15: SLES-15-030530 + stigid@ubuntu2004: UBTU-20-010180 +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index ffca983d0bd..d92bc72971c 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -560,6 +560,8 @@ selections: + + # RHEL-08-020220 + - accounts_password_pam_pwhistory_remember_system_auth ++ ++ # RHEL-08-020221 + - accounts_password_pam_pwhistory_remember_password_auth + + # RHEL-08-020230 +@@ -712,18 +714,11 @@ selections: + + # RHEL-08-030200 + - audit_rules_dac_modification_lremovexattr +- +- # RHEL-08-030210 + - audit_rules_dac_modification_removexattr +- +- # RHEL-08-030220 + - audit_rules_dac_modification_lsetxattr +- +- # RHEL-08-030230 + - audit_rules_dac_modification_fsetxattr +- +- # RHEL-08-030240 + - audit_rules_dac_modification_fremovexattr ++ - audit_rules_dac_modification_setxattr + + # RHEL-08-030250 + - audit_rules_privileged_commands_chage +@@ -731,8 +726,6 @@ selections: + # RHEL-08-030260 + - audit_rules_execution_chcon + +- # RHEL-08-030270 +- - audit_rules_dac_modification_setxattr + + # RHEL-08-030280 + - audit_rules_privileged_commands_ssh_agent +@@ -787,28 +780,18 @@ selections: + + # RHEL-08-030360 + - audit_rules_kernel_module_loading_init ++ - audit_rules_kernel_module_loading_finit + + # RHEL-08-030361 + - audit_rules_file_deletion_events_rename +- +- # RHEL-08-030362 + - audit_rules_file_deletion_events_renameat +- +- # RHEL-08-030363 + - audit_rules_file_deletion_events_rmdir +- +- # RHEL-08-030364 + - audit_rules_file_deletion_events_unlink +- +- # RHEL-08-030365 + - audit_rules_file_deletion_events_unlinkat + + # RHEL-08-030370 + - audit_rules_privileged_commands_gpasswd + +- # RHEL-08-030380 +- - audit_rules_kernel_module_loading_finit +- + # RHEL-08-030390 + - audit_rules_kernel_module_loading_delete + +@@ -820,41 +803,21 @@ selections: + + # RHEL-08-030420 + - audit_rules_unsuccessful_file_modification_truncate +- +- # RHEL-08-030430 + - audit_rules_unsuccessful_file_modification_openat +- +- # RHEL-08-030440 + - audit_rules_unsuccessful_file_modification_open +- +- # RHEL-08-030450 + - audit_rules_unsuccessful_file_modification_open_by_handle_at +- +- # RHEL-08-030460 + - audit_rules_unsuccessful_file_modification_ftruncate +- +- # RHEL-08-030470 + - audit_rules_unsuccessful_file_modification_creat + + # RHEL-08-030480 + - audit_rules_dac_modification_chown +- +- # RHEL-08-030490 +- - audit_rules_dac_modification_chmod +- +- # RHEL-08-030500 + - audit_rules_dac_modification_lchown +- +- # RHEL-08-030510 + - audit_rules_dac_modification_fchownat +- +- # RHEL-08-030520 + - audit_rules_dac_modification_fchown + +- # RHEL-08-030530 ++ # RHEL-08-030490 ++ - audit_rules_dac_modification_chmod + - audit_rules_dac_modification_fchmodat +- +- # RHEL-08-030540 + - audit_rules_dac_modification_fchmod + + # RHEL-08-030550 +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index eb2cac913bd..42c6d0e9aca 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -561,6 +561,8 @@ selections: + + # RHEL-08-020220 + - accounts_password_pam_pwhistory_remember_system_auth ++ ++ # RHEL-08-020221 + - accounts_password_pam_pwhistory_remember_password_auth + + # RHEL-08-020230 +@@ -713,18 +715,11 @@ selections: + + # RHEL-08-030200 + - audit_rules_dac_modification_lremovexattr +- +- # RHEL-08-030210 + - audit_rules_dac_modification_removexattr +- +- # RHEL-08-030220 + - audit_rules_dac_modification_lsetxattr +- +- # RHEL-08-030230 + - audit_rules_dac_modification_fsetxattr +- +- # RHEL-08-030240 + - audit_rules_dac_modification_fremovexattr ++ - audit_rules_dac_modification_setxattr + + # RHEL-08-030250 + - audit_rules_privileged_commands_chage +@@ -732,9 +727,6 @@ selections: + # RHEL-08-030260 + - audit_rules_execution_chcon + +- # RHEL-08-030270 +- - audit_rules_dac_modification_setxattr +- + # RHEL-08-030280 + - audit_rules_privileged_commands_ssh_agent + +@@ -788,28 +780,18 @@ selections: + + # RHEL-08-030360 + - audit_rules_kernel_module_loading_init ++ - audit_rules_kernel_module_loading_finit + + # RHEL-08-030361 + - audit_rules_file_deletion_events_rename +- +- # RHEL-08-030362 + - audit_rules_file_deletion_events_renameat +- +- # RHEL-08-030363 + - audit_rules_file_deletion_events_rmdir +- +- # RHEL-08-030364 + - audit_rules_file_deletion_events_unlink +- +- # RHEL-08-030365 + - audit_rules_file_deletion_events_unlinkat + + # RHEL-08-030370 + - audit_rules_privileged_commands_gpasswd + +- # RHEL-08-030380 +- - audit_rules_kernel_module_loading_finit +- + # RHEL-08-030390 + - audit_rules_kernel_module_loading_delete + +@@ -821,41 +803,21 @@ selections: + + # RHEL-08-030420 + - audit_rules_unsuccessful_file_modification_truncate +- +- # RHEL-08-030430 + - audit_rules_unsuccessful_file_modification_openat +- +- # RHEL-08-030440 + - audit_rules_unsuccessful_file_modification_open +- +- # RHEL-08-030450 + - audit_rules_unsuccessful_file_modification_open_by_handle_at +- +- # RHEL-08-030460 + - audit_rules_unsuccessful_file_modification_ftruncate +- +- # RHEL-08-030470 + - audit_rules_unsuccessful_file_modification_creat + + # RHEL-08-030480 + - audit_rules_dac_modification_chown +- +- # RHEL-08-030490 +- - audit_rules_dac_modification_chmod +- +- # RHEL-08-030500 + - audit_rules_dac_modification_lchown +- +- # RHEL-08-030510 + - audit_rules_dac_modification_fchownat +- +- # RHEL-08-030520 + - audit_rules_dac_modification_fchown + +- # RHEL-08-030530 ++ # RHEL-08-030490 ++ - audit_rules_dac_modification_chmod + - audit_rules_dac_modification_fchmodat +- +- # RHEL-08-030540 + - audit_rules_dac_modification_fchmod + + # RHEL-08-030550 diff --git a/SOURCES/scap-security-guide-0.1.61-rhel8_stig_v1r5-PR_8050.patch b/SOURCES/scap-security-guide-0.1.61-rhel8_stig_v1r5-PR_8050.patch new file mode 100644 index 0000000..5ec2d98 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-rhel8_stig_v1r5-PR_8050.patch @@ -0,0 +1,375 @@ +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/bash/shared.sh b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/bash/shared.sh +new file mode 100644 +index 00000000000..1c151a1ec1a +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/bash/shared.sh +@@ -0,0 +1,5 @@ ++# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_rhv ++ ++if ! grep -q "^password.*sufficient.*pam_unix.so.*sha512" "/etc/pam.d/password-auth"; then ++ sed -i --follow-symlinks "/^password.*sufficient.*pam_unix.so/ s/$/ sha512/" "/etc/pam.d/password-auth" ++fi +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/oval/shared.xml b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/oval/shared.xml +new file mode 100644 +index 00000000000..24fdbe4c1d4 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/oval/shared.xml +@@ -0,0 +1,19 @@ ++ ++ ++ {{{ oval_metadata("The password hashing algorithm should be set correctly in /etc/pam.d/password-auth.") }}} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ /etc/pam.d/password-auth ++ ^[\s]*password[\s]+(?:(?:required)|(?:sufficient))[\s]+pam_unix\.so[\s]+.*sha512.*$ ++ 1 ++ ++ ++ +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/rule.yml +new file mode 100644 +index 00000000000..9375269161d +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/rule.yml +@@ -0,0 +1,72 @@ ++documentation_complete: true ++ ++prodtype: fedora,rhel7,rhel8,rhel9,rhv4 ++ ++title: "Set PAM's Password Hashing Algorithm - password-auth" ++ ++description: |- ++ The PAM system service can be configured to only store encrypted ++ representations of passwords. In ++ /etc/pam.d/password-auth, ++ the ++ password section of the file controls which PAM modules execute ++ during a password change. Set the pam_unix.so module in the ++ password section to include the argument sha512, as shown ++ below: ++
    ++
    password    sufficient    pam_unix.so sha512 other arguments...
    ++
    ++ This will help ensure when local users change their passwords, hashes for ++ the new passwords will be generated using the SHA-512 algorithm. This is ++ the default. ++ ++rationale: |- ++ Passwords need to be protected at all times, and encryption is the standard ++ method for protecting passwords. If passwords are not encrypted, they can ++ be plainly read (i.e., clear text) and easily compromised. Passwords that ++ are encrypted with a weak algorithm are no more protected than if they are ++ kepy in plain text. ++

    ++ This setting ensures user and group account administration utilities are ++ configured to store only encrypted representations of passwords. ++ Additionally, the crypt_style configuration option ensures the use ++ of a strong hashing algorithm that makes password cracking attacks more ++ difficult. ++ ++severity: medium ++ ++identifiers: ++ cce@rhel7: CCE-85943-9 ++ cce@rhel8: CCE-85945-4 ++ cce@rhel9: CCE-85946-2 ++ ++references: ++ anssi: BP28(R32) ++ cis-csc: 1,12,15,16,5 ++ cis@rhel7: 5.4.3 ++ cis@rhel8: 5.4.4 ++ cjis: 5.6.2.2 ++ cobit5: DSS05.04,DSS05.05,DSS05.07,DSS05.10,DSS06.03,DSS06.10 ++ cui: 3.13.11 ++ disa: CCI-000196 ++ isa-62443-2009: 4.3.3.2.2,4.3.3.5.1,4.3.3.5.2,4.3.3.6.1,4.3.3.6.2,4.3.3.6.3,4.3.3.6.4,4.3.3.6.5,4.3.3.6.6,4.3.3.6.7,4.3.3.6.8,4.3.3.6.9,4.3.3.7.2,4.3.3.7.4 ++ isa-62443-2013: 'SR 1.1,SR 1.10,SR 1.2,SR 1.3,SR 1.4,SR 1.5,SR 1.7,SR 1.8,SR 1.9,SR 2.1' ++ ism: 0418,1055,1402 ++ iso27001-2013: A.18.1.4,A.7.1.1,A.9.2.1,A.9.2.2,A.9.2.3,A.9.2.4,A.9.2.6,A.9.3.1,A.9.4.2,A.9.4.3 ++ nist: IA-5(c),IA-5(1)(c),CM-6(a) ++ nist-csf: PR.AC-1,PR.AC-6,PR.AC-7 ++ pcidss: Req-8.2.1 ++ srg: SRG-OS-000073-GPOS-00041 ++ stigid@rhel7: RHEL-07-010200 ++ stigid@rhel8: RHEL-08-010160 ++ vmmsrg: SRG-OS-000480-VMM-002000 ++ ++ocil_clause: 'it does not' ++ ++ocil: |- ++ Inspect the password section of /etc/pam.d/password-auth ++ and ensure that the pam_unix.so module includes the argument ++ sha512: ++
    $ grep sha512 /etc/pam.d/password-auth
    ++ ++platform: pam +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/tests/correct.pass.sh b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/tests/correct.pass.sh +new file mode 100644 +index 00000000000..a924fe5bd97 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/tests/correct.pass.sh +@@ -0,0 +1,5 @@ ++#!/bin/bash ++ ++if ! grep -q "^password.*sufficient.*pam_unix.so.*sha512" "/etc/pam.d/password-auth"; then ++ sed -i --follow-symlinks "/^password.*sufficient.*pam_unix.so/ s/$/ sha512/" "/etc/pam.d/password-auth" ++fi +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/tests/missing.fail.sh b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/tests/missing.fail.sh +new file mode 100644 +index 00000000000..68e925a645f +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_passwordauth/tests/missing.fail.sh +@@ -0,0 +1,3 @@ ++#!/bin/bash ++ ++sed -i --follow-symlinks "/^password.*sufficient.*pam_unix.so/ s/sha512//g" "/etc/pam.d/password-auth" +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/bash/shared.sh b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/bash/shared.sh +index 542ea521a6c..e7503feeecb 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/bash/shared.sh ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/bash/shared.sh +@@ -1,7 +1,9 @@ +-# platform = multi_platform_wrlinux,multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_sle ++# platform = multi_platform_wrlinux,multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv + + AUTH_FILES[0]="/etc/pam.d/system-auth" ++{{%- if product == "rhel7" %}} + AUTH_FILES[1]="/etc/pam.d/password-auth" ++{{%- endif %}} + + for pamFile in "${AUTH_FILES[@]}" + do +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/oval/shared.xml b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/oval/shared.xml +index d76b6f80c0c..a754a84df6c 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/oval/shared.xml ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/oval/shared.xml +@@ -3,6 +3,9 @@ + {{{ oval_metadata("The password hashing algorithm should be set correctly in /etc/pam.d/system-auth.") }}} + + ++ {{%- if product == "rhel7" %}} ++ ++ {{%- endif %}} + +
    + +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/rule.yml +index 13da9dd4086..59fb48e93b5 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/rule.yml ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/rule.yml +@@ -70,7 +70,7 @@ references: + stigid@ol7: OL07-00-010200 + stigid@ol8: OL08-00-010160 + stigid@rhel7: RHEL-07-010200 +- stigid@rhel8: RHEL-08-010160 ++ stigid@rhel8: RHEL-08-010159 + stigid@sle12: SLES-12-010230 + stigid@sle15: SLES-15-020170 + vmmsrg: SRG-OS-000480-VMM-002000 +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/tests/correct.pass.sh b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/tests/correct.pass.sh +index 7e481760670..fb9feec4d27 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/tests/correct.pass.sh ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/tests/correct.pass.sh +@@ -1,7 +1,9 @@ + #!/bin/bash + + AUTH_FILES[0]="/etc/pam.d/system-auth" ++{{%- if product == "rhel7" %}} + AUTH_FILES[1]="/etc/pam.d/password-auth" ++{{%- endif %}} + + for pamFile in "${AUTH_FILES[@]}" + do +diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/tests/missing.fail.sh b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/tests/missing.fail.sh +index 09bb82dd1d7..2f35381d475 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/tests/missing.fail.sh ++++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth/tests/missing.fail.sh +@@ -1,7 +1,9 @@ + #!/bin/bash + + AUTH_FILES[0]="/etc/pam.d/system-auth" ++{{%- if product == "rhel7" %}} + AUTH_FILES[1]="/etc/pam.d/password-auth" ++{{%- endif %}} + + for pamFile in "${AUTH_FILES[@]}" + do +diff --git a/products/rhel8/profiles/pci-dss.profile b/products/rhel8/profiles/pci-dss.profile +index 3ada8e6fe49..4df21f4ae6e 100644 +--- a/products/rhel8/profiles/pci-dss.profile ++++ b/products/rhel8/profiles/pci-dss.profile +@@ -126,6 +126,7 @@ selections: + - service_pcscd_enabled + - sssd_enable_smartcards + - set_password_hashing_algorithm_systemauth ++ - set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_logindefs + - set_password_hashing_algorithm_libuserconf + - file_owner_etc_shadow +diff --git a/products/rhel8/profiles/rht-ccp.profile b/products/rhel8/profiles/rht-ccp.profile +index 15abd98a6a5..7188062df72 100644 +--- a/products/rhel8/profiles/rht-ccp.profile ++++ b/products/rhel8/profiles/rht-ccp.profile +@@ -54,6 +54,7 @@ selections: + - accounts_password_pam_difok + - accounts_passwords_pam_faillock_deny + - set_password_hashing_algorithm_systemauth ++ - set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_logindefs + - set_password_hashing_algorithm_libuserconf + - require_singleuser_auth +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index 04f158116ee..8d69bb48d38 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -149,6 +149,9 @@ selections: + # RHEL-08-010152 + - require_emergency_target_auth + ++ # RHEL-08-010159 ++ - set_password_hashing_algorithm_passwordauth ++ + # RHEL-08-010160 + - set_password_hashing_algorithm_systemauth + +diff --git a/products/rhel9/profiles/pci-dss.profile b/products/rhel9/profiles/pci-dss.profile +index beb1acda31d..1e4044f4e7e 100644 +--- a/products/rhel9/profiles/pci-dss.profile ++++ b/products/rhel9/profiles/pci-dss.profile +@@ -123,6 +123,7 @@ selections: + - service_pcscd_enabled + - sssd_enable_smartcards + - set_password_hashing_algorithm_systemauth ++ - set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_logindefs + - set_password_hashing_algorithm_libuserconf + - file_owner_etc_shadow +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 8f79b22e3e4..b9f557de030 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -150,6 +150,9 @@ selections: + # RHEL-08-010152 + - require_emergency_target_auth + ++ # RHEL-08-010159 ++ - set_password_hashing_algorithm_passwordauth ++ + # RHEL-08-010160 + - set_password_hashing_algorithm_systemauth + +diff --git a/products/rhv4/profiles/pci-dss.profile b/products/rhv4/profiles/pci-dss.profile +index c4ed0ec2d48..d00f44996d8 100644 +--- a/products/rhv4/profiles/pci-dss.profile ++++ b/products/rhv4/profiles/pci-dss.profile +@@ -121,6 +121,7 @@ selections: + - service_pcscd_enabled + - sssd_enable_smartcards + - set_password_hashing_algorithm_systemauth ++ - set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_logindefs + - set_password_hashing_algorithm_libuserconf + - file_owner_etc_shadow +diff --git a/products/rhv4/profiles/rhvh-stig.profile b/products/rhv4/profiles/rhvh-stig.profile +index 01c2fd8cc2d..9cf416665ab 100644 +--- a/products/rhv4/profiles/rhvh-stig.profile ++++ b/products/rhv4/profiles/rhvh-stig.profile +@@ -356,6 +356,7 @@ selections: + - set_password_hashing_algorithm_libuserconf + - set_password_hashing_algorithm_logindefs + - set_password_hashing_algorithm_systemauth ++ - set_password_hashing_algorithm_passwordauth + - package_opensc_installed + - var_smartcard_drivers=cac + - configure_opensc_card_drivers +diff --git a/products/rhv4/profiles/rhvh-vpp.profile b/products/rhv4/profiles/rhvh-vpp.profile +index c2b6c106937..e66fe435508 100644 +--- a/products/rhv4/profiles/rhvh-vpp.profile ++++ b/products/rhv4/profiles/rhvh-vpp.profile +@@ -201,6 +201,7 @@ selections: + - accounts_password_pam_unix_remember + - set_password_hashing_algorithm_logindefs + - set_password_hashing_algorithm_systemauth ++ - set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_libuserconf + - no_empty_passwords + +diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt +index 3f6ec5e17c4..4aa925037b1 100644 +--- a/shared/references/cce-redhat-avail.txt ++++ b/shared/references/cce-redhat-avail.txt +@@ -53,9 +53,6 @@ CCE-85939-7 + CCE-85940-5 + CCE-85941-3 + CCE-85942-1 +-CCE-85943-9 +-CCE-85945-4 +-CCE-85946-2 + CCE-85947-0 + CCE-85948-8 + CCE-85949-6 +diff --git a/tests/data/profile_stability/rhel8/pci-dss.profile b/tests/data/profile_stability/rhel8/pci-dss.profile +index f58bcf91cf2..e235d492438 100644 +--- a/tests/data/profile_stability/rhel8/pci-dss.profile ++++ b/tests/data/profile_stability/rhel8/pci-dss.profile +@@ -1,5 +1,9 @@ ++title: PCI-DSS v3.2.1 Control Baseline for Red Hat Enterprise Linux 8 + description: Ensures PCI-DSS v3.2.1 security configuration settings are applied. +-documentation_complete: true ++extends: null ++metadata: ++ SMEs: ++ - yuumasato + reference: https://www.pcisecuritystandards.org/documents/PCI_DSS_v3-2-1.pdf + selections: + - account_disable_post_pw_expiration +@@ -120,6 +124,7 @@ selections: + - service_pcscd_enabled + - set_password_hashing_algorithm_libuserconf + - set_password_hashing_algorithm_logindefs ++- set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_systemauth + - sshd_set_idle_timeout + - sshd_set_keepalive_0 +@@ -136,4 +141,8 @@ selections: + - var_multiple_time_servers=rhel + - var_sshd_set_keepalive=0 + - var_smartcard_drivers=cac +-title: PCI-DSS v3.2.1 Control Baseline for Red Hat Enterprise Linux 8 ++platforms: !!set {} ++cpe_names: !!set {} ++platform: null ++filter_rules: '' ++documentation_complete: true +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index ed739e724f4..c5fcbf47de2 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -336,6 +337,7 @@ selections: + - service_systemd-coredump_disabled + - service_usbguard_enabled + - set_password_hashing_algorithm_logindefs ++- set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_systemauth + - sshd_disable_compression + - sshd_disable_empty_passwords +diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile +index 56c3fcb9f59..49ec4ae41ac 100644 +--- a/tests/data/profile_stability/rhel8/stig_gui.profile ++++ b/tests/data/profile_stability/rhel8/stig_gui.profile +@@ -347,6 +348,7 @@ selections: + - service_systemd-coredump_disabled + - service_usbguard_enabled + - set_password_hashing_algorithm_logindefs ++- set_password_hashing_algorithm_passwordauth + - set_password_hashing_algorithm_systemauth + - sshd_disable_compression + - sshd_disable_empty_passwords diff --git a/SOURCES/scap-security-guide-0.1.61-selinux_state_rhel8_anssi_enhanced-PR_8182.patch b/SOURCES/scap-security-guide-0.1.61-selinux_state_rhel8_anssi_enhanced-PR_8182.patch new file mode 100644 index 0000000..e1c22ac --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-selinux_state_rhel8_anssi_enhanced-PR_8182.patch @@ -0,0 +1,155 @@ +diff --git a/controls/anssi.yml b/controls/anssi.yml +index ff3736711dd..5c3d5f34ea8 100644 +--- a/controls/anssi.yml ++++ b/controls/anssi.yml +@@ -72,6 +72,7 @@ controls: + SELinux policies limit the privileges of services and daemons to only what they require. + rules: + - selinux_state ++ - var_selinux_state=enforcing + + - id: R4 + levels: +diff --git a/products/rhel8/profiles/anssi_bp28_enhanced.profile b/products/rhel8/profiles/anssi_bp28_enhanced.profile +index 2a49527c10a..8f2ee31493b 100644 +--- a/products/rhel8/profiles/anssi_bp28_enhanced.profile ++++ b/products/rhel8/profiles/anssi_bp28_enhanced.profile +@@ -17,4 +17,3 @@ description: |- + + selections: + - anssi:all:enhanced +- - '!selinux_state' +diff --git a/products/rhel9/profiles/anssi_bp28_enhanced.profile b/products/rhel9/profiles/anssi_bp28_enhanced.profile +index 89e0d260390..da048c9b556 100644 +--- a/products/rhel9/profiles/anssi_bp28_enhanced.profile ++++ b/products/rhel9/profiles/anssi_bp28_enhanced.profile +@@ -17,4 +17,3 @@ description: |- + + selections: + - anssi:all:enhanced +- - '!selinux_state' +diff --git a/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml b/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml +index 2e60ec43532..b201c495b8d 100644 +--- a/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml ++++ b/tests/unit/ssg-module/data/controls_dir/abcd-levels.yml +@@ -42,3 +42,29 @@ controls: + rules: + - var_password_pam_minlen=2 + - var_some_variable=3 ++ ++ # S5, S6 and S7 are used to test if level inheritance is working corectly ++ # when multiple levels select the same rule ++ - id: S5 ++ title: Default Crypto Policy ++ levels: ++ - low ++ rules: ++ - configure_crypto_policy ++ - var_system_crypto_policy=default_policy ++ ++ - id: S6 ++ title: FIPS Crypto Policy ++ levels: ++ - medium ++ rules: ++ - configure_crypto_policy ++ - var_system_crypto_policy=fips ++ ++ - id: S7 ++ title: Future Crypto Policy ++ levels: ++ - high ++ rules: ++ - configure_crypto_policy ++ - var_system_crypto_policy=future +diff --git a/tests/unit/ssg-module/test_controls.py b/tests/unit/ssg-module/test_controls.py +index d3d6280042a..fb569280736 100644 +--- a/tests/unit/ssg-module/test_controls.py ++++ b/tests/unit/ssg-module/test_controls.py +@@ -92,6 +92,20 @@ def test_controls_levels(): + c_4b = controls_manager.get_control("abcd-levels", "S4.b") + assert c_4b.levels == ["high"] + ++ c_5 = controls_manager.get_control("abcd-levels", "S5") ++ assert c_5.levels == ["low"] ++ ++ c_6 = controls_manager.get_control("abcd-levels", "S6") ++ assert c_6.levels == ["medium"] ++ ++ c_7 = controls_manager.get_control("abcd-levels", "S7") ++ assert c_7.levels == ["high"] ++ ++ # test if all crypto-policy controls have the rule selected ++ assert "configure_crypto_policy" in c_5.selections ++ assert "configure_crypto_policy" in c_6.selections ++ assert "configure_crypto_policy" in c_7.selections ++ + # just the essential controls + low_controls = controls_manager.get_all_controls_of_level( + "abcd-levels", "low") +@@ -104,25 +118,34 @@ def test_controls_levels(): + + assert len(high_controls) == len(all_controls) + assert len(low_controls) <= len(high_controls) +- assert len(low_controls) == 4 +- assert len(medium_controls) == 5 ++ assert len(low_controls) == 5 ++ assert len(medium_controls) == 7 + + # test overriding of variables in levels + assert c_2.variables["var_password_pam_minlen"] == "1" + assert "var_password_pam_minlen" not in c_3.variables.keys() + assert c_4b.variables["var_password_pam_minlen"] == "2" + ++ variable_found = False + for c in low_controls: + if "var_password_pam_minlen" in c.variables.keys(): ++ variable_found = True + assert c.variables["var_password_pam_minlen"] == "1" ++ assert variable_found + ++ variable_found = False + for c in medium_controls: + if "var_password_pam_minlen" in c.variables.keys(): ++ variable_found = True + assert c.variables["var_password_pam_minlen"] == "1" ++ assert variable_found + ++ variable_found = False + for c in high_controls: + if "var_password_pam_minlen" in c.variables.keys(): ++ variable_found = True + assert c.variables["var_password_pam_minlen"] == "2" ++ assert variable_found + + # now test if controls of lower level has the variable definition correctly removed + # because it is overriden by higher level controls +@@ -141,6 +164,28 @@ def test_controls_levels(): + assert s2_low[0].variables["var_some_variable"] == "1" + assert s2_low[0].variables["var_password_pam_minlen"] == "1" + ++ # check that low, medium and high levels have crypto policy selected ++ s5_low = [c for c in low_controls if c.id == "S5"] ++ assert len(s5_low) == 1 ++ assert "configure_crypto_policy" in s5_low[0].selections ++ ++ s5_medium = [c for c in medium_controls if c.id == "S5"] ++ assert len(s5_medium) == 1 ++ assert "configure_crypto_policy" in s5_medium[0].selections ++ s6_medium = [c for c in medium_controls if c.id == "S6"] ++ assert len(s6_medium) == 1 ++ assert "configure_crypto_policy" in s6_medium[0].selections ++ ++ s5_high = [c for c in high_controls if c.id == "S5"] ++ assert len(s5_high) == 1 ++ assert "configure_crypto_policy" in s5_high[0].selections ++ s6_high = [c for c in high_controls if c.id == "S6"] ++ assert len(s6_high) == 1 ++ assert "configure_crypto_policy" in s6_high[0].selections ++ s7_high = [c for c in high_controls if c.id == "S7"] ++ assert len(s7_high) == 1 ++ assert "configure_crypto_policy" in s7_high[0].selections ++ + + def test_controls_load_product(): + product_yaml = os.path.join(ssg_root, "products", "rhel8", "product.yml") diff --git a/SOURCES/scap-security-guide-0.1.61-sudoers_timestamp_timeout-PR_8220.patch b/SOURCES/scap-security-guide-0.1.61-sudoers_timestamp_timeout-PR_8220.patch new file mode 100644 index 0000000..c64e503 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-sudoers_timestamp_timeout-PR_8220.patch @@ -0,0 +1,163 @@ +From 573ae69742cf372d41da6c56a3051745326055cd Mon Sep 17 00:00:00 2001 +From: Gabriel Becker +Date: Mon, 14 Feb 2022 15:54:37 +0100 +Subject: [PATCH] Update RHEL-08-010385 to allow only one occurrence of config. + +This configuration must appear at only one place so it doesn't get +overriden by a different file that can loaded on a different order and +the intended configuration is replaced by non-compliant value. +--- + .../ansible/shared.yml | 36 ++++++++++++++++++ + .../bash/shared.sh | 38 +++++++++++++++++++ + .../oval/shared.xml | 4 +- + .../sudo_require_reauthentication/rule.yml | 14 +------ + .../tests/multiple_correct_value.fail.sh | 10 +++++ + 5 files changed, 87 insertions(+), 15 deletions(-) + create mode 100644 linux_os/guide/system/software/sudo/sudo_require_reauthentication/ansible/shared.yml + create mode 100644 linux_os/guide/system/software/sudo/sudo_require_reauthentication/bash/shared.sh + create mode 100644 linux_os/guide/system/software/sudo/sudo_require_reauthentication/tests/multiple_correct_value.fail.sh + +diff --git a/linux_os/guide/system/software/sudo/sudo_require_reauthentication/ansible/shared.yml b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/ansible/shared.yml +new file mode 100644 +index 00000000000..b0c67a69af9 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/ansible/shared.yml +@@ -0,0 +1,36 @@ ++# platform = multi_platform_all ++# reboot = false ++# strategy = restrict ++# complexity = low ++# disruption = low ++ ++{{{ ansible_instantiate_variables("var_sudo_timestamp_timeout") }}} ++- name: "Find out if /etc/sudoers.d/* files contain 'Defaults timestamp_timeout' to be deduplicated" ++ find: ++ path: "/etc/sudoers.d" ++ patterns: "*" ++ contains: '^[\s]*Defaults\s.*\btimestamp_timeout=.*' ++ register: sudoers_d_defaults_timestamp_timeout ++ ++- name: "Remove found occurrences of 'Defaults timestamp_timeout' from /etc/sudoers.d/* files" ++ lineinfile: ++ path: "{{ item.path }}" ++ regexp: '^[\s]*Defaults\s.*\btimestamp_timeout=.*' ++ state: absent ++ with_items: "{{ sudoers_d_defaults_timestamp_timeout.files }}" ++ ++- name: Ensure timestamp_timeout is enabled with the appropriate value in /etc/sudoers ++ lineinfile: ++ path: /etc/sudoers ++ regexp: '^[\s]*Defaults\s(.*)\btimestamp_timeout=[-]?\w+\b(.*)$' ++ line: 'Defaults \1timestamp_timeout={{ var_sudo_timestamp_timeout }}\2' ++ validate: /usr/sbin/visudo -cf %s ++ backrefs: yes ++ register: edit_sudoers_timestamp_timeout_option ++ ++- name: Enable timestamp_timeout option with appropriate value in /etc/sudoers ++ lineinfile: # noqa 503 ++ path: /etc/sudoers ++ line: 'Defaults timestamp_timeout={{ var_sudo_timestamp_timeout }}' ++ validate: /usr/sbin/visudo -cf %s ++ when: edit_sudoers_timestamp_timeout_option is defined and not edit_sudoers_timestamp_timeout_option.changed +diff --git a/linux_os/guide/system/software/sudo/sudo_require_reauthentication/bash/shared.sh b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/bash/shared.sh +new file mode 100644 +index 00000000000..0b623ed4a49 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/bash/shared.sh +@@ -0,0 +1,38 @@ ++# platform = multi_platform_all ++# reboot = false ++# strategy = restrict ++# complexity = low ++# disruption = low ++ ++ ++{{{ bash_instantiate_variables("var_sudo_timestamp_timeout") }}} ++ ++if grep -x '^[\s]*Defaults.*\btimestamp_timeout=.*' /etc/sudoers.d/*; then ++ find /etc/sudoers.d/ -type f -exec sed -i "/^[\s]*Defaults.*\btimestamp_timeout=.*/d" {} \; ++fi ++ ++if /usr/sbin/visudo -qcf /etc/sudoers; then ++ cp /etc/sudoers /etc/sudoers.bak ++ if ! grep -P '^[\s]*Defaults.*\btimestamp_timeout=[-]?\w+\b\b.*$' /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 if appropriate value is not set ++ if ! grep -P "^[\s]*Defaults.*\btimestamp_timeout=${var_sudo_timestamp_timeout}\b.*$" /etc/sudoers; then ++ ++ sed -Ei "s/(^[\s]*Defaults.*\btimestamp_timeout=)[-]?\w+(\b.*$)/\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 +diff --git a/linux_os/guide/system/software/sudo/sudo_require_reauthentication/oval/shared.xml b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/oval/shared.xml +index 8f404ca6065..dfc319b6f1f 100644 +--- a/linux_os/guide/system/software/sudo/sudo_require_reauthentication/oval/shared.xml ++++ b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/oval/shared.xml +@@ -6,13 +6,13 @@ + +
    + +- ++ + + + + + +- /etc/sudoers ++ ^/etc/sudoers(\.d/.*)?$ + ^[\s]*Defaults[\s]+timestamp_timeout=([-]?[\d]+)$ + 1 + +diff --git a/linux_os/guide/system/software/sudo/sudo_require_reauthentication/rule.yml b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/rule.yml +index 42c6e28f9e6..eebb96678f1 100644 +--- a/linux_os/guide/system/software/sudo/sudo_require_reauthentication/rule.yml ++++ b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/rule.yml +@@ -50,16 +50,4 @@ ocil: |- +
    sudo grep -ri '^Defaults.*timestamp_timeout' /etc/sudoers /etc/sudoers.d
    + The output should be: +
    /etc/sudoers:Defaults timestamp_timeout=0
    or "timestamp_timeout" is set to a positive number. +- +-template: +- name: sudo_defaults_option +- vars: +- option: timestamp_timeout +- variable_name: "var_sudo_timestamp_timeout" +- # optional minus char added so remediation can detect properly if item is already configured +- option_regex_suffix: '=[-]?\w+\b' +- backends: +- # Template is not able to accomodate this particular check. +- # It needs to check for an integer greater than or equal to zero +- oval: "off" +- ++ If results are returned from more than one file location, this is a finding. +diff --git a/linux_os/guide/system/software/sudo/sudo_require_reauthentication/tests/multiple_correct_value.fail.sh b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/tests/multiple_correct_value.fail.sh +new file mode 100644 +index 00000000000..a258d6632b5 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudo_require_reauthentication/tests/multiple_correct_value.fail.sh +@@ -0,0 +1,10 @@ ++#!/bin/bash ++ ++ ++if grep -q 'timestamp_timeout' /etc/sudoers; then ++ sed -i 's/.*timestamp_timeout.*/Defaults timestamp_timeout=3/' /etc/sudoers ++else ++ echo "Defaults timestamp_timeout=3" >> /etc/sudoers ++fi ++ ++echo "Defaults timestamp_timeout=3" > /etc/sudoers.d/00-complianceascode-test.conf diff --git a/SOURCES/scap-security-guide-0.1.61-supported-rhel9-PR_8202.patch b/SOURCES/scap-security-guide-0.1.61-supported-rhel9-PR_8202.patch new file mode 100644 index 0000000..c22eff3 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-supported-rhel9-PR_8202.patch @@ -0,0 +1,23 @@ +From 7345dfea41ddf9cafc2b91b5c90f12ca9ceaffd6 Mon Sep 17 00:00:00 2001 +From: Matej Tyc +Date: Thu, 10 Feb 2022 19:11:57 +0100 +Subject: [PATCH] RHEL9 is supported + +State that rhel9 will be supported by the vendor (as soon as it starts +to exist) +--- + .../installed_OS_is_vendor_supported/oval/shared.xml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/linux_os/guide/system/software/integrity/certified-vendor/installed_OS_is_vendor_supported/oval/shared.xml b/linux_os/guide/system/software/integrity/certified-vendor/installed_OS_is_vendor_supported/oval/shared.xml +index 931be7e8959..16c3847adb7 100644 +--- a/linux_os/guide/system/software/integrity/certified-vendor/installed_OS_is_vendor_supported/oval/shared.xml ++++ b/linux_os/guide/system/software/integrity/certified-vendor/installed_OS_is_vendor_supported/oval/shared.xml +@@ -6,6 +6,7 @@ + + + ++ + + + diff --git a/SOURCES/scap-security-guide-0.1.61-update-ospp-description-PR_8232.patch b/SOURCES/scap-security-guide-0.1.61-update-ospp-description-PR_8232.patch new file mode 100644 index 0000000..466149d --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update-ospp-description-PR_8232.patch @@ -0,0 +1,57 @@ +From ca715d7c17056b6f4cfc2ed3ee2ca68b4388a729 Mon Sep 17 00:00:00 2001 +From: Vojtech Polasek +Date: Wed, 16 Feb 2022 09:53:53 +0100 +Subject: [PATCH 1/2] update description of rhel9 ospp profile + +--- + products/rhel9/profiles/ospp.profile | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile +index c3f4e2d26eb..cb19227a3bd 100644 +--- a/products/rhel9/profiles/ospp.profile ++++ b/products/rhel9/profiles/ospp.profile +@@ -11,14 +11,12 @@ reference: https://www.niap-ccevs.org/Profile/PP.cfm + title: '[DRAFT] Protection Profile for General Purpose Operating Systems' + + description: |- +- This profile reflects mandatory configuration controls identified in the +- NIAP Configuration Annex to the Protection Profile for General Purpose +- Operating Systems (Protection Profile Version 4.2.1). +- +- This configuration profile is consistent with CNSSI-1253, which requires +- 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. ++ This profile is part of Red Hat Enterprise Linux 9 Common Criteria Guidance ++ documentation for Target of Evaluation based on Protection Profile for ++ General Purpose Operating Systems (OSPP) version 4.2.1 and Functional ++ Package for SSH version 1.0. ++ Where appropriate, CNSSI 1253 or DoD-specific values are used for ++ configuration, based on Configuration Annex to the OSPP. + + selections: + + +From 11061228944b3a33a482289dfef5e6a034c39ae4 Mon Sep 17 00:00:00 2001 +From: Gabriel Becker +Date: Wed, 16 Feb 2022 11:32:09 +0100 +Subject: [PATCH 2/2] Add newline in the RHEL9 OSPP description + +To be nicely rendered in the guide and OAA. +--- + products/rhel9/profiles/ospp.profile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile +index cb19227a3bd..f25abd7e4c4 100644 +--- a/products/rhel9/profiles/ospp.profile ++++ b/products/rhel9/profiles/ospp.profile +@@ -15,6 +15,7 @@ description: |- + documentation for Target of Evaluation based on Protection Profile for + General Purpose Operating Systems (OSPP) version 4.2.1 and Functional + Package for SSH version 1.0. ++ + Where appropriate, CNSSI 1253 or DoD-specific values are used for + configuration, based on Configuration Annex to the OSPP. + diff --git a/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010030-PR_8183.patch b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010030-PR_8183.patch new file mode 100644 index 0000000..1f30bf6 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010030-PR_8183.patch @@ -0,0 +1,13 @@ +diff --git a/linux_os/guide/system/software/disk_partitioning/encrypt_partitions/rule.yml b/linux_os/guide/system/software/disk_partitioning/encrypt_partitions/rule.yml +index e9d25a34fbd..13231dc2cc9 100644 +--- a/linux_os/guide/system/software/disk_partitioning/encrypt_partitions/rule.yml ++++ b/linux_os/guide/system/software/disk_partitioning/encrypt_partitions/rule.yml +@@ -90,6 +90,7 @@ ocil: |- + /dev/sda2: UUID=" bc98d7ef-6g54-321h-1d24-9870de2ge1a2 + " TYPE="crypto_LUKS" +

    +- Pseudo-file systems, such as /proc, /sys, and tmpfs, are not required to use disk encryption and are not a finding. ++ The boot partition and pseudo-file systems, such as /proc, /sys, and tmpfs, ++ are not required to use disk encryption and are not a finding. + + platform: machine diff --git a/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010287-PR_8051.patch b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010287-PR_8051.patch new file mode 100644 index 0000000..ad5b814 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010287-PR_8051.patch @@ -0,0 +1,43 @@ +diff --git a/linux_os/guide/system/software/integrity/crypto/configure_ssh_crypto_policy/rule.yml b/linux_os/guide/system/software/integrity/crypto/configure_ssh_crypto_policy/rule.yml +index 395129acb66..60b0ce0eb7d 100644 +--- a/linux_os/guide/system/software/integrity/crypto/configure_ssh_crypto_policy/rule.yml ++++ b/linux_os/guide/system/software/integrity/crypto/configure_ssh_crypto_policy/rule.yml +@@ -30,7 +30,7 @@ references: + nist: AC-17(a),AC-17(2),CM-6(a),MA-4(6),SC-13 + srg: SRG-OS-000250-GPOS-00093 + stigid@ol8: OL08-00-010020 +- stigid@rhel8: RHEL-08-010020 ++ stigid@rhel8: RHEL-08-010287 + + ocil_clause: 'the CRYPTO_POLICY variable is not set or is commented in the /etc/sysconfig/sshd' + +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index 04f158116ee..60eafa9c566 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -191,9 +191,7 @@ selections: + # RHEL-08-010260 + - file_groupowner_var_log + +- # *** SHARED *** # +- # RHEL-08-010290 && RHEL-08-010291 +- # *** SHARED *** # ++ # RHEL-08-010287 + - configure_ssh_crypto_policy + + # RHEL-08-010290 +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 8f79b22e3e4..9bd1a2b0f51 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -192,9 +192,7 @@ selections: + # RHEL-08-010260 + - file_groupowner_var_log + +- # *** SHARED *** # +- # RHEL-08-010290 && RHEL-08-010291 +- # *** SHARED *** # ++ # RHEL-08-010287 + - configure_ssh_crypto_policy + + # RHEL-08-010290 diff --git a/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010383-PR_8138.patch b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010383-PR_8138.patch new file mode 100644 index 0000000..f421060 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_010383-PR_8138.patch @@ -0,0 +1,146 @@ +diff --git a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/ansible/shared.yml b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/ansible/shared.yml +index 08ffd76aed6..399ca1ea3ce 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/ansible/shared.yml ++++ b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/ansible/shared.yml +@@ -4,6 +4,26 @@ + # complexity = low + # disruption = low + +-{{{ ansible_lineinfile(msg='Ensure that Defaults !targetpw is defined in sudoers', path='/etc/sudoers', new_line='Defaults !targetpw', create='yes', state='present') }}} +-{{{ ansible_lineinfile(msg='Ensure that Defaults !rootpw is defined in sudoers', path='/etc/sudoers', new_line='Defaults !rootpw', create='yes', state='present') }}} +-{{{ ansible_lineinfile(msg='Ensure that Defaults !runaspw is defined in sudoers', path='/etc/sudoers', new_line='Defaults !runaspw', create='yes', state='present') }}} ++{{%- macro delete_line_in_sudoers_d(line) %}} ++- name: "Find out if /etc/sudoers.d/* files contain {{{ line }}} to be deduplicated" ++ find: ++ path: "/etc/sudoers.d" ++ patterns: "*" ++ contains: '^{{{ line }}}$' ++ register: sudoers_d_defaults ++ ++- name: "Remove found occurrences of {{{ line }}} from /etc/sudoers.d/* files" ++ lineinfile: ++ path: "{{ item.path }}" ++ regexp: "^{{{ line }}}$" ++ state: absent ++ with_items: "{{ sudoers_d_defaults.files }}" ++{{%- endmacro %}} ++ ++{{{- delete_line_in_sudoers_d("Defaults !targetpw") }}} ++{{{- delete_line_in_sudoers_d("Defaults !rootpw") }}} ++{{{- delete_line_in_sudoers_d("Defaults !runaspw") }}} ++ ++{{{ ansible_only_lineinfile(msg='Ensure that Defaults !targetpw is defined in sudoers', line_regex='^Defaults !targetpw$', path='/etc/sudoers', new_line='Defaults !targetpw') }}} ++{{{ ansible_only_lineinfile(msg='Ensure that Defaults !rootpw is defined in sudoers', line_regex='^Defaults !rootpw$', path='/etc/sudoers', new_line='Defaults !rootpw') }}} ++{{{ ansible_only_lineinfile(msg='Ensure that Defaults !runaspw is defined in sudoers', line_regex='^Defaults !runaspw$', path='/etc/sudoers', new_line='Defaults !runaspw') }}} +diff --git a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/bash/shared.sh b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/bash/shared.sh +index ea0ac67fa1c..3b327f3fc88 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/bash/shared.sh ++++ b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/bash/shared.sh +@@ -1,5 +1,17 @@ + # platform = multi_platform_all + ++{{%- macro delete_line_in_sudoers_d(line) %}} ++if grep -x '^{{{line}}}$' /etc/sudoers.d/*; then ++ find /etc/sudoers.d/ -type f -exec sed -i "/{{{line}}}/d" {} \; ++fi ++{{%- endmacro %}} ++ ++{{{- delete_line_in_sudoers_d("Defaults !targetpw") }}} ++{{{- delete_line_in_sudoers_d("Defaults !rootpw") }}} ++{{{- delete_line_in_sudoers_d("Defaults !runaspw") }}} ++ + {{{ set_config_file(path="/etc/sudoers", parameter="Defaults !targetpw", value="", create=true, insensitive=false, separator="", separator_regex="", prefix_regex="") }}} + {{{ set_config_file(path="/etc/sudoers", parameter="Defaults !rootpw", value="", create=true, insensitive=false, separator="", separator_regex="", prefix_regex="") }}} + {{{ set_config_file(path="/etc/sudoers", parameter="Defaults !runaspw", value="", create=true, insensitive=false, separator="", separator_regex="", prefix_regex="") }}} ++ ++ +diff --git a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/oval/shared.xml b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/oval/shared.xml +index 646e6bfb7c0..b3fadd53bee 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/oval/shared.xml ++++ b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/oval/shared.xml +@@ -8,17 +8,17 @@ +
    + + +- + + + +- + + + +- + + +@@ -26,19 +26,19 @@ + + ^/etc/sudoers(\.d/.*)?$ + ^Defaults !targetpw$\r?\n +- 1 ++ 1 + + + + ^/etc/sudoers(\.d/.*)?$ + ^Defaults !rootpw$\r?\n +- 1 ++ 1 + + + + ^/etc/sudoers(\.d/.*)?$ + ^Defaults !runaspw$\r?\n +- 1 ++ 1 + + + +diff --git a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/rule.yml b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/rule.yml +index ccc29b77d15..698021d8fd0 100644 +--- a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/rule.yml ++++ b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/rule.yml +@@ -42,7 +42,8 @@ ocil_clause: 'invoke user passwd when using sudo' + ocil: |- + Run the following command to Verify that the sudoers security policy is configured to use the invoking user's password for privilege escalation: +
     sudo egrep -i '(!rootpw|!targetpw|!runaspw)' /etc/sudoers /etc/sudoers.d/* | grep -v '#'
    +- If no results are returned, this is a finding ++ If no results are returned, this is a finding. ++ If results are returned from more than one file location, this is a finding. + If "Defaults !targetpw" is not defined, this is a finding. + If "Defaults !rootpw" is not defined, this is a finding. + If "Defaults !runaspw" is not defined, this is a finding. +diff --git a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/tests/sudoers_d_duplicate.fail.sh b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/tests/sudoers_d_duplicate.fail.sh +new file mode 100644 +index 00000000000..a258d108a00 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/tests/sudoers_d_duplicate.fail.sh +@@ -0,0 +1,9 @@ ++# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel,SUSE Linux Enterprise 15 ++# packages = sudo ++ ++echo 'Defaults !targetpw' >> /etc/sudoers ++echo 'Defaults !rootpw' >> /etc/sudoers ++echo 'Defaults !runaspw' >> /etc/sudoers ++echo 'Defaults !targetpw' >> /etc/sudoers.d/00-complianceascode.conf ++echo 'Defaults !rootpw' >> /etc/sudoers.d/00-complianceascode.conf ++echo 'Defaults !runaspw' >> /etc/sudoers.d/00-complianceascode.conf +diff --git a/linux_os/guide/system/software/sudo/sudoers_validate_passwd/tests/sudoers_validate_passwd_duplicates.fail.sh b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/tests/sudoers_validate_passwd_duplicates.fail.sh +new file mode 100644 +index 00000000000..6247b5230e4 +--- /dev/null ++++ b/linux_os/guide/system/software/sudo/sudoers_validate_passwd/tests/sudoers_validate_passwd_duplicates.fail.sh +@@ -0,0 +1,7 @@ ++# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel,SUSE Linux Enterprise 15 ++# packages = sudo ++ ++echo 'Defaults !targetpw' >> /etc/sudoers ++echo 'Defaults !rootpw' >> /etc/sudoers ++echo 'Defaults !runaspw' >> /etc/sudoers ++echo 'Defaults !runaspw' >> /etc/sudoers diff --git a/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_020041-PR_8146.patch b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_020041-PR_8146.patch new file mode 100644 index 0000000..5c27f1f --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_020041-PR_8146.patch @@ -0,0 +1,300 @@ +diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/bash/shared.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/bash/shared.sh +index 737d725872d..08b62057bde 100644 +--- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/bash/shared.sh ++++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/bash/shared.sh +@@ -1,7 +1,11 @@ + # platform = multi_platform_all ++# reboot = true ++# strategy = enable ++# complexity = low ++# disruption = low + + if ! grep -x ' case "$name" in sshd|login) exec tmux ;; esac' /etc/bashrc; then +- cat >> /etc/bashrc <<'EOF' ++ cat >> /etc/profile.d/tmux.sh <<'EOF' + if [ "$PS1" ]; then + parent=$(ps -o ppid= -p $$) + name=$(ps -o comm= -p $parent) +diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/oval/shared.xml b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/oval/shared.xml +index 00ac349e292..4cb2f9e0e04 100644 +--- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/oval/shared.xml ++++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/oval/shared.xml +@@ -4,21 +4,27 @@ + + ++ + + +- + +- + + + +- /etc/bashrc +- ^(.*)$ +- 1 ++ ^/etc/bashrc$|^/etc/profile\.d/.*$ ++ if \[ "\$PS1" \]; then\n\s+parent=\$\(ps -o ppid= -p \$\$\)\n\s+name=\$\(ps -o comm= -p \$parent\)\n\s+case "\$name" in sshd\|login\) exec tmux ;; esac\nfi ++ 1 + +- +- if \[ "\$PS1" \]; then\n\s+parent=\$\(ps -o ppid= -p \$\$\)\n\s+name=\$\(ps -o comm= -p \$parent\)\n\s+case "\$name" in sshd\|login\) exec tmux ;; esac\nfi +- ++ ++ ++ ++ ++ ++ ++ ^tmux(?:|[\s]+.*)$ ++ 0 ++ + +diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/rule.yml b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/rule.yml +index 3ba0f4a2d8f..7afc5fc5e6b 100644 +--- a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/rule.yml ++++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/rule.yml +@@ -7,12 +7,20 @@ title: 'Support session locking with tmux' + description: |- + The tmux terminal multiplexer is used to implement + automatic session locking. It should be started from +- /etc/bashrc. ++ /etc/bashrc or drop-in files within /etc/profile.d/. ++ Additionally it must be ensured that the tmux process is running ++ and it can be verified with the following command: ++
    ps all | grep tmux | grep -v grep
    + + rationale: |- + Unlike bash itself, the tmux terminal multiplexer + provides a mechanism to lock sessions after period of inactivity. + ++warnings: ++ - general: |- ++ The remediation does not start the tmux process, so it must be ++ manually started or have the system rebooted after applying the fix. ++ + severity: medium + + identifiers: +@@ -26,17 +34,21 @@ references: + stigid@ol8: OL08-00-020041 + stigid@rhel8: RHEL-08-020041 + +-ocil_clause: 'exec tmux is not present at the end of bashrc' ++ocil_clause: 'exec tmux is not present at the end of bashrc or tmux process is not running' + + ocil: |- + To verify that tmux is configured to execute, + run the following command: +-
    $ grep -A1 -B3 "case ..name. in sshd|login) exec tmux ;; esac" /etc/bashrc
    ++
    $ grep -A1 -B3 "case ..name. in sshd|login) exec tmux ;; esac" /etc/bashrc /etc/profile.d/*
    + The output should return the following: +
    if [ "$PS1" ]; then
    +       parent=$(ps -o ppid= -p $$)
    +       name=$(ps -o comm= -p $parent)
    +       case "$name" in sshd|login) exec tmux ;; esac
    +     fi
    ++ To verify that the tmux process is running, ++ run the following command: ++
    ps all | grep tmux | grep -v grep
    ++ If the command does not produce output, this is a finding. + + platform: machine +diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/correct_value.pass.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/correct_value.pass.sh +new file mode 100644 +index 00000000000..221c18665ef +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/correct_value.pass.sh +@@ -0,0 +1,12 @@ ++#!/bin/bash ++# packages = tmux ++ ++cat >> /etc/bashrc <<'EOF' ++if [ "$PS1" ]; then ++ parent=$(ps -o ppid= -p $$) ++ name=$(ps -o comm= -p $parent) ++ case "$name" in sshd|login) exec tmux ;; esac ++fi ++EOF ++ ++tmux new-session -s root -d +diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/correct_value_d_directory.pass.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/correct_value_d_directory.pass.sh +new file mode 100644 +index 00000000000..1702bb17e79 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/correct_value_d_directory.pass.sh +@@ -0,0 +1,13 @@ ++#!/bin/bash ++# packages = tmux ++ ++ ++cat >> /etc/profile.d/00-complianceascode.conf <<'EOF' ++if [ "$PS1" ]; then ++ parent=$(ps -o ppid= -p $$) ++ name=$(ps -o comm= -p $parent) ++ case "$name" in sshd|login) exec tmux ;; esac ++fi ++EOF ++ ++tmux new-session -s root -d +diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/duplicate_value_multiple_files.pass.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/duplicate_value_multiple_files.pass.sh +new file mode 100644 +index 00000000000..16d4acfcb5a +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/duplicate_value_multiple_files.pass.sh +@@ -0,0 +1,20 @@ ++#!/bin/bash ++# packages = tmux ++ ++cat >> /etc/profile.d/00-complianceascode.conf <<'EOF' ++if [ "$PS1" ]; then ++ parent=$(ps -o ppid= -p $$) ++ name=$(ps -o comm= -p $parent) ++ case "$name" in sshd|login) exec tmux ;; esac ++fi ++EOF ++ ++cat >> /etc/bashrc <<'EOF' ++if [ "$PS1" ]; then ++ parent=$(ps -o ppid= -p $$) ++ name=$(ps -o comm= -p $parent) ++ case "$name" in sshd|login) exec tmux ;; esac ++fi ++EOF ++ ++tmux new-session -s root -d +diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/tmux_not_running.fail.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/tmux_not_running.fail.sh +new file mode 100644 +index 00000000000..6cb9d83efc5 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/tmux_not_running.fail.sh +@@ -0,0 +1,13 @@ ++#!/bin/bash ++# packages = tmux ++# remediation = none ++ ++cat >> /etc/bashrc <<'EOF' ++if [ "$PS1" ]; then ++ parent=$(ps -o ppid= -p $$) ++ name=$(ps -o comm= -p $parent) ++ case "$name" in sshd|login) exec tmux ;; esac ++fi ++EOF ++ ++killall tmux || true +diff --git a/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/wrong_value.fail.sh b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/wrong_value.fail.sh +new file mode 100644 +index 00000000000..f13a8b038e4 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-physical/screen_locking/console_screen_locking/configure_bashrc_exec_tmux/tests/wrong_value.fail.sh +@@ -0,0 +1,105 @@ ++#!/bin/bash ++# packages = tmux ++ ++cat > /etc/bashrc <<'EOF' ++# /etc/bashrc ++ ++# System wide functions and aliases ++# Environment stuff goes in /etc/profile ++ ++# It's NOT a good idea to change this file unless you know what you ++# are doing. It's much better to create a custom.sh shell script in ++# /etc/profile.d/ to make custom changes to your environment, as this ++# will prevent the need for merging in future updates. ++ ++# Prevent doublesourcing ++if [ -z "$BASHRCSOURCED" ]; then ++ BASHRCSOURCED="Y" ++ ++ # are we an interactive shell? ++ if [ "$PS1" ]; then ++ if [ -z "$PROMPT_COMMAND" ]; then ++ case $TERM in ++ xterm*|vte*) ++ if [ -e /etc/sysconfig/bash-prompt-xterm ]; then ++ PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm ++ elif [ "${VTE_VERSION:-0}" -ge 3405 ]; then ++ PROMPT_COMMAND="__vte_prompt_command" ++ else ++ PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' ++ fi ++ ;; ++ screen*) ++ if [ -e /etc/sysconfig/bash-prompt-screen ]; then ++ PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen ++ else ++ PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' ++ fi ++ ;; ++ *) ++ [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default ++ ;; ++ esac ++ fi ++ # Turn on parallel history ++ shopt -s histappend ++ history -a ++ # Turn on checkwinsize ++ shopt -s checkwinsize ++ [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " ++ # You might want to have e.g. tty in prompt (e.g. more virtual machines) ++ # and console windows ++ # If you want to do so, just add e.g. ++ # if [ "$PS1" ]; then ++ # PS1="[\u@\h:\l \W]\\$ " ++ # fi ++ # to your custom modification shell script in /etc/profile.d/ directory ++ fi ++ ++ if ! shopt -q login_shell ; then # We're not a login shell ++ # Need to redefine pathmunge, it gets undefined at the end of /etc/profile ++ pathmunge () { ++ case ":${PATH}:" in ++ *:"$1":*) ++ ;; ++ *) ++ if [ "$2" = "after" ] ; then ++ PATH=$PATH:$1 ++ else ++ PATH=$1:$PATH ++ fi ++ esac ++ } ++ ++ # By default, we want umask to get set. This sets it for non-login shell. ++ # Current threshold for system reserved uid/gids is 200 ++ # You could check uidgid reservation validity in ++ # /usr/share/doc/setup-*/uidgid file ++ if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then ++ umask 002 ++ else ++ umask 022 ++ fi ++ ++ SHELL=/bin/bash ++ # Only display echos from profile.d scripts if we are no login shell ++ # and interactive - otherwise just process them to set envvars ++ for i in /etc/profile.d/*.sh; do ++ if [ -r "$i" ]; then ++ if [ "$PS1" ]; then ++ . "$i" ++ else ++ . "$i" >/dev/null ++ fi ++ fi ++ done ++ ++ unset i ++ unset -f pathmunge ++ fi ++ ++fi ++# vim:ts=4:sw=4 ++EOF ++ ++tmux new-session -s root -d diff --git a/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_040320-PR_8170.patch b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_040320-PR_8170.patch new file mode 100644 index 0000000..c561b1a --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_040320-PR_8170.patch @@ -0,0 +1,209 @@ +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/ansible/shared.yml b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/ansible/shared.yml +index 5b3afb324df..67d6836e873 100644 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/ansible/shared.yml ++++ b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/ansible/shared.yml +@@ -14,12 +14,3 @@ + - xorg-x11-server-Xwayland + {{% endif %}} + state: absent +- +- +-- name: Switch to multi-user runlevel +- file: +- src: /usr/lib/systemd/system/multi-user.target +- dest: /etc/systemd/system/default.target +- state: link +- force: yes +- +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/bash/shared.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/bash/shared.sh +index dbabe572d2a..496dc74be7c 100644 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/bash/shared.sh ++++ b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/bash/shared.sh +@@ -12,6 +12,3 @@ + {{% if product not in ["rhel7", "ol7"] %}} + {{{ bash_package_remove("xorg-x11-server-Xwayland") }}} + {{% endif %}} +- +-# configure run level +-systemctl set-default multi-user.target +\ No newline at end of file +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/oval/shared.xml b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/oval/shared.xml +index 0710efe9f1b..0868ec6eae7 100644 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/oval/shared.xml ++++ b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/oval/shared.xml +@@ -2,10 +2,6 @@ + + {{{ oval_metadata("Ensure that the default runlevel target is set to multi-user.target.") }}} + +- {{%- if init_system == "systemd" and target_oval_version != [5, 10] %}} +- +- {{%- endif %}} + + sudo {{{ pkg_manager }}} remove xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-server-Xwayland + {{% endif %}} +- Additionally, setting the system's default target to +- multi-user.target will prevent automatic startup of the X server. +- To do so, run: +-
    $ systemctl set-default multi-user.target
    +- You should see the following output: +-
    Removed symlink /etc/systemd/system/default.target.
    +-    Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
    +- + + rationale: |- + Unnecessary service packages must not be installed to decrease the attack surface of the system. X windows has a long history of security +@@ -72,6 +64,8 @@ warnings: + The installation and use of a Graphical User Interface (GUI) increases your attack vector and decreases your + overall security posture. Removing the package xorg-x11-server-common package will remove the graphical target + which might bring your system to an inconsistent state requiring additional configuration to access the system +- again. If a GUI is an operational requirement, a tailored profile that removes this rule should used before ++ again. ++ The rule xwindows_runlevel_target can be used to configure the system to boot into the multi-user.target. ++ If a GUI is an operational requirement, a tailored profile that removes this rule should be used before + continuing installation. + {{{ ovirt_rule_notapplicable_warning("X11 graphic libraries are dependency of OpenStack Cinderlib storage provider") | indent(4) }}} +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/correct_target.pass.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/correct_target.pass.sh +deleted file mode 100644 +index 9bf62a42d28..00000000000 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/correct_target.pass.sh ++++ /dev/null +@@ -1,5 +0,0 @@ +-#!/bin/bash +- +-yum -y remove xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-server-Xwayland +- +-systemctl set-default multi-user.target +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/correct_target_under_lib.pass.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/correct_target_under_lib.pass.sh +deleted file mode 100644 +index 4eeb6971486..00000000000 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/correct_target_under_lib.pass.sh ++++ /dev/null +@@ -1,5 +0,0 @@ +-#!/bin/bash +- +-yum -y remove xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-server-Xwayland +- +-ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_installed.fail.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_installed.fail.sh +new file mode 100644 +index 00000000000..b3908cff002 +--- /dev/null ++++ b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_installed.fail.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++ ++{{{ bash_package_install("xorg-x11-server-Xorg") }}} ++{{{ bash_package_install("xorg-x11-server-utils") }}} ++{{{ bash_package_install("xorg-x11-server-common") }}} ++{{% if product not in ["rhel7", "ol7"] %}} ++{{{ bash_package_install("xorg-x11-server-Xwayland") }}} ++{{% endif %}} +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_installed_removed.pass.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_installed_removed.pass.sh +new file mode 100644 +index 00000000000..abafdbd624a +--- /dev/null ++++ b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_installed_removed.pass.sh +@@ -0,0 +1,16 @@ ++#!/bin/bash ++# based on shared/templates/package_removed/tests/package-installed-removed.pass.sh ++ ++{{{ bash_package_install("xorg-x11-server-Xorg") }}} ++{{{ bash_package_install("xorg-x11-server-utils") }}} ++{{{ bash_package_install("xorg-x11-server-common") }}} ++{{% if product not in ["rhel7", "ol7"] %}} ++{{{ bash_package_install("xorg-x11-server-Xwayland") }}} ++{{% endif %}} ++ ++{{{ bash_package_remove("xorg-x11-server-Xorg") }}} ++{{{ bash_package_remove("xorg-x11-server-utils") }}} ++{{{ bash_package_remove("xorg-x11-server-common") }}} ++{{% if product not in ["rhel7", "ol7"] %}} ++{{{ bash_package_remove("xorg-x11-server-Xwayland") }}} ++{{% endif %}} +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_removed.pass.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_removed.pass.sh +new file mode 100644 +index 00000000000..a403e108082 +--- /dev/null ++++ b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/packages_removed.pass.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++ ++{{{ bash_package_remove("xorg-x11-server-Xorg") }}} ++{{{ bash_package_remove("xorg-x11-server-utils") }}} ++{{{ bash_package_remove("xorg-x11-server-common") }}} ++{{% if product not in ["rhel7", "ol7"] %}} ++{{{ bash_package_remove("xorg-x11-server-Xwayland") }}} ++{{% endif %}} +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel7_packages_installed_correct_target.fail.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel7_packages_installed_correct_target.fail.sh +deleted file mode 100644 +index ff7d0efda29..00000000000 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel7_packages_installed_correct_target.fail.sh ++++ /dev/null +@@ -1,4 +0,0 @@ +-#!/bin/bash +-# platform = Red Hat Enterprise Linux 7 +-# packages = xorg-x11-server-Xorg,xorg-x11-server-common,xorg-x11-server-utils +- +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel7_packages_installed_wrong_target.fail.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel7_packages_installed_wrong_target.fail.sh +deleted file mode 100644 +index d8ecd8c7361..00000000000 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel7_packages_installed_wrong_target.fail.sh ++++ /dev/null +@@ -1,5 +0,0 @@ +-#!/bin/bash +-# platform = Red Hat Enterprise Linux 7 +-# packages = xorg-x11-server-Xorg,xorg-x11-server-common,xorg-x11-server-utils +- +-systemctl set-default graphical.target +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel8_packages_installed_correct_target.fail.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel8_packages_installed_correct_target.fail.sh +deleted file mode 100644 +index 14f1a97bc4f..00000000000 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel8_packages_installed_correct_target.fail.sh ++++ /dev/null +@@ -1,4 +0,0 @@ +-#!/bin/bash +-# platform = Red Hat Enterprise Linux 8 +-# packages = xorg-x11-server-Xorg,xorg-x11-server-common,xorg-x11-server-utils,xorg-x11-server-Xwayland +- +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel8_packages_installed_wrong_target.fail.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel8_packages_installed_wrong_target.fail.sh +deleted file mode 100644 +index c678ef711d9..00000000000 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/rhel8_packages_installed_wrong_target.fail.sh ++++ /dev/null +@@ -1,5 +0,0 @@ +-#!/bin/bash +-# platform = Red Hat Enterprise Linux 8 +-# packages = xorg-x11-server-Xorg,xorg-x11-server-common,xorg-x11-server-utils,xorg-x11-server-Xwayland +- +-systemctl set-default graphical.target +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/wrong_target.fail.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/wrong_target.fail.sh +deleted file mode 100644 +index bf8a615b1dc..00000000000 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/wrong_target.fail.sh ++++ /dev/null +@@ -1,5 +0,0 @@ +-#!/bin/bash +- +-yum -y remove xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-server-Xwayland +- +-systemctl set-default graphical.target +diff --git a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/wrong_target_under_lib.fail.sh b/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/wrong_target_under_lib.fail.sh +deleted file mode 100644 +index 652088b85ae..00000000000 +--- a/linux_os/guide/services/xwindows/disabling_xwindows/xwindows_remove_packages/tests/wrong_target_under_lib.fail.sh ++++ /dev/null +@@ -1,5 +0,0 @@ +-#!/bin/bash +- +-yum -y remove xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-server-Xwayland +- +-ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target diff --git a/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_STIG-PR_8139.patch b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_STIG-PR_8139.patch new file mode 100644 index 0000000..ed6e199 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update_RHEL_08_STIG-PR_8139.patch @@ -0,0 +1,13374 @@ +diff --git a/docs/manual/developer/05_tools_and_utilities.md b/docs/manual/developer/05_tools_and_utilities.md +index 6a37ca35207..b38e3b0f0a5 100644 +--- a/docs/manual/developer/05_tools_and_utilities.md ++++ b/docs/manual/developer/05_tools_and_utilities.md +@@ -64,7 +64,7 @@ options: + + Example + +- $ ./utils/build_stig_control.py -p rhel8 -m shared/references/disa-stig-rhel8-v1r4-xccdf-manual.xml ++ $ ./utils/build_stig_control.py -p rhel8 -m shared/references/disa-stig-rhel8-v1r5-xccdf-manual.xml + + + ## Generating login banner regular expressions +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index cb72403e81a..d5f0c07cbc5 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -1,7 +1,7 @@ + documentation_complete: true + + metadata: +- version: V1R4 ++ version: V1R5 + SMEs: + - mab879 + - ggbecker +@@ -12,7 +12,7 @@ title: 'DISA STIG for Red Hat Enterprise Linux 8' + + description: |- + This profile contains configuration checks that align to the +- DISA STIG for Red Hat Enterprise Linux 8 V1R4. ++ DISA STIG for Red Hat Enterprise Linux 8 V1R5. + + In addition to being applicable to Red Hat Enterprise Linux 8, DISA recognizes this + configuration baseline as applicable to the operating system tier of +diff --git a/products/rhel8/profiles/stig_gui.profile b/products/rhel8/profiles/stig_gui.profile +index 1f87acf264a..d1577215b07 100644 +--- a/products/rhel8/profiles/stig_gui.profile ++++ b/products/rhel8/profiles/stig_gui.profile +@@ -1,7 +1,7 @@ + documentation_complete: true + + metadata: +- version: V1R4 ++ version: V1R5 + SMEs: + - mab879 + - ggbecker +@@ -12,7 +12,7 @@ title: 'DISA STIG with GUI for Red Hat Enterprise Linux 8' + + description: |- + This profile contains configuration checks that align to the +- DISA STIG with GUI for Red Hat Enterprise Linux 8 V1R4. ++ DISA STIG with GUI for Red Hat Enterprise Linux 8 V1R5. + + In addition to being applicable to Red Hat Enterprise Linux 8, DISA recognizes this + configuration baseline as applicable to the operating system tier of +diff --git a/shared/references/disa-stig-rhel8-v1r3-xccdf-scap.xml b/shared/references/disa-stig-rhel8-v1r4-xccdf-scap.xml +similarity index 89% +rename from shared/references/disa-stig-rhel8-v1r3-xccdf-scap.xml +rename to shared/references/disa-stig-rhel8-v1r4-xccdf-scap.xml +index 3af966c9a02..24c8f3e51a8 100644 +--- a/shared/references/disa-stig-rhel8-v1r3-xccdf-scap.xml ++++ b/shared/references/disa-stig-rhel8-v1r4-xccdf-scap.xml +@@ -1,36 +1,36 @@ + +- +- ++ ++ + +- ++ + +- ++ + + + + +- ++ + +- ++ + + + + +- +- ++ ++ + + +- ++ + + + Red Hat Enterprise Linux 8 +- oval:mil.disa.stig.rhel8:def:1 ++ oval:mil.disa.stig.rhel8:def:1 + + + +- ++ + +- accepted ++ accepted + Red Hat Enterprise Linux 8 Security Technical Implementation Guide + This Security Technical Implementation Guide is published as a tool to improve the security of Department of Defense (DoD) information systems. The requirements are derived from the National Institute of Standards and Technology (NIST) 800-53 and related documents. Comments or proposed revisions to this document should be sent via email to the following address: disa.stig_spt@mail.mil. + +@@ -40,11 +40,11 @@ + DISA + STIG.DOD.MIL + +- Release: 1.3 Benchmark Date: 27 Oct 2021 ++ Release: 1.4 Benchmark Date: 27 Jan 2022 + 3.2.2.36079 + 1.10.0 + +- 001.003 ++ 001.004 + + DISA + DISA +@@ -103,7 +103,6 @@ + + + +- + + + +@@ -157,7 +156,6 @@ + + + +- + + + +@@ -180,13 +178,8 @@ + + + +- +- +- +- + + +- + + + +@@ -206,28 +199,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -355,7 +333,6 @@ + + + +- + + + +@@ -409,7 +386,6 @@ + + + +- + + + +@@ -432,13 +408,8 @@ + + + +- +- +- +- + + +- + + + +@@ -458,28 +429,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -607,7 +563,6 @@ + + + +- + + + +@@ -661,7 +616,6 @@ + + + +- + + + +@@ -684,13 +638,8 @@ + + + +- +- +- +- + + +- + + + +@@ -710,28 +659,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -859,7 +793,6 @@ + + + +- + + + +@@ -913,7 +846,6 @@ + + + +- + + + +@@ -936,13 +868,8 @@ + + + +- +- +- +- + + +- + + + +@@ -962,28 +889,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -1111,7 +1023,6 @@ + + + +- + + + +@@ -1165,7 +1076,6 @@ + + + +- + + + +@@ -1188,13 +1098,8 @@ + + + +- +- +- +- + + +- + + + +@@ -1214,28 +1119,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -1363,7 +1253,6 @@ + + + +- + + + +@@ -1417,7 +1306,6 @@ + + + +- + + + +@@ -1440,13 +1328,8 @@ + + + +- +- +- +- + + +- + + + +@@ -1466,28 +1349,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -1615,7 +1483,6 @@ + + + +- + + + +@@ -1669,7 +1536,6 @@ + + + +- + + + +@@ -1692,13 +1558,8 @@ + + + +- +- +- +- + + +- + + + +@@ -1718,28 +1579,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -1867,7 +1713,6 @@ + + + +- + + + +@@ -1921,7 +1766,6 @@ + + + +- + + + +@@ -1944,13 +1788,8 @@ + + + +- +- +- +- + + +- + + + +@@ -1970,28 +1809,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -2119,7 +1943,6 @@ + + + +- + + + +@@ -2173,7 +1996,6 @@ + + + +- + + + +@@ -2196,13 +2018,8 @@ + + + +- +- +- +- + + +- + + + +@@ -2222,28 +2039,13 @@ + + + +- +- +- +- + +- + + + + +- +- +- +- +- + + +- +- +- +- +- + + + +@@ -2324,9 +2126,9 @@ + This profile only includes rules that are Severity Category I. + + +- ++ + +- ++ + + + +@@ -2338,7 +2140,7 @@ + + + +- ++ + + + +@@ -2363,7 +2165,6 @@ + + + +- + + + +@@ -2390,13 +2191,13 @@ + + + +- ++ + +- ++ + + + +- ++ + + + +@@ -2404,7 +2205,7 @@ + + + +- ++ + + + +@@ -2416,7 +2217,6 @@ + + + +- + + + +@@ -2438,14 +2238,9 @@ + + + +- +- +- +- +- ++ + + +- + + + +@@ -2463,30 +2258,15 @@ + + + +- +- +- +- +- +- ++ ++ + +- + + + +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ + + + +@@ -2510,7 +2290,7 @@ + + + +- ++ + + + +@@ -2553,8 +2333,8 @@ + + + +- +- ++ ++ + + + SRG-OS-000480-GPOS-00227 +@@ -2576,7 +2356,7 @@ Red Hat offers the Extended Update Support (EUS) ad-on to a Red Hat Enterprise L + Upgrade to a supported version of RHEL 8. + + +- ++ + + + +@@ -2612,7 +2392,7 @@ $ sudo fips-mode-setup --enable + Reboot the system for the changes to take effect. + + +- ++ + + + +@@ -2642,7 +2422,7 @@ Edit/Modify the following line in the "/etc/login.defs" file and set "[ENCRYPT_M + ENCRYPT_METHOD SHA512 + + +- ++ + + + +@@ -2666,16 +2446,16 @@ Passwords need to be protected at all times, and encryption is the standard meth + Lock all interactive user accounts not using SHA-512 hashing until the passwords can be regenerated with SHA-512. + + +- ++ + + + + + SRG-OS-000073-GPOS-00041 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-010130 +- The RHEL 8 password-auth file must be configured to use a sufficient number of hashing rounds. ++ The RHEL 8 shadow password suite must be configured to use a sufficient number of hashing rounds. + <VulnDiscussion>The system must use a strong hashing algorithm to store the password. The system must use a sufficient number of hashing rounds to ensure the required level of entropy. + + Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +@@ -2687,14 +2467,14 @@ Passwords need to be protected at all times, and encryption is the standard meth + 2921 + + CCI-000196 +- Configure RHEL 8 to encrypt all stored passwords with a strong cryptographic hash. ++ Configure RHEL 8 to encrypt all stored passwords with a strong cryptographic hash. + +-Edit/modify the following line in the "/etc/pam.d/password-auth" file and set "rounds" to a value no lower than "5000": ++Edit/modify the following line in the "/etc/login.defs" file and set "SHA_CRYPT_MIN_ROUNDS" to a value no lower than "5000": + +-password sufficient pam_unix.so sha512 rounds=5000 +- ++SHA_CRYPT_MIN_ROUNDS 5000 ++ + +- ++ + + + +@@ -2722,7 +2502,7 @@ Enter password: + Confirm password: + + +- ++ + + + +@@ -2750,7 +2530,7 @@ Enter password: + Confirm password: + + +- ++ + + + +@@ -2774,14 +2554,14 @@ Confirm password: + ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue + + +- ++ + + + + + SRG-OS-000120-GPOS-00061 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-010160 + The RHEL 8 pam_unix.so module must be configured in the password-auth file to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication. + <VulnDiscussion>Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and DoD data may be compromised. +@@ -2797,14 +2577,14 @@ FIPS 140-2 is the current standard for validating that mechanisms used to access + 2921 + + CCI-000803 +- Configure RHEL 8 to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication. ++ Configure RHEL 8 to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication. + + Edit/modify the following line in the "/etc/pam.d/password-auth" file to include the sha512 option for pam_unix.so: + +-password sufficient pam_unix.so sha512 rounds=5000 +- ++password sufficient pam_unix.so sha512 ++ + +- ++ + + + +@@ -2834,7 +2614,7 @@ FIPS 140-2 is the current standard for validating that mechanisms used to access + Remove any files with the .keytab extension from the operating system. + + +- ++ + + + +@@ -2864,7 +2644,7 @@ FIPS 140-2 is the current standard for validating that mechanisms used to access + $ sudo yum remove krb5-workstation + + +- ++ + + + +@@ -2890,7 +2670,7 @@ Policycoreutils contains the policy core utilities that are required for basic o + $ sudo yum install policycoreutils + + +- ++ + + + +@@ -2926,7 +2706,7 @@ In order for the changes to take effect, the SSH daemon must be restarted. + $ sudo systemctl restart sshd.service + + +- ++ + + + +@@ -2952,7 +2732,7 @@ The structure and content of error messages must be carefully considered by the + $ sudo chmod 0640 /var/log/messages + + +- ++ + + + +@@ -2978,7 +2758,7 @@ The structure and content of error messages must be carefully considered by the + $ sudo chown root /var/log/messages + + +- ++ + + + +@@ -3004,7 +2784,7 @@ The structure and content of error messages must be carefully considered by the + $ sudo chgrp root /var/log/messages + + +- ++ + + + +@@ -3030,7 +2810,7 @@ The structure and content of error messages must be carefully considered by the + $ sudo chmod 0755 /var/log + + +- ++ + + + +@@ -3056,7 +2836,7 @@ The structure and content of error messages must be carefully considered by the + $ sudo chown root /var/log + + +- ++ + + + +@@ -3082,7 +2862,7 @@ The structure and content of error messages must be carefully considered by the + $ sudo chgrp root /var/log + + +- ++ + + + +@@ -3112,14 +2892,14 @@ SSH_USE_STRONG_RNG=32 + The SSH service must be restarted for changes to take effect. + + +- ++ + + + + + SRG-OS-000250-GPOS-00093 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-010294 + The RHEL 8 operating system must implement DoD-approved TLS encryption in the OpenSSL package. + <VulnDiscussion>Without cryptographic integrity protections, information can be altered by unauthorized users without detection. +@@ -3139,14 +2919,18 @@ Satisfies: SRG-OS-000250-GPOS-00093, SRG-OS-000393-GPOS-00173, SRG-OS-000394-GPO + 2921 + + CCI-001453 +- Configure the RHEL 8 OpenSSL library to use only DoD-approved TLS encryption by editing the following line in the "/etc/crypto-policies/back-ends/opensslcnf.config" file: ++ Configure the RHEL 8 OpenSSL library to use only DoD-approved TLS encryption by editing the following line in the "/etc/crypto-policies/back-ends/opensslcnf.config" file: + ++For versions prior to crypto-policies-20210617-1.gitc776d3e.el8.noarch: + MinProtocol = TLSv1.2 + ++For version crypto-policies-20210617-1.gitc776d3e.el8.noarch and newer: ++TLS.MinProtocol = TLSv1.2 ++DTLS.MinProtocol = DTLSv1.2 + A reboot is required for the changes to take effect. +- ++ + +- ++ + + + +@@ -3174,7 +2958,7 @@ Run the following command, replacing "[FILE]" with any system command with a mod + $ sudo chmod 755 [FILE] + + +- ++ + + + +@@ -3202,7 +2986,7 @@ Run the following command, replacing "[FILE]" with any system command file not o + $ sudo chown root [FILE] + + +- ++ + + + +@@ -3230,7 +3014,7 @@ Run the following command, replacing "[FILE]" with any system command file not g + $ sudo chgrp root [FILE] + + +- ++ + + + +@@ -3258,7 +3042,7 @@ Verifying the authenticity of the software prior to installation validates the i + gpgcheck=1 + + +- ++ + + + +@@ -3288,7 +3072,7 @@ Set the "localpkg_gpgcheck" option to "True" in the "/etc/dnf/dnf.conf" file: + localpkg_gpgcheck=True + + +- ++ + + + +@@ -3329,7 +3113,7 @@ Load settings from all system configuration files with the following command: + $ sudo sysctl --system + + +- ++ + + + +@@ -3375,7 +3159,7 @@ Load settings from all system configuration files with the following command: + $ sudo sysctl --system + + +- ++ + + + +@@ -3421,7 +3205,7 @@ Load settings from all system configuration files with the following command: + $ sudo sysctl --system + + +- ++ + + + +@@ -3467,7 +3251,7 @@ Load settings from all system configuration files with the following command: + $ sudo sysctl --system + + +- ++ + + + +@@ -3513,7 +3297,7 @@ Load settings from all system configuration files with the following command: + $ sudo sysctl --system + + +- ++ + + + +@@ -3539,7 +3323,7 @@ Satisfies: SRG-OS-000373-GPOS-00156, SRG-OS-000373-GPOS-00157, SRG-OS-000373-GPO + Remove any occurrence of "NOPASSWD" found in "/etc/sudoers" file or files in the "/etc/sudoers.d" directory. + + +- ++ + + + +@@ -3565,7 +3349,7 @@ Satisfies: SRG-OS-000373-GPOS-00156, SRG-OS-000373-GPOS-00157, SRG-OS-000373-GPO + Remove any occurrence of "!authenticate" found in "/etc/sudoers" file or files in the "/etc/sudoers.d" directory. + + +- ++ + + + +@@ -3597,7 +3381,7 @@ This requirement only applies to components where this is specific to the functi + $ sudo yum install openssl-pkcs11 + + +- ++ + + + +@@ -3623,7 +3407,7 @@ Set the "clean_requirements_on_remove" option to "True" in the "/etc/dnf/dnf.con + clean_requirements_on_remove=True + + +- ++ + + + +@@ -3653,7 +3437,7 @@ SELINUXTYPE=targeted + A reboot is required for the changes to take effect. + + +- ++ + + + +@@ -3677,7 +3461,7 @@ A reboot is required for the changes to take effect. + $ sudo rm /etc/ssh/shosts.equiv + + +- ++ + + + +@@ -3701,7 +3485,7 @@ $ sudo rm /etc/ssh/shosts.equiv + $ sudo rm /[path]/[to]/[file]/.shosts + + +- ++ + + + +@@ -3729,7 +3513,7 @@ The SSH daemon must be restarted for the changes to take effect. To restart the + $ sudo systemctl restart sshd.service + + +- ++ + + + +@@ -3757,7 +3541,7 @@ The SSH daemon must be restarted for the changes to take effect. To restart the + $ sudo systemctl restart sshd.service + + +- ++ + + + +@@ -3785,7 +3569,7 @@ The SSH daemon must be restarted for the changes to take effect. To restart the + $ sudo systemctl restart sshd.service + + +- ++ + + + +@@ -3811,7 +3595,7 @@ Compression no + The SSH service must be restarted for changes to take effect. + + +- ++ + + + +@@ -3841,7 +3625,7 @@ The SSH daemon must be restarted for the changes to take effect. To restart the + $ sudo systemctl restart sshd.service + + +- ++ + + + +@@ -3871,7 +3655,7 @@ The SSH daemon must be restarted for the changes to take effect. To restart the + $ sudo systemctl restart sshd.service + + +- ++ + + + +@@ -3893,7 +3677,7 @@ $ sudo systemctl restart sshd.service + Migrate the "/var" path onto a separate file system. + + +- ++ + + + +@@ -3915,7 +3699,7 @@ $ sudo systemctl restart sshd.service + Migrate the "/var/log" path onto a separate file system. + + +- ++ + + + +@@ -3937,7 +3721,7 @@ $ sudo systemctl restart sshd.service + Migrate the system audit data path onto a separate file system. + + +- ++ + + + +@@ -3959,7 +3743,7 @@ $ sudo systemctl restart sshd.service + Migrate the "/tmp" directory onto a separate file system/partition. + + +- ++ + + + +@@ -3989,35 +3773,7 @@ The SSH daemon must be restarted for the changes to take effect. To restart the + $ sudo systemctl restart sshd.service + + +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-010560 +- The auditd service must be running in RHEL 8. +- <VulnDiscussion>Configuring RHEL 8 to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. +- +-Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example: registry settings; account, file, directory permission settings; and settings for functions, ports, protocols, services, and remote connections.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Start the auditd service, and enable the auditd service with the following commands: +- +-$ sudo systemctl start auditd.service +- +-$ sudo systemctl enable auditd.service +- +- +- ++ + + + +@@ -4045,7 +3801,7 @@ $ sudo systemctl start rsyslog.service + $ sudo systemctl enable rsyslog.service + + +- ++ + + + +@@ -4067,7 +3823,7 @@ $ sudo systemctl enable rsyslog.service + Configure the "/etc/fstab" to use the "nosuid" option on the /boot directory. + + +- ++ + + + +@@ -4089,7 +3845,7 @@ $ sudo systemctl enable rsyslog.service + Configure the "/etc/fstab" to use the "nodev" option on all non-root local partitions. + + +- ++ + + + +@@ -4111,7 +3867,7 @@ $ sudo systemctl enable rsyslog.service + Configure the "/etc/fstab" to use the "noexec" option on file systems that are being imported via NFS. + + +- ++ + + + +@@ -4133,7 +3889,7 @@ $ sudo systemctl enable rsyslog.service + Configure the "/etc/fstab" to use the "nodev" option on file systems that are being imported via NFS. + + +- ++ + + + +@@ -4155,7 +3911,7 @@ $ sudo systemctl enable rsyslog.service + Configure the "/etc/fstab" to use the "nosuid" option on file systems that are being imported via NFS. + + +- ++ + + + +@@ -4195,7 +3951,7 @@ The system configuration files need to be reloaded for the changes to take effec + $ sudo sysctl --system + + +- ++ + + + +@@ -4223,7 +3979,7 @@ Add the following line to the top of the /etc/security/limits.conf or in a ".con + * hard core 0 + + +- ++ + + + +@@ -4251,7 +4007,7 @@ Add or modify the following line in /etc/systemd/coredump.conf: + Storage=none + + +- ++ + + + +@@ -4279,7 +4035,7 @@ Add or modify the following line in /etc/systemd/coredump.conf: + ProcessSizeMax=0 + + +- ++ + + + +@@ -4303,7 +4059,7 @@ ProcessSizeMax=0 + CREATE_HOME yes + + +- ++ + + + +@@ -4333,7 +4089,7 @@ The SSH daemon must be restarted for the changes to take effect. To restart the + $ sudo systemctl restart sshd.service + + +- ++ + + + +@@ -4371,7 +4127,7 @@ The "sssd" service must be restarted for the changes to take effect. To restart + $ sudo systemctl restart sssd.service + + +- ++ + + + +@@ -4403,7 +4159,7 @@ Add/Modify the "/etc/security/faillock.conf" file to match the following line: + deny = 3 + + +- ++ + + + +@@ -4441,7 +4197,7 @@ The "sssd" service must be restarted for the changes to take effect. To restart + $ sudo systemctl restart sssd.service + + +- ++ + + + +@@ -4473,7 +4229,7 @@ Add/Modify the "/etc/security/faillock.conf" file to match the following line: + fail_interval = 900 + + +- ++ + + + +@@ -4511,7 +4267,7 @@ The "sssd" service must be restarted for the changes to take effect. To restart + $ sudo systemctl restart sssd.service + + +- ++ + + + +@@ -4543,7 +4299,7 @@ Add/Modify the "/etc/security/faillock.conf" file to match the following line: + unlock_time = 0 + + +- ++ + + + +@@ -4581,7 +4337,7 @@ The "sssd" service must be restarted for the changes to take effect. To restart + $ sudo systemctl restart sssd.service + + +- ++ + + + +@@ -4613,7 +4369,7 @@ Add/Modify the "/etc/security/faillock.conf" file to match the following line: + silent + + +- ++ + + + +@@ -4653,7 +4409,7 @@ The "sssd" service must be restarted for the changes to take effect. To restart + $ sudo systemctl restart sssd.service + + +- ++ + + + +@@ -4685,7 +4441,7 @@ Add/Modify the "/etc/security/faillock.conf" file to match the following line: + audit + + +- ++ + + + +@@ -4725,7 +4481,7 @@ The "sssd" service must be restarted for the changes to take effect. To restart + $ sudo systemctl restart sssd.service + + +- ++ + + + +@@ -4757,7 +4513,7 @@ Add/Modify the "/etc/security/faillock.conf" file to match the following line: + even_deny_root + + +- ++ + + + +@@ -4785,7 +4541,7 @@ Add the following line to the top of the /etc/security/limits.conf or in a ".con + * hard maxlogins 10 + + +- ++ + + + +@@ -4817,14 +4573,14 @@ Create a global configuration file "/etc/tmux.conf" and add the following line: + set -g lock-command vlock + + +- ++ + + + + + SRG-OS-000028-GPOS-00009 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-020041 + RHEL 8 must ensure session control is automatically started at shell initialization. + <VulnDiscussion>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 log out because of the temporary nature of the absence. +@@ -4842,14 +4598,18 @@ Satisfies: SRG-OS-000028-GPOS-00009, SRG-OS-000030-GPOS-00011</VulnDiscussion + 2921 + + CCI-000056 +- Configure the operating system to initialize the tmux terminal multiplexer as each shell is called by adding the following line to the end of the "/etc/bashrc" configuration file: ++ Configure the operating system to initialize the tmux terminal multiplexer as each shell is called by adding the following lines to a custom.sh shell script in the /etc/profile.d/ directory: + +-[ -n "$PS1" -a -z "$TMUX" ] && exec tmux ++If [ "$PS1" ]; then ++parent=$(ps -o ppid= -p $$) ++name=$(ps -o comm= -p $parent) ++case "$name" in (sshd|login) exec tmux ;; esac ++fi + + This setting will take effect at next logon. +- ++ + +- ++ + + + +@@ -4877,23 +4637,21 @@ Satisfies: SRG-OS-000028-GPOS-00009, SRG-OS-000030-GPOS-00011</VulnDiscussion + Configure the operating system to prevent users from disabling the tmux terminal multiplexer by editing the "/etc/shells" configuration file to remove any instances of tmux. + + +- ++ + + + + + SRG-OS-000069-GPOS-00037 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-020100 +- RHEL 8 must ensure a password complexity module is enabled. ++ RHEL 8 must ensure the password complexity module is enabled in the password-auth file. + <VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. + + RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. This is set in both: + /etc/pam.d/password-auth +-/etc/pam.d/system-auth +- +-Note the value of "retry" set in these configuration files should be between "1" and "3". Manual changes to the listed files may be overwritten by the "authselect" program.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++/etc/pam.d/system-auth</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -4901,15 +4659,15 @@ Note the value of "retry" set in these configuration files should be between "1" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000192 +- Configure the operating system to use "pwquality" to enforce password complexity rules. ++ CCI-000366 ++ Configure the operating system to use "pwquality" to enforce password complexity rules. + +-Add the following line to both "/etc/pam.d/password-auth" and "/etc/pam.d/system-auth" (or modify the line to have the required value): ++Add the following line to the "/etc/pam.d/password-auth" file (or modify the line to have the required value): + +-password required pam_pwquality.so retry=3 +- ++password required pam_pwquality.so ++ + +- ++ + + + +@@ -4939,7 +4697,7 @@ Add the following line to /etc/security/pwquality.conf (or modify the line to ha + ucredit = -1 + + +- ++ + + + +@@ -4969,7 +4727,7 @@ Add the following line to /etc/security/pwquality.conf (or modify the line to ha + lcredit = -1 + + +- ++ + + + +@@ -4999,14 +4757,14 @@ Add the following line to /etc/security/pwquality.conf (or modify the line to ha + dcredit = -1 + + +- ++ + + + + + SRG-OS-000072-GPOS-00040 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-020140 + RHEL 8 must require the maximum number of repeating characters of the same character class be limited to four when passwords are changed. + <VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. +@@ -5029,7 +4787,7 @@ Add the following line to "/etc/security/pwquality.conf" conf (or modify the lin + maxclassrepeat = 4 + + +- ++ + + + +@@ -5059,7 +4817,7 @@ Add the following line to "/etc/security/pwquality.conf conf" (or modify the lin + maxrepeat = 3 + + +- ++ + + + +@@ -5089,7 +4847,7 @@ Add the following line to "/etc/security/pwquality.conf conf" (or modify the lin + minclass = 4 + + +- ++ + + + +@@ -5119,7 +4877,7 @@ Add the following line to "/etc/security/pwquality.conf" (or modify the line to + difok = 8 + + +- ++ + + + +@@ -5143,7 +4901,7 @@ difok = 8 + $ sudo chage -m 1 [user] + + +- ++ + + + +@@ -5169,7 +4927,7 @@ Add the following line in "/etc/login.defs" (or modify the line to have the requ + PASS_MIN_DAYS 1 + + +- ++ + + + +@@ -5195,7 +4953,7 @@ Add, or modify the following line in the "/etc/login.defs" file: + PASS_MAX_DAYS 60 + + +- ++ + + + +@@ -5219,19 +4977,19 @@ PASS_MAX_DAYS 60 + $ sudo chage -M 60 [user] + + +- ++ + + + + + SRG-OS-000077-GPOS-00045 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-020220 +- RHEL 8 passwords must be prohibited from reuse for a minimum of five generations. ++ RHEL 8 must be configured in the password-auth file to prohibit password reuse for a minimum of five generations. + <VulnDiscussion>Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. If the information system or application allows the user to reuse their password consecutively when that password has exceeded its defined lifetime, the end result is a password that is not changed per policy requirements. + +-RHEL 8 utilizes "pwquality" consecutively as a mechanism to enforce password complexity. This is set in both: ++RHEL 8 uses "pwhistory" consecutively as a mechanism to prohibit password reuse. This is set in both: + /etc/pam.d/password-auth + /etc/pam.d/system-auth. + +@@ -5244,14 +5002,14 @@ Note that manual changes to the listed files may be overwritten by the "authsele + 2921 + + CCI-000200 +- Configure the operating system to prohibit password reuse for a minimum of five generations. ++ Configure the operating system in the password-auth file to prohibit password reuse for a minimum of five generations. + +-Add the following line in "/etc/pam.d/system-auth" and "/etc/pam.d/password-auth" (or modify the line to have the required value): ++Add the following line in "/etc/pam.d/password-auth" (or modify the line to have the required value): + + password required pam_pwhistory.so use_authtok remember=5 retry=3 +- ++ + +- ++ + + + +@@ -5285,7 +5043,7 @@ Add the following line to "/etc/security/pwquality.conf" (or modify the line to + minlen = 15 + + +- ++ + + + +@@ -5315,7 +5073,7 @@ Add, or modify the following line in the "/etc/login.defs" file: + PASS_MIN_LEN 15 + + +- ++ + + + +@@ -5345,7 +5103,7 @@ $ sudo useradd -D -f 35 + DoD recommendation is 35 days, but a lower value is acceptable. The value "-1" will disable this feature, and "0" will disable the account immediately after the password expires. + + +- ++ + + + +@@ -5375,7 +5133,7 @@ Add the following line to /etc/security/pwquality.conf (or modify the line to ha + ocredit = -1 + + +- ++ + + + +@@ -5401,7 +5159,7 @@ Add or update the following line in the "/etc/security/pwquality.conf" file or a + dictcheck=1 + + +- ++ + + + +@@ -5429,7 +5187,7 @@ Modify the "/etc/login.defs" file to set the "FAIL_DELAY" parameter to "4" or gr + FAIL_DELAY 4 + + +- ++ + + + +@@ -5457,7 +5215,7 @@ The SSH daemon must be restarted for the changes to take effect. To restart the + $ sudo systemctl restart sshd.service + + +- ++ + + + +@@ -5485,7 +5243,7 @@ PrintLastLog yes + The SSH service must be restarted for changes to "sshd_config" to take effect. + + +- ++ + + + +@@ -5511,7 +5269,7 @@ Add or edit the line for the "UMASK" parameter in "/etc/login.defs" file to "077 + UMASK 077 + + +- ++ + + + +@@ -5545,7 +5303,7 @@ Add or update the following file system rules to "/etc/audit/rules.d/audit.rules + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -5575,7 +5333,7 @@ Edit the following line in "/etc/audit/auditd.conf" to ensure that administrator + action_mail_acct = root + + +- ++ + + + +@@ -5607,37 +5365,7 @@ disk_error_action = HALT + If availability has been determined to be more important, and this decision is documented with the ISSO, configure the operating system to notify system administration staff and ISSO staff in the event of an audit processing failure by setting the "disk_error_action" to "SYSLOG". + + +- +- +- +- +- +- SRG-OS-000047-GPOS-00023 +- <GroupDescription></GroupDescription> +- +- RHEL-08-030050 +- The RHEL 8 System Administrator (SA) and Information System Security Officer (ISSO) (at a minimum) must be alerted when the audit storage volume is full. +- <VulnDiscussion>It is critical that when RHEL 8 is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. +- +-When availability is an overriding concern, other approved actions in response to an audit failure are as follows: +- +-1) If the failure was caused by the lack of audit record storage capacity, RHEL 8 must continue generating audit records if possible (automatically restarting the audit service if necessary) and overwriting the oldest audit records in a first-in-first-out manner. +- +-2) If audit records are sent to a centralized collection server and communication with this server is lost or the server fails, RHEL 8 must queue audit records locally until communication is restored or until the audit records are retrieved manually. Upon restoration of the connection to the centralized collection server, action should be taken to synchronize the local audit data with the collection server.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000140 +- Configure RHEL 8 to notify the System Administrator (SA) and Information System Security Officer (ISSO) when the audit storage volume is full by configuring the "max_log_file_action" parameter in the "/etc/audit/auditd.conf" file with the a value of "syslog" or "keep_logs": +- +-max_log_file_action = syslog +- +- +- ++ + + + +@@ -5671,7 +5399,7 @@ disk_full_action = HALT + If availability has been determined to be more important, and this decision is documented with the ISSO, configure the operating system to notify system administration staff and ISSO staff in the event of an audit processing failure by setting the "disk_full_action" to "SYSLOG". + + +- ++ + + + +@@ -5699,7 +5427,7 @@ Add or update the following line in "/etc/audit/auditd.conf" file: + local_events = yes + + +- ++ + + + +@@ -5731,7 +5459,7 @@ name_format = hostname + The audit daemon must be restarted for changes to take effect. + + +- ++ + + + +@@ -5761,7 +5489,7 @@ log_format = ENRICHED + The audit daemon must be restarted for changes to take effect. + + +- ++ + + + +@@ -5789,7 +5517,7 @@ Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPO + log_group = root + + +- ++ + + + +@@ -5819,7 +5547,7 @@ $ sudo chown root [audit_log_file] + Replace "[audit_log_file]" to the correct audit log path, by default this location is "/var/log/audit/audit.log". + + +- ++ + + + +@@ -5847,7 +5575,7 @@ Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPO + log_group = root + + +- ++ + + + +@@ -5877,7 +5605,7 @@ $ sudo chown root [audit_log_directory] + Replace "[audit_log_directory]" with the correct audit log directory path, by default this location is usually "/var/log/audit". + + +- ++ + + + +@@ -5907,7 +5635,7 @@ $ sudo chgrp root [audit_log_directory] + Replace "[audit_log_directory]" with the correct audit log directory path, by default this location is usually "/var/log/audit". + + +- ++ + + + +@@ -5937,7 +5665,7 @@ $ sudo chmod 0700 [audit_log_directory] + Replace "[audit_log_directory]" to the correct audit log directory path, by default this location is "/var/log/audit". + + +- ++ + + + +@@ -5969,7 +5697,7 @@ Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPO + Note: Once set, the system must be rebooted for auditing to be changed. It is recommended to add this option as the last step in securing the system. + + +- ++ + + + +@@ -5999,7 +5727,7 @@ Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPO + --loginuid-immutable + + +- ++ + + + +@@ -6031,7 +5759,7 @@ Add or update the following file system rule to "/etc/audit/rules.d/audit.rules" + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6063,7 +5791,7 @@ Add or update the following file system rule to "/etc/audit/rules.d/audit.rules" + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6095,7 +5823,7 @@ Add or update the following file system rule to "/etc/audit/rules.d/audit.rules" + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6127,7 +5855,7 @@ Add or update the following file system rule to "/etc/audit/rules.d/audit.rules" + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6159,7 +5887,7 @@ Add or update the following file system rule to "/etc/audit/rules.d/audit.rules" + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6191,7 +5919,7 @@ Add or update the following file system rule to "/etc/audit/rules.d/audit.rules" + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6223,7 +5951,7 @@ Add or update the following file system rule to "/etc/audit/rules.d/audit.rules" + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6255,7 +5983,7 @@ Install the audit service (if the audit service is not already installed) with t + $ sudo yum install audit + + +- ++ + + + +@@ -6287,167 +6015,32 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + + + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-030200 +- The RHEL 8 audit system must be configured to audit any usage of the lremovexattr system call. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Lremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from symbolic links. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000169 +- Configure RHEL 8 to audit the execution of the "lremovexattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S lremovexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S lremovexattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect. +- +- +- +- +- +- +- +- SRG-OS-000062-GPOS-00031 +- <GroupDescription></GroupDescription> +- +- RHEL-08-030210 +- The RHEL 8 audit system must be configured to audit any usage of the removexattr system call. ++ The RHEL 8 audit system must be configured to audit any usage of the setxattr, fsetxattr, lsetxattr, removexattr, fremovexattr, and lremovexattr system calls. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Removexattr" is a system call that removes extended attributes. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000169 +- Configure RHEL 8 to audit the execution of the "removexattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S removexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S removexattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S removexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S removexattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect. +- +- +- +- +- +- +- +- SRG-OS-000062-GPOS-00031 +- <GroupDescription></GroupDescription> +- +- RHEL-08-030220 +- The RHEL 8 audit system must be configured to audit any usage of the lsetxattr system call. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Lsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a symbolic link. ++"Setxattr" is a system call used to set an extended attribute value. ++"Fsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a file. ++"Lsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a symbolic link. ++"Removexattr" is a system call that removes extended attributes. ++"Fremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from a file. ++"Lremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from symbolic links. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000169 +- Configure RHEL 8 to audit the execution of the "lsetxattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S lsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S lsetxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S lsetxattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect. +- +- +- +- +- +- +- +- SRG-OS-000062-GPOS-00031 +- <GroupDescription></GroupDescription> +- +- RHEL-08-030230 +- The RHEL 8 audit system must be configured to audit any usage of the fsetxattr system call. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Fsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a file. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The auid representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000169 +- Configure RHEL 8 to audit the execution of the "fsetxattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S fsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S fsetxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S fsetxattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect. +- +- +- +- +- +- +- +- SRG-OS-000062-GPOS-00031 +- <GroupDescription></GroupDescription> +- +- RHEL-08-030240 +- The RHEL 8 audit system must be configured to audit any usage of the fremovexattr system call. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Fremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from a file. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -6456,18 +6049,18 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure RHEL 8 to audit the execution of the "fremovexattr" system call by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": ++ Configure RHEL 8 to audit the execution of the "setxattr", "fsetxattr", "lsetxattr", "removexattr", "fremovexattr", and "lremovexattr" system calls by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": + +--a always,exit -F arch=b32 -S fremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fremovexattr -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod + +--a always,exit -F arch=b32 -S fremovexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S fremovexattr -F auid=0 -k perm_mod ++-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod ++-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +@@ -6499,7 +6092,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6531,43 +6124,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- +- +- +- +- +- SRG-OS-000062-GPOS-00031 +- <GroupDescription></GroupDescription> +- +- RHEL-08-030270 +- The RHEL 8 audit system must be configured to audit any usage of the setxattr system call. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Setxattr" is a system call used to set an extended attribute value. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000169 +- Configure RHEL 8 to audit the execution of the "setxattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S setxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S setxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S setxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S setxattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect. +- +- +- ++ + + + +@@ -6599,7 +6156,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6631,7 +6188,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6663,7 +6220,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6695,7 +6252,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6728,7 +6285,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6760,7 +6317,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6792,7 +6349,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6824,7 +6381,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6856,7 +6413,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6888,7 +6445,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6920,7 +6477,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6952,7 +6509,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -6984,7 +6541,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -7016,7 +6573,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -7048,7 +6605,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -7080,7 +6637,7 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + +@@ -7112,23 +6669,25 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + The audit daemon must be restarted for the changes to take effect. + + +- ++ + + + + + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-030360 +- Successful/unsuccessful uses of the init_module command in RHEL 8 must generate an audit record. ++ Successful/unsuccessful uses of the init_module and finit_module system calls in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "init_module" command is used to load a kernel module. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "init_module" and "finit_module" system calls are used to load a kernel module. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7137,31 +6696,38 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "init_module" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "init_module" and "finit_module" system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S init_module -F auid>=1000 -F auid!=unset -k module_chng +--a always,exit -F arch=b64 -S init_module -F auid>=1000 -F auid!=unset -k module_chng ++-a always,exit -F arch=b32 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng ++-a always,exit -F arch=b64 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + + + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-030361 +- Successful/unsuccessful uses of the rename command in RHEL 8 must generate an audit record. ++ Successful/unsuccessful uses of the rename, unlink, rmdir, renameat, and unlinkat system calls in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rename" command will rename the specified files by replacing the first occurrence of expression in their name by replacement. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rename" system call will rename the specified files by replacing the first occurrence of expression in their name by replacement. ++ ++The "unlink" system call deletes a name from the filesystem. If that name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse. ++The "rmdir" system call removes empty directories. ++The "renameat" system call renames a file, moving it between directories if required. ++The "unlinkat" system call operates in exactly the same way as either "unlink" or "rmdir" except for the differences described in the manual page. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. Performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7170,27 +6736,27 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "rename" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "rename", "unlink", "rmdir", "renameat", and "unlinkat" system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S rename -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S rename -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F arch=b32 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F arch=b64 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030362 +- Successful/unsuccessful uses of the renameat command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030370 ++ Successful/unsuccessful uses of the gpasswd command in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "renameat" command renames a file, moving it between directories if required. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "gpasswd" command is used to administer /etc/group and /etc/gshadow. Every group can have administrators, members and a password. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +@@ -7203,27 +6769,26 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "renameat" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "gpasswd" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S renameat -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S renameat -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F path=/usr/bin/gpasswd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-gpasswd + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030363 +- Successful/unsuccessful uses of the rmdir command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030390 ++ Successful/unsuccessful uses of the delete_module command in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rmdir" command removes empty directories. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "delete_module" command is used to unload a kernel module. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +@@ -7236,27 +6801,27 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "rmdir" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "delete_module" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S rmdir -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S rmdir -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F arch=b32 -S delete_module -F auid>=1000 -F auid!=unset -k module_chng ++-a always,exit -F arch=b64 -S delete_module -F auid>=1000 -F auid!=unset -k module_chng + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030364 +- Successful/unsuccessful uses of the unlink command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030400 ++ Successful/unsuccessful uses of the crontab command in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "unlink" command deletes a name from the filesystem. If that name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "crontab" command is used to maintain crontab files for individual users. Crontab is the program used to install, remove, or list the tables used to drive the cron daemon. This is similar to the task scheduler used in other operating systems. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +@@ -7269,27 +6834,26 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "unlink" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "crontab" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S unlink -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S unlink -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F path=/usr/bin/crontab -F perm=x -F auid>=1000 -F auid!=unset -k privileged-crontab + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030365 +- Successful/unsuccessful uses of the unlinkat command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030410 ++ Successful/unsuccessful uses of the chsh command in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "unlinkat" system call operates in exactly the same way as either "unlink" or "rmdir" except for the differences described in the manual page. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chsh" command is used to change the login shell. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +@@ -7302,31 +6866,37 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "unlinkat" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chsh" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S unlinkat -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S unlinkat -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F path=/usr/bin/chsh -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030370 +- Successful/unsuccessful uses of the gpasswd command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030420 ++ Successful/unsuccessful uses of the truncate, ftruncate, creat, open, openat, and open_by_handle_at system calls in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "gpasswd" command is used to administer /etc/group and /etc/gshadow. Every group can have administrators, members and a password. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. ++ ++The "creat" system call is used to open and possibly create a file or device. ++The "open" system call opens a file specified by a pathname. If the specified file does not exist, it may optionally be created by "open". ++The "openat" system call opens a file specified by a relative pathname. ++The "name_to_handle_at" and "open_by_handle_at" system calls split the functionality of "openat" into two parts: "name_to_handle_at" returns an opaque handle that corresponds to a specified file; "open_by_handle_at" opens the file corresponding to a handle returned by a previous call to "name_to_handle_at" and returns an open file descriptor. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7335,30 +6905,40 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "gpasswd" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "truncate", "ftruncate", "creat", "open", "openat", and "open_by_handle_at" system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F path=/usr/bin/gpasswd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-gpasswd ++-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++ ++-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030380 +- Successful/unsuccessful uses of the finit_module command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030480 ++ Successful/unsuccessful uses of the chown, fchown, fchownat, and lchown system calls in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "finit_module" command is used to load a kernel module. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chown" command is used to change file owner and group. ++ ++The "fchown" system call is used to change the ownership of a file referred to by the open file descriptor. ++The "fchownat" system call is used to change ownership of a file relative to a directory file descriptor. ++The "lchown" system call is used to change the ownership of the file specified by a path, which does not dereference symbolic links. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7367,31 +6947,36 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "finit_module" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chown", "fchown", "fchownat", and "lchown" system calls by adding or updating the following line to "/etc/audit/rules.d/audit.rules": + +--a always,exit -F arch=b32 -S finit_module -F auid>=1000 -F auid!=unset -k module_chng +--a always,exit -F arch=b64 -S finit_module -F auid>=1000 -F auid!=unset -k module_chng ++-a always,exit -F arch=b32 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030390 +- Successful/unsuccessful uses of the delete_module command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030490 ++ Successful/unsuccessful uses of the chmod, fchmod, and fchmodat system calls in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "delete_module" command is used to unload a kernel module. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chmod" system call changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits. ++ ++The "fchmod" system call is used to change permissions of a file. ++The "fchmodat" system call is used to change permissions of a file relative to a directory file descriptor. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. Performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7400,31 +6985,31 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "delete_module" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chmod", "fchmod", and "fchmodat" syscalls by adding or updating the following line to "/etc/audit/rules.d/audit.rules": + +--a always,exit -F arch=b32 -S delete_module -F auid>=1000 -F auid!=unset -k module_chng +--a always,exit -F arch=b64 -S delete_module -F auid>=1000 -F auid!=unset -k module_chng ++-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030400 +- Successful/unsuccessful uses of the crontab command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030550 ++ Successful/unsuccessful uses of the sudo command in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "crontab" command is used to maintain crontab files for individual users. Crontab is the program used to install, remove, or list the tables used to drive the cron daemon. This is similar to the task scheduler used in other operating systems. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "sudo" command allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7433,30 +7018,30 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "crontab" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "sudo" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F path=/usr/bin/crontab -F perm=x -F auid>=1000 -F auid!=unset -k privileged-crontab ++-a always,exit -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030410 +- Successful/unsuccessful uses of the chsh command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030560 ++ Successful/unsuccessful uses of the usermod command in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chsh" command is used to change the login shell. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "usermod" command modifies the system account files to reflect the changes that are specified on the command line. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7465,30 +7050,30 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chsh" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: ++ Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "usermod" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F path=/usr/bin/chsh -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd ++-a always,exit -F path=/usr/sbin/usermod -F perm=x -F auid>=1000 -F auid!=unset -k privileged-usermod + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030420 +- Successful/unsuccessful uses of the truncate command in RHEL 8 must generate an audit record. ++ ++ RHEL-08-030570 ++ Successful/unsuccessful uses of the chacl command in RHEL 8 must generate an audit record. + <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chacl" command is used to change the access control list of a file or directory. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7497,34 +7082,40 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "truncate" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S truncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S truncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++ Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chacl" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S truncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S truncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++-a always,exit -F path=/usr/bin/chacl -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030430 +- Successful/unsuccessful uses of the openat system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030580 ++ Successful/unsuccessful uses of the kmod command in RHEL 8 must generate an audit record. ++ <VulnDiscussion>Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "openat" system call opens a file specified by a relative pathname. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "kmod" command is used to control Linux Kernel modules. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++DoD has defined the list of events for which RHEL 8 will provide an audit record generation capability as the following: ++ ++1) Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels); ++ ++2) Access actions, such as successful and unsuccessful logon attempts, privileged activities or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system; ++ ++3) All account creations, modifications, disabling, and terminations; and ++ ++4) All kernel module load, unload, and restart actions. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000471-GPOS-00216, SRG-OS-000477-GPOS-00222</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7533,34 +7124,40 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "openat" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S openat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S openat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++ Configure RHEL 8 to audit the execution of the module management program "kmod" by adding or updating the following line to "/etc/audit/rules.d/audit.rules": + +--a always,exit -F arch=b32 -S openat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S openat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++-a always,exit -F path=/usr/bin/kmod -F perm=x -F auid>=1000 -F auid!=unset -k modules + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- ++ + SRG-OS-000062-GPOS-00031 + <GroupDescription></GroupDescription> +- +- RHEL-08-030440 +- Successful/unsuccessful uses of the open system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030600 ++ Successful/unsuccessful modifications to the lastlog file in RHEL 8 must generate an audit record. ++ <VulnDiscussion>Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "open system" call opens a file specified by a pathname. If the specified file does not exist, it may optionally be created by "open". ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records. ++ ++DoD has defined the list of events for which RHEL 8 will provide an audit record generation capability as the following: ++ ++1) Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels); ++ ++2) Access actions, such as successful and unsuccessful logon attempts, privileged activities or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system; ++ ++3) All account creations, modifications, disabling, and terminations; and + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++4) All kernel module load, unload, and restart actions. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000473-GPOS-00218</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7569,34 +7166,24 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + 2921 + + CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "open" system call by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S open -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++ Configure the audit system to generate an audit event for any successful/unsuccessful modifications to the "lastlog" file by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S open -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++-w /var/log/lastlog -p wa -k logins + + The audit daemon must be restarted for the changes to take effect. +- ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000063-GPOS-00032 + <GroupDescription></GroupDescription> +- +- RHEL-08-030450 +- Successful/unsuccessful uses of the open_by_handle_at system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "name_to_handle_at" and "open_by_handle_at" system calls split the functionality of openat into two parts: "name_to_handle_at" returns an opaque handle that corresponds to a specified file; "open_by_handle_at" opens the file corresponding to a handle returned by a previous call to "name_to_handle_at" and returns an open file descriptor. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-030610 ++ RHEL 8 must allow only the Information System Security Manager (ISSM) (or individuals or roles appointed by the ISSM) to select which auditable events are to be audited. ++ <VulnDiscussion>Without the capability to restrict the roles and individuals that can select which events are audited, unauthorized personnel may be able to prevent the auditing of critical events. Misconfigured audits may degrade the system's performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7604,35 +7191,29 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "open_by_handle_at" system call by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++ CCI-000171 ++ Configure the files in directory "/etc/audit/rules.d/" and the "/etc/audit/auditd.conf" file to have a mode of "0640" with the following commands: + +-The audit daemon must be restarted for the changes to take effect. +- ++$ sudo chmod 0640 /etc/audit/rules.d/audit.rules ++$ sudo chmod 0640 /etc/audit/rules.d/[customrulesfile].rules ++$ sudo chmod 0640 /etc/audit/auditd.conf ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000256-GPOS-00097 + <GroupDescription></GroupDescription> +- +- RHEL-08-030460 +- Successful/unsuccessful uses of the ftruncate command in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. ++ ++ RHEL-08-030620 ++ RHEL 8 audit tools must have a mode of 0755 or less permissive. ++ <VulnDiscussion>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 operation on audit information. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++RHEL 8 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7640,35 +7221,31 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "ftruncate" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++ CCI-001493 ++ Configure the audit tools to be protected from unauthorized access by setting the correct permissive mode using the following command: + +--a always,exit -F arch=b32 -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++$ sudo chmod 0755 [audit_tool] + +-The audit daemon must be restarted for the changes to take effect. +- ++Replace "[audit_tool]" with the audit tool that does not have the correct permissive mode. ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000256-GPOS-00097 + <GroupDescription></GroupDescription> +- +- RHEL-08-030470 +- Successful/unsuccessful uses of the creat system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030630 ++ RHEL 8 audit tools must be owned by root. ++ <VulnDiscussion>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 operation on audit information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "creat" system call is used to open and possibly create a file or device. ++RHEL 8 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000256-GPOS-00097, SRG-OS-000257-GPOS-00098, SRG-OS-000258-GPOS-00099</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7676,35 +7253,31 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "creat" system call by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S creat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S creat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++ CCI-001493 ++ Configure the audit tools to be owned by "root", by running the following command: + +--a always,exit -F arch=b32 -S creat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S creat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++$ sudo chown root [audit_tool] + +-The audit daemon must be restarted for the changes to take effect. +- ++Replace "[audit_tool]" with each audit tool not owned by "root". ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000256-GPOS-00097 + <GroupDescription></GroupDescription> +- +- RHEL-08-030480 +- Successful/unsuccessful uses of the chown command in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030640 ++ RHEL 8 audit tools must be group-owned by root. ++ <VulnDiscussion>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 operation on audit information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chown" command is used to change file owner and group. ++RHEL 8 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000256-GPOS-00097, SRG-OS-000257-GPOS-00098, SRG-OS-000258-GPOS-00099</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7712,32 +7285,36 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chown" command by adding or updating the following line to "/etc/audit/rules.d/audit.rules": ++ CCI-001493 ++ Configure the audit tools to be group-owned by "root", by running the following command: + +--a always,exit -F arch=b32 -S chown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S chown -F auid>=1000 -F auid!=unset -k perm_mod ++$ sudo chgrp root [audit_tool] + +-The audit daemon must be restarted for the changes to take effect. +- ++Replace "[audit_tool]" with each audit tool not group-owned by "root". ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-030490 +- Successful/unsuccessful uses of the chmod command in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030670 ++ RHEL 8 must have the packages required for offloading audit logs installed. ++ <VulnDiscussion>Information stored in one location is vulnerable to accidental or incidental deletion or alteration. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chmod" command changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits. ++Off-loading is a common process in information systems with limited audit storage capacity. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++RHEL 8 installation media provides "rsyslogd". "rsyslogd" is a system utility providing support for message logging. Support for both internet and UNIX domain sockets enables this utility to support both local and remote logging. Couple this utility with "gnutls" (which is a secure communications library implementing the SSL, TLS and DTLS protocols), and you have a method to securely encrypt and off-load auditing. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Rsyslog provides three ways to forward message: the traditional UDP transport, which is extremely lossy but standard; the plain TCP based transport, which loses messages only during certain situations but is widely available; and the RELP transport, which does not lose messages but is currently available only as part of the rsyslogd 3.15.0 and above. ++Examples of each configuration: ++UDP *.* @remotesystemname ++TCP *.* @@remotesystemname ++RELP *.* :omrelp:remotesystemname:2514 ++Note that a port number was given as there is no standard port for RELP.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7745,32 +7322,34 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chmod" command by adding or updating the following line to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S chmod -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S chmod -F auid>=1000 -F auid!=unset -k perm_mod ++ CCI-000366 ++ Configure the operating system to offload audit logs by installing the required packages with the following command: + +-The audit daemon must be restarted for the changes to take effect. +- ++$ sudo yum install rsyslog ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-030500 +- Successful/unsuccessful uses of the lchown system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030680 ++ RHEL 8 must have the packages required for encrypting offloaded audit logs installed. ++ <VulnDiscussion>Information stored in one location is vulnerable to accidental or incidental deletion or alteration. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "lchown" system call is used to change the ownership of the file specified by a path, which does not dereference symbolic links. ++Off-loading is a common process in information systems with limited audit storage capacity. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++RHEL 8 installation media provides "rsyslogd". "rsyslogd" is a system utility providing support for message logging. Support for both internet and UNIX domain sockets enables this utility to support both local and remote logging. Couple this utility with "rsyslog-gnutls" (which is a secure communications library implementing the SSL, TLS and DTLS protocols), and you have a method to securely encrypt and off-load auditing. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Rsyslog provides three ways to forward message: the traditional UDP transport, which is extremely lossy but standard; the plain TCP based transport, which loses messages only during certain situations but is widely available; and the RELP transport, which does not lose messages but is currently available only as part of the rsyslogd 3.15.0 and above. ++Examples of each configuration: ++UDP *.* @remotesystemname ++TCP *.* @@remotesystemname ++RELP *.* :omrelp:remotesystemname:2514 ++Note that a port number was given as there is no standard port for RELP.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7778,32 +7357,29 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "lchown" system call by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S lchown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lchown -F auid>=1000 -F auid!=unset -k perm_mod ++ CCI-000366 ++ Configure the operating system to encrypt offloaded audit logs by installing the required packages with the following command: + +-The audit daemon must be restarted for the changes to take effect. +- ++$ sudo yum install rsyslog-gnutls ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000342-GPOS-00133 + <GroupDescription></GroupDescription> +- +- RHEL-08-030510 +- Successful/unsuccessful uses of the fchownat system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030700 ++ RHEL 8 must take appropriate action when the internal event queue is full. ++ <VulnDiscussion>Information stored in one location is vulnerable to accidental or incidental deletion or alteration. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchownat" system call is used to change ownership of a file relative to a directory file descriptor. ++Off-loading is a common process in information systems with limited audit storage capacity. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++RHEL 8 installation media provides "rsyslogd". "rsyslogd" is a system utility providing support for message logging. Support for both internet and UNIX domain sockets enables this utility to support both local and remote logging. Couple this utility with "gnutls" (which is a secure communications library implementing the SSL, TLS and DTLS protocols), and you have a method to securely encrypt and off-load auditing. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7811,32 +7387,25 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "fchownat" system call by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": ++ CCI-001851 ++ Edit the /etc/audit/auditd.conf file and add or update the "overflow_action" option: + +--a always,exit -F arch=b32 -S fchownat -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchownat -F auid>=1000 -F auid!=unset -k perm_mod ++overflow_action = syslog + +-The audit daemon must be restarted for the changes to take effect. +- ++The audit daemon must be restarted for changes to take effect. ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000343-GPOS-00134 + <GroupDescription></GroupDescription> +- +- RHEL-08-030520 +- Successful/unsuccessful uses of the fchown system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchown" system call is used to change the ownership of a file referred to by the open file descriptor. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-030730 ++ RHEL 8 must take action when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity. ++ <VulnDiscussion>If security personnel are not notified immediately when storage volume reaches 75 percent utilization, they are unable to plan for audit record storage capacity expansion.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7844,32 +7413,31 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "fchown" system call by adding or updating the following line to "/etc/audit/rules.d/audit.rules": ++ CCI-001855 ++ Configure the operating system to initiate an action to notify the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity by adding/modifying the following line in the /etc/audit/auditd.conf file. + +--a always,exit -F arch=b32 -S fchown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchown -F auid>=1000 -F auid!=unset -k perm_mod ++space_left = 25% + +-The audit daemon must be restarted for the changes to take effect. +- ++Note: Option names and values in the auditd.conf file are case insensitive. ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030530 +- Successful/unsuccessful uses of the fchmodat system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030741 ++ RHEL 8 must disable the chrony daemon from acting as a server. ++ <VulnDiscussion>Inaccurate time stamps make it more difficult to correlate events and can lead to an inaccurate analysis. Determining the correct time a particular event occurred on a system is critical when conducting forensic analysis and investigating system events. Sources outside the configured acceptable allowance (drift) may be inaccurate. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchmodat" system call is used to change permissions of a file relative to a directory file descriptor. ++Minimizing the exposure of the server functionality of the chrony daemon diminishes the attack surface. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++RHEL 8 utilizes the "timedatectl" command to view the status of the "systemd-timesyncd.service". The "timedatectl" status will display the local time, UTC, and the offset from UTC. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Note that USNO offers authenticated NTP service to DoD and U.S. Government agencies operating on the NIPR and SIPR networks. Visit https://www.usno.navy.mil/USNO/time/ntp/dod-customers for more information.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7877,32 +7445,29 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "fchmodat" system call by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S fchmodat -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchmodat -F auid>=1000 -F auid!=unset -k perm_mod ++ CCI-000381 ++ Configure the operating system to disable the chrony daemon from acting as a server by adding/modifying the following line in the /etc/chrony.conf file. + +-The audit daemon must be restarted for the changes to take effect. +- ++port 0 ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030540 +- Successful/unsuccessful uses of the fchmod system call in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-030742 ++ RHEL 8 must disable network management of the chrony daemon. ++ <VulnDiscussion>Inaccurate time stamps make it more difficult to correlate events and can lead to an inaccurate analysis. Determining the correct time a particular event occurred on a system is critical when conducting forensic analysis and investigating system events. Sources outside the configured acceptable allowance (drift) may be inaccurate. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchmod" system call is used to change permissions of a file. ++Not exposing the management interface of the chrony daemon on the network diminishes the attack space. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++RHEL 8 utilizes the "timedatectl" command to view the status of the "systemd-timesyncd.service". The "timedatectl" status will display the local time, UTC, and the offset from UTC. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Note that USNO offers authenticated NTP service to DoD and U.S. Government agencies operating on the NIPR and SIPR networks. Visit https://www.usno.navy.mil/USNO/time/ntp/dod-customers for more information.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7910,32 +7475,33 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "fchmod" system call by adding or updating the following line to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S fchmod -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchmod -F auid>=1000 -F auid!=unset -k perm_mod ++ CCI-000381 ++ Configure the operating system disable network management of the chrony daemon by adding/modifying the following line in the /etc/chrony.conf file. + +-The audit daemon must be restarted for the changes to take effect. +- ++cmdport 0 ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030550 +- Successful/unsuccessful uses of the sudo command in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-040000 ++ RHEL 8 must not have the telnet-server package installed. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "sudo" command allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. ++Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Examples of non-essential capabilities include, but are not limited to, games, software packages, tools, and demonstration software not related to requirements or providing a wide array of functionality not required for every mission, but which cannot be disabled. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Verify the operating system is configured to disable non-essential capabilities. The most secure way of ensuring a non-essential capability is disabled is to not have the capability installed. ++ ++The telnet service provides an unencrypted remote access service that does not provide for the confidentiality and integrity of user passwords or the remote session. ++ ++If a privileged user were to log on using this service, the privileged user password could be compromised.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7943,31 +7509,29 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "sudo" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd ++ CCI-000381 ++ Configure the operating system to disable non-essential capabilities by removing the telnet-server package from the system with the following command: + +-The audit daemon must be restarted for the changes to take effect. +- ++$ sudo yum remove telnet-server ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030560 +- Successful/unsuccessful uses of the usermod command in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-040001 ++ RHEL 8 must not have any automated bug reporting tools installed. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "usermod" command modifies the system account files to reflect the changes that are specified on the command line. ++Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Examples of non-essential capabilities include, but are not limited to, games, software packages, tools, and demonstration software not related to requirements or providing a wide array of functionality not required for every mission, but which cannot be disabled. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Verify the operating system is configured to disable non-essential capabilities. The most secure way of ensuring a non-essential capability is disabled is to not have the capability installed.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -7975,31 +7539,29 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "usermod" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F path=/usr/sbin/usermod -F perm=x -F auid>=1000 -F auid!=unset -k privileged-usermod ++ CCI-000381 ++ Configure the operating system to disable non-essential capabilities by removing automated bug reporting packages from the system with the following command: + +-The audit daemon must be restarted for the changes to take effect. +- ++$ sudo yum remove abrt* ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030570 +- Successful/unsuccessful uses of the chacl command in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++ RHEL-08-040002 ++ RHEL 8 must not have the sendmail package installed. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chacl" command is used to change the access control list of a file or directory. ++Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Examples of non-essential capabilities include, but are not limited to, games, software packages, tools, and demonstration software not related to requirements or providing a wide array of functionality not required for every mission, but which cannot be disabled. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Verify the operating system is configured to disable non-essential capabilities. The most secure way of ensuring a non-essential capability is disabled is to not have the capability installed.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8007,41 +7569,31 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chacl" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F path=/usr/bin/chacl -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod ++ CCI-000381 ++ Configure the operating system to disable non-essential capabilities by removing the sendmail package from the system with the following command: + +-The audit daemon must be restarted for the changes to take effect. +- ++$ sudo yum remove sendmail ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030580 +- Successful/unsuccessful uses of the kmod command in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "kmod" command is used to control Linux Kernel modules. +- +-The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records. +- +-DoD has defined the list of events for which RHEL 8 will provide an audit record generation capability as the following: +- +-1) Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels); ++ ++ RHEL-08-040010 ++ RHEL 8 must not have the rsh-server package installed. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-2) Access actions, such as successful and unsuccessful logon attempts, privileged activities or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system; ++Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). + +-3) All account creations, modifications, disabling, and terminations; and ++The rsh-server service provides an unencrypted remote access service that does not provide for the confidentiality and integrity of user passwords or the remote session and has very weak authentication. + +-4) All kernel module load, unload, and restart actions. ++If a privileged user were to log on using this service, the privileged user password could be compromised. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000471-GPOS-00216, SRG-OS-000477-GPOS-00222</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000095-GPOS-00049, SRG-OS-000074-GPOS-00042</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8049,41 +7601,27 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure RHEL 8 to audit the execution of the module management program "kmod" by adding or updating the following line to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F path=/usr/bin/kmod -F perm=x -F auid>=1000 -F auid!=unset -k modules ++ CCI-000381 ++ Configure the operating system to disable non-essential capabilities by removing the rsh-server package from the system with the following command: + +-The audit daemon must be restarted for the changes to take effect. +- ++$ sudo yum remove rsh-server ++ + +- ++ + + + +- +- SRG-OS-000062-GPOS-00031 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030600 +- Successful/unsuccessful modifications to the lastlog file in RHEL 8 must generate an audit record. +- <VulnDiscussion>Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). +- +-The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records. +- +-DoD has defined the list of events for which RHEL 8 will provide an audit record generation capability as the following: +- +-1) Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels); +- +-2) Access actions, such as successful and unsuccessful logon attempts, privileged activities or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system; +- +-3) All account creations, modifications, disabling, and terminations; and ++ ++ RHEL-08-040021 ++ RHEL 8 must disable the asynchronous transfer mode (ATM) protocol. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-4) All kernel module load, unload, and restart actions. ++Failing to disconnect unused protocols can result in a system compromise. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000473-GPOS-00218</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The Asynchronous Transfer Mode (ATM) is a protocol operating on network, data link, and physical layers, based on virtual circuits and virtual paths. Disabling ATM protects the system against exploitation of any laws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8091,25 +7629,32 @@ Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000169 +- Configure the audit system to generate an audit event for any successful/unsuccessful modifications to the "lastlog" file by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ CCI-000381 ++ Configure the operating system to disable the ability to use the ATM protocol kernel module. + +--w /var/log/lastlog -p wa -k logins ++Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": + +-The audit daemon must be restarted for the changes to take effect. +- ++install atm /bin/true ++blacklist atm ++ ++Reboot the system for the settings to take effect. ++ + +- ++ + + + +- +- SRG-OS-000063-GPOS-00032 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030610 +- RHEL 8 must allow only the Information System Security Manager (ISSM) (or individuals or roles appointed by the ISSM) to select which auditable events are to be audited. +- <VulnDiscussion>Without the capability to restrict the roles and individuals that can select which events are audited, unauthorized personnel may be able to prevent the auditing of critical events. Misconfigured audits may degrade the system's performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040022 ++ RHEL 8 must disable the controller area network (CAN) protocol. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++ ++Failing to disconnect unused protocols can result in a system compromise. ++ ++The Controller Area Network (CAN) is a serial communications protocol, which was initially developed for automotive and is now also used in marine, industrial, and medical applications. Disabling CAN protects the system against exploitation of any flaws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8117,29 +7662,32 @@ The audit daemon must be restarted for the changes to take effect.Red Hat Enterprise Linux 8 + 2921 + +- CCI-000171 +- Configure the files in directory "/etc/audit/rules.d/" and the "/etc/audit/auditd.conf" file to have a mode of "0640" with the following commands: ++ CCI-000381 ++ Configure the operating system to disable the ability to use the CAN protocol kernel module. + +-$ sudo chmod 0640 /etc/audit/rules.d/audit.rules +-$ sudo chmod 0640 /etc/audit/rules.d/[customrulesfile].rules +-$ sudo chmod 0640 /etc/audit/auditd.conf +- ++Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": ++ ++install can /bin/true ++blacklist can ++ ++Reboot the system for the settings to take effect. ++ + +- ++ + + + +- +- SRG-OS-000256-GPOS-00097 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030620 +- RHEL 8 audit tools must have a mode of 0755 or less permissive. +- <VulnDiscussion>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 operation on audit information. ++ ++ RHEL-08-040023 ++ RHEL 8 must disable the stream control transmission protocol (SCTP). ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-RHEL 8 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools. ++Failing to disconnect unused protocols can result in a system compromise. + +-Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The Stream Control Transmission Protocol (SCTP) is a transport layer protocol, designed to support the idea of message-oriented communication, with several streams of messages within one connection. Disabling SCTP protects the system against exploitation of any flaws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8147,31 +7695,32 @@ Audit tools include, but are not limited to, vendor-provided and open source aud + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001493 +- Configure the audit tools to be protected from unauthorized access by setting the correct permissive mode using the following command: ++ CCI-000381 ++ Configure the operating system to disable the ability to use the SCTP kernel module. + +-$ sudo chmod 0755 [audit_tool] ++Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": + +-Replace "[audit_tool]" with the audit tool that does not have the correct permissive mode. +- ++install sctp /bin/true ++blacklist sctp ++ ++Reboot the system for the settings to take effect. ++ + +- ++ + + + +- +- SRG-OS-000256-GPOS-00097 +- <GroupDescription></GroupDescription> +- +- RHEL-08-030630 +- RHEL 8 audit tools must be owned by root. +- <VulnDiscussion>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 operation on audit information. +- +-RHEL 8 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools. ++ ++ SRG-OS-000095-GPOS-00049 ++ <GroupDescription></GroupDescription> ++ ++ RHEL-08-040024 ++ RHEL 8 must disable the transparent inter-process communication (TIPC) protocol. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators. ++Failing to disconnect unused protocols can result in a system compromise. + +-Satisfies: SRG-OS-000256-GPOS-00097, SRG-OS-000257-GPOS-00098, SRG-OS-000258-GPOS-00099</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communications between nodes in a cluster. Disabling TIPC protects the system against exploitation of any flaws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8179,31 +7728,32 @@ Satisfies: SRG-OS-000256-GPOS-00097, SRG-OS-000257-GPOS-00098, SRG-OS-000258-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001493 +- Configure the audit tools to be owned by "root", by running the following command: ++ CCI-000381 ++ Configure the operating system to disable the ability to use the TIPC protocol kernel module. + +-$ sudo chown root [audit_tool] ++Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": + +-Replace "[audit_tool]" with each audit tool not owned by "root". +- ++install tipc /bin/true ++blacklist tipc ++ ++Reboot the system for the settings to take effect. ++ + +- ++ + + + +- +- SRG-OS-000256-GPOS-00097 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030640 +- RHEL 8 audit tools must be group-owned by root. +- <VulnDiscussion>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 operation on audit information. +- +-RHEL 8 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools. ++ ++ RHEL-08-040025 ++ RHEL 8 must disable mounting of cramfs. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators. ++Removing support for unneeded filesystem types reduces the local attack surface of the server. + +-Satisfies: SRG-OS-000256-GPOS-00097, SRG-OS-000257-GPOS-00098, SRG-OS-000258-GPOS-00099</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Compressed ROM/RAM file system (or cramfs) is a read-only file system designed for simplicity and space-efficiency. It is mainly used in embedded and small-footprint systems.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8211,36 +7761,30 @@ Satisfies: SRG-OS-000256-GPOS-00097, SRG-OS-000257-GPOS-00098, SRG-OS-000258-GPO + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001493 +- Configure the audit tools to be group-owned by "root", by running the following command: ++ CCI-000381 ++ Configure the operating system to disable the ability to use the cramfs kernel module. + +-$ sudo chgrp root [audit_tool] ++Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": + +-Replace "[audit_tool]" with each audit tool not group-owned by "root". +- ++install cramfs /bin/true ++blacklist cramfs ++ ++Reboot the system for the settings to take effect. ++ + +- ++ + + + +- +- SRG-OS-000480-GPOS-00227 ++ ++ SRG-OS-000095-GPOS-00049 + <GroupDescription></GroupDescription> +- +- RHEL-08-030670 +- RHEL 8 must have the packages required for offloading audit logs installed. +- <VulnDiscussion>Information stored in one location is vulnerable to accidental or incidental deletion or alteration. +- +-Off-loading is a common process in information systems with limited audit storage capacity. +- +-RHEL 8 installation media provides "rsyslogd". "rsyslogd" is a system utility providing support for message logging. Support for both internet and UNIX domain sockets enables this utility to support both local and remote logging. Couple this utility with "gnutls" (which is a secure communications library implementing the SSL, TLS and DTLS protocols), and you have a method to securely encrypt and off-load auditing. ++ ++ RHEL-08-040026 ++ RHEL 8 must disable IEEE 1394 (FireWire) Support. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-Rsyslog provides three ways to forward message: the traditional UDP transport, which is extremely lossy but standard; the plain TCP based transport, which loses messages only during certain situations but is widely available; and the RELP transport, which does not lose messages but is currently available only as part of the rsyslogd 3.15.0 and above. +-Examples of each configuration: +-UDP *.* @remotesystemname +-TCP *.* @@remotesystemname +-RELP *.* :omrelp:remotesystemname:2514 +-Note that a port number was given as there is no standard port for RELP.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The IEEE 1394 (FireWire) is a serial bus standard for high-speed real-time communication. Disabling FireWire protects the system against exploitation of any flaws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8248,34 +7792,30 @@ Note that a port number was given as there is no standard port for RELP.</Vul + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000366 +- Configure the operating system to offload audit logs by installing the required packages with the following command: ++ CCI-000381 ++ Configure the operating system to disable the ability to use the firewire-core kernel module. + +-$ sudo yum install rsyslog +- ++Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": ++ ++install firewire-core /bin/true ++blacklist firewire-core ++ ++Reboot the system for the settings to take effect. ++ + +- ++ + + + +- +- SRG-OS-000480-GPOS-00227 ++ ++ SRG-OS-000114-GPOS-00059 + <GroupDescription></GroupDescription> +- +- RHEL-08-030680 +- RHEL 8 must have the packages required for encrypting offloaded audit logs installed. +- <VulnDiscussion>Information stored in one location is vulnerable to accidental or incidental deletion or alteration. +- +-Off-loading is a common process in information systems with limited audit storage capacity. +- +-RHEL 8 installation media provides "rsyslogd". "rsyslogd" is a system utility providing support for message logging. Support for both internet and UNIX domain sockets enables this utility to support both local and remote logging. Couple this utility with "rsyslog-gnutls" (which is a secure communications library implementing the SSL, TLS and DTLS protocols), and you have a method to securely encrypt and off-load auditing. ++ ++ RHEL-08-040080 ++ RHEL 8 must be configured to disable USB mass storage. ++ <VulnDiscussion>USB mass storage permits easy introduction of unknown devices, thereby facilitating malicious activity. + +-Rsyslog provides three ways to forward message: the traditional UDP transport, which is extremely lossy but standard; the plain TCP based transport, which loses messages only during certain situations but is widely available; and the RELP transport, which does not lose messages but is currently available only as part of the rsyslogd 3.15.0 and above. +-Examples of each configuration: +-UDP *.* @remotesystemname +-TCP *.* @@remotesystemname +-RELP *.* :omrelp:remotesystemname:2514 +-Note that a port number was given as there is no standard port for RELP.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8283,29 +7823,32 @@ Note that a port number was given as there is no standard port for RELP.</Vul + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000366 +- Configure the operating system to encrypt offloaded audit logs by installing the required packages with the following command: ++ CCI-000778 ++ Configure the operating system to disable the ability to use the USB Storage kernel module and the ability to use USB mass storage devices. + +-$ sudo yum install rsyslog-gnutls +- ++Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": ++ ++install usb-storage /bin/true ++blacklist usb-storage ++ ++Reboot the system for the settings to take effect. ++ + +- ++ + + + +- +- SRG-OS-000342-GPOS-00133 ++ ++ SRG-OS-000300-GPOS-00118 + <GroupDescription></GroupDescription> +- +- RHEL-08-030700 +- RHEL 8 must take appropriate action when the internal event queue is full. +- <VulnDiscussion>Information stored in one location is vulnerable to accidental or incidental deletion or alteration. +- +-Off-loading is a common process in information systems with limited audit storage capacity. ++ ++ RHEL-08-040111 ++ RHEL 8 Bluetooth must be disabled. ++ <VulnDiscussion>Without protection of communications with wireless peripherals, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read, altered, or used to compromise the RHEL 8 operating system. + +-RHEL 8 installation media provides "rsyslogd". "rsyslogd" is a system utility providing support for message logging. Support for both internet and UNIX domain sockets enables this utility to support both local and remote logging. Couple this utility with "gnutls" (which is a secure communications library implementing the SSL, TLS and DTLS protocols), and you have a method to securely encrypt and off-load auditing. ++This requirement applies to wireless peripheral technologies (e.g., wireless mice, keyboards, displays, etc.) used with RHEL 8 systems. Wireless peripherals (e.g., Wi-Fi/Bluetooth/IR Keyboards, Mice, and Pointing Devices and Near Field Communications [NFC]) present a unique challenge by creating an open, unsecured port on a computer. Wireless peripherals must meet DoD requirements for wireless data transmission and be approved for use by the Authorizing Official (AO). Even though some wireless peripherals, such as mice and pointing devices, do not ordinarily carry information that need to be protected, modification of communications with these wireless peripherals may be used to compromise the RHEL 8 operating system. Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. + +-Satisfies: SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Protecting the confidentiality and integrity of communications with wireless peripherals can be accomplished by physical means (e.g., employing physical barriers to wireless radio frequencies) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa. If the wireless peripheral is only passing telemetry data, encryption of the data may not be required.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8313,25 +7856,33 @@ Satisfies: SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224</VulnDiscussion + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001851 +- Edit the /etc/audit/auditd.conf file and add or update the "overflow_action" option: ++ CCI-001443 ++ Configure the operating system to disable the Bluetooth adapter when not in use. + +-overflow_action = syslog ++Build or modify the "/etc/modprobe.d/bluetooth.conf" file with the following line: + +-The audit daemon must be restarted for changes to take effect. +- ++install bluetooth /bin/true ++ ++Reboot the system for the settings to take effect. ++ + +- ++ + + + +- +- SRG-OS-000343-GPOS-00134 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-030730 +- RHEL 8 must take action when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity. +- <VulnDiscussion>If security personnel are not notified immediately when storage volume reaches 75 percent utilization, they are unable to plan for audit record storage capacity expansion.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040120 ++ RHEL 8 must mount /dev/shm with the nodev option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. ++ ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8339,31 +7890,27 @@ The audit daemon must be restarted for changes to take effect. + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001855 +- Configure the operating system to initiate an action to notify the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity by adding/modifying the following line in the /etc/audit/auditd.conf file. +- +-space_left = 25% ++ CCI-001764 ++ Configure the system so that /dev/shm is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: + +-Note: Option names and values in the auditd.conf file are case insensitive. +- ++tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-030741 +- RHEL 8 must disable the chrony daemon from acting as a server. +- <VulnDiscussion>Inaccurate time stamps make it more difficult to correlate events and can lead to an inaccurate analysis. Determining the correct time a particular event occurred on a system is critical when conducting forensic analysis and investigating system events. Sources outside the configured acceptable allowance (drift) may be inaccurate. +- +-Minimizing the exposure of the server functionality of the chrony daemon diminishes the attack surface. +- +-RHEL 8 utilizes the "timedatectl" command to view the status of the "systemd-timesyncd.service". The "timedatectl" status will display the local time, UTC, and the offset from UTC. ++ ++ RHEL-08-040121 ++ RHEL 8 must mount /dev/shm with the nosuid option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Note that USNO offers authenticated NTP service to DoD and U.S. Government agencies operating on the NIPR and SIPR networks. Visit https://www.usno.navy.mil/USNO/time/ntp/dod-customers for more information.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8371,29 +7918,29 @@ Note that USNO offers authenticated NTP service to DoD and U.S. Government agenc + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable the chrony daemon from acting as a server by adding/modifying the following line in the /etc/chrony.conf file. ++ CCI-001764 ++ Configure the system so that /dev/shm is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: + +-port 0 +- ++tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-030742 +- RHEL 8 must disable network management of the chrony daemon. +- <VulnDiscussion>Inaccurate time stamps make it more difficult to correlate events and can lead to an inaccurate analysis. Determining the correct time a particular event occurred on a system is critical when conducting forensic analysis and investigating system events. Sources outside the configured acceptable allowance (drift) may be inaccurate. ++ ++ RHEL-08-040122 ++ RHEL 8 must mount /dev/shm with the noexec option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Not exposing the management interface of the chrony daemon on the network diminishes the attack space. ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-RHEL 8 utilizes the "timedatectl" command to view the status of the "systemd-timesyncd.service". The "timedatectl" status will display the local time, UTC, and the offset from UTC. ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-Note that USNO offers authenticated NTP service to DoD and U.S. Government agencies operating on the NIPR and SIPR networks. Visit https://www.usno.navy.mil/USNO/time/ntp/dod-customers for more information.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8401,33 +7948,29 @@ Note that USNO offers authenticated NTP service to DoD and U.S. Government agenc + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system disable network management of the chrony daemon by adding/modifying the following line in the /etc/chrony.conf file. ++ CCI-001764 ++ Configure the system so that /dev/shm is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: + +-cmdport 0 +- ++tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040000 +- RHEL 8 must not have the telnet-server package installed. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++ ++ RHEL-08-040123 ++ RHEL 8 must mount /tmp with the nodev option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-Examples of non-essential capabilities include, but are not limited to, games, software packages, tools, and demonstration software not related to requirements or providing a wide array of functionality not required for every mission, but which cannot be disabled. +- +-Verify the operating system is configured to disable non-essential capabilities. The most secure way of ensuring a non-essential capability is disabled is to not have the capability installed. +- +-The telnet service provides an unencrypted remote access service that does not provide for the confidentiality and integrity of user passwords or the remote session. ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-If a privileged user were to log on using this service, the privileged user password could be compromised.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8435,29 +7978,27 @@ If a privileged user were to log on using this service, the privileged user pass + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable non-essential capabilities by removing the telnet-server package from the system with the following command: ++ CCI-001764 ++ Configure the system so that /tmp is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: + +-$ sudo yum remove telnet-server +- ++/dev/mapper/rhel-tmp /tmp xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040001 +- RHEL 8 must not have any automated bug reporting tools installed. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). +- +-Examples of non-essential capabilities include, but are not limited to, games, software packages, tools, and demonstration software not related to requirements or providing a wide array of functionality not required for every mission, but which cannot be disabled. ++ ++ RHEL-08-040124 ++ RHEL 8 must mount /tmp with the nosuid option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Verify the operating system is configured to disable non-essential capabilities. The most secure way of ensuring a non-essential capability is disabled is to not have the capability installed.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8465,29 +8006,29 @@ Verify the operating system is configured to disable non-essential capabilities. + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable non-essential capabilities by removing automated bug reporting packages from the system with the following command: ++ CCI-001764 ++ Configure the system so that /tmp is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: + +-$ sudo yum remove abrt* +- ++/dev/mapper/rhel-tmp /tmp xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040002 +- RHEL 8 must not have the sendmail package installed. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++ ++ RHEL-08-040125 ++ RHEL 8 must mount /tmp with the noexec option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-Examples of non-essential capabilities include, but are not limited to, games, software packages, tools, and demonstration software not related to requirements or providing a wide array of functionality not required for every mission, but which cannot be disabled. ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-Verify the operating system is configured to disable non-essential capabilities. The most secure way of ensuring a non-essential capability is disabled is to not have the capability installed.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8495,31 +8036,29 @@ Verify the operating system is configured to disable non-essential capabilities. + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable non-essential capabilities by removing the sendmail package from the system with the following command: ++ CCI-001764 ++ Configure the system so that /tmp is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: + +-$ sudo yum remove sendmail +- ++/dev/mapper/rhel-tmp /tmp xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040010 +- RHEL 8 must not have the rsh-server package installed. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). ++ ++ RHEL-08-040126 ++ RHEL 8 must mount /var/log with the nodev option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-The rsh-server service provides an unencrypted remote access service that does not provide for the confidentiality and integrity of user passwords or the remote session and has very weak authentication. ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-If a privileged user were to log on using this service, the privileged user password could be compromised. ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-Satisfies: SRG-OS-000095-GPOS-00049, SRG-OS-000074-GPOS-00042</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8527,27 +8066,29 @@ Satisfies: SRG-OS-000095-GPOS-00049, SRG-OS-000074-GPOS-00042</VulnDiscussion + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable non-essential capabilities by removing the rsh-server package from the system with the following command: ++ CCI-001764 ++ Configure the system so that /var/log is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: + +-$ sudo yum remove rsh-server +- ++/dev/mapper/rhel-var-log /var/log xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040021 +- RHEL 8 must disable the asynchronous transfer mode (ATM) protocol. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++ ++ RHEL-08-040127 ++ RHEL 8 must mount /var/log with the nosuid option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Failing to disconnect unused protocols can result in a system compromise. ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-The Asynchronous Transfer Mode (ATM) is a protocol operating on network, data link, and physical layers, based on virtual circuits and virtual paths. Disabling ATM protects the system against exploitation of any laws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8555,32 +8096,29 @@ The Asynchronous Transfer Mode (ATM) is a protocol operating on network, data li + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable the ability to use the ATM protocol kernel module. +- +-Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": +- +-install atm /bin/true +-blacklist atm ++ CCI-001764 ++ Configure the system so that /var/log is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: + +-Reboot the system for the settings to take effect. +- ++/dev/mapper/rhel-var-log /var/log xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040022 +- RHEL 8 must disable the controller area network (CAN) protocol. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++ ++ RHEL-08-040128 ++ RHEL 8 must mount /var/log with the noexec option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Failing to disconnect unused protocols can result in a system compromise. ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-The Controller Area Network (CAN) is a serial communications protocol, which was initially developed for automotive and is now also used in marine, industrial, and medical applications. Disabling CAN protects the system against exploitation of any flaws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8588,32 +8126,29 @@ The Controller Area Network (CAN) is a serial communications protocol, which was + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable the ability to use the CAN protocol kernel module. +- +-Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": +- +-install can /bin/true +-blacklist can ++ CCI-001764 ++ Configure the system so that /var/log is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: + +-Reboot the system for the settings to take effect. +- ++/dev/mapper/rhel-var-log /var/log xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040023 +- RHEL 8 must disable the stream control transmission protocol (SCTP). +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++ ++ RHEL-08-040129 ++ RHEL 8 must mount /var/log/audit with the nodev option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Failing to disconnect unused protocols can result in a system compromise. ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-The Stream Control Transmission Protocol (SCTP) is a transport layer protocol, designed to support the idea of message-oriented communication, with several streams of messages within one connection. Disabling SCTP protects the system against exploitation of any flaws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8621,32 +8156,29 @@ The Stream Control Transmission Protocol (SCTP) is a transport layer protocol, d + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable the ability to use the SCTP kernel module. +- +-Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": +- +-install sctp /bin/true +-blacklist sctp ++ CCI-001764 ++ Configure the system so that /var/log/audit is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: + +-Reboot the system for the settings to take effect. +- ++/dev/mapper/rhel-var-log-audit /var/log/audit xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040024 +- RHEL 8 must disable the transparent inter-process communication (TIPC) protocol. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++ ++ RHEL-08-040130 ++ RHEL 8 must mount /var/log/audit with the nosuid option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Failing to disconnect unused protocols can result in a system compromise. ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communications between nodes in a cluster. Disabling TIPC protects the system against exploitation of any flaws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8654,32 +8186,29 @@ The Transparent Inter-Process Communication (TIPC) protocol is designed to provi + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable the ability to use the TIPC protocol kernel module. +- +-Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": +- +-install tipc /bin/true +-blacklist tipc ++ CCI-001764 ++ Configure the system so that /var/log/audit is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: + +-Reboot the system for the settings to take effect. +- ++/dev/mapper/rhel-var-log-audit /var/log/audit xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040025 +- RHEL 8 must disable mounting of cramfs. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++ ++ RHEL-08-040131 ++ RHEL 8 must mount /var/log/audit with the noexec option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-Removing support for unneeded filesystem types reduces the local attack surface of the server. ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-Compressed ROM/RAM file system (or cramfs) is a read-only file system designed for simplicity and space-efficiency. It is mainly used in embedded and small-footprint systems.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8687,103 +8216,29 @@ Compressed ROM/RAM file system (or cramfs) is a read-only file system designed f + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000381 +- Configure the operating system to disable the ability to use the cramfs kernel module. +- +-Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": +- +-install cramfs /bin/true +-blacklist cramfs ++ CCI-001764 ++ Configure the system so that /var/log/audit is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: + +-Reboot the system for the settings to take effect. +- ++/dev/mapper/rhel-var-log-audit /var/log/audit xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000095-GPOS-00049 ++ ++ SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040026 +- RHEL 8 must disable IEEE 1394 (FireWire) Support. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-The IEEE 1394 (FireWire) is a serial bus standard for high-speed real-time communication. Disabling FireWire protects the system against exploitation of any flaws in its implementation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000381 +- Configure the operating system to disable the ability to use the firewire-core kernel module. +- +-Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": +- +-install firewire-core /bin/true +-blacklist firewire-core +- +-Reboot the system for the settings to take effect. +- +- +- +- +- +- +- +- SRG-OS-000114-GPOS-00059 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040080 +- RHEL 8 must be configured to disable USB mass storage. +- <VulnDiscussion>USB mass storage permits easy introduction of unknown devices, thereby facilitating malicious activity. +- +-Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000778 +- Configure the operating system to disable the ability to use the USB Storage kernel module. +- +-Create a file under "/etc/modprobe.d" with the following command: +- +-$ sudo touch /etc/modprobe.d/usb-storage.conf +- +-Add the following line to the created file: +- +-install usb-storage /bin/true +- +-Configure the operating system to disable the ability to use USB mass storage devices. +- +-$ sudo vi /etc/modprobe.d/blacklist.conf +- +-Add or update the line: ++ ++ RHEL-08-040132 ++ RHEL 8 must mount /var/tmp with the nodev option. ++ <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + +-blacklist usb-storage +- +- +- +- +- +- +- +- SRG-OS-000300-GPOS-00118 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040111 +- RHEL 8 Bluetooth must be disabled. +- <VulnDiscussion>Without protection of communications with wireless peripherals, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read, altered, or used to compromise the RHEL 8 operating system. ++The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-This requirement applies to wireless peripheral technologies (e.g., wireless mice, keyboards, displays, etc.) used with RHEL 8 systems. Wireless peripherals (e.g., Wi-Fi/Bluetooth/IR Keyboards, Mice, and Pointing Devices and Near Field Communications [NFC]) present a unique challenge by creating an open, unsecured port on a computer. Wireless peripherals must meet DoD requirements for wireless data transmission and be approved for use by the Authorizing Official (AO). Even though some wireless peripherals, such as mice and pointing devices, do not ordinarily carry information that need to be protected, modification of communications with these wireless peripherals may be used to compromise the RHEL 8 operating system. Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. ++The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +-Protecting the confidentiality and integrity of communications with wireless peripherals can be accomplished by physical means (e.g., employing physical barriers to wireless radio frequencies) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa. If the wireless peripheral is only passing telemetry data, encryption of the data may not be required.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8791,26 +8246,22 @@ Protecting the confidentiality and integrity of communications with wireless per + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001443 +- Configure the operating system to disable the Bluetooth adapter when not in use. +- +-Build or modify the "/etc/modprobe.d/bluetooth.conf" file with the following line: +- +-install bluetooth /bin/true ++ CCI-001764 ++ Configure the system so that /var/tmp is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: + +-Reboot the system for the settings to take effect. +- ++/dev/mapper/rhel-var-tmp /var/tmp xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- ++ + SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040120 +- RHEL 8 must mount /dev/shm with the nodev option. ++ ++ RHEL-08-040133 ++ RHEL 8 must mount /var/tmp with the nosuid option. + <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + + The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +@@ -8826,25 +8277,27 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + 2921 + + CCI-001764 +- Configure the system so that /dev/shm is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: ++ Configure the system so that /var/tmp is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: + +-tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0 +- ++/dev/mapper/rhel-var-tmp /var/tmp xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- ++ + SRG-OS-000368-GPOS-00154 + <GroupDescription></GroupDescription> +- +- RHEL-08-040121 +- RHEL 8 must mount /dev/shm with the nosuid option. ++ ++ RHEL-08-040134 ++ RHEL 8 must mount /var/tmp with the noexec option. + <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + + The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ + The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ + The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 +@@ -8854,28 +8307,28 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + 2921 + + CCI-001764 +- Configure the system so that /dev/shm is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: ++ Configure the system so that /var/tmp is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: + +-tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0 +- ++/dev/mapper/rhel-var-tmp /var/tmp xfs defaults,nodev,nosuid,noexec 0 0 ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000423-GPOS-00187 + <GroupDescription></GroupDescription> +- +- RHEL-08-040122 +- RHEL 8 must mount /dev/shm with the noexec option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. ++ ++ RHEL-08-040160 ++ All RHEL 8 networked systems must have and implement SSH to protect the confidentiality and integrity of transmitted and received information, as well as information during preparation for transmission. ++ <VulnDiscussion>Without protection of the transmitted information, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read or altered. + +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++This requirement applies to both internal and external networks and all types of information system components from which information can be transmitted (e.g., servers, mobile devices, notebook computers, printers, copiers, scanners, and facsimile machines). Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++Protecting the confidentiality and integrity of organizational information can be accomplished by physical means (e.g., employing physical distribution systems) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa. + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Satisfies: SRG-OS-000423-GPOS-00187, SRG-OS-000424-GPOS-00188, SRG-OS-000425-GPOS-00189, SRG-OS-000426-GPOS-00190</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8883,29 +8336,31 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /dev/shm is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: ++ CCI-002418 ++ Configure the SSH service to automatically start after reboot with the following command: + +-tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0 +- ++$ sudo systemctl enable sshd.service ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000033-GPOS-00014 + <GroupDescription></GroupDescription> +- +- RHEL-08-040123 +- RHEL 8 must mount /tmp with the nodev option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. ++ ++ RHEL-08-040161 ++ RHEL 8 must force a frequent session key renegotiation for SSH connections to the server. ++ <VulnDiscussion>Without protection of the transmitted information, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read or altered. + +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++This requirement applies to both internal and external networks and all types of information system components from which information can be transmitted (e.g., servers, mobile devices, notebook computers, printers, copiers, scanners, and facsimile machines). Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++Protecting the confidentiality and integrity of organizational information can be accomplished by physical means (e.g., employing physical distribution systems) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa. + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Session key regeneration limits the chances of a session key becoming compromised. ++ ++Satisfies: SRG-OS-000033-GPOS-00014, SRG-OS-000420-GPOS-00186, SRG-OS-000424-GPOS-00188</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8913,27 +8368,27 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /tmp is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000068 ++ Configure the system to force a frequent session key renegotiation for SSH connections to the server by add or modifying the following line in the "/etc/ssh/sshd_config" file: + +-/dev/mapper/rhel-tmp /tmp xfs defaults,nodev,nosuid,noexec 0 0 +- ++RekeyLimit 1G 1h ++ ++Restart the SSH daemon for the settings to take effect. ++ ++$ sudo systemctl restart sshd.service ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040124 +- RHEL 8 must mount /tmp with the nosuid option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040172 ++ The systemd Ctrl-Alt-Delete burst key sequence in RHEL 8 must be disabled. ++ <VulnDiscussion>A locally logged-on user who presses Ctrl-Alt-Delete when at the console can reboot the system. If accidentally pressed, as could happen in the case of a mixed OS environment, this can create the risk of short-term loss of availability of systems due to unintentional reboot. In a graphical user environment, risk of unintentional reboot from the Ctrl-Alt-Delete sequence is reduced because the user will be prompted before any action is taken.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8941,29 +8396,27 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /tmp is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Configure the system to disable the CtrlAltDelBurstAction by added or modifying the following line in the "/etc/systemd/system.conf" configuration file: + +-/dev/mapper/rhel-tmp /tmp xfs defaults,nodev,nosuid,noexec 0 0 +- ++CtrlAltDelBurstAction=none ++ ++Reload the daemon for this change to take effect. ++ ++$ sudo systemctl daemon-reload ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040125 +- RHEL 8 must mount /tmp with the noexec option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +- +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +- +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040190 ++ The Trivial File Transfer Protocol (TFTP) server package must not be installed if not required for RHEL 8 operational support. ++ <VulnDiscussion>If TFTP is required for operational support (such as the transmission of router configurations) its use must be documented with the Information System Security Officer (ISSO), restricted to only authorized personnel, and have access control rules established.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -8971,29 +8424,23 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /tmp is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Remove the TFTP package from the system with the following command: + +-/dev/mapper/rhel-tmp /tmp xfs defaults,nodev,nosuid,noexec 0 0 +- ++$ sudo yum remove tftp-server ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040126 +- RHEL 8 must mount /var/log with the nodev option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +- +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +- +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040200 ++ The root account must be the only account having unrestricted access to the RHEL 8 system. ++ <VulnDiscussion>If an account other than root also has a User Identifier (UID) of "0", it has root authority, giving that account unrestricted access to the entire operating system. Multiple accounts with a UID of "0" afford an opportunity for potential intruders to guess a password for a privileged account.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9001,29 +8448,33 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /var/log is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Change the UID of any account on the system, other than root, that has a UID of "0". + +-/dev/mapper/rhel-var-log /var/log xfs defaults,nodev,nosuid,noexec 0 0 +- ++If the account is associated with system commands or applications, the UID should be changed to one greater than "0" but less than "1000". Otherwise, assign a UID of greater than "1000" that has not already been assigned. ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040127 +- RHEL 8 must mount /var/log with the nosuid option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++ RHEL-08-040210 ++ RHEL 8 must prevent IPv6 Internet Control Message Protocol (ICMP) redirect messages from being accepted. ++ <VulnDiscussion>ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages modify the host's route table and are unauthenticated. An illicit ICMP redirect message could result in a man-in-the-middle attack. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9031,29 +8482,41 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /var/log is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Configure RHEL 8 to prevent IPv6 ICMP redirect messages from being accepted. + +-/dev/mapper/rhel-var-log /var/log xfs defaults,nodev,nosuid,noexec 0 0 +- ++Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ ++net.ipv6.conf.default.accept_redirects = 0 ++ ++Load settings from all system configuration files with the following command: ++ ++$ sudo sysctl --system ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040128 +- RHEL 8 must mount /var/log with the noexec option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. ++ ++ RHEL-08-040220 ++ RHEL 8 must not send Internet Control Message Protocol (ICMP) redirects. ++ <VulnDiscussion>ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages contain information from the system's route table, possibly revealing portions of the network topology. + +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++There are notable differences between Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). There is only a directive to disable sending of IPv4 redirected packets. Refer to RFC4294 for an explanation of "IPv6 Node Requirements", which resulted in this difference between IPv4 and IPv6. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9061,29 +8524,40 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /var/log is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Configure RHEL 8 to not allow interfaces to perform IPv4 ICMP redirects. + +-/dev/mapper/rhel-var-log /var/log xfs defaults,nodev,nosuid,noexec 0 0 +- ++Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ ++net.ipv4.conf.all.send_redirects=0 ++ ++Load settings from all system configuration files with the following command: ++ ++$ sudo sysctl --system ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040129 +- RHEL 8 must mount /var/log/audit with the nodev option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++ RHEL-08-040230 ++ RHEL 8 must not respond to Internet Control Message Protocol (ICMP) echoes sent to a broadcast address. ++ <VulnDiscussion>Responding to broadcast ICMP echoes facilitates network mapping and provides a vector for amplification attacks. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++There are notable differences between Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). IPv6 does not implement the same method of broadcast as IPv4. Instead, IPv6 uses multicast addressing to the all-hosts multicast group. Refer to RFC4294 for an explanation of "IPv6 Node Requirements", which resulted in this difference between IPv4 and IPv6. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9091,29 +8565,39 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /var/log/audit is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Configure RHEL 8 to not respond to IPv4 ICMP echoes sent to a broadcast address. + +-/dev/mapper/rhel-var-log-audit /var/log/audit xfs defaults,nodev,nosuid,noexec 0 0 +- ++Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ ++net.ipv4.icmp_echo_ignore_broadcasts=1 ++ ++Load settings from all system configuration files with the following command: ++ ++$ sudo sysctl --system ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040130 +- RHEL 8 must mount /var/log/audit with the nosuid option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++ RHEL-08-040240 ++ RHEL 8 must not forward IPv6 source-routed packets. ++ <VulnDiscussion>Source-routed packets allow the source of the packet to suggest that routers forward the packet along a different path than configured on the router, which can be used to bypass network security measures. This requirement applies only to the forwarding of source-routed traffic, such as when forwarding is enabled and the system is functioning as a router. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9121,29 +8605,39 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /var/log/audit is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Configure RHEL 8 to not forward IPv6 source-routed packets. + +-/dev/mapper/rhel-var-log-audit /var/log/audit xfs defaults,nodev,nosuid,noexec 0 0 +- ++Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ ++net.ipv6.conf.all.accept_source_route=0 ++ ++Load settings from all system configuration files with the following command: ++ ++$ sudo sysctl --system ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040131 +- RHEL 8 must mount /var/log/audit with the noexec option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++ RHEL-08-040250 ++ RHEL 8 must not forward IPv6 source-routed packets by default. ++ <VulnDiscussion>Source-routed packets allow the source of the packet to suggest that routers forward the packet along a different path than configured on the router, which can be used to bypass network security measures. This requirement applies only to the forwarding of source-routed traffic, such as when forwarding is enabled and the system is functioning as a router. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9151,29 +8645,39 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /var/log/audit is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Configure RHEL 8 to not forward IPv6 source-routed packets by default. + +-/dev/mapper/rhel-var-log-audit /var/log/audit xfs defaults,nodev,nosuid,noexec 0 0 +- ++Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ ++net.ipv6.conf.default.accept_source_route=0 ++ ++Load settings from all system configuration files with the following command: ++ ++$ sudo sysctl --system ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040132 +- RHEL 8 must mount /var/tmp with the nodev option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ ++ RHEL-08-040260 ++ RHEL 8 must not enable IPv6 packet forwarding unless the system is a router. ++ <VulnDiscussion>Routing protocol daemons are typically used on routers to exchange network topology information with other routers. If this software is used when not required, system network information may be unnecessarily transmitted across the network. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9181,29 +8685,41 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /var/tmp is mounted with the "nodev" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Configure RHEL 8 to not allow IPv6 packet forwarding, unless the system is a router. + +-/dev/mapper/rhel-var-tmp /var/tmp xfs defaults,nodev,nosuid,noexec 0 0 +- ++Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ ++net.ipv6.conf.all.forwarding=0 ++ ++Load settings from all system configuration files with the following command: ++ ++$ sudo sysctl --system ++ + +- ++ + + + +- +- SRG-OS-000368-GPOS-00154 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040133 +- RHEL 8 must mount /var/tmp with the nosuid option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. ++ ++ RHEL-08-040261 ++ RHEL 8 must not accept router advertisements on all IPv6 interfaces. ++ <VulnDiscussion>Routing protocol daemons are typically used on routers to exchange network topology information with other routers. If this software is used when not required, system network information may be unnecessarily transmitted across the network. + +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++An illicit router advertisement message could result in a man-in-the-middle attack. + +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9211,119 +8727,41 @@ The "nosuid" mount option causes the system to not execute "setuid" and "setgid" + Red Hat Enterprise Linux 8 + 2921 + +- CCI-001764 +- Configure the system so that /var/tmp is mounted with the "nosuid" option by adding /modifying the /etc/fstab with the following line: ++ CCI-000366 ++ Configure RHEL 8 to not accept router advertisements on all IPv6 interfaces unless the system is a router. + +-/dev/mapper/rhel-var-tmp /var/tmp xfs defaults,nodev,nosuid,noexec 0 0 +- +- +- +- +- +- +- +- SRG-OS-000368-GPOS-00154 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040134 +- RHEL 8 must mount /var/tmp with the noexec option. +- <VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. +- +-The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +- +-The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. +- +-The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-001764 +- Configure the system so that /var/tmp is mounted with the "noexec" option by adding /modifying the /etc/fstab with the following line: +- +-/dev/mapper/rhel-var-tmp /var/tmp xfs defaults,nodev,nosuid,noexec 0 0 +- +- +- +- +- +- +- +- SRG-OS-000423-GPOS-00187 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040160 +- All RHEL 8 networked systems must have and implement SSH to protect the confidentiality and integrity of transmitted and received information, as well as information during preparation for transmission. +- <VulnDiscussion>Without protection of the transmitted information, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read or altered. +- +-This requirement applies to both internal and external networks and all types of information system components from which information can be transmitted (e.g., servers, mobile devices, notebook computers, printers, copiers, scanners, and facsimile machines). Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. ++Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: + +-Protecting the confidentiality and integrity of organizational information can be accomplished by physical means (e.g., employing physical distribution systems) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa. ++net.ipv6.conf.all.accept_ra=0 + +-Satisfies: SRG-OS-000423-GPOS-00187, SRG-OS-000424-GPOS-00188, SRG-OS-000425-GPOS-00189, SRG-OS-000426-GPOS-00190</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-002418 +- Configure the SSH service to automatically start after reboot with the following command: ++Load settings from all system configuration files with the following command: + +-$ sudo systemctl enable sshd.service +- ++$ sudo sysctl --system ++ + +- ++ + + + +- +- SRG-OS-000033-GPOS-00014 ++ ++ SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040161 +- RHEL 8 must force a frequent session key renegotiation for SSH connections to the server. +- <VulnDiscussion>Without protection of the transmitted information, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read or altered. +- +-This requirement applies to both internal and external networks and all types of information system components from which information can be transmitted (e.g., servers, mobile devices, notebook computers, printers, copiers, scanners, and facsimile machines). Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. +- +-Protecting the confidentiality and integrity of organizational information can be accomplished by physical means (e.g., employing physical distribution systems) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa. +- +-Session key regeneration limits the chances of a session key becoming compromised. +- +-Satisfies: SRG-OS-000033-GPOS-00014, SRG-OS-000420-GPOS-00186, SRG-OS-000424-GPOS-00188</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000068 +- Configure the system to force a frequent session key renegotiation for SSH connections to the server by add or modifying the following line in the "/etc/ssh/sshd_config" file: ++ ++ RHEL-08-040262 ++ RHEL 8 must not accept router advertisements on all IPv6 interfaces by default. ++ <VulnDiscussion>Routing protocol daemons are typically used on routers to exchange network topology information with other routers. If this software is used when not required, system network information may be unnecessarily transmitted across the network. + +-RekeyLimit 1G 1h ++An illicit router advertisement message could result in a man-in-the-middle attack. + +-Restart the SSH daemon for the settings to take effect. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-$ sudo systemctl restart sshd.service +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040172 +- The systemd Ctrl-Alt-Delete burst key sequence in RHEL 8 must be disabled. +- <VulnDiscussion>A locally logged-on user who presses Ctrl-Alt-Delete when at the console can reboot the system. If accidentally pressed, as could happen in the case of a mixed OS environment, this can create the risk of short-term loss of availability of systems due to unintentional reboot. In a graphical user environment, risk of unintentional reboot from the Ctrl-Alt-Delete sequence is reduced because the user will be prompted before any action is taken.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9332,74 +8770,30 @@ $ sudo systemctl restart sshd.service + 2921 + + CCI-000366 +- Configure the system to disable the CtrlAltDelBurstAction by added or modifying the following line in the "/etc/systemd/system.conf" configuration file: ++ Configure RHEL 8 to not accept router advertisements on all IPv6 interfaces by default unless the system is a router. + +-CtrlAltDelBurstAction=none ++Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: + +-Reload the daemon for this change to take effect. ++net.ipv6.conf.default.accept_ra=0 + +-$ sudo systemctl daemon-reload +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040190 +- The Trivial File Transfer Protocol (TFTP) server package must not be installed if not required for RHEL 8 operational support. +- <VulnDiscussion>If TFTP is required for operational support (such as the transmission of router configurations) its use must be documented with the Information System Security Officer (ISSO), restricted to only authorized personnel, and have access control rules established.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Remove the TFTP package from the system with the following command: ++Load settings from all system configuration files with the following command: + +-$ sudo yum remove tftp-server +- ++$ sudo sysctl --system ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040200 +- The root account must be the only account having unrestricted access to the RHEL 8 system. +- <VulnDiscussion>If an account other than root also has a User Identifier (UID) of "0", it has root authority, giving that account unrestricted access to the entire operating system. Multiple accounts with a UID of "0" afford an opportunity for potential intruders to guess a password for a privileged account.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Change the UID of any account on the system, other than root, that has a UID of "0". ++ ++ RHEL-08-040270 ++ RHEL 8 must not allow interfaces to perform Internet Control Message Protocol (ICMP) redirects by default. ++ <VulnDiscussion>ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages contain information from the system's route table, possibly revealing portions of the network topology. + +-If the account is associated with system commands or applications, the UID should be changed to one greater than "0" but less than "1000". Otherwise, assign a UID of greater than "1000" that has not already been assigned. +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040210 +- RHEL 8 must prevent IPv6 Internet Control Message Protocol (ICMP) redirect messages from being accepted. +- <VulnDiscussion>ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages modify the host's route table and are unauthenticated. An illicit ICMP redirect message could result in a man-in-the-middle attack. ++There are notable differences between Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). There is only a directive to disable sending of IPv4 redirected packets. Refer to RFC4294 for an explanation of "IPv6 Node Requirements", which resulted in this difference between IPv4 and IPv6. + + The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. + /etc/sysctl.d/*.conf +@@ -9418,30 +8812,28 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to prevent IPv6 ICMP redirect messages from being accepted. ++ Configure RHEL 8 to not allow interfaces to perform Internet Protocol version 4 (IPv4) ICMP redirects by default. + + Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: + +-net.ipv6.conf.default.accept_redirects = 0 ++net.ipv4.conf.default.send_redirects = 0 + + Load settings from all system configuration files with the following command: + + $ sudo sysctl --system +- ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040220 +- RHEL 8 must not send Internet Control Message Protocol (ICMP) redirects. +- <VulnDiscussion>ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages contain information from the system's route table, possibly revealing portions of the network topology. +- +-There are notable differences between Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). There is only a directive to disable sending of IPv4 redirected packets. Refer to RFC4294 for an explanation of "IPv6 Node Requirements", which resulted in this difference between IPv4 and IPv6. ++ ++ RHEL-08-040280 ++ RHEL 8 must ignore IPv6 Internet Control Message Protocol (ICMP) redirect messages. ++ <VulnDiscussion>ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages modify the host's route table and are unauthenticated. An illicit ICMP redirect message could result in a man-in-the-middle attack. + + The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. + /etc/sysctl.d/*.conf +@@ -9460,30 +8852,29 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to not allow interfaces to perform IPv4 ICMP redirects. ++ Configure RHEL 8 to ignore IPv6 ICMP redirect messages. + + Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: + +-net.ipv4.conf.all.send_redirects=0 ++net.ipv6.conf.all.accept_redirects = 0 + + Load settings from all system configuration files with the following command: + + $ sudo sysctl --system +- ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040230 +- RHEL 8 must not respond to Internet Control Message Protocol (ICMP) echoes sent to a broadcast address. +- <VulnDiscussion>Responding to broadcast ICMP echoes facilitates network mapping and provides a vector for amplification attacks. ++ ++ RHEL-08-040281 ++ RHEL 8 must disable access to network bpf syscall from unprivileged processes. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-There are notable differences between Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). IPv6 does not implement the same method of broadcast as IPv4. Instead, IPv6 uses multicast addressing to the all-hosts multicast group. Refer to RFC4294 for an explanation of "IPv6 Node Requirements", which resulted in this difference between IPv4 and IPv6. + The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. + /etc/sysctl.d/*.conf + /run/sysctl.d/*.conf +@@ -9501,28 +8892,26 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to not respond to IPv4 ICMP echoes sent to a broadcast address. +- +-Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ Configure RHEL 8 to prevent privilege escalation thru the kernel by disabling access to the bpf syscall by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: + +-net.ipv4.icmp_echo_ignore_broadcasts=1 ++kernel.unprivileged_bpf_disabled = 1 + +-Load settings from all system configuration files with the following command: ++The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: + + $ sudo sysctl --system +- ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040240 +- RHEL 8 must not forward IPv6 source-routed packets. +- <VulnDiscussion>Source-routed packets allow the source of the packet to suggest that routers forward the packet along a different path than configured on the router, which can be used to bypass network security measures. This requirement applies only to the forwarding of source-routed traffic, such as when forwarding is enabled and the system is functioning as a router. ++ ++ RHEL-08-040282 ++ RHEL 8 must restrict usage of ptrace to descendant processes. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + + The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. + /etc/sysctl.d/*.conf +@@ -9541,28 +8930,26 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to not forward IPv6 source-routed packets. +- +-Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ Configure RHEL 8 to restrict usage of ptrace to descendant processes by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: + +-net.ipv6.conf.all.accept_source_route=0 ++kernel.yama.ptrace_scope = 1 + +-Load settings from all system configuration files with the following command: ++The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: + + $ sudo sysctl --system +- ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040250 +- RHEL 8 must not forward IPv6 source-routed packets by default. +- <VulnDiscussion>Source-routed packets allow the source of the packet to suggest that routers forward the packet along a different path than configured on the router, which can be used to bypass network security measures. This requirement applies only to the forwarding of source-routed traffic, such as when forwarding is enabled and the system is functioning as a router. ++ ++ RHEL-08-040283 ++ RHEL 8 must restrict exposed kernel pointer addresses access. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + + The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. + /etc/sysctl.d/*.conf +@@ -9581,28 +8968,26 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to not forward IPv6 source-routed packets by default. ++ Configure RHEL 8 to restrict exposed kernel pointer addresses access by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: + +-Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++kernel.kptr_restrict = 1 + +-net.ipv6.conf.default.accept_source_route=0 +- +-Load settings from all system configuration files with the following command: ++The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: + + $ sudo sysctl --system +- ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040260 +- RHEL 8 must not enable IPv6 packet forwarding unless the system is a router. +- <VulnDiscussion>Routing protocol daemons are typically used on routers to exchange network topology information with other routers. If this software is used when not required, system network information may be unnecessarily transmitted across the network. ++ ++ RHEL-08-040284 ++ RHEL 8 must disable the use of user namespaces. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + + The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. + /etc/sysctl.d/*.conf +@@ -9621,30 +9006,28 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to not allow IPv6 packet forwarding, unless the system is a router. ++ Configure RHEL 8 to disable the use of user namespaces by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: + +-Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++Note: User namespaces are used primarily for Linux containers. If containers are in use, this requirement is not applicable. + +-net.ipv6.conf.all.forwarding=0 ++user.max_user_namespaces = 0 + +-Load settings from all system configuration files with the following command: ++The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: + + $ sudo sysctl --system +- ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040261 +- RHEL 8 must not accept router advertisements on all IPv6 interfaces. +- <VulnDiscussion>Routing protocol daemons are typically used on routers to exchange network topology information with other routers. If this software is used when not required, system network information may be unnecessarily transmitted across the network. +- +-An illicit router advertisement message could result in a man-in-the-middle attack. ++ ++ RHEL-08-040285 ++ RHEL 8 must use reverse path filtering on all IPv4 interfaces. ++ <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + + The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. + /etc/sysctl.d/*.conf +@@ -9663,40 +9046,26 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to not accept router advertisements on all IPv6 interfaces unless the system is a router. +- +-Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ Configure RHEL 8 to use reverse path filtering on all IPv4 interfaces by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: + +-net.ipv6.conf.all.accept_ra=0 ++net.ipv4.conf.all.rp_filter = 1 + +-Load settings from all system configuration files with the following command: ++The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: + + $ sudo sysctl --system +- ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040262 +- RHEL 8 must not accept router advertisements on all IPv6 interfaces by default. +- <VulnDiscussion>Routing protocol daemons are typically used on routers to exchange network topology information with other routers. If this software is used when not required, system network information may be unnecessarily transmitted across the network. +- +-An illicit router advertisement message could result in a man-in-the-middle attack. +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040290 ++ RHEL 8 must be configured to prevent unrestricted mail relaying. ++ <VulnDiscussion>If unrestricted mail relaying is permitted, unauthorized senders could use this host as a mail relay for the purpose of sending spam or other unauthorized activity.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9705,40 +9074,26 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to not accept router advertisements on all IPv6 interfaces by default unless the system is a router. +- +-Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: +- +-net.ipv6.conf.default.accept_ra=0 +- +-Load settings from all system configuration files with the following command: ++ If "postfix" is installed, modify the "/etc/postfix/main.cf" file to restrict client connections to the local network with the following command: + +-$ sudo sysctl --system +- ++$ sudo postconf -e 'smtpd_client_restrictions = permit_mynetworks,reject' ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040270 +- RHEL 8 must not allow interfaces to perform Internet Control Message Protocol (ICMP) redirects by default. +- <VulnDiscussion>ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages contain information from the system's route table, possibly revealing portions of the network topology. +- +-There are notable differences between Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). There is only a directive to disable sending of IPv4 redirected packets. Refer to RFC4294 for an explanation of "IPv6 Node Requirements", which resulted in this difference between IPv4 and IPv6. ++ ++ RHEL-08-040340 ++ RHEL 8 remote X connections for interactive users must be disabled unless to fulfill documented and validated mission requirements. ++ <VulnDiscussion>The security risk of using X11 forwarding is that the client's X11 display server may be exposed to attack when the SSH client requests forwarding. A system administrator may have a stance in which they want to protect clients that may expose themselves to attack by unwittingly requesting X11 forwarding, which can warrant a "no" setting. + +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf ++X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the user's X11 authorization database) can access the local X11 display through the forwarded connection. An attacker may then be able to perform activities such as keystroke monitoring if the ForwardX11Trusted option is also enabled. + +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++If X11 services are not required for the system's intended function, they should be disabled or restricted as appropriate to the system’s needs.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9747,38 +9102,26 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to not allow interfaces to perform Internet Protocol version 4 (IPv4) ICMP redirects by default. +- +-Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: ++ Edit the "/etc/ssh/sshd_config" file to uncomment or add the line for the "X11Forwarding" keyword and set its value to "no" (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor): + +-net.ipv4.conf.default.send_redirects = 0 ++X11Forwarding no + +-Load settings from all system configuration files with the following command: ++The SSH service must be restarted for changes to take effect: + +-$ sudo sysctl --system +- ++$ sudo systemctl restart sshd ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040280 +- RHEL 8 must ignore IPv6 Internet Control Message Protocol (ICMP) redirect messages. +- <VulnDiscussion>ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages modify the host's route table and are unauthenticated. An illicit ICMP redirect message could result in a man-in-the-middle attack. +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040341 ++ The RHEL 8 SSH daemon must prevent remote hosts from connecting to the proxy display. ++ <VulnDiscussion>When X11 forwarding is enabled, there may be additional exposure to the server and client displays if the sshd proxy display is configured to listen on the wildcard address. By default, sshd binds the forwarding server to the loopback address and sets the hostname part of the DIPSLAY environment variable to localhost. This prevents remote hosts from connecting to the proxy display.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9787,38 +9130,24 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to ignore IPv6 ICMP redirect messages. +- +-Add or edit the following line in a system configuration file, which begins with "99-", in the "/etc/sysctl.d/" directory: +- +-net.ipv6.conf.all.accept_redirects = 0 ++ Configure the SSH daemon to prevent remote hosts from connecting to the proxy display. + +-Load settings from all system configuration files with the following command: ++Edit the "/etc/ssh/sshd_config" file to uncomment or add the line for the "X11UseLocalhost" keyword and set its value to "yes" (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor): + +-$ sudo sysctl --system +- ++X11UseLocalhost yes ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040281 +- RHEL 8 must disable access to network bpf syscall from unprivileged processes. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040350 ++ If the Trivial File Transfer Protocol (TFTP) server is required, the RHEL 8 TFTP daemon must be configured to operate in secure mode. ++ <VulnDiscussion>Restricting TFTP to a specific directory prevents remote users from copying, transferring, or overwriting system files.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9827,36 +9156,22 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to prevent privilege escalation thru the kernel by disabling access to the bpf syscall by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: +- +-kernel.unprivileged_bpf_disabled = 1 +- +-The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: ++ Configure the TFTP daemon to operate in secure mode by adding the following line to "/etc/xinetd.d/tftp" (or modify the line to have the required value): + +-$ sudo sysctl --system +- ++server_args = -s /var/lib/tftpboot ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040282 +- RHEL 8 must restrict usage of ptrace to descendant processes. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++ ++ RHEL-08-040360 ++ A File Transfer Protocol (FTP) server package must not be installed unless mission essential on RHEL 8. ++ <VulnDiscussion>The FTP service provides an unencrypted remote access that does not provide for the confidentiality and integrity of user passwords or the remote session. If a privileged user were to log on using this service, the privileged user password could be compromised. SSH or other encrypted file transfer methods must be used in place of this service.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9865,36 +9180,26 @@ Based on the information above, if a configuration file that begins with "99-" i + 2921 + + CCI-000366 +- Configure RHEL 8 to restrict usage of ptrace to descendant processes by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: +- +-kernel.yama.ptrace_scope = 1 +- +-The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: ++ Document the FTP server package with the ISSO as an operational requirement or remove it from the system with the following command: + +-$ sudo sysctl --system +- ++$ sudo yum remove vsftpd ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040283 +- RHEL 8 must restrict exposed kernel pointer addresses access. ++ ++ RHEL-08-040370 ++ The gssproxy package must not be installed unless mission essential on RHEL 8. + <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf ++Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). + +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The gssproxy package is a proxy for GSS API credential handling and could expose secrets on some networks. It is not needed for normal function of the OS.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -9902,267 +9207,27 @@ Based on the information above, if a configuration file that begins with "99-" i + Red Hat Enterprise Linux 8 + 2921 + +- CCI-000366 +- Configure RHEL 8 to restrict exposed kernel pointer addresses access by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: +- +-kernel.kptr_restrict = 1 +- +-The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: ++ CCI-000381 ++ Document the gssproxy package with the ISSO as an operational requirement or remove it from the system with the following command: + +-$ sudo sysctl --system +- ++$ sudo yum remove gssproxy ++ + +- ++ + + + +- ++ + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- +- RHEL-08-040284 +- RHEL 8 must disable the use of user namespaces. ++ ++ RHEL-08-040380 ++ The iprutils package must not be installed unless mission essential on RHEL 8. + <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf ++Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). + +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Configure RHEL 8 to disable the use of user namespaces by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: +- +-Note: User namespaces are used primarily for Linux containers. If containers are in use, this requirement is not applicable. +- +-user.max_user_namespaces = 0 +- +-The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: +- +-$ sudo sysctl --system +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040285 +- RHEL 8 must use reverse path filtering on all IPv4 interfaces. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Configure RHEL 8 to use reverse path filtering on all IPv4 interfaces by adding the following line to a file, which begins with "99-", in the "/etc/sysctl.d" directory: +- +-net.ipv4.conf.all.rp_filter = 1 +- +-The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command: +- +-$ sudo sysctl --system +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040290 +- RHEL 8 must be configured to prevent unrestricted mail relaying. +- <VulnDiscussion>If unrestricted mail relaying is permitted, unauthorized senders could use this host as a mail relay for the purpose of sending spam or other unauthorized activity.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- If "postfix" is installed, modify the "/etc/postfix/main.cf" file to restrict client connections to the local network with the following command: +- +-$ sudo postconf -e 'smtpd_client_restrictions = permit_mynetworks,reject' +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040340 +- RHEL 8 remote X connections for interactive users must be disabled unless to fulfill documented and validated mission requirements. +- <VulnDiscussion>The security risk of using X11 forwarding is that the client's X11 display server may be exposed to attack when the SSH client requests forwarding. A system administrator may have a stance in which they want to protect clients that may expose themselves to attack by unwittingly requesting X11 forwarding, which can warrant a "no" setting. +- +-X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the user's X11 authorization database) can access the local X11 display through the forwarded connection. An attacker may then be able to perform activities such as keystroke monitoring if the ForwardX11Trusted option is also enabled. +- +-If X11 services are not required for the system's intended function, they should be disabled or restricted as appropriate to the system’s needs.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Edit the "/etc/ssh/sshd_config" file to uncomment or add the line for the "X11Forwarding" keyword and set its value to "no" (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor): +- +-X11Forwarding no +- +-The SSH service must be restarted for changes to take effect: +- +-$ sudo systemctl restart sshd +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040341 +- The RHEL 8 SSH daemon must prevent remote hosts from connecting to the proxy display. +- <VulnDiscussion>When X11 forwarding is enabled, there may be additional exposure to the server and client displays if the sshd proxy display is configured to listen on the wildcard address. By default, sshd binds the forwarding server to the loopback address and sets the hostname part of the DIPSLAY environment variable to localhost. This prevents remote hosts from connecting to the proxy display.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Configure the SSH daemon to prevent remote hosts from connecting to the proxy display. +- +-Edit the "/etc/ssh/sshd_config" file to uncomment or add the line for the "X11UseLocalhost" keyword and set its value to "yes" (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor): +- +-X11UseLocalhost yes +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040350 +- If the Trivial File Transfer Protocol (TFTP) server is required, the RHEL 8 TFTP daemon must be configured to operate in secure mode. +- <VulnDiscussion>Restricting TFTP to a specific directory prevents remote users from copying, transferring, or overwriting system files.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Configure the TFTP daemon to operate in secure mode by adding the following line to "/etc/xinetd.d/tftp" (or modify the line to have the required value): +- +-server_args = -s /var/lib/tftpboot +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040360 +- A File Transfer Protocol (FTP) server package must not be installed unless mission essential on RHEL 8. +- <VulnDiscussion>The FTP service provides an unencrypted remote access that does not provide for the confidentiality and integrity of user passwords or the remote session. If a privileged user were to log on using this service, the privileged user password could be compromised. SSH or other encrypted file transfer methods must be used in place of this service.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000366 +- Document the FTP server package with the ISSO as an operational requirement or remove it from the system with the following command: +- +-$ sudo yum remove vsftpd +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040370 +- The gssproxy package must not be installed unless mission essential on RHEL 8. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). +- +-The gssproxy package is a proxy for GSS API credential handling and could expose secrets on some networks. It is not needed for normal function of the OS.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> +- +- DPMS Target Red Hat Enterprise Linux 8 +- DISA +- DPMS Target +- Red Hat Enterprise Linux 8 +- 2921 +- +- CCI-000381 +- Document the gssproxy package with the ISSO as an operational requirement or remove it from the system with the following command: +- +-$ sudo yum remove gssproxy +- +- +- +- +- +- +- +- SRG-OS-000480-GPOS-00227 +- <GroupDescription></GroupDescription> +- +- RHEL-08-040380 +- The iprutils package must not be installed unless mission essential on RHEL 8. +- <VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). +- +-The iprutils package provides a suite of utilities to manage and configure SCSI devices supported by the ipr SCSI storage device driver.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> ++The iprutils package provides a suite of utilities to manage and configure SCSI devices supported by the ipr SCSI storage device driver.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls> + + DPMS Target Red Hat Enterprise Linux 8 + DISA +@@ -10176,7 +9241,7 @@ The iprutils package provides a suite of utilities to manage and configure SCSI + $ sudo yum remove iprutils + + +- ++ + + + +@@ -10204,7 +9269,7 @@ The tuned package contains a daemon that tunes the system settings dynamically. + $ sudo yum remove tuned + + +- ++ + + + +@@ -10234,7 +9299,7 @@ FIPS 140-2 is the current standard for validating that mechanisms used to access + $ sudo yum remove krb5-server + + +- ++ + + + +@@ -10258,14 +9323,14 @@ ALL ALL=(ALL) ALL + ALL ALL=(ALL:ALL) ALL + + +- ++ + + + + + SRG-OS-000480-GPOS-00227 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-010383 + RHEL 8 must use the invoking user's password for privilege escalation when using "sudo". + <VulnDiscussion>The sudoers security policy requires that users authenticate themselves before they can use sudo. When sudoers requires authentication, it validates the invoking user's credentials. If the rootpw, targetpw, or runaspw flags are defined and not disabled, by default the operating system will prompt the invoking user for the "root" user password. +@@ -10284,14 +9349,14 @@ Defaults !rootpw + Defaults !runaspw + + +- ++ + + + + + SRG-OS-000373-GPOS-00156 + <GroupDescription></GroupDescription> +- ++ + RHEL-08-010384 + RHEL 8 must require re-authentication when using the "sudo" command. + <VulnDiscussion>Without re-authentication, users may access resources or perform tasks for which they do not have authorization. +@@ -10316,18 +9381,18 @@ Defaults timestamp_timeout=[value] + Note: The "[value]" must be a number that is greater than or equal to "0". + + +- ++ + + + + + +- ++ + + + repotool + 5.10 +- 2021-10-04T21:38:10 ++ 2022-01-03T11:44:33 + + + +@@ -10358,7 +9423,7 @@ Note: The "[value]" must be a number that is greater than or equal to "0". +
    +
    +- ++ + + RHEL-08-010000 - RHEL 8 must be a vendor-supported release. + +@@ -10369,8 +9434,9 @@ Note: The "[value]" must be a number that is greater than or equal to "0". + +- ++ + ++ + + + +@@ -10420,9 +9486,9 @@ Passwords need to be protected at all times, and encryption is the standard meth + + + +- ++ + +- RHEL-08-010130 - The RHEL 8 password-auth file must be configured to use a sufficient number of hashing rounds. ++ RHEL-08-010130 - The RHEL 8 shadow password suite must be configured to use a sufficient number of hashing rounds. + + Red Hat Enterprise Linux 8 + +@@ -10431,7 +9497,8 @@ Passwords need to be protected at all times, and encryption is the standard meth + Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised. + + +- ++ ++ + + + +@@ -10506,2717 +9573,2410 @@ RHEL 8 systems utilizing encryption are required to use FIPS-compliant mechanism + + The key derivation function (KDF) in Kerberos is not FIPS compatible. Ensuring the system does not have any keytab files present prevents system daemons from using Kerberos for authentication. A keytab is a file containing pairs of Kerberos principals and encrypted keys. + +-FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules utilize authentication that meets DoD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system. +- +- +- +- +- +- +- +- +- +- RHEL-08-010162 - The krb5-workstation package must not be installed on RHEL 8. +- +- Red Hat Enterprise Linux 8 +- +- Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and DoD data may be compromised. +- +-RHEL 8 systems utilizing encryption are required to use FIPS-compliant mechanisms for authenticating to cryptographic modules. +- +-Currently, Kerberos does not utilize FIPS 140-2 cryptography. +- +-FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules utilize authentication that meets DoD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system. +- +- +- +- +- +- +- +- +- +- RHEL-08-010171 - RHEL 8 must have the policycoreutils package installed. +- +- Red Hat Enterprise Linux 8 +- +- Without verification of the security functions, security functions may not operate correctly and the failure may go unnoticed. Security function is defined as the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Security functionality includes, but is not limited to, establishing system accounts, configuring access authorizations (i.e., permissions, privileges), setting events to be audited, and setting intrusion detection parameters. +- +-Policycoreutils contains the policy core utilities that are required for basic operation of an SELinux-enabled system. These utilities include load_policy to load SELinux policies, setfile to label filesystems, newrole to switch roles, and run_init to run /etc/init.d scripts in the proper context. +- +- +- +- +- +- +- +- RHEL-08-010200 - RHEL 8 must be configured so that all network connections associated with SSH traffic are terminated at the end of the session or after 10 minutes of inactivity, except to fulfill documented and validated mission requirements. +- +- Red Hat Enterprise Linux 8 +- +- Terminating an idle SSH session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended. In addition, quickly terminating an idle SSH session will also free up resources committed by the managed network element. +- +-Terminating network connections associated with communications sessions includes, for example, de-allocating associated TCP/IP address/port pairs at the operating system level and de-allocating networking assignments at the application level if multiple application sessions are using a single operating system-level network connection. This does not mean that the operating system terminates all sessions or network access; it only ends the inactive session and releases the resources associated with that session. +- +-RHEL 8 utilizes /etc/ssh/sshd_config for configurations of OpenSSH. Within the sshd_config the product of the values of "ClientAliveInterval" and "ClientAliveCountMax" are used to establish the inactivity threshold. The "ClientAliveInterval" is a timeout interval in seconds after which if no data has been received from the client, sshd will send a message through the encrypted channel to request a response from the client. The "ClientAliveCountMax" is the number of client alive messages that may be sent without sshd receiving any messages back from the client. If this threshold is met, sshd will disconnect the client. +- +- +- +- +- +- +- +- +- RHEL-08-010210 - The RHEL 8 /var/log/messages file must have mode 0640 or less permissive. +- +- Red Hat Enterprise Linux 8 +- +- Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. +- +-The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. +- +- +- +- +- +- +- +- RHEL-08-010220 - The RHEL 8 /var/log/messages file must be owned by root. +- +- Red Hat Enterprise Linux 8 +- +- Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. +- +-The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. +- +- +- +- +- +- +- +- RHEL-08-010230 - The RHEL 8 /var/log/messages file must be group-owned by root. +- +- Red Hat Enterprise Linux 8 +- +- Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. +- +-The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. +- +- +- +- +- +- +- +- RHEL-08-010240 - The RHEL 8 /var/log directory must have mode 0755 or less permissive. +- +- Red Hat Enterprise Linux 8 +- +- Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. +- +-The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. +- +- +- +- +- +- +- +- RHEL-08-010250 - The RHEL 8 /var/log directory must be owned by root. +- +- Red Hat Enterprise Linux 8 +- +- Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. +- +-The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. +- +- +- +- +- +- +- +- RHEL-08-010260 - The RHEL 8 /var/log directory must be group-owned by root. +- +- Red Hat Enterprise Linux 8 +- +- Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. +- +-The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. +- +- +- +- +- +- +- +- RHEL-08-010292 - RHEL 8 must ensure the SSH server uses strong entropy. +- +- Red Hat Enterprise Linux 8 +- +- The most important characteristic of a random number generator is its randomness, namely its ability to deliver random numbers that are impossible to predict. Entropy in computer security is associated with the unpredictability of a source of randomness. The random source with high entropy tends to achieve a uniform distribution of random values. Random number generators are one of the most important building blocks of cryptosystems. +- +-The SSH implementation in RHEL8 uses the OPENSSL library, which does not use high-entropy sources by default. By using the SSH_USE_STRONG_RNG environment variable the OPENSSL random generator is reseeded from /dev/random. This setting is not recommended on computers without the hardware random generator because insufficient entropy causes the connection to be blocked until enough entropy is available. +- +- +- +- +- +- +- +- +- +- RHEL-08-010294 - The RHEL 8 operating system must implement DoD-approved TLS encryption in the OpenSSL package. +- +- Red Hat Enterprise Linux 8 +- +- Without cryptographic integrity protections, information can be altered by unauthorized users without detection. +- +-Remote access (e.g., RDP) is access to DoD nonpublic information systems by an authorized user (or an information system) communicating through an external, non-organization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. +- +-Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash. +- +-RHEL 8 incorporates system-wide crypto policies by default. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/openssl.config file. +- +- +- +- +- +- +- +- RHEL-08-010300 - RHEL 8 system commands must have mode 755 or less permissive. +- +- Red Hat Enterprise Linux 8 +- +- If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. +- +-This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. +- +- +- +- +- +- +- +- RHEL-08-010310 - RHEL 8 system commands must be owned by root. +- +- Red Hat Enterprise Linux 8 +- +- If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. +- +-This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. +- +- +- +- +- +- +- +- RHEL-08-010320 - RHEL 8 system commands must be group-owned by root or a system account. +- +- Red Hat Enterprise Linux 8 +- +- If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. +- +-This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. +- +- +- +- +- +- +- +- RHEL-08-010370 - RHEL 8 must prevent the installation of software, patches, service packs, device drivers, or operating system components from a repository without verification they have been digitally signed using a certificate that is issued by a Certificate Authority (CA) that is recognized and approved by the organization. +- +- Red Hat Enterprise Linux 8 +- +- Changes to any software components can have significant effects on the overall security of the operating system. This requirement ensures the software has not been tampered with and that it has been provided by a trusted vendor. +- +-Accordingly, patches, service packs, device drivers, or operating system components must be signed with a certificate recognized and approved by the organization. +- +-Verifying the authenticity of the software prior to installation validates the integrity of the patch or upgrade received from a vendor. This verifies the software has not been tampered with and that it has been provided by a trusted vendor. Self-signed certificates are disallowed by this requirement. The operating system should not have to verify the software again. This requirement does not mandate DoD certificates for this purpose; however, the certificate used to verify the software must be from an approved CA. +- +- +- +- +- +- +- +- +- RHEL-08-010371 - RHEL 8 must prevent the installation of software, patches, service packs, device drivers, or operating system components of local packages without verification they have been digitally signed using a certificate that is issued by a Certificate Authority (CA) that is recognized and approved by the organization. +- +- Red Hat Enterprise Linux 8 +- +- Changes to any software components can have significant effects on the overall security of the operating system. This requirement ensures the software has not been tampered with and that it has been provided by a trusted vendor. +- +-Accordingly, patches, service packs, device drivers, or operating system components must be signed with a certificate recognized and approved by the organization. +- +-Verifying the authenticity of the software prior to installation validates the integrity of the patch or upgrade received from a vendor. This verifies the software has not been tampered with and that it has been provided by a trusted vendor. Self-signed certificates are disallowed by this requirement. The operating system should not have to verify the software again. This requirement does not mandate DoD certificates for this purpose; however, the certificate used to verify the software must be from an approved CA. +- +- +- +- +- +- +- +- RHEL-08-010372 - RHEL 8 must prevent the loading of a new kernel for later execution. +- +- Red Hat Enterprise Linux 8 +- +- Changes to any software components can have significant effects on the overall security of the operating system. This requirement ensures the software has not been tampered with and that it has been provided by a trusted vendor. +-Disabling kexec_load prevents an unsigned kernel image (that could be a windows kernel or modified vulnerable kernel) from being loaded. Kexec can be used subvert the entire secureboot process and should be avoided at all costs especially since it can load unsigned kernel images. +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system. +- +- +- +- +- +- +- +- +- RHEL-08-010373 - RHEL 8 must enable kernel parameters to enforce discretionary access control on symlinks. +- +- Red Hat Enterprise Linux 8 +- +- Discretionary Access Control (DAC) is based on the notion that individual users are "owners" of objects and therefore have discretion over who should be authorized to access the object and in which mode (e.g., read or write). Ownership is usually acquired as a consequence of creating the object or via specified ownership assignment. DAC allows the owner to determine who will have access to objects they control. An example of DAC includes user-controlled file permissions. +- +-When discretionary access control policies are implemented, subjects are not constrained with regard to what actions they can take with information for which they have already been granted access. Thus, subjects that have been granted access to information are not prevented from passing (i.e., the subjects have the discretion to pass) the information to other subjects or objects. A subject that is constrained in its operation by Mandatory Access Control policies is still able to operate under the less rigorous constraints of this requirement. Thus, while Mandatory Access Control imposes constraints preventing a subject from passing information to another subject operating at a different sensitivity level, this requirement permits the subject to pass the information to any subject at the same sensitivity level. The policy is bounded by the information system boundary. Once the information is passed outside the control of the information system, additional means may be required to ensure the constraints remain in effect. While the older, more traditional definitions of discretionary access control require identity-based access control, that limitation is not required for this use of discretionary access control. +- +-By enabling the fs.protected_symlinks kernel parameter, symbolic links are permitted to be followed only when outside a sticky world-writable directory, or when the UID of the link and follower match, or when the directory owner matches the symlink's owner. Disallowing such symlinks helps mitigate vulnerabilities based on insecure file system accessed by privileged programs, avoiding an exploitation vector exploiting unsafe use of open() or creat(). +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a gien filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configurationfile on the system. +- +- +- +- +- +- +- +- +- RHEL-08-010374 - RHEL 8 must enable kernel parameters to enforce discretionary access control on hardlinks. +- +- Red Hat Enterprise Linux 8 +- +- Discretionary Access Control (DAC) is based on the notion that individual users are "owners" of objects and therefore have discretion over who should be authorized to access the object and in which mode (e.g., read or write). Ownership is usually acquired as a consequence of creating the object or via specified ownership assignment. DAC allows the owner to determine who will have access to objects they control. An example of DAC includes user-controlled file permissions. +- +-When discretionary access control policies are implemented, subjects are not constrained with regard to what actions they can take with information for which they have already been granted access. Thus, subjects that have been granted access to information are not prevented from passing (i.e., the subjects have the discretion to pass) the information to other subjects or objects. A subject that is constrained in its operation by Mandatory Access Control policies is still able to operate under the less rigorous constraints of this requirement. Thus, while Mandatory Access Control imposes constraints preventing a subject from passing information to another subject operating at a different sensitivity level, this requirement permits the subject to pass the information to any subject at the same sensitivity level. The policy is bounded by the information system boundary. Once the information is passed outside the control of the information system, additional means may be required to ensure the constraints remain in effect. While the older, more traditional definitions of discretionary access control require identity-based access control, that limitation is not required for this use of discretionary access control. +- +-By enabling the fs.protected_hardlinks kernel parameter, users can no longer create soft or hard links to files they do not own. Disallowing such hardlinks mitigate vulnerabilities based on insecure file system accessed by privileged programs, avoiding an exploitation vector exploiting unsafe use of open() or creat(). +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system. +- +- +- +- +- +- +- +- +- RHEL-08-010375 - RHEL 8 must restrict access to the kernel message buffer. +- +- Red Hat Enterprise Linux 8 +- +- Preventing unauthorized information transfers mitigates the risk of information, including encrypted representations of information, produced by the actions of prior users/roles (or the actions of processes acting on behalf of prior users/roles) from being available to any current users/roles (or current processes) that obtain access to shared system resources (e.g., registers, main memory, hard disks) after those resources have been released back to information systems. The control of information in shared resources is also commonly referred to as object reuse and residual information protection. +- +-This requirement generally applies to the design of an information technology product, but it can also apply to the configuration of particular information system components that are, or use, such products. This can be verified by acceptance/validation processes in DoD or other government agencies. +- +-There may be shared resources with configurable protections (e.g., files in storage) that may be assessed on specific information system components. +- +-Restricting access to the kernel message buffer limits access to only root. This prevents attackers from gaining additional system information as a non-privileged user. +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a gien filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configurationfile on the system. +- +- +- +- +- +- +- +- +- RHEL-08-010376 - RHEL 8 must prevent kernel profiling by unprivileged users. +- +- Red Hat Enterprise Linux 8 +- +- Preventing unauthorized information transfers mitigates the risk of information, including encrypted representations of information, produced by the actions of prior users/roles (or the actions of processes acting on behalf of prior users/roles) from being available to any current users/roles (or current processes) that obtain access to shared system resources (e.g., registers, main memory, hard disks) after those resources have been released back to information systems. The control of information in shared resources is also commonly referred to as object reuse and residual information protection. +- +-This requirement generally applies to the design of an information technology product, but it can also apply to the configuration of particular information system components that are, or use, such products. This can be verified by acceptance/validation processes in DoD or other government agencies. +- +-There may be shared resources with configurable protections (e.g., files in storage) that may be assessed on specific information system components. +- +-Setting the kernel.perf_event_paranoid kernel parameter to "2" prevents attackers from gaining additional system information as a non-privileged user. +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf +- +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system. +- +- +- +- ++FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules utilize authentication that meets DoD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system. ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-010380 - RHEL 8 must require users to provide a password for privilege escalation. ++ RHEL-08-010162 - The krb5-workstation package must not be installed on RHEL 8. + + Red Hat Enterprise Linux 8 + +- Without reauthentication, users may access resources or perform tasks for which they do not have authorization. ++ Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and DoD data may be compromised. + +-When operating systems provide the capability to escalate a functional capability, it is critical the user reauthenticate. ++RHEL 8 systems utilizing encryption are required to use FIPS-compliant mechanisms for authenticating to cryptographic modules. ++ ++Currently, Kerberos does not utilize FIPS 140-2 cryptography. ++ ++FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules utilize authentication that meets DoD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system. + +- +- +- ++ ++ ++ ++ + + +- ++ + +- RHEL-08-010381 - RHEL 8 must require users to reauthenticate for privilege escalation. ++ RHEL-08-010171 - RHEL 8 must have the policycoreutils package installed. + + Red Hat Enterprise Linux 8 + +- Without reauthentication, users may access resources or perform tasks for which they do not have authorization. ++ Without verification of the security functions, security functions may not operate correctly and the failure may go unnoticed. Security function is defined as the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Security functionality includes, but is not limited to, establishing system accounts, configuring access authorizations (i.e., permissions, privileges), setting events to be audited, and setting intrusion detection parameters. + +-When operating systems provide the capability to escalate a functional capability, it is critical the user reauthenticate. ++Policycoreutils contains the policy core utilities that are required for basic operation of an SELinux-enabled system. These utilities include load_policy to load SELinux policies, setfile to label filesystems, newrole to switch roles, and run_init to run /etc/init.d scripts in the proper context. + + +- +- ++ + + +- ++ + +- RHEL-08-010390 - RHEL 8 must have the packages required for multifactor authentication installed. ++ RHEL-08-010200 - RHEL 8 must be configured so that all network connections associated with SSH traffic are terminated at the end of the session or after 10 minutes of inactivity, except to fulfill documented and validated mission requirements. + + Red Hat Enterprise Linux 8 + +- Using an authentication device, such as a DoD Common Access Card (CAC) or token that is separate from the information system, ensures that even if the information system is compromised, credentials stored on the authentication device will not be affected. +- +-Multifactor solutions that require devices separate from information systems gaining access include, for example, hardware tokens providing time-based or challenge-response authenticators and smart cards such as the U.S. Government Personal Identity Verification (PIV) card and the DoD CAC. +- +-A privileged account is defined as an information system account with authorizations of a privileged user. ++ Terminating an idle SSH session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended. In addition, quickly terminating an idle SSH session will also free up resources committed by the managed network element. + +-Remote access is access to DoD nonpublic information systems by an authorized user (or an information system) communicating through an external, non-organization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. ++Terminating network connections associated with communications sessions includes, for example, de-allocating associated TCP/IP address/port pairs at the operating system level and de-allocating networking assignments at the application level if multiple application sessions are using a single operating system-level network connection. This does not mean that the operating system terminates all sessions or network access; it only ends the inactive session and releases the resources associated with that session. + +-This requirement only applies to components where this is specific to the function of the device or has the concept of an organizational user (e.g., VPN, proxy capability). This does not apply to authentication for the purpose of configuring the device itself (management). ++RHEL 8 utilizes /etc/ssh/sshd_config for configurations of OpenSSH. Within the sshd_config the product of the values of "ClientAliveInterval" and "ClientAliveCountMax" are used to establish the inactivity threshold. The "ClientAliveInterval" is a timeout interval in seconds after which if no data has been received from the client, sshd will send a message through the encrypted channel to request a response from the client. The "ClientAliveCountMax" is the number of client alive messages that may be sent without sshd receiving any messages back from the client. If this threshold is met, sshd will disconnect the client. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010440 - YUM must remove all software components after updated versions have been installed on RHEL 8. ++ RHEL-08-010210 - The RHEL 8 /var/log/messages file must have mode 0640 or less permissive. + + Red Hat Enterprise Linux 8 + +- Previous versions of software components that are not removed from the information system after updates have been installed may be exploited by adversaries. Some information technology products may remove older versions of software automatically from the information system. ++ Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. ++ ++The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. + + +- ++ + + +- ++ + +- RHEL-08-010450 - RHEL 8 must enable the SELinux targeted policy. ++ RHEL-08-010220 - The RHEL 8 /var/log/messages file must be owned by root. + + Red Hat Enterprise Linux 8 + +- Without verification of the security functions, security functions may not operate correctly and the failure may go unnoticed. Security function is defined as the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Security functionality includes, but is not limited to, establishing system accounts, configuring access authorizations (i.e., permissions, privileges), setting events to be audited, and setting intrusion detection parameters. ++ Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. + +-This requirement applies to operating systems performing security function verification/testing and/or systems and environments that require this functionality. ++The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. + + +- ++ + + +- ++ + +- RHEL-08-010460 - There must be no shosts.equiv files on the RHEL 8 operating system. ++ RHEL-08-010230 - The RHEL 8 /var/log/messages file must be group-owned by root. + + Red Hat Enterprise Linux 8 + +- The "shosts.equiv" files are used to configure host-based authentication for the system via SSH. Host-based authentication is not sufficient for preventing unauthorized access to the system, as it does not require interactive identification and authentication of a connection request, or for the use of two-factor authentication. ++ Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. ++ ++The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. + + +- ++ + + +- ++ + +- RHEL-08-010470 - There must be no .shosts files on the RHEL 8 operating system. ++ RHEL-08-010240 - The RHEL 8 /var/log directory must have mode 0755 or less permissive. + + Red Hat Enterprise Linux 8 + +- The ".shosts" files are used to configure host-based authentication for individual users or the system via SSH. Host-based authentication is not sufficient for preventing unauthorized access to the system, as it does not require interactive identification and authentication of a connection request, or for the use of two-factor authentication. ++ Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. ++ ++The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. + + +- ++ + + +- ++ + +- RHEL-08-010480 - The RHEL 8 SSH public host key files must have mode 0644 or less permissive. ++ RHEL-08-010250 - The RHEL 8 /var/log directory must be owned by root. + + Red Hat Enterprise Linux 8 + +- If a public host key file is modified by an unauthorized user, the SSH service may be compromised. ++ Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. ++ ++The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-010490 - The RHEL 8 SSH private host key files must have mode 0600 or less permissive. ++ RHEL-08-010260 - The RHEL 8 /var/log directory must be group-owned by root. + + Red Hat Enterprise Linux 8 + +- If an unauthorized user obtains the private SSH host key file, the host could be impersonated. ++ Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. ++ ++The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-010500 - The RHEL 8 SSH daemon must perform strict mode checking of home directory configuration files. ++ RHEL-08-010292 - RHEL 8 must ensure the SSH server uses strong entropy. + + Red Hat Enterprise Linux 8 + +- If other users have access to modify user-specific SSH configuration files, they may be able to log on to the system as another user. ++ The most important characteristic of a random number generator is its randomness, namely its ability to deliver random numbers that are impossible to predict. Entropy in computer security is associated with the unpredictability of a source of randomness. The random source with high entropy tends to achieve a uniform distribution of random values. Random number generators are one of the most important building blocks of cryptosystems. ++ ++The SSH implementation in RHEL8 uses the OPENSSL library, which does not use high-entropy sources by default. By using the SSH_USE_STRONG_RNG environment variable the OPENSSL random generator is reseeded from /dev/random. This setting is not recommended on computers without the hardware random generator because insufficient entropy causes the connection to be blocked until enough entropy is available. + +- +- +- ++ ++ ++ ++ + + +- ++ + +- RHEL-08-010510 - The RHEL 8 SSH daemon must not allow compression or must only allow compression after successful authentication. ++ RHEL-08-010294 - The RHEL 8 operating system must implement DoD-approved TLS encryption in the OpenSSL package. + + Red Hat Enterprise Linux 8 + +- If compression is allowed in an SSH connection prior to authentication, vulnerabilities in the compression software could result in compromise of the system from an unauthenticated connection, potentially with root privileges. ++ Without cryptographic integrity protections, information can be altered by unauthorized users without detection. ++ ++Remote access (e.g., RDP) is access to DoD nonpublic information systems by an authorized user (or an information system) communicating through an external, non-organization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. ++ ++Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash. ++ ++RHEL 8 incorporates system-wide crypto policies by default. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/openssl.config file. + +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-010520 - The RHEL 8 SSH daemon must not allow authentication using known hosts authentication. ++ RHEL-08-010300 - RHEL 8 system commands must have mode 755 or less permissive. + + Red Hat Enterprise Linux 8 + +- Configuring this setting for the SSH daemon provides additional assurance that remote logon via SSH will require a password, even in the event of misconfiguration elsewhere. ++ If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. ++ ++This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-010521 - The RHEL 8 SSH daemon must not allow Kerberos authentication, except to fulfill documented and validated mission requirements. ++ RHEL-08-010310 - RHEL 8 system commands must be owned by root. + + Red Hat Enterprise Linux 8 + +- Configuring these settings for the SSH daemon provides additional assurance that remote logon via SSH will not use Kerberos authentication, even in the event of misconfiguration elsewhere. ++ If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. ++ ++This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-010540 - RHEL 8 must use a separate file system for /var. ++ RHEL-08-010320 - RHEL 8 system commands must be group-owned by root or a system account. + + Red Hat Enterprise Linux 8 + +- The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. ++ If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. ++ ++This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. + + +- +- ++ + + +- ++ + +- RHEL-08-010541 - RHEL 8 must use a separate file system for /var/log. ++ RHEL-08-010370 - RHEL 8 must prevent the installation of software, patches, service packs, device drivers, or operating system components from a repository without verification they have been digitally signed using a certificate that is issued by a Certificate Authority (CA) that is recognized and approved by the organization. + + Red Hat Enterprise Linux 8 + +- The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. ++ Changes to any software components can have significant effects on the overall security of the operating system. This requirement ensures the software has not been tampered with and that it has been provided by a trusted vendor. ++ ++Accordingly, patches, service packs, device drivers, or operating system components must be signed with a certificate recognized and approved by the organization. ++ ++Verifying the authenticity of the software prior to installation validates the integrity of the patch or upgrade received from a vendor. This verifies the software has not been tampered with and that it has been provided by a trusted vendor. Self-signed certificates are disallowed by this requirement. The operating system should not have to verify the software again. This requirement does not mandate DoD certificates for this purpose; however, the certificate used to verify the software must be from an approved CA. + + +- +- ++ ++ + + +- ++ + +- RHEL-08-010542 - RHEL 8 must use a separate file system for the system audit data path. ++ RHEL-08-010371 - RHEL 8 must prevent the installation of software, patches, service packs, device drivers, or operating system components of local packages without verification they have been digitally signed using a certificate that is issued by a Certificate Authority (CA) that is recognized and approved by the organization. + + Red Hat Enterprise Linux 8 + +- The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. ++ Changes to any software components can have significant effects on the overall security of the operating system. This requirement ensures the software has not been tampered with and that it has been provided by a trusted vendor. ++ ++Accordingly, patches, service packs, device drivers, or operating system components must be signed with a certificate recognized and approved by the organization. ++ ++Verifying the authenticity of the software prior to installation validates the integrity of the patch or upgrade received from a vendor. This verifies the software has not been tampered with and that it has been provided by a trusted vendor. Self-signed certificates are disallowed by this requirement. The operating system should not have to verify the software again. This requirement does not mandate DoD certificates for this purpose; however, the certificate used to verify the software must be from an approved CA. + + +- +- ++ + + +- ++ + +- RHEL-08-010543 - A separate RHEL 8 filesystem must be used for the /tmp directory. ++ RHEL-08-010372 - RHEL 8 must prevent the loading of a new kernel for later execution. + + Red Hat Enterprise Linux 8 + +- The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. ++ Changes to any software components can have significant effects on the overall security of the operating system. This requirement ensures the software has not been tampered with and that it has been provided by a trusted vendor. ++Disabling kexec_load prevents an unsigned kernel image (that could be a windows kernel or modified vulnerable kernel) from being loaded. Kexec can be used subvert the entire secureboot process and should be avoided at all costs especially since it can load unsigned kernel images. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010550 - RHEL 8 must not permit direct logons to the root account using remote access via SSH. ++ RHEL-08-010373 - RHEL 8 must enable kernel parameters to enforce discretionary access control on symlinks. + + Red Hat Enterprise Linux 8 + +- Even though the communications channel may be encrypted, an additional layer of security is gained by extending the policy of not logging on directly as root. In addition, logging on with a user-specific account provides individual accountability of actions performed on the system. ++ Discretionary Access Control (DAC) is based on the notion that individual users are "owners" of objects and therefore have discretion over who should be authorized to access the object and in which mode (e.g., read or write). Ownership is usually acquired as a consequence of creating the object or via specified ownership assignment. DAC allows the owner to determine who will have access to objects they control. An example of DAC includes user-controlled file permissions. ++ ++When discretionary access control policies are implemented, subjects are not constrained with regard to what actions they can take with information for which they have already been granted access. Thus, subjects that have been granted access to information are not prevented from passing (i.e., the subjects have the discretion to pass) the information to other subjects or objects. A subject that is constrained in its operation by Mandatory Access Control policies is still able to operate under the less rigorous constraints of this requirement. Thus, while Mandatory Access Control imposes constraints preventing a subject from passing information to another subject operating at a different sensitivity level, this requirement permits the subject to pass the information to any subject at the same sensitivity level. The policy is bounded by the information system boundary. Once the information is passed outside the control of the information system, additional means may be required to ensure the constraints remain in effect. While the older, more traditional definitions of discretionary access control require identity-based access control, that limitation is not required for this use of discretionary access control. ++ ++By enabling the fs.protected_symlinks kernel parameter, symbolic links are permitted to be followed only when outside a sticky world-writable directory, or when the UID of the link and follower match, or when the directory owner matches the symlink's owner. Disallowing such symlinks helps mitigate vulnerabilities based on insecure file system accessed by privileged programs, avoiding an exploitation vector exploiting unsafe use of open() or creat(). ++ ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a gien filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf ++ ++Based on the information above, if a configuration file begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configurationfile on the system. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010560 - The auditd service must be running in RHEL 8. ++ RHEL-08-010374 - RHEL 8 must enable kernel parameters to enforce discretionary access control on hardlinks. + + Red Hat Enterprise Linux 8 + +- Configuring RHEL 8 to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. ++ Discretionary Access Control (DAC) is based on the notion that individual users are "owners" of objects and therefore have discretion over who should be authorized to access the object and in which mode (e.g., read or write). Ownership is usually acquired as a consequence of creating the object or via specified ownership assignment. DAC allows the owner to determine who will have access to objects they control. An example of DAC includes user-controlled file permissions. + +-Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example: registry settings; account, file, directory permission settings; and settings for functions, ports, protocols, services, and remote connections. ++When discretionary access control policies are implemented, subjects are not constrained with regard to what actions they can take with information for which they have already been granted access. Thus, subjects that have been granted access to information are not prevented from passing (i.e., the subjects have the discretion to pass) the information to other subjects or objects. A subject that is constrained in its operation by Mandatory Access Control policies is still able to operate under the less rigorous constraints of this requirement. Thus, while Mandatory Access Control imposes constraints preventing a subject from passing information to another subject operating at a different sensitivity level, this requirement permits the subject to pass the information to any subject at the same sensitivity level. The policy is bounded by the information system boundary. Once the information is passed outside the control of the information system, additional means may be required to ensure the constraints remain in effect. While the older, more traditional definitions of discretionary access control require identity-based access control, that limitation is not required for this use of discretionary access control. ++ ++By enabling the fs.protected_hardlinks kernel parameter, users can no longer create soft or hard links to files they do not own. Disallowing such hardlinks mitigate vulnerabilities based on insecure file system accessed by privileged programs, avoiding an exploitation vector exploiting unsafe use of open() or creat(). ++ ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf ++ ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010561 - The rsyslog service must be running in RHEL 8. ++ RHEL-08-010375 - RHEL 8 must restrict access to the kernel message buffer. + + Red Hat Enterprise Linux 8 + +- Configuring RHEL 8 to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. ++ Preventing unauthorized information transfers mitigates the risk of information, including encrypted representations of information, produced by the actions of prior users/roles (or the actions of processes acting on behalf of prior users/roles) from being available to any current users/roles (or current processes) that obtain access to shared system resources (e.g., registers, main memory, hard disks) after those resources have been released back to information systems. The control of information in shared resources is also commonly referred to as object reuse and residual information protection. + +-Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example: registry settings; account, file, directory permission settings; and settings for functions, ports, protocols, services, and remote connections. ++This requirement generally applies to the design of an information technology product, but it can also apply to the configuration of particular information system components that are, or use, such products. This can be verified by acceptance/validation processes in DoD or other government agencies. ++ ++There may be shared resources with configurable protections (e.g., files in storage) that may be assessed on specific information system components. ++ ++Restricting access to the kernel message buffer limits access to only root. This prevents attackers from gaining additional system information as a non-privileged user. ++ ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a gien filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf ++ ++Based on the information above, if a configuration file begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configurationfile on the system. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010571 - RHEL 8 must prevent files with the setuid and setgid bit set from being executed on the /boot directory. ++ RHEL-08-010376 - RHEL 8 must prevent kernel profiling by unprivileged users. + + Red Hat Enterprise Linux 8 + +- The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ Preventing unauthorized information transfers mitigates the risk of information, including encrypted representations of information, produced by the actions of prior users/roles (or the actions of processes acting on behalf of prior users/roles) from being available to any current users/roles (or current processes) that obtain access to shared system resources (e.g., registers, main memory, hard disks) after those resources have been released back to information systems. The control of information in shared resources is also commonly referred to as object reuse and residual information protection. ++ ++This requirement generally applies to the design of an information technology product, but it can also apply to the configuration of particular information system components that are, or use, such products. This can be verified by acceptance/validation processes in DoD or other government agencies. ++ ++There may be shared resources with configurable protections (e.g., files in storage) that may be assessed on specific information system components. ++ ++Setting the kernel.perf_event_paranoid kernel parameter to "2" prevents attackers from gaining additional system information as a non-privileged user. ++ ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf ++ ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system. + +- +- +- +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010580 - RHEL 8 must prevent special devices on non-root local partitions. ++ RHEL-08-010380 - RHEL 8 must require users to provide a password for privilege escalation. + + Red Hat Enterprise Linux 8 + +- The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. The only legitimate location for device files is the /dev directory located on the root partition. ++ Without reauthentication, 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 the user reauthenticate. + + +- +- ++ ++ + + +- ++ + +- RHEL-08-010630 - RHEL 8 must prevent code from being executed on file systems that are imported via Network File System (NFS). ++ RHEL-08-010381 - RHEL 8 must require users to reauthenticate for privilege escalation. + + Red Hat Enterprise Linux 8 + +- The "noexec" mount option causes the system not to execute binary files. This option must be used for mounting any file system not containing approved binary as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ Without reauthentication, 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 the user reauthenticate. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010640 - RHEL 8 must prevent special devices on file systems that are imported via Network File System (NFS). ++ RHEL-08-010390 - RHEL 8 must have the packages required for multifactor authentication installed. + + Red Hat Enterprise Linux 8 + +- The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ Using an authentication device, such as a DoD Common Access Card (CAC) or token that is separate from the information system, ensures that even if the information system is compromised, credentials stored on the authentication device will not be affected. ++ ++Multifactor solutions that require devices separate from information systems gaining access include, for example, hardware tokens providing time-based or challenge-response authenticators and smart cards such as the U.S. Government Personal Identity Verification (PIV) card and the DoD CAC. ++ ++A privileged account is defined as an information system account with authorizations of a privileged user. ++ ++Remote access is access to DoD nonpublic information systems by an authorized user (or an information system) communicating through an external, non-organization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. ++ ++This requirement only applies to components where this is specific to the function of the device or has the concept of an organizational user (e.g., VPN, proxy capability). This does not apply to authentication for the purpose of configuring the device itself (management). + + +- +- ++ + + +- ++ + +- RHEL-08-010650 - RHEL 8 must prevent files with the setuid and setgid bit set from being executed on file systems that are imported via Network File System (NFS). ++ RHEL-08-010440 - YUM must remove all software components after updated versions have been installed on RHEL 8. + + Red Hat Enterprise Linux 8 + +- The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. ++ Previous versions of software components that are not removed from the information system after updates have been installed may be exploited by adversaries. Some information technology products may remove older versions of software automatically from the information system. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-010671 - RHEL 8 must disable the kernel.core_pattern. ++ RHEL-08-010450 - RHEL 8 must enable the SELinux targeted policy. + + Red Hat Enterprise Linux 8 + +- It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. +-/etc/sysctl.d/*.conf +-/run/sysctl.d/*.conf +-/usr/local/lib/sysctl.d/*.conf +-/usr/lib/sysctl.d/*.conf +-/lib/sysctl.d/*.conf +-/etc/sysctl.conf ++ Without verification of the security functions, security functions may not operate correctly and the failure may go unnoticed. Security function is defined as the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Security functionality includes, but is not limited to, establishing system accounts, configuring access authorizations (i.e., permissions, privileges), setting events to be audited, and setting intrusion detection parameters. + +-Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system. ++This requirement applies to operating systems performing security function verification/testing and/or systems and environments that require this functionality. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-010673 - RHEL 8 must disable core dumps for all users. ++ RHEL-08-010460 - There must be no shosts.equiv files on the RHEL 8 operating system. + + Red Hat Enterprise Linux 8 + +- It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers trying to debug problems. ++ The "shosts.equiv" files are used to configure host-based authentication for the system via SSH. Host-based authentication is not sufficient for preventing unauthorized access to the system, as it does not require interactive identification and authentication of a connection request, or for the use of two-factor authentication. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-010674 - RHEL 8 must disable storing core dumps. ++ RHEL-08-010470 - There must be no .shosts files on the RHEL 8 operating system. + + Red Hat Enterprise Linux 8 + +- It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers trying to debug problems. ++ The ".shosts" files are used to configure host-based authentication for individual users or the system via SSH. Host-based authentication is not sufficient for preventing unauthorized access to the system, as it does not require interactive identification and authentication of a connection request, or for the use of two-factor authentication. + + +- ++ + + +- ++ + +- RHEL-08-010675 - RHEL 8 must disable core dump backtraces. ++ RHEL-08-010480 - The RHEL 8 SSH public host key files must have mode 0644 or less permissive. + + Red Hat Enterprise Linux 8 + +- It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. +- +-A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers trying to debug problems. ++ If a public host key file is modified by an unauthorized user, the SSH service may be compromised. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010760 - All RHEL 8 local interactive user accounts must be assigned a home directory upon creation ++ RHEL-08-010490 - The RHEL 8 SSH private host key files must have mode 0600 or less permissive. + + Red Hat Enterprise Linux 8 + +- If local interactive users are not assigned a valid home directory, there is no place for the storage and control of files they should own. ++ If an unauthorized user obtains the private SSH host key file, the host could be impersonated. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-010830 - RHEL 8 must not allow users to override SSH environment variables. ++ RHEL-08-010500 - The RHEL 8 SSH daemon must perform strict mode checking of home directory configuration files. + + Red Hat Enterprise Linux 8 + +- SSH environment options potentially allow users to bypass access restriction in some configurations. ++ If other users have access to modify user-specific SSH configuration files, they may be able to log on to the system as another user. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020010 - RHEL 8 must automatically lock an account when three unsuccessful logon attempts occur. ++ RHEL-08-010510 - The RHEL 8 SSH daemon must not allow compression or must only allow compression after successful authentication. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. +- +-From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ If compression is allowed in an SSH connection prior to authentication, vulnerabilities in the compression software could result in compromise of the system from an unauthenticated connection, potentially with root privileges. + +- +- +- +- +- +- +- +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020011 - RHEL 8 must automatically lock an account when three unsuccessful logon attempts occur. ++ RHEL-08-010520 - The RHEL 8 SSH daemon must not allow authentication using known hosts authentication. + + Red Hat Enterprise Linux 8 + +- In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. +- +-From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ Configuring this setting for the SSH daemon provides additional assurance that remote logon via SSH will require a password, even in the event of misconfiguration elsewhere. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020012 - RHEL 8 must automatically lock an account when three unsuccessful logon attempts occur during a 15-minute time period. ++ RHEL-08-010521 - The RHEL 8 SSH daemon must not allow Kerberos authentication, except to fulfill documented and validated mission requirements. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. +- +-From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ Configuring these settings for the SSH daemon provides additional assurance that remote logon via SSH will not use Kerberos authentication, even in the event of misconfiguration elsewhere. + +- +- +- +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020013 - RHEL 8 must automatically lock an account when three unsuccessful logon attempts occur during a 15-minute time period. ++ RHEL-08-010540 - RHEL 8 must use a separate file system for /var. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. +- +-From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020014 - RHEL 8 must automatically lock an account until the locked account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. ++ RHEL-08-010541 - RHEL 8 must use a separate file system for /var/log. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. +- +-From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. + +- +- +- +- +- +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020015 - RHEL 8 must automatically lock an account until the locked account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. ++ RHEL-08-010542 - RHEL 8 must use a separate file system for the system audit data path. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. +- +-From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020018 - RHEL 8 must prevent system messages from being presented when three unsuccessful logon attempts occur. ++ RHEL-08-010543 - A separate RHEL 8 filesystem must be used for the /tmp directory. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. +- +-From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. + +- +- +- +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020019 - RHEL 8 must prevent system messages from being presented when three unsuccessful logon attempts occur. ++ RHEL-08-010550 - RHEL 8 must not permit direct logons to the root account using remote access via SSH. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. +- +-From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ Even though the communications channel may be encrypted, an additional layer of security is gained by extending the policy of not logging on directly as root. In addition, logging on with a user-specific account provides individual accountability of actions performed on the system. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020020 - RHEL 8 must log user name information when unsuccessful logon attempts occur. ++ RHEL-08-010560 - The auditd service must be running in RHEL 8. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. ++ Configuring RHEL 8 to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. + +-From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example: registry settings; account, file, directory permission settings; and settings for functions, ports, protocols, services, and remote connections. + +- +- +- +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020021 - RHEL 8 must prevent system messages from being presented when three unsuccessful logon attempts occur. ++ RHEL-08-010561 - The rsyslog service must be running in RHEL 8. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. ++ Configuring RHEL 8 to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. + +-From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example: registry settings; account, file, directory permission settings; and settings for functions, ports, protocols, services, and remote connections. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020022 - RHEL 8 must include root when automatically locking an account until the locked account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. ++ RHEL-08-010571 - RHEL 8 must prevent files with the setuid and setgid bit set from being executed on the /boot directory. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. +- +-From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +- +- +- +- +- ++ ++ ++ ++ ++ + + + +- ++ + +- RHEL-08-020023 - RHEL 8 must include root when automatically locking an account until the locked account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. ++ RHEL-08-010580 - RHEL 8 must prevent special devices on non-root local partitions. + + Red Hat Enterprise Linux 8 + +- By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. +- +-In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. +- +-From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. ++ The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. The only legitimate location for device files is the /dev directory located on the root partition. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020024 - RHEL 8 must limit the number of concurrent sessions to ten for all accounts and/or account types. ++ RHEL-08-010630 - RHEL 8 must prevent code from being executed on file systems that are imported via Network File System (NFS). + + Red Hat Enterprise Linux 8 + +- Operating system management includes the ability to control the number of users and user sessions that utilize an operating system. Limiting the number of allowed users and sessions per user is helpful in reducing the risks related to DoS attacks. +- +-This requirement addresses concurrent sessions for information system accounts and does not address concurrent sessions by single users via multiple system accounts. The maximum number of concurrent sessions should be defined based on mission needs and the operational environment for each system. ++ The "noexec" mount option causes the system not to execute binary files. This option must be used for mounting any file system not containing approved binary as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020040 - RHEL 8 must enable a user session lock until that user re-establishes access using established identification and authentication procedures for command line sessions. ++ RHEL-08-010640 - RHEL 8 must prevent special devices on file systems that are imported via Network File System (NFS). + + Red Hat Enterprise Linux 8 + +- 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 log out because of the temporary nature of the absence. +- +-The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. +- +-Tmux is a terminal multiplexer that enables a number of terminals to be created, accessed, and controlled from a single screen. Red Hat endorses tmux as the recommended session controlling package. ++ The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + + +- ++ ++ + + +- ++ + +- RHEL-08-020041 - RHEL 8 must ensure session control is automatically started at shell initialization. ++ RHEL-08-010650 - RHEL 8 must prevent files with the setuid and setgid bit set from being executed on file systems that are imported via Network File System (NFS). + + Red Hat Enterprise Linux 8 + +- 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 log out because of the temporary nature of the absence. +- +-The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. +- +-Tmux is a terminal multiplexer that enables a number of terminals to be created, accessed, and controlled from a single screen. Red Hat endorses tmux as the recommended session controlling package. ++ The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020042 - RHEL 8 must prevent users from disabling session control mechanisms. ++ RHEL-08-010671 - RHEL 8 must disable the kernel.core_pattern. + + Red Hat Enterprise Linux 8 + +- 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 log out because of the temporary nature of the absence. ++ It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. ++The sysctl --system command will load settings from all system configuration files. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Files are read from directories in the following list from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. ++/etc/sysctl.d/*.conf ++/run/sysctl.d/*.conf ++/usr/local/lib/sysctl.d/*.conf ++/usr/lib/sysctl.d/*.conf ++/lib/sysctl.d/*.conf ++/etc/sysctl.conf + +-Tmux is a terminal multiplexer that enables a number of terminals to be created, accessed, and controlled from a single screen. Red Hat endorses tmux as the recommended session controlling package. ++Based on the information above, if a configuration file that begins with "99-" is created in the "/etc/sysctl.d/" directory, it will take precedence over any other configuration file on the system. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020100 - RHEL 8 must ensure a password complexity module is enabled. ++ RHEL-08-010673 - RHEL 8 must disable core dumps for all users. + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. +- +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. This is set in both: +-/etc/pam.d/password-auth +-/etc/pam.d/system-auth ++ It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-Note the value of "retry" set in these configuration files should be between "1" and "3". Manual changes to the listed files may be overwritten by the "authselect" program. ++A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers trying to debug problems. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020110 - RHEL 8 must enforce password complexity by requiring that at least one uppercase character be used. ++ RHEL-08-010674 - RHEL 8 must disable storing core dumps. + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. +- +-Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. ++ It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-RHEL 8 utilizes pwquality as a mechanism to enforce password complexity. Note that in order to require uppercase characters, without degrading the "minlen" value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf". ++A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers trying to debug problems. + + +- ++ + + +- ++ + +- RHEL-08-020120 - RHEL 8 must enforce password complexity by requiring that at least one lower-case character be used. ++ RHEL-08-010675 - RHEL 8 must disable core dump backtraces. + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. +- +-Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. ++ It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + +-RHEL 8 utilizes pwquality as a mechanism to enforce password complexity. Note that in order to require lower-case characters without degrading the "minlen" value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf". ++A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers trying to debug problems. + + +- ++ + + +- ++ + +- RHEL-08-020130 - RHEL 8 must enforce password complexity by requiring that at least one numeric character be used. ++ RHEL-08-010760 - All RHEL 8 local interactive user accounts must be assigned a home directory upon creation + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. +- +-Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. +- +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. Note that in order to require numeric characters, without degrading the minlen value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf". ++ If local interactive users are not assigned a valid home directory, there is no place for the storage and control of files they should own. + + +- ++ + + +- ++ + +- RHEL-08-020140 - RHEL 8 must require the maximum number of repeating characters of the same character class be limited to four when passwords are changed. ++ RHEL-08-010830 - RHEL 8 must not allow users to override SSH environment variables. + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. +- +-Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. +- +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The "maxclassrepeat" option sets the maximum number of allowed same consecutive characters in the same class in the new password. ++ SSH environment options potentially allow users to bypass access restriction in some configurations. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020150 - RHEL 8 must require the maximum number of repeating characters be limited to three when passwords are changed. ++ RHEL-08-020010 - RHEL 8 must automatically lock an account when three unsuccessful logon attempts occur. + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. + +-Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. ++RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. + +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The "maxrepeat" option sets the maximum number of allowed same consecutive characters in a new password. ++From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-020160 - RHEL 8 must require the change of at least four character classes when passwords are changed. ++ RHEL-08-020011 - RHEL 8 must automatically lock an account when three unsuccessful logon attempts occur. + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. +- +-Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. ++ In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. + +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The "minclass" option sets the minimum number of required classes of characters for the new password (digits, uppercase, lowercase, others). ++From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020170 - RHEL 8 must require the change of at least 8 characters when passwords are changed. ++ RHEL-08-020012 - RHEL 8 must automatically lock an account when three unsuccessful logon attempts occur during a 15-minute time period. + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. + +-Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. ++RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. + +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The "difok" option sets the number of characters in a password that must not be present in the old password. ++From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-020180 - RHEL 8 passwords must have a 24 hours/1 day minimum password lifetime restriction in /etc/shadow. ++ RHEL-08-020013 - RHEL 8 must automatically lock an account when three unsuccessful logon attempts occur during a 15-minute time period. + + Red Hat Enterprise Linux 8 + +- Enforcing a minimum password lifetime helps to prevent repeated password changes to defeat the password reuse or history enforcement requirement. If users are allowed to immediately and continually change their password, the password could be repeatedly changed in a short period of time to defeat the organization's policy regarding password reuse. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. ++ ++In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. ++ ++From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020190 - RHEL 8 passwords for new users or password changes must have a 24 hours/1 day minimum password lifetime restriction in /etc/logins.def. ++ RHEL-08-020014 - RHEL 8 must automatically lock an account until the locked account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. + + Red Hat Enterprise Linux 8 + +- Enforcing a minimum password lifetime helps to prevent repeated password changes to defeat the password reuse or history enforcement requirement. If users are allowed to immediately and continually change their password, the password could be repeatedly changed in a short period of time to defeat the organization's policy regarding password reuse. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. ++ ++RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. ++ ++From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-020200 - RHEL 8 user account passwords must have a 60-day maximum password lifetime restriction. ++ RHEL-08-020015 - RHEL 8 must automatically lock an account until the locked account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. + + Red Hat Enterprise Linux 8 + +- Any password, no matter how complex, can eventually be cracked. Therefore, passwords need to be changed periodically. If RHEL 8 does not limit the lifetime of passwords and force users to change their passwords, there is the risk that RHEL 8 passwords could be compromised. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. ++ ++In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. ++ ++From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020210 - RHEL 8 user account passwords must be configured so that existing passwords are restricted to a 60-day maximum lifetime. ++ RHEL-08-020018 - RHEL 8 must prevent system messages from being presented when three unsuccessful logon attempts occur. + + Red Hat Enterprise Linux 8 + +- Any password, no matter how complex, can eventually be cracked. Therefore, passwords need to be changed periodically. If RHEL 8 does not limit the lifetime of passwords and force users to change their passwords, there is the risk that RHEL 8 passwords could be compromised. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. ++ ++RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. ++ ++From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- +- +- +- ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-020220 - RHEL 8 passwords must be prohibited from reuse for a minimum of five generations. ++ RHEL-08-020019 - RHEL 8 must prevent system messages from being presented when three unsuccessful logon attempts occur. + + Red Hat Enterprise Linux 8 + +- Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. If the information system or application allows the user to reuse their password consecutively when that password has exceeded its defined lifetime, the end result is a password that is not changed per policy requirements. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. + +-RHEL 8 utilizes "pwquality" consecutively as a mechanism to enforce password complexity. This is set in both: +-/etc/pam.d/password-auth +-/etc/pam.d/system-auth. ++In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. + +-Note that manual changes to the listed files may be overwritten by the "authselect" program. ++From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020230 - RHEL 8 passwords must have a minimum of 15 characters. ++ RHEL-08-020020 - RHEL 8 must log user name information when unsuccessful logon attempts occur. + + Red Hat Enterprise Linux 8 + +- The shorter the password, the lower the number of possible combinations that need to be tested before the password is compromised. +- +-Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. Password length is one factor of several that helps to determine strength and how long it takes to crack a password. Use of more characters in a password helps to increase exponentially the time and/or resources required to compromise the password. +- +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. Configurations are set in the "etc/security/pwquality.conf" file. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. + +-The "minlen", sometimes noted as minimum length, acts as a "score" of complexity based on the credit components of the "pwquality" module. By setting the credit components to a negative value, not only will those components be required, they will not count towards the total "score" of "minlen". This will enable "minlen" to require a 15-character minimum. ++RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. + +-The DoD minimum password requirement is 15 characters. ++From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-020231 - RHEL 8 passwords for new users must have a minimum of 15 characters. ++ RHEL-08-020021 - RHEL 8 must prevent system messages from being presented when three unsuccessful logon attempts occur. + + Red Hat Enterprise Linux 8 + +- The shorter the password, the lower the number of possible combinations that need to be tested before the password is compromised. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. + +-Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. Password length is one factor of several that helps to determine strength and how long it takes to crack a password. Use of more characters in a password helps to increase exponentially the time and/or resources required to compromise the password. ++In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. + +-The DoD minimum password requirement is 15 characters. ++From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020260 - RHEL 8 account identifiers (individuals, groups, roles, and devices) must be disabled after 35 days of inactivity. ++ RHEL-08-020022 - RHEL 8 must include root when automatically locking an account until the locked account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. + + Red Hat Enterprise Linux 8 + +- Inactive identifiers pose a risk to systems and applications because attackers may exploit an inactive identifier and potentially obtain undetected access to the system. Owners of inactive accounts will not notice if unauthorized access to their user account has been obtained. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. + +-RHEL 8 needs to track periods of inactivity and disable application identifiers after 35 days of inactivity. ++RHEL 8 can utilize the "pam_faillock.so" for this purpose. Note that manual changes to the listed files may be overwritten by the "authselect" program. ++ ++From "Pam_Faillock" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-020280 - All RHEL 8 passwords must contain at least one special character. ++ RHEL-08-020023 - RHEL 8 must include root when automatically locking an account until the locked account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. + + Red Hat Enterprise Linux 8 + +- Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. ++ By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account. + +-Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. ++In RHEL 8.2 the "/etc/security/faillock.conf" file was incorporated to centralize the configuration of the pam_faillock.so module. Also introduced is a "local_users_only" option that will only track failed user authentication attempts for local users in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users to allow the centralized platform to solely manage user lockout. + +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. Note that to require special characters without degrading the "minlen" value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf". ++From "faillock.conf" man pages: Note that the default directory that "pam_faillock" uses is usually cleared on system boot so the access will be also re-enabled after system reboot. If that is undesirable a different tally directory must be set with the "dir" option. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020300 - RHEL 8 must prevent the use of dictionary words for passwords. ++ RHEL-08-020024 - RHEL 8 must limit the number of concurrent sessions to ten for all accounts and/or account types. + + Red Hat Enterprise Linux 8 + +- If RHEL 8 allows the user to select passwords based on dictionary words, this increases the chances of password compromise by increasing the opportunity for successful guesses, and brute-force attacks. ++ Operating system management includes the ability to control the number of users and user sessions that utilize an operating system. Limiting the number of allowed users and sessions per user is helpful in reducing the risks related to DoS attacks. ++ ++This requirement addresses concurrent sessions for information system accounts and does not address concurrent sessions by single users via multiple system accounts. The maximum number of concurrent sessions should be defined based on mission needs and the operational environment for each system. + + +- ++ ++ + + +- ++ + +- RHEL-08-020310 - RHEL 8 must enforce a delay of at least four seconds between logon prompts following a failed logon attempt. ++ RHEL-08-020040 - RHEL 8 must enable a user session lock until that user re-establishes access using established identification and authentication procedures for command line sessions. + + Red Hat Enterprise Linux 8 + +- Configuring the operating system to implement organization-wide security implementation guides and security checklists verifies compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. ++ 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 log out because of the temporary nature of the absence. + +-Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example, registry settings; account, file, and directory permission settings; and settings for functions, ports, protocols, services, and remote connections. ++The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. ++ ++Tmux is a terminal multiplexer that enables a number of terminals to be created, accessed, and controlled from a single screen. Red Hat endorses tmux as the recommended session controlling package. + + +- ++ + + +- ++ + +- RHEL-08-020330 - RHEL 8 must not have accounts configured with blank or null passwords. ++ RHEL-08-020041 - RHEL 8 must ensure session control is automatically started at shell initialization. + + Red Hat Enterprise Linux 8 + +- If an account has an empty password, anyone could log on and run commands with the privileges of that account. Accounts with empty passwords should never be used in operational environments. ++ 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 log out because of the temporary nature of the absence. ++ ++The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. ++ ++Tmux is a terminal multiplexer that enables a number of terminals to be created, accessed, and controlled from a single screen. Red Hat endorses tmux as the recommended session controlling package. + +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-020350 - RHEL 8 must display the date and time of the last successful account logon upon an SSH logon. ++ RHEL-08-020042 - RHEL 8 must prevent users from disabling session control mechanisms. + + Red Hat Enterprise Linux 8 + +- Providing users with feedback on when account accesses via SSH last occurred facilitates user recognition and reporting of unauthorized account use. ++ 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 log out because of the temporary nature of the absence. ++ ++The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. ++ ++Tmux is a terminal multiplexer that enables a number of terminals to be created, accessed, and controlled from a single screen. Red Hat endorses tmux as the recommended session controlling package. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-020351 - RHEL 8 must define default permissions for all authenticated users in such a way that the user can only read and modify their own files. ++ RHEL-08-020100 - RHEL 8 must ensure the password complexity module is enabled in the password-auth file. + + Red Hat Enterprise Linux 8 + +- Setting the most restrictive default permissions ensures that when new accounts are created, they do not have unnecessary access. ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. ++ ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth + + +- ++ + + +- ++ + +- RHEL-08-030000 - The RHEL 8 audit system must be configured to audit the execution of privileged functions and prevent all software from executing at higher privilege levels than users executing the software. ++ RHEL-08-020110 - RHEL 8 must enforce password complexity by requiring that at least one uppercase character be used. + + Red Hat Enterprise Linux 8 + +- Misuse of privileged functions, either intentionally or unintentionally by authorized users, or by unauthorized external entities that have compromised information system accounts, is a serious and ongoing concern and can have significant adverse impacts on organizations. Auditing the use of privileged functions is one way to detect such misuse and identify the risk from insider threats and the advanced persistent threat. ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. ++ ++Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. ++ ++RHEL 8 utilizes pwquality as a mechanism to enforce password complexity. Note that in order to require uppercase characters, without degrading the "minlen" value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf". + + +- +- +- +- +- ++ + + +- ++ + +- RHEL-08-030020 - The RHEL 8 System Administrator (SA) and Information System Security Officer (ISSO) (at a minimum) must be alerted of an audit processing failure event. ++ RHEL-08-020120 - RHEL 8 must enforce password complexity by requiring that at least one lower-case character be used. + + Red Hat Enterprise Linux 8 + +- It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected. ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + +-Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded. ++Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +-This requirement applies to each audit data storage repository (i.e., distinct information system component where audit records are stored), the centralized audit storage capacity of organizations (i.e., all audit data storage repositories combined), or both. ++RHEL 8 utilizes pwquality as a mechanism to enforce password complexity. Note that in order to require lower-case characters without degrading the "minlen" value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf". + + +- ++ + + +- ++ + +- RHEL-08-030040 - The RHEL 8 System must take appropriate action when an audit processing failure occurs. ++ RHEL-08-020130 - RHEL 8 must enforce password complexity by requiring that at least one numeric character be used. + + Red Hat Enterprise Linux 8 + +- It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected. ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + +-Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded. ++Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +-This requirement applies to each audit data storage repository (i.e., distinct information system component where audit records are stored), the centralized audit storage capacity of organizations (i.e., all audit data storage repositories combined), or both. ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. Note that in order to require numeric characters, without degrading the minlen value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf". + + +- ++ + + +- ++ + +- RHEL-08-030050 - The RHEL 8 System Administrator (SA) and Information System Security Officer (ISSO) (at a minimum) must be alerted when the audit storage volume is full. ++ RHEL-08-020140 - RHEL 8 must require the maximum number of repeating characters of the same character class be limited to four when passwords are changed. + + Red Hat Enterprise Linux 8 + +- It is critical that when RHEL 8 is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. +- +-When availability is an overriding concern, other approved actions in response to an audit failure are as follows: ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + +-1) If the failure was caused by the lack of audit record storage capacity, RHEL 8 must continue generating audit records if possible (automatically restarting the audit service if necessary) and overwriting the oldest audit records in a first-in-first-out manner. ++Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +-2) If audit records are sent to a centralized collection server and communication with this server is lost or the server fails, RHEL 8 must queue audit records locally until communication is restored or until the audit records are retrieved manually. Upon restoration of the connection to the centralized collection server, action should be taken to synchronize the local audit data with the collection server. ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The "maxclassrepeat" option sets the maximum number of allowed same consecutive characters in the same class in the new password. + + +- ++ + + +- ++ + +- RHEL-08-030060 - The RHEL 8 audit system must take appropriate action when the audit storage volume is full. ++ RHEL-08-020150 - RHEL 8 must require the maximum number of repeating characters be limited to three when passwords are changed. + + Red Hat Enterprise Linux 8 + +- It is critical that when RHEL 8 is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. +- +-When availability is an overriding concern, other approved actions in response to an audit failure are as follows: ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + +-1) If the failure was caused by the lack of audit record storage capacity, RHEL 8 must continue generating audit records if possible (automatically restarting the audit service if necessary) and overwriting the oldest audit records in a first-in-first-out manner. ++Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +-2) If audit records are sent to a centralized collection server and communication with this server is lost or the server fails, RHEL 8 must queue audit records locally until communication is restored or until the audit records are retrieved manually. Upon restoration of the connection to the centralized collection server, action should be taken to synchronize the local audit data with the collection server. ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The "maxrepeat" option sets the maximum number of allowed same consecutive characters in a new password. + + +- ++ + + +- ++ + +- RHEL-08-030061 - The RHEL 8 audit system must audit local events. ++ RHEL-08-020160 - RHEL 8 must require the change of at least four character classes when passwords are changed. + + Red Hat Enterprise Linux 8 + +- Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + +-Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. ++Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. ++ ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The "minclass" option sets the minimum number of required classes of characters for the new password (digits, uppercase, lowercase, others). + + +- ++ + + +- ++ + +- RHEL-08-030062 - RHEL 8 must label all off-loaded audit logs before sending them to the central log server. ++ RHEL-08-020170 - RHEL 8 must require the change of at least 8 characters when passwords are changed. + + Red Hat Enterprise Linux 8 + +- Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. +- +-Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + +-Enriched logging is needed to determine who, what, and when events occur on a system. Without this, determining root cause of an event will be much more difficult. ++Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +-When audit logs are not labeled before they are sent to a central log server, the audit data will not be able to be analyzed and tied back to the correct system. ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The "difok" option sets the number of characters in a password that must not be present in the old password. + + +- ++ + + +- ++ + +- RHEL-08-030063 - RHEL 8 must resolve audit information before writing to disk. ++ RHEL-08-020180 - RHEL 8 passwords must have a 24 hours/1 day minimum password lifetime restriction in /etc/shadow. + + Red Hat Enterprise Linux 8 + +- Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. +- +-Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. +- +-Enriched logging aids in making sense of who, what, and when events occur on a system. Without this, determining root cause of an event will be much more difficult. ++ Enforcing a minimum password lifetime helps to prevent repeated password changes to defeat the password reuse or history enforcement requirement. If users are allowed to immediately and continually change their password, the password could be repeatedly changed in a short period of time to defeat the organization's policy regarding password reuse. + + +- ++ ++ + + +- ++ + +- RHEL-08-030070 - RHEL 8 audit logs must have a mode of 0600 or less permissive to prevent unauthorized read access. ++ RHEL-08-020190 - RHEL 8 passwords for new users or password changes must have a 24 hours/1 day minimum password lifetime restriction in /etc/logins.def. + + Red Hat Enterprise Linux 8 + +- Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. +- +-The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. ++ Enforcing a minimum password lifetime helps to prevent repeated password changes to defeat the password reuse or history enforcement requirement. If users are allowed to immediately and continually change their password, the password could be repeatedly changed in a short period of time to defeat the organization's policy regarding password reuse. + + +- ++ + + +- ++ + +- RHEL-08-030080 - RHEL 8 audit logs must be owned by root to prevent unauthorized read access. ++ RHEL-08-020200 - RHEL 8 user account passwords must have a 60-day maximum password lifetime restriction. + + Red Hat Enterprise Linux 8 + +- Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. +- +-The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. ++ Any password, no matter how complex, can eventually be cracked. Therefore, passwords need to be changed periodically. If RHEL 8 does not limit the lifetime of passwords and force users to change their passwords, there is the risk that RHEL 8 passwords could be compromised. + + +- ++ + + +- ++ + +- RHEL-08-030090 - RHEL 8 audit logs must be group-owned by root to prevent unauthorized read access. ++ RHEL-08-020210 - RHEL 8 user account passwords must be configured so that existing passwords are restricted to a 60-day maximum lifetime. + + Red Hat Enterprise Linux 8 + +- Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. +- +-Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 activity. ++ Any password, no matter how complex, can eventually be cracked. Therefore, passwords need to be changed periodically. If RHEL 8 does not limit the lifetime of passwords and force users to change their passwords, there is the risk that RHEL 8 passwords could be compromised. + + +- ++ ++ ++ ++ + + +- ++ + +- RHEL-08-030100 - RHEL 8 audit log directory must be owned by root to prevent unauthorized read access. ++ RHEL-08-020220 - RHEL 8 must be configured in the password-auth file to prohibit password reuse for a minimum of five generations. + + Red Hat Enterprise Linux 8 + +- Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. ++ Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. If the information system or application allows the user to reuse their password consecutively when that password has exceeded its defined lifetime, the end result is a password that is not changed per policy requirements. + +-Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 activity. ++RHEL 8 utilizes "pwhistory" consecutively as a mechanism to prohibit password reuse. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth. ++ ++Note that manual changes to the listed files may be overwritten by the "authselect" program. + + +- ++ + + +- ++ + +- RHEL-08-030110 - RHEL 8 audit log directory must be group-owned by root to prevent unauthorized read access. ++ RHEL-08-020230 - RHEL 8 passwords must have a minimum of 15 characters. + + Red Hat Enterprise Linux 8 + +- Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. ++ The shorter the password, the lower the number of possible combinations that need to be tested before the password is compromised. + +-Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 activity. ++Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. Password length is one factor of several that helps to determine strength and how long it takes to crack a password. Use of more characters in a password helps to increase exponentially the time and/or resources required to compromise the password. ++ ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. Configurations are set in the "etc/security/pwquality.conf" file. ++ ++The "minlen", sometimes noted as minimum length, acts as a "score" of complexity based on the credit components of the "pwquality" module. By setting the credit components to a negative value, not only will those components be required, they will not count towards the total "score" of "minlen". This will enable "minlen" to require a 15-character minimum. ++ ++The DoD minimum password requirement is 15 characters. + + +- ++ + + +- ++ + +- RHEL-08-030120 - RHEL 8 audit log directory must have a mode of 0700 or less permissive to prevent unauthorized read access. ++ RHEL-08-020231 - RHEL 8 passwords for new users must have a minimum of 15 characters. + + Red Hat Enterprise Linux 8 + +- Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. ++ The shorter the password, the lower the number of possible combinations that need to be tested before the password is compromised. + +-Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 system activity. ++Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. Password length is one factor of several that helps to determine strength and how long it takes to crack a password. Use of more characters in a password helps to increase exponentially the time and/or resources required to compromise the password. ++ ++The DoD minimum password requirement is 15 characters. + + +- ++ + + +- ++ + +- RHEL-08-030121 - RHEL 8 audit system must protect auditing rules from unauthorized change. ++ RHEL-08-020260 - RHEL 8 account identifiers (individuals, groups, roles, and devices) must be disabled after 35 days of inactivity. + + Red Hat Enterprise Linux 8 + +- Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. +- +-Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 system activity. ++ Inactive identifiers pose a risk to systems and applications because attackers may exploit an inactive identifier and potentially obtain undetected access to the system. Owners of inactive accounts will not notice if unauthorized access to their user account has been obtained. + +-In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. A system reboot would be noticeable and a system administrator could then investigate the unauthorized changes. ++RHEL 8 needs to track periods of inactivity and disable application identifiers after 35 days of inactivity. + + +- ++ + + +- ++ + +- RHEL-08-030122 - RHEL 8 audit system must protect logon UIDs from unauthorized change. ++ RHEL-08-020280 - All RHEL 8 passwords must contain at least one special character. + + Red Hat Enterprise Linux 8 + +- Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. ++ Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + +-Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 system activity. ++Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +-In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. A system reboot would be noticeable and a system administrator could then investigate the unauthorized changes. ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. Note that to require special characters without degrading the "minlen" value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf". + + +- ++ + + +- ++ + +- RHEL-08-030130 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/shadow. ++ RHEL-08-020300 - RHEL 8 must prevent the use of dictionary words for passwords. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). ++ If RHEL 8 allows the user to select passwords based on dictionary words, this increases the chances of password compromise by increasing the opportunity for successful guesses, and brute-force attacks. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-030140 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/security/opasswd. ++ RHEL-08-020310 - RHEL 8 must enforce a delay of at least four seconds between logon prompts following a failed logon attempt. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Configuring the operating system to implement organization-wide security implementation guides and security checklists verifies compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). ++Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example, registry settings; account, file, and directory permission settings; and settings for functions, ports, protocols, services, and remote connections. + + +- +- ++ + + +- ++ + +- RHEL-08-030150 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/passwd. ++ RHEL-08-020330 - RHEL 8 must not have accounts configured with blank or null passwords. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). ++ If an account has an empty password, anyone could log on and run commands with the privileges of that account. Accounts with empty passwords should never be used in operational environments. + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-030160 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/gshadow. ++ RHEL-08-020350 - RHEL 8 must display the date and time of the last successful account logon upon an SSH logon. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). ++ Providing users with feedback on when account accesses via SSH last occurred facilitates user recognition and reporting of unauthorized account use. + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-030170 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/group. ++ RHEL-08-020351 - RHEL 8 must define default permissions for all authenticated users in such a way that the user can only read and modify their own files. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). ++ Setting the most restrictive default permissions ensures that when new accounts are created, they do not have unnecessary access. + + +- +- ++ + + +- ++ + +- RHEL-08-030171 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/sudoers. ++ RHEL-08-030000 - The RHEL 8 audit system must be configured to audit the execution of privileged functions and prevent all software from executing at higher privilege levels than users executing the software. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). ++ Misuse of privileged functions, either intentionally or unintentionally by authorized users, or by unauthorized external entities that have compromised information system accounts, is a serious and ongoing concern and can have significant adverse impacts on organizations. Auditing the use of privileged functions is one way to detect such misuse and identify the risk from insider threats and the advanced persistent threat. + + +- +- ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-030172 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/sudoers.d/. ++ RHEL-08-030020 - The RHEL 8 System Administrator (SA) and Information System Security Officer (ISSO) (at a minimum) must be alerted of an audit processing failure event. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). ++Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded. ++ ++This requirement applies to each audit data storage repository (i.e., distinct information system component where audit records are stored), the centralized audit storage capacity of organizations (i.e., all audit data storage repositories combined), or both. + + +- +- ++ + + +- ++ + +- RHEL-08-030180 - The RHEL 8 audit package must be installed. ++ RHEL-08-030040 - The RHEL 8 System must take appropriate action when an audit processing failure occurs. + + Red Hat Enterprise Linux 8 + +- Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. ++ It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected. + +-Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. ++Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded. + +-Associating event types with detected events in RHEL 8 audit logs provides a means of investigating an attack, recognizing resource utilization or capacity thresholds, or identifying an improperly configured RHEL 8 system. ++This requirement applies to each audit data storage repository (i.e., distinct information system component where audit records are stored), the centralized audit storage capacity of organizations (i.e., all audit data storage repositories combined), or both. + + +- ++ + + +- ++ + +- RHEL-08-030190 - Successful/unsuccessful uses of the su command in RHEL 8 must generate an audit record. ++ RHEL-08-030060 - The RHEL 8 audit system must take appropriate action when the audit storage volume is full. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ It is critical that when RHEL 8 is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "su" command allows a user to run commands with a substitute user and group ID. ++When availability is an overriding concern, other approved actions in response to an audit failure are as follows: + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++1) If the failure was caused by the lack of audit record storage capacity, RHEL 8 must continue generating audit records if possible (automatically restarting the audit service if necessary) and overwriting the oldest audit records in a first-in-first-out manner. ++ ++2) If audit records are sent to a centralized collection server and communication with this server is lost or the server fails, RHEL 8 must queue audit records locally until communication is restored or until the audit records are retrieved manually. Upon restoration of the connection to the centralized collection server, action should be taken to synchronize the local audit data with the collection server. + + +- +- ++ + + +- ++ + +- RHEL-08-030200 - The RHEL 8 audit system must be configured to audit any usage of the lremovexattr system call. ++ RHEL-08-030061 - The RHEL 8 audit system must audit local events. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Lremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from symbolic links. ++ Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. + + +- +- +- +- +- ++ + + +- ++ + +- RHEL-08-030210 - The RHEL 8 audit system must be configured to audit any usage of the removexattr system call ++ RHEL-08-030062 - RHEL 8 must label all off-loaded audit logs before sending them to the central log server. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Removexattr" is a system call that removes extended attributes. ++Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Enriched logging is needed to determine who, what, and when events occur on a system. Without this, determining root cause of an event will be much more difficult. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210 ++When audit logs are not labeled before they are sent to a central log server, the audit data will not be able to be analyzed and tied back to the correct system. + + +- +- +- +- +- ++ + + +- ++ + +- RHEL-08-030220 - The RHEL 8 audit system must be configured to audit any usage of the lsetxattr system call. ++ RHEL-08-030063 - RHEL 8 must resolve audit information before writing to disk. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Lsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a symbolic link. ++Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Enriched logging aids in making sense of who, what, and when events occur on a system. Without this, determining root cause of an event will be much more difficult. + + +- +- +- +- +- ++ + + +- ++ + +- RHEL-08-030230 - The RHEL 8 audit system must be configured to audit any usage of the fsetxattr system call ++ RHEL-08-030070 - RHEL 8 audit logs must have a mode of 0600 or less permissive to prevent unauthorized read access. + + Red Hat Enterprise Linux 8 + +- Audit records can be generated from various components within the information system (e.g., module or policy filter). "Fsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a file. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The auid representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219 ++The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. + + +- +- +- +- +- ++ + + +- ++ + +- RHEL-08-030240 - The RHEL 8 audit system must be configured to audit any usage of the fremovexattr system call ++ RHEL-08-030080 - RHEL 8 audit logs must be owned by root to prevent unauthorized read access. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Fremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from a file. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the RHEL 8 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210 ++The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements. + + +- +- +- +- +- ++ + + +- ++ + +- RHEL-08-030250 - Successful/unsuccessful uses of the chage command in RHEL 8 must generate an audit record ++ RHEL-08-030090 - RHEL 8 audit logs must be group-owned by root to prevent unauthorized read access. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chage" command is used to change or view user password expiry information. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215 ++Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 activity. + + +- +- ++ + + +- ++ + +- RHEL-08-030260 - Successful/unsuccessful uses of the chcon command in RHEL 8 must generate an audit record ++ RHEL-08-030100 - RHEL 8 audit log directory must be owned by root to prevent unauthorized read access. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chcon" command is used to change file SELinux security context. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215 ++Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 activity. + + +- +- ++ + + +- ++ + +- RHEL-08-030270 - The RHEL 8 audit system must be configured to audit any usage of the setxattr system call. ++ RHEL-08-030110 - RHEL 8 audit log directory must be group-owned by root to prevent unauthorized read access. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Setxattr" is a system call used to set an extended attribute value. ++ Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 activity. + + +- +- +- +- +- ++ + + +- ++ + +- RHEL-08-030280 - Successful/unsuccessful uses of the ssh-agent in RHEL 8 must generate an audit record. ++ RHEL-08-030120 - RHEL 8 audit log directory must have a mode of 0700 or less permissive to prevent unauthorized read access. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "ssh-agent" is a program to hold private keys used for public key authentication. ++ Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 system activity. + + +- +- ++ + + +- ++ + +- RHEL-08-030290 - Successful/unsuccessful uses of the passwd command in RHEL 8 must generate an audit record. ++ RHEL-08-030121 - RHEL 8 audit system must protect auditing rules from unauthorized change. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "passwd" command is used to change passwords for user accounts. ++Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 system activity. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. A system reboot would be noticeable and a system administrator could then investigate the unauthorized changes. + + +- +- ++ + + +- ++ + +- RHEL-08-030300 - Successful/unsuccessful uses of the mount command in RHEL 8 must generate an audit record. ++ RHEL-08-030122 - RHEL 8 audit system must protect logon UIDs from unauthorized change. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "mount" command is used to mount a filesystem. ++Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit RHEL 8 system activity. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. A system reboot would be noticeable and a system administrator could then investigate the unauthorized changes. + + +- +- ++ + + +- ++ + +- RHEL-08-030301 - Successful/unsuccessful uses of the umount command in RHEL 8 must generate an audit record. ++ RHEL-08-030130 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/shadow. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "umount" command is used to unmount a filesystem. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030302 - Successful/unsuccessful uses of the mount syscall in RHEL 8 must generate an audit record. ++ RHEL-08-030140 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/security/opasswd. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "mount" syscall is used to mount a filesystem. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + + + +- +- ++ + + +- ++ + +- RHEL-08-030310 - Successful/unsuccessful uses of the unix_update in RHEL 8 must generate an audit record. ++ RHEL-08-030150 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/passwd. + + Red Hat Enterprise Linux 8 + +- Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. +- +-At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. "Unix_update" is a helper program for the "pam_unix" module that updates the password for a given user. It is not intended to be run directly from the command line and logs a security violation if done so. ++ Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030311 - Successful/unsuccessful uses of postdrop in RHEL 8 must generate an audit record. ++ RHEL-08-030160 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/gshadow. + + Red Hat Enterprise Linux 8 + +- Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. +- +-At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "postdrop" command creates a file in the maildrop directory and copies its standard input to the file. ++ Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030312 - Successful/unsuccessful uses of postqueue in RHEL 8 must generate an audit record. ++ RHEL-08-030170 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/group. + + Red Hat Enterprise Linux 8 + +- Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. +- +-At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "postqueue" command implements the Postfix user interface for queue management. ++ Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030313 - Successful/unsuccessful uses of semanage in RHEL 8 must generate an audit record. ++ RHEL-08-030171 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/sudoers. + + Red Hat Enterprise Linux 8 + +- Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. +- +-At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "semanage" command is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. ++ Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + + + +- ++ + + +- ++ + +- RHEL-08-030314 - Successful/unsuccessful uses of setfiles in RHEL 8 must generate an audit record. ++ RHEL-08-030172 - RHEL 8 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/sudoers.d/. + + Red Hat Enterprise Linux 8 + +- Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. +- +-At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "setfiles" command is primarily used to initialize the security context fields (extended attributes) on one or more filesystems (or parts of them). Usually it is initially run as part of the SELinux installation process (a step commonly known as labeling). ++ Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). + + + +- ++ + + +- ++ + +- RHEL-08-030315 - Successful/unsuccessful uses of userhelper in RHEL 8 must generate an audit record. ++ RHEL-08-030180 - The RHEL 8 audit package must be installed. + + Red Hat Enterprise Linux 8 + +- Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. ++ Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. + +-At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "userhelper" command is not intended to be run interactively. "Userhelper" provides a basic interface to change a user's password, gecos information, and shell. The main difference between this program and its traditional equivalents (passwd, chfn, chsh) is that prompts are written to standard out to make it easy for a graphical user interface wrapper to interface to it as a child process. ++Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Associating event types with detected events in RHEL 8 audit logs provides a means of investigating an attack, recognizing resource utilization or capacity thresholds, or identifying an improperly configured RHEL 8 system. + + +- +- ++ + + +- ++ + +- RHEL-08-030316 - Successful/unsuccessful uses of setsebool in RHEL 8 must generate an audit record. ++ RHEL-08-030190 - Successful/unsuccessful uses of the su command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. ++ Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "setsebool" command sets the current state of a particular SELinux boolean or a list of booleans to a given value. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "su" command allows a user to run commands with a substitute user and group ID. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030317 - Successful/unsuccessful uses of unix_chkpwd in RHEL 8 must generate an audit record. ++ RHEL-08-030200 - The RHEL 8 audit system must be configured to audit any usage of the setxattr, fsetxattr, lsetxattr, removexattr, fremovexattr and lremovexattr system calls. + + Red Hat Enterprise Linux 8 + +- Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. ++ Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "unix_chkpwd" command is a helper program for the pam_unix module that verifies the password of the current user. It also checks password and account expiration dates in shadow. It is not intended to be run directly from the command line and logs a security violation if done so. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). "Setxattr" is a system call used to set an extended attribute value. ++"Fsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a file. ++"Lsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a symbolic link. ++"Removexattr" is a system call that removes extended attributes. ++"Fremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from a file. ++"Lremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from symbolic links. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++The system call rules are loaded into a matching engine that intercepts each syscall that all programs on the system makes. Therefore, it is very important to only use syscall rules when you have to since these affect performance. The more rules, the bigger the performance hit. You can help the performance, though, by combining syscalls into one rule whenever possible. + + + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-030320 - Successful/unsuccessful uses of the ssh-keysign in RHEL 8 must generate an audit record. ++ RHEL-08-030250 - Successful/unsuccessful uses of the chage command in RHEL 8 must generate an audit record + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "ssh-keysign" program is an SSH helper program for host-based authentication. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chage" command is used to change or view user password expiry information. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215 + + + +- ++ + + +- ++ + +- RHEL-08-030330 - Successful/unsuccessful uses of the setfacl command in RHEL 8 must generate an audit record. ++ RHEL-08-030260 - Successful/unsuccessful uses of the chcon command in RHEL 8 must generate an audit record + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "setfacl" command is used to set file access control lists. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chcon" command is used to change file SELinux security context. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215 + + + +- ++ + + +- ++ + +- RHEL-08-030340 - Successful/unsuccessful uses of the pam_timestamp_check command in RHEL 8 must generate an audit record. ++ RHEL-08-030280 - Successful/unsuccessful uses of the ssh-agent in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "pam_timestamp_check" command is used to check if the default timestamp is valid. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "ssh-agent" is a program to hold private keys used for public key authentication. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030350 - Successful/unsuccessful uses of the newgrp command in RHEL 8 must generate an audit record. ++ RHEL-08-030290 - Successful/unsuccessful uses of the passwd command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "newgrp" command is used to change the current group ID during a login session. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "passwd" command is used to change passwords for user accounts. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- ++ + + +- ++ + +- RHEL-08-030360 - Successful/unsuccessful uses of the init_module command in RHEL 8 must generate an audit record. ++ RHEL-08-030300 - Successful/unsuccessful uses of the mount command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "init_module" command is used to load a kernel module. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "mount" command is used to mount a filesystem. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ + + +- ++ + +- RHEL-08-030361 - Successful/unsuccessful uses of the rename command in RHEL 8 must generate an audit record. ++ RHEL-08-030301 - Successful/unsuccessful uses of the umount command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rename" command will rename the specified files by replacing the first occurrence of expression in their name by replacement. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "umount" command is used to unmount a filesystem. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ + + +- ++ + +- RHEL-08-030362 - Successful/unsuccessful uses of the renameat command in RHEL 8 must generate an audit record. ++ RHEL-08-030302 - Successful/unsuccessful uses of the mount syscall in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "renameat" command renames a file, moving it between directories if required. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "mount" syscall is used to mount a filesystem. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + +- +- +- ++ ++ ++ + + +- ++ + +- RHEL-08-030363 - Successful/unsuccessful uses of the rmdir command in RHEL 8 must generate an audit record. ++ RHEL-08-030310 - Successful/unsuccessful uses of the unix_update in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rmdir" command removes empty directories. ++At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. "Unix_update" is a helper program for the "pam_unix" module that updates the password for a given user. It is not intended to be run directly from the command line and logs a security violation if done so. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ + + +- ++ + +- RHEL-08-030364 - Successful/unsuccessful uses of the unlink command in RHEL 8 must generate an audit record. ++ RHEL-08-030311 - Successful/unsuccessful uses of postdrop in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "unlink" command deletes a name from the filesystem. If that name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse. ++At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "postdrop" command creates a file in the maildrop directory and copies its standard input to the file. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ + + +- ++ + +- RHEL-08-030365 - Successful/unsuccessful uses of the unlinkat command in RHEL 8 must generate an audit record. ++ RHEL-08-030312 - Successful/unsuccessful uses of postqueue in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "unlinkat" system call operates in exactly the same way as either "unlink" or "rmdir" except for the differences described in the manual page. ++At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "postqueue" command implements the Postfix user interface for queue management. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ + + +- ++ + +- RHEL-08-030370 - Successful/unsuccessful uses of the gpasswd command in RHEL 8 must generate an audit record. ++ RHEL-08-030313 - Successful/unsuccessful uses of semanage in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "gpasswd" command is used to administer /etc/group and /etc/gshadow. Every group can have administrators, members and a password. ++At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "semanage" command is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030380 - Successful/unsuccessful uses of the finit_module command in RHEL 8 must generate an audit record. ++ RHEL-08-030314 - Successful/unsuccessful uses of setfiles in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "finit_module" command is used to load a kernel module. ++At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "setfiles" command is primarily used to initialize the security context fields (extended attributes) on one or more filesystems (or parts of them). Usually it is initially run as part of the SELinux installation process (a step commonly known as labeling). + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-030390 - Successful/unsuccessful uses of the delete_module command in RHEL 8 must generate an audit record. ++ RHEL-08-030315 - Successful/unsuccessful uses of userhelper in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "delete_module" command is used to unload a kernel module. ++At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "userhelper" command is not intended to be run interactively. "Userhelper" provides a basic interface to change a user's password, gecos information, and shell. The main difference between this program and its traditional equivalents (passwd, chfn, chsh) is that prompts are written to standard out to make it easy for a graphical user interface wrapper to interface to it as a child process. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + +- +- +- ++ ++ + + +- ++ + +- RHEL-08-030400 - Successful/unsuccessful uses of the crontab command in RHEL 8 must generate an audit record. ++ RHEL-08-030316 - Successful/unsuccessful uses of setsebool in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "crontab" command is used to maintain crontab files for individual users. Crontab is the program used to install, remove, or list the tables used to drive the cron daemon. This is similar to the task scheduler used in other operating systems. ++At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "setsebool" command sets the current state of a particular SELinux boolean or a list of booleans to a given value. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030410 - Successful/unsuccessful uses of the chsh command in RHEL 8 must generate an audit record. ++ RHEL-08-030317 - Successful/unsuccessful uses of unix_chkpwd in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + +- Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chsh" command is used to change the login shell. ++At a minimum, the organization must audit the full-text recording of privileged commands. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. The "unix_chkpwd" command is a helper program for the pam_unix module that verifies the password of the current user. It also checks password and account expiration dates in shadow. It is not intended to be run directly from the command line and logs a security violation if done so. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- ++ + + +- ++ + +- RHEL-08-030420 - Successful/unsuccessful uses of the truncate command in RHEL 8 must generate an audit record. ++ RHEL-08-030320 - Successful/unsuccessful uses of the ssh-keysign in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "ssh-keysign" program is an SSH helper program for host-based authentication. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- +- +- ++ + + +- ++ + +- RHEL-08-030430 - Successful/unsuccessful uses of the openat system call in RHEL 8 must generate an audit record. ++ RHEL-08-030330 - Successful/unsuccessful uses of the setfacl command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "openat" system call opens a file specified by a relative pathname. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "setfacl" command is used to set file access control lists. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- +- +- ++ + + +- ++ + +- RHEL-08-030440 - Successful/unsuccessful uses of the open system call in RHEL 8 must generate an audit record. ++ RHEL-08-030340 - Successful/unsuccessful uses of the pam_timestamp_check command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "open system" call opens a file specified by a pathname. If the specified file does not exist, it may optionally be created by "open". ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "pam_timestamp_check" command is used to check if the default timestamp is valid. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + +- +- +- +- +- ++ ++ + + +- ++ + +- RHEL-08-030450 - Successful/unsuccessful uses of the open_by_handle_at system call in RHEL 8 must generate an audit record. ++ RHEL-08-030350 - Successful/unsuccessful uses of the newgrp command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "name_to_handle_at" and "open_by_handle_at" system calls split the functionality of openat into two parts: "name_to_handle_at" returns an opaque handle that corresponds to a specified file; "open_by_handle_at" opens the file corresponding to a handle returned by a previous call to "name_to_handle_at" and returns an open file descriptor. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "newgrp" command is used to change the current group ID during a login session. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- +- +- ++ + + +- ++ + +- RHEL-08-030460 - Successful/unsuccessful uses of the ftruncate command in RHEL 8 must generate an audit record. ++ RHEL-08-030360 - Successful/unsuccessful uses of the init_module and finit_module command system calls in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "init_module" and "finit_module" command system calls is are used to load a kernel module. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++The system call rules are loaded into a matching engine that intercepts each syscall that all programs on the system makes. Therefore, it is very important to only use syscall rules when you have to since these affect performance. The more rules, the bigger the performance hit. You can help the performance, though, by combining syscalls into one rule whenever possible. + + + +- +- +- +- ++ ++ ++ ++ + + +- ++ + +- RHEL-08-030470 - Successful/unsuccessful uses of the creat system call in RHEL 8 must generate an audit record. ++ RHEL-08-030361 - Successful/unsuccessful uses of the rename, unlink, rmdir, renameat and unlinkat commandsystem calls in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "creat" system call is used to open and possibly create a file or device. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rename" command system call will rename the specified files by replacing the first occurrence of expression in their name by replacement. ++The "unlink" system call deletes a name from the filesystem. If that name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse. ++The "rmdir" system call removes empty directories. ++The "renameat" system call renames a file, moving it between directories if required. ++The "unlinkat" system call operates in exactly the same way as either "unlink" or "rmdir" except for the differences described in the manual page. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++The system call rules are loaded into a matching engine that intercepts each syscall that all programs on the system makes. Therefore, it is very important to only use syscall rules when you have to since these affect performance. The more rules, the bigger the performance hit. You can help the performance, though, by combining syscalls into one rule whenever possible. + + +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-030480 - Successful/unsuccessful uses of the chown command in RHEL 8 must generate an audit record. ++ RHEL-08-030370 - Successful/unsuccessful uses of the gpasswd command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chown" command is used to change file owner and group. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "gpasswd" command is used to administer /etc/group and /etc/gshadow. Every group can have administrators, members and a password. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ + + +- ++ + +- RHEL-08-030490 - Successful/unsuccessful uses of the chmod command in RHEL 8 must generate an audit record. ++ RHEL-08-030390 - Successful/unsuccessful uses of the delete_module command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chmod" command changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "delete_module" command is used to unload a kernel module. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ ++ + + +- ++ + +- RHEL-08-030500 - Successful/unsuccessful uses of the lchown system call in RHEL 8 must generate an audit record. ++ RHEL-08-030400 - Successful/unsuccessful uses of the crontab command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "lchown" system call is used to change the ownership of the file specified by a path, which does not dereference symbolic links. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "crontab" command is used to maintain crontab files for individual users. Crontab is the program used to install, remove, or list the tables used to drive the cron daemon. This is similar to the task scheduler used in other operating systems. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ + + +- ++ + +- RHEL-08-030510 - Successful/unsuccessful uses of the fchownat system call in RHEL 8 must generate an audit record. ++ RHEL-08-030410 - Successful/unsuccessful uses of the chsh command in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchownat" system call is used to change ownership of a file relative to a directory file descriptor. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chsh" command is used to change the login shell. + + When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. + + + +- +- ++ + + +- ++ + +- RHEL-08-030520 - Successful/unsuccessful uses of the fchown system call in RHEL 8 must generate an audit record. ++ RHEL-08-030420 - Successful/unsuccessful uses of the truncate, ftruncate, creat, open, openat, and open_by_handle_at system calls in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchown" system call is used to change the ownership of a file referred to by the open file descriptor. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. ++The "creat" system call is used to open and possibly create a file or device. ++The "open" system call opens a file specified by a pathname. If the specified file does not exist, it may optionally be created by "open". ++The "openat" system call opens a file specified by a relative pathname. ++The "name_to_handle_at" and "open_by_handle_at" system calls split the functionality of openat into two parts: "name_to_handle_at" returns an opaque handle that corresponds to a specified file; "open_by_handle_at" opens the file corresponding to a handle returned by a previous call to "name_to_handle_at" and returns an open file descriptor. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++The system call rules are loaded into a matching engine that intercepts each syscall that all programs on the system makes. Therefore, it is very important to only use syscall rules when you have to since these affect performance. The more rules, the bigger the performance hit. You can help the performance, though, by combining syscalls into one rule whenever possible. + + + +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-030530 - Successful/unsuccessful uses of the fchmodat system call in RHEL 8 must generate an audit record. ++ RHEL-08-030480 - Successful/unsuccessful uses of the chown, fchown, fchownat and lchown system calls in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchmodat" system call is used to change permissions of a file relative to a directory file descriptor. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). ++The "chown" command is used to change file owner and group. ++The "fchown" system call is used to change the ownership of a file referred to by the open file descriptor. ++The "fchownat" system call is used to change ownership of a file relative to a directory file descriptor. ++The "lchown" system call is used to change the ownership of the file specified by a path, which does not dereference symbolic links. + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++The system call rules are loaded into a matching engine that intercepts each syscall that all programs on the system makes. Therefore, it is very important to only use syscall rules when you have to since these affect performance. The more rules, the bigger the performance hit. You can help the performance, though, by combining syscalls into one rule whenever possible. + + + +- +- ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + +- RHEL-08-030540 - Successful/unsuccessful uses of the fchmod system call in RHEL 8 must generate an audit record. ++ RHEL-08-030490 - Successful/unsuccessful uses of the chmod, fchmod and fchmodat system calls in RHEL 8 must generate an audit record. + + Red Hat Enterprise Linux 8 + + Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchmod" system call is used to change permissions of a file. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++Audit records can be generated from various components within the information system (e.g., module or policy filter). ++The "chmod" command system call changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits. ++The "fchmod" system call is used to change permissions of a file. ++The "fchmodat" system call is used to change permissions of a file relative to a directory file descriptor. ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++The system call rules are loaded into a matching engine that intercepts each syscall that all programs on the system makes. Therefore, it is very important to only use syscall rules when you have to since these affect performance. The more rules, the bigger the performance hit. You can help the performance, though, by combining syscalls into one rule whenever possible. + + + ++ ++ ++ ++ + + + +@@ -13550,7 +12310,7 @@ If a privileged user were to log on using this service, the privileged user pass + + + +- ++ + + RHEL-08-040021 - RHEL 8 must disable the asynchronous transfer mode (ATM) protocol. + +@@ -13563,8 +12323,8 @@ Failing to disconnect unused protocols can result in a system compromise. + The Asynchronous Transfer Mode (ATM) is a protocol operating on network, data link, and physical layers, based on virtual circuits and virtual paths. Disabling ATM protects the system against exploitation of any laws in its implementation. + + +- +- ++ ++ + + + +@@ -14594,7 +13354,7 @@ FIPS 140-2 is the current standard for validating that mechanisms used to access + + + +- ++ + + RHEL-08-010383 - RHEL 8 must use the invoking user's password for privilege escalation when using "sudo". + +@@ -14604,21 +13364,21 @@ FIPS 140-2 is the current standard for validating that mechanisms used to access + For more information on each of the listed configurations, reference the sudoers(5) manual page. + + +- ++ + + + +- ++ + + + +- ++ + + + + + +- ++ + + RHEL-08-010384 - RHEL 8 must require re-authentication when using the "sudo" command. + +@@ -14630,7 +13390,7 @@ When operating systems provide the capability to escalate a functional capabilit + + If the value is set to an integer less than 0, the user's time stamp will not expire and the user will not have to re-authenticate for privileged actions until the user's session is terminated. + +- ++ + + + +@@ -14651,9 +13411,19 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- ++ + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -14678,10 +13448,14 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- ++ + + + ++ ++ ++ ++ + + + +@@ -14768,10 +13542,24 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- ++ + + ++ ++ ++ ++ ++ ++ ++ ++ + ++ ++ ++ ++ ++ ++ + + + +@@ -15141,19 +13929,17 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- ++ + + ++ ++ ++ + + + +- ++ + +- +- +- +- +- + + + +@@ -15216,11 +14002,7 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- +- +- +- +- ++ + + + +@@ -15245,6 +14027,10 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + ++ ++ ++ ++ + + + +@@ -15282,11 +14068,6 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- +- +- +- +- + + + +@@ -15736,7 +14517,7 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- ++ + + + +@@ -16093,29 +14874,29 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + + +- ++ + + + +@@ -16155,6 +14936,12 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*CPE_NAME="cpe:/o:redhat:enterprise_linux:8\.(\d+)\b + 1 + ++ ++ /etc ++ os-release ++ ^\s*PRETTY_NAME="Red Hat Enterprise Linux 8\.(\d+)\b ++ 1 ++ + + /proc/sys/crypto/fips_enabled + ^(\d+)$ +@@ -16182,10 +14969,14 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + oval:mil.disa.stig.rhel8:ste:10401 + + +- +- /etc/pam.d +- password-auth +- ^[ \t]*password[ \t]+sufficient[ \t]+pam_unix\.so(?:[ \t]+|(?:[ \t][^#\r\f\n]+[ \t]))rounds=([\d]+)(?:[ \t]|$) ++ ++ /etc/login.defs ++ ^\s*SHA_CRYPT_MIN_ROUNDS\s+(\d+)\b ++ 1 ++ ++ ++ /etc/login.defs ++ ^\s*SHA_CRYPT_MAX_ROUNDS\s+(\d+)\b + 1 + + +@@ -16256,9 +15047,22 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^[ \t]*SSH_USE_STRONG_RNG[ \t]*=[ \t]*32[ \t]*$ + 1 + +- ++ ++ crypto-policies ++ ++ ++ /etc/crypto-policies/back-ends/opensslcnf.config ++ ^\s*MinProtocol\s*=\s*([\.\w]+)\s*(?:#.*)?$ ++ 1 ++ ++ ++ /etc/crypto-policies/back-ends/opensslcnf.config ++ ^\s*TLS\.MinProtocol\s*=\s*([\.\w]+)\s*(?:#.*)?$ ++ 1 ++ ++ + /etc/crypto-policies/back-ends/opensslcnf.config +- ^\s*MinProtocol\s*=\s*(\S+)\s*(?:#.*)?$ ++ ^\s*DTLS\.MinProtocol\s*=\s*([\.\w]+)\s*(?:#.*)?$ + 1 + + +@@ -16687,25 +15491,25 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*set\s+-g\s+lock-command\s+vlock\s*(?:#.*)?$ + 1 + +- +- /etc/bashrc +- ^\s*\[\s+-n\s+"\$PS1"\s+-a\s+-z\s+"\$TMUX"\s+\]\s+&&\s+exec\s+tmux\s*(?:#.*)?$ ++ ++ /etc/profile.d ++ \.sh$ ++ ^\s*if\s+\[\s*"\$PS1"\s*\];\s+then\s+parent=\$\(ps\s+-o\s+ppid=\s+-p\s+\$\$\)\s+name=\$\(ps\s+-o\s+comm=\s+-p\s+\$parent\)\s+case\s+"\$name"\s+in\s+\(sshd\|login\)\s+exec\s+tmux\s+;;\s+esac\s+fi\s*$ + 1 + ++ ++ ^(/usr/bin/)?tmux\b ++ 1 ++ + + + /etc/shells + tmux + 1 + +- ++ + /etc/pam.d/password-auth +- ^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_pwquality\.so.*retry=(\S+)\b +- 1 +- +- +- /etc/pam.d/system-auth +- ^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_pwquality\.so.*retry=(\S+)\b ++ ^\s*password\s+(?:required|requisite)\s+pam_pwquality\.so\b + 1 + + +@@ -16801,14 +15605,9 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^root:[^:]*:[^:]*:[^:]*:: + 1 + +- +- /etc/pam.d/system-auth +- ^\s*password\s+required\s+pam_pwhistory\.so\s+[^#\n]*\bremember=(\d).*$ +- 1 +- +- ++ + /etc/pam.d/password-auth +- ^\s*password\s+required\s+pam_pwhistory\.so\s+[^#\n]*\bremember=(\d).*$ ++ ^\s*password\s+required\s+pam_pwhistory\.so\s+[^#\n]*\bremember=(\d+)\b + 1 + + +@@ -16836,6 +15635,12 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*dictcheck\s*=\s*(\d*)\s*(?:#.*)?$ + 1 + ++ ++ /etc/pwquality.conf.d/ ++ ^.*\.conf$ ++ ^\s*dictcheck\s*=\s*(\d*)\s*(?:#.*)?$ ++ 1 ++ + + /etc/login.defs + ^\s*FAIL_DELAY\s+(\d+)\s*$ +@@ -16886,11 +15691,6 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + (?i)^\s*disk_error_action\s*=\s*(\w+)\s*(?:#.*)?$ + 1 + +- +- /etc/audit/auditd.conf +- (?i)^\s*max_log_file_action\s*=\s*(\w+)\s*(?:#.*)?$ +- 1 +- + + /etc/audit/auditd.conf + (?i)^\s*disk_full_action\s*=\s*(\w+)\s*(?:#.*)?$ +@@ -16977,104 +15777,104 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*-a\s+(always,exit|exit,always)\s+-F\s+path=/usr/bin/su\s+(-F\s+perm=([rwa]*x[rwa]*)\s+)?-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lremovexattr\s+|(\s+|,)lremovexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lremovexattr\s+|(\s+|,)lremovexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lremovexattr\s+|(\s+|,)lremovexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lremovexattr\s+|(\s+|,)lremovexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lremovexattr\s+|(\s+|,)lremovexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lremovexattr\s+|(\s+|,)lremovexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lremovexattr\s+|(\s+|,)lremovexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lremovexattr\s+|(\s+|,)lremovexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+removexattr\s+|(\s+|,)removexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+removexattr\s+|(\s+|,)removexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+removexattr\s+|(\s+|,)removexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+removexattr\s+|(\s+|,)removexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+removexattr\s+|(\s+|,)removexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+removexattr\s+|(\s+|,)removexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+removexattr\s+|(\s+|,)removexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+removexattr\s+|(\s+|,)removexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lsetxattr\s+|(\s+|,)lsetxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lsetxattr\s+|(\s+|,)lsetxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lsetxattr\s+|(\s+|,)lsetxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lsetxattr\s+|(\s+|,)lsetxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lsetxattr\s+|(\s+|,)lsetxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lsetxattr\s+|(\s+|,)lsetxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lsetxattr\s+|(\s+|,)lsetxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lsetxattr\s+|(\s+|,)lsetxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fsetxattr\s+|(\s+|,)fsetxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fsetxattr\s+|(\s+|,)fsetxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fsetxattr\s+|(\s+|,)fsetxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fsetxattr\s+|(\s+|,)fsetxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fsetxattr\s+|(\s+|,)fsetxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fsetxattr\s+|(\s+|,)fsetxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fsetxattr\s+|(\s+|,)fsetxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fsetxattr\s+|(\s+|,)fsetxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fremovexattr\s+|(\s+|,)fremovexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fremovexattr\s+|(\s+|,)fremovexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fremovexattr\s+|(\s+|,)fremovexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fremovexattr\s+|(\s+|,)fremovexattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fremovexattr\s+|(\s+|,)fremovexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fremovexattr\s+|(\s+|,)fremovexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fremovexattr\s+|(\s+|,)fremovexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fremovexattr\s+|(\s+|,)fremovexattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + + +@@ -17087,24 +15887,24 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*-a\s+(always,exit|exit,always)\s+-F\s+path=/usr/bin/chcon\s+(-F\s+perm=([rwa]*x[rwa]*)\s+)?-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+setxattr\s+|(\s+|,)setxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+setxattr\s+|(\s+|,)setxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+setxattr\s+|(\s+|,)setxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+setxattr\s+|(\s+|,)setxattr(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+setxattr\s+|(\s+|,)setxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+setxattr\s+|(\s+|,)setxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+setxattr\s+|(\s+|,)setxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+setxattr\s+|(\s+|,)setxattr(\s+|,))).*-F\s+auid=0(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + + +@@ -17197,64 +15997,64 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*-a\s+(always,exit|exit,always)\s+-F\s+path=/usr/bin/newgrp\s+(-F\s+perm=([rwa]*x[rwa]*)\s+)?-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+init_module\s+|(\s+|,)init_module(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+init_module\s+|(\s+|,)init_module(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+init_module\s+|(\s+|,)init_module(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+init_module\s+|(\s+|,)init_module(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+rename\s+|(\s+|,)rename(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+rename\s+|(\s+|,)rename(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+rename\s+|(\s+|,)rename(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+rename\s+|(\s+|,)rename(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+renameat\s+|(\s+|,)renameat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+renameat\s+|(\s+|,)renameat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+renameat\s+|(\s+|,)renameat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+renameat\s+|(\s+|,)renameat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+rmdir\s+|(\s+|,)rmdir(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+rmdir\s+|(\s+|,)rmdir(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+rmdir\s+|(\s+|,)rmdir(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+rmdir\s+|(\s+|,)rmdir(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+unlink\s+|(\s+|,)unlink(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+unlink\s+|(\s+|,)unlink(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+unlink\s+|(\s+|,)unlink(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+unlink\s+|(\s+|,)unlink(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+unlinkat\s+|(\s+|,)unlinkat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+unlinkat\s+|(\s+|,)unlinkat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+unlinkat\s+|(\s+|,)unlinkat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+unlinkat\s+|(\s+|,)unlinkat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + + +@@ -17262,14 +16062,14 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*-a\s+(always,exit|exit,always)\s+-F\s+path=/usr/bin/gpasswd\s+(-F\s+perm=([rwa]*x[rwa]*)\s+)?-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+finit_module\s+|(\s+|,)finit_module(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+finit_module\s+|(\s+|,)finit_module(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+finit_module\s+|(\s+|,)finit_module(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+finit_module\s+|(\s+|,)finit_module(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + + +@@ -17292,194 +16092,194 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*-a\s+(always,exit|exit,always)\s+-F\s+path=/usr/bin/chsh\s+(-F\s+perm=([rwa]*x[rwa]*)\s+)?-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+truncate\s+|(\s+|,)truncate(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+truncate\s+|(\s+|,)truncate(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+truncate\s+|(\s+|,)truncate(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+truncate\s+|(\s+|,)truncate(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+truncate\s+|(\s+|,)truncate(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+truncate\s+|(\s+|,)truncate(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+truncate\s+|(\s+|,)truncate(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+truncate\s+|(\s+|,)truncate(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+openat\s+|(\s+|,)openat(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+openat\s+|(\s+|,)openat(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+openat\s+|(\s+|,)openat(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+openat\s+|(\s+|,)openat(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+openat\s+|(\s+|,)openat(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+openat\s+|(\s+|,)openat(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+openat\s+|(\s+|,)openat(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+openat\s+|(\s+|,)openat(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+open\s+|(\s+|,)open(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+open\s+|(\s+|,)open(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+open\s+|(\s+|,)open(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+open\s+|(\s+|,)open(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+open\s+|(\s+|,)open(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+open\s+|(\s+|,)open(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+open\s+|(\s+|,)open(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+open\s+|(\s+|,)open(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+open_by_handle_at\s+|(\s+|,)open_by_handle_at(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+open_by_handle_at\s+|(\s+|,)open_by_handle_at(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+open_by_handle_at\s+|(\s+|,)open_by_handle_at(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+open_by_handle_at\s+|(\s+|,)open_by_handle_at(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+open_by_handle_at\s+|(\s+|,)open_by_handle_at(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+open_by_handle_at\s+|(\s+|,)open_by_handle_at(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+open_by_handle_at\s+|(\s+|,)open_by_handle_at(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+open_by_handle_at\s+|(\s+|,)open_by_handle_at(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+ftruncate\s+|(\s+|,)ftruncate(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+ftruncate\s+|(\s+|,)ftruncate(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+ftruncate\s+|(\s+|,)ftruncate(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+ftruncate\s+|(\s+|,)ftruncate(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+ftruncate\s+|(\s+|,)ftruncate(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+ftruncate\s+|(\s+|,)ftruncate(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+ftruncate\s+|(\s+|,)ftruncate(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+ftruncate\s+|(\s+|,)ftruncate(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+creat\s+|(\s+|,)creat(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+creat\s+|(\s+|,)creat(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+creat\s+|(\s+|,)creat(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+creat\s+|(\s+|,)creat(\s+|,))).*-F\s+exit=-EPERM\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+creat\s+|(\s+|,)creat(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+creat\s+|(\s+|,)creat(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+creat\s+|(\s+|,)creat(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+creat\s+|(\s+|,)creat(\s+|,))).*-F\s+exit=-EACCES\s+-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+chown\s+|(\s+|,)chown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+chown\s+|(\s+|,)chown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+chown\s+|(\s+|,)chown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+chown\s+|(\s+|,)chown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+chmod\s+|(\s+|,)chmod(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+chmod\s+|(\s+|,)chmod(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+chmod\s+|(\s+|,)chmod(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+chmod\s+|(\s+|,)chmod(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lchown\s+|(\s+|,)lchown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+lchown\s+|(\s+|,)lchown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lchown\s+|(\s+|,)lchown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+lchown\s+|(\s+|,)lchown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fchownat\s+|(\s+|,)fchownat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fchownat\s+|(\s+|,)fchownat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fchownat\s+|(\s+|,)fchownat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fchownat\s+|(\s+|,)fchownat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fchown\s+|(\s+|,)fchown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fchown\s+|(\s+|,)fchown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fchown\s+|(\s+|,)fchown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fchown\s+|(\s+|,)fchown(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fchmodat\s+|(\s+|,)fchmodat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fchmodat\s+|(\s+|,)fchmodat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fchmodat\s+|(\s+|,)fchmodat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fchmodat\s+|(\s+|,)fchmodat(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fchmod\s+|(\s+|,)fchmod(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b32\s+(?:.*(-S\s+fchmod\s+|(\s+|,)fchmod(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + +- ++ + /etc/audit/audit.rules +- ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fchmod\s+|(\s+|,)fchmod(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)\S+)?\s*$ ++ ^\s*-a\s+(always,exit|exit,always)\s+-F\s+arch=b64\s+(?:.*(-S\s+fchmod\s+|(\s+|,)fchmod(\s+|,))).*-F\s+auid>=1000\s+-F\s+auid!=(4294967295|-1|unset)(\s+(-k\s+|-F\s+key=)[-\w]+)*\s*$ + 1 + + +@@ -17552,7 +16352,7 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + rsh-server + +- ++ + /etc/modprobe.d + .* + ^[ \t]*install[ \t]+atm[ \t]+/bin/true[ \t]*$ +@@ -17904,37 +16704,37 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + ^\s*ALL\s+ALL\=\(ALL(?:|\:ALL)\)\s+ALL\s*$ + 1 + +- ++ + /etc/sudoers +- ^\s*Defaults \!targetpw\s*$ ++ ^\s*Defaults\s+\!targetpw\s*$ + 1 + +- ++ + /etc/sudoers.d + ^.*$ +- ^\s*Defaults \!targetpw\s*$ ++ ^\s*Defaults\s+\!targetpw\s*$ + 1 + +- ++ + /etc/sudoers +- ^\s*Defaults \!rootpw\s*$ ++ ^\s*Defaults\s+\!rootpw\s*$ + 1 + +- ++ + /etc/sudoers.d + ^.*$ +- ^\s*Defaults \!rootpw\s*$ ++ ^\s*Defaults\s+\!rootpw\s*$ + 1 + +- ++ + /etc/sudoers +- ^\s*Defaults \!runaspw\s*$ ++ ^\s*Defaults\s+\!runaspw\s*$ + 1 + +- ++ + /etc/sudoers.d + ^.*$ +- ^\s*Defaults \!runaspw\s*$ ++ ^\s*Defaults\s+\!runaspw\s*$ + 1 + + +@@ -17956,9 +16756,6 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + 1 + +- +- 1 +- + + 2 + +@@ -17995,7 +16792,7 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + ^[$][6] + +- ++ + 5000 + + +@@ -18041,12 +16838,21 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + false + false + +- ++ ++ 20210617 ++ ++ + TLSv1.2 + +- ++ + TLSv1.3 + ++ ++ DTLSv1.2 ++ ++ ++ DTLSv1.3 ++ + + symbolic link + +@@ -18220,9 +17026,6 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + 10 + +- +- ^[123]$ +- + + 0 + +@@ -18301,12 +17104,6 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + (?i)^halt$ + +- +- (?i)^syslog$ +- +- +- (?i)^keep_logs$ +- + + (?i)^yes$ + +@@ -18561,12 +17358,12 @@ If the value is set to an integer less than 0, the user's time stamp will not ex + + + +- ++ + + + repotool + 5.10 +- 2021-10-04T21:38:10 ++ 2022-01-03T11:44:33 + + + +diff --git a/shared/references/disa-stig-rhel8-v1r4-xccdf-manual.xml b/shared/references/disa-stig-rhel8-v1r5-xccdf-manual.xml +similarity index 81% +rename from shared/references/disa-stig-rhel8-v1r4-xccdf-manual.xml +rename to shared/references/disa-stig-rhel8-v1r5-xccdf-manual.xml +index 46c5fa15578..216e91f92c6 100644 +--- a/shared/references/disa-stig-rhel8-v1r4-xccdf-manual.xml ++++ b/shared/references/disa-stig-rhel8-v1r5-xccdf-manual.xml +@@ -1,4 +1,4 @@ +-acceptedRed Hat Enterprise Linux 8 Security Technical Implementation GuideThis Security Technical Implementation Guide is published as a tool to improve the security of Department of Defense (DoD) information systems. The requirements are derived from the National Institute of Standards and Technology (NIST) 800-53 and related documents. Comments or proposed revisions to this document should be sent via email to the following address: disa.stig_spt@mail.mil.DISASTIG.DOD.MILRelease: 4 Benchmark Date: 27 Oct 20213.2.2.360791.10.01I - Mission Critical Classified<ProfileDescription></ProfileDescription>I - Mission Critical Sensitive<ProfileDescription></ProfileDescription>II - Mission Support Public<ProfileDescription></ProfileDescription>III - Administrative Classified<ProfileDescription></ProfileDescription>III - Administrative Sensitive<ProfileDescription></ProfileDescription>I - Mission Critical Public<ProfileDescription></ProfileDescription>II - Mission Support Classified<ProfileDescription></ProfileDescription>II - Mission Support Sensitive<ProfileDescription></ProfileDescription>III - Administrative Public<ProfileDescription></ProfileDescription>SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010000RHEL 8 must be a vendor-supported release.<VulnDiscussion>An operating system release is considered "supported" if the vendor continues to provide security patches for the product. With an unsupported release, it will not be possible to resolve security issues discovered in the system software. + + Red Hat offers the Extended Update Support (EUS) ad-on to a Red Hat Enterprise Linux subscription, for a fee, for those customers who wish to standardize on a specific minor release for an extended period. The RHEL 8 minor releases eligible for EUS are 8.1, 8.2, 8.4, 8.6, and 8.8. Each RHEL 8 EUS stream is available for 24 months from the availability of the minor release. RHEL 8.10 will be the final minor release overall. For more details on the Red Hat Enterprise Linux Life Cycle visit https://access.redhat.com/support/policy/updates/errata.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Upgrade to a supported version of RHEL 8.Verify the version of the operating system is vendor supported. + +@@ -80,13 +80,13 @@ $ sudo cat /proc/sys/crypto/fips_enabled + + 1 + +-If FIPS mode is not "on", the kernel boot parameter is not configured for FIPS mode, or the system does not have a value of "1" for "fips_enabled" in "/proc/sys/crypto", this is a finding.SRG-OS-000185-GPOS-00079<GroupDescription></GroupDescription>RHEL-08-010030All RHEL 8 local disk partitions must implement cryptographic mechanisms to prevent unauthorized disclosure or modification of all information that requires at rest protection.<VulnDiscussion>RHEL 8 systems handling data requiring "data at rest" protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. ++If FIPS mode is not "on", the kernel boot parameter is not configured for FIPS mode, or the system does not have a value of "1" for "fips_enabled" in "/proc/sys/crypto", this is a finding.SRG-OS-000185-GPOS-00079<GroupDescription></GroupDescription>RHEL-08-010030All RHEL 8 local disk partitions must implement cryptographic mechanisms to prevent unauthorized disclosure or modification of all information that requires at rest protection.<VulnDiscussion>RHEL 8 systems handling data requiring "data at rest" protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. + + Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields). + + Satisfies: SRG-OS-000185-GPOS-00079, SRG-OS-000404-GPOS-00183, SRG-OS-000405-GPOS-00184</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001199Configure RHEL 8 to prevent unauthorized modification of all information at rest by using disk encryption. + +-Encrypting a partition in an already installed system is more difficult, because existing partitions will need to be resized and changed. To encrypt an entire partition, dedicate a partition for encryption in the partition layout.Verify RHEL 8 prevents unauthorized disclosure or modification of all information requiring at-rest protection by using disk encryption. ++Encrypting a partition in an already installed system is more difficult, because existing partitions will need to be resized and changed. To encrypt an entire partition, dedicate a partition for encryption in the partition layout.Verify RHEL 8 prevents unauthorized disclosure or modification of all information requiring at-rest protection by using disk encryption. + + If there is a documented and approved reason for not having data-at-rest encryption, this requirement is Not Applicable. + +@@ -96,7 +96,7 @@ $ sudo blkid + + /dev/mapper/rhel-root: UUID="67b7d7fe-de60-6fd0-befb-e6748cf97743" TYPE="crypto_LUKS" + +-Every persistent disk partition present must be of type "crypto_LUKS". If any partitions other than pseudo file systems (such as /proc or /sys) are not type "crypto_LUKS", ask the administrator to indicate how the partitions are encrypted. If there is no evidence that all local disk partitions are encrypted, this is a finding.SRG-OS-000023-GPOS-00006<GroupDescription></GroupDescription>RHEL-08-010040RHEL 8 must display the Standard Mandatory DoD Notice and Consent Banner before granting local or remote access to the system via a ssh logon.<VulnDiscussion>Display of a standardized and approved use notification before granting access to the operating system ensures privacy and security notification verbiage used is consistent with applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance. ++Every persistent disk partition present must be of type "crypto_LUKS". If any partitions other than the boot partition or pseudo file systems (such as /proc or /sys) are not type "crypto_LUKS", ask the administrator to indicate how the partitions are encrypted. If there is no evidence that these partitions are encrypted, this is a finding.SRG-OS-000023-GPOS-00006<GroupDescription></GroupDescription>RHEL-08-010040RHEL 8 must display the Standard Mandatory DoD Notice and Consent Banner before granting local or remote access to the system via a ssh logon.<VulnDiscussion>Display of a standardized and approved use notification before granting access to the operating system ensures privacy and security notification verbiage used is consistent with applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance. + + System use notifications are required only for access via logon interfaces with human users and are not required when such human interfaces do not exist. + +@@ -293,7 +293,7 @@ $ sudo grep -E '(auth.*|authpriv.*|daemon.*)' /etc/rsyslog.conf + + auth.*;authpriv.*;daemon.* /var/log/secure + +-If "auth.*", "authpriv.*" or "daemon.*" are not configured to be logged, this is a finding.SRG-OS-000066-GPOS-00034<GroupDescription></GroupDescription>RHEL-08-010090RHEL 8, for PKI-based authentication, must validate certificates by constructing a certification path (which includes status information) to an accepted trust anchor.<VulnDiscussion>Without path validation, an informed trust decision by the relying party cannot be made when presented with any certificate not already explicitly trusted. ++If "auth.*", "authpriv.*" or "daemon.*" are not configured to be logged, this is a finding.SRG-OS-000066-GPOS-00034<GroupDescription></GroupDescription>RHEL-08-010090RHEL 8, for PKI-based authentication, must validate certificates by constructing a certification path (which includes status information) to an accepted trust anchor.<VulnDiscussion>Without path validation, an informed trust decision by the relying party cannot be made when presented with any certificate not already explicitly trusted. + + A trust anchor is an authoritative entity represented via a public key and associated data. It is used in the context of public key infrastructures, X.509 digital certificates, and DNSSEC. + +@@ -301,11 +301,11 @@ When there is a chain of trust, usually the top entity to be trusted becomes the + + This requirement verifies that a certification path to an accepted trust anchor is used for certificate validation and that the path includes status information. Path validation is necessary for a relying party to make an informed trust decision when presented with any certificate not already explicitly trusted. Status information for certification paths includes certificate revocation lists or online certificate status protocol responses. Validation of the certificate status information is out of scope for this requirement. + +-Satisfies: SRG-OS-000066-GPOS-00034, SRG-OS-000384-GPOS-00167</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000185Configure RHEL 8, for PKI-based authentication, to validate certificates by constructing a certification path (which includes status information) to an accepted trust anchor. ++Satisfies: SRG-OS-000066-GPOS-00034, SRG-OS-000384-GPOS-00167</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000185Configure RHEL 8, for PKI-based authentication, to validate certificates by constructing a certification path (which includes status information) to an accepted trust anchor. + +-Obtain a valid copy of the DoD root CA file from the PKI CA certificate bundle from cyber.mil and copy the DoD_PKE_CA_chain.pem into the following file: ++Obtain a valid copy of the DoD root CA file from the PKI CA certificate bundle at cyber.mil and copy into the following file: + +-/etc/sssd/pki/sssd_auth_ca_db.pemVerify RHEL 8 for PKI-based authentication has valid certificates by constructing a certification path (which includes status information) to an accepted trust anchor. ++/etc/sssd/pki/sssd_auth_ca_db.pemVerify RHEL 8 for PKI-based authentication has valid certificates by constructing a certification path (which includes status information) to an accepted trust anchor. + + Check that the system has a valid DoD root CA installed with the following command: + +@@ -356,19 +356,19 @@ $ sudo cut -d: -f2 /etc/shadow + + $6$kcOnRq/5$NUEYPuyL.wghQwWssXRcLRFiiru7f5JPV6GaJhNC2aK5F3PZpE/BCCtwrxRc/AInKMNX3CdMw11m9STiql12f/ + +-Password hashes "!" or "*" indicate inactive accounts not available for logon and are not evaluated. If any interactive user password hash does not begin with "$6$", this is a finding.SRG-OS-000073-GPOS-00041<GroupDescription></GroupDescription>RHEL-08-010130The RHEL 8 password-auth file must be configured to use a sufficient number of hashing rounds.<VulnDiscussion>The system must use a strong hashing algorithm to store the password. The system must use a sufficient number of hashing rounds to ensure the required level of entropy. ++Password hashes "!" or "*" indicate inactive accounts not available for logon and are not evaluated. If any interactive user password hash does not begin with "$6$", this is a finding.SRG-OS-000073-GPOS-00041<GroupDescription></GroupDescription>RHEL-08-010130The RHEL 8 shadow password suite must be configured to use a sufficient number of hashing rounds.<VulnDiscussion>The system must use a strong hashing algorithm to store the password. The system must use a sufficient number of hashing rounds to ensure the required level of entropy. + +-Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000196Configure RHEL 8 to encrypt all stored passwords with a strong cryptographic hash. ++Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000196Configure RHEL 8 to encrypt all stored passwords with a strong cryptographic hash. + +-Edit/modify the following line in the "/etc/pam.d/password-auth" file and set "rounds" to a value no lower than "5000": ++Edit/modify the following line in the "/etc/login.defs" file and set "SHA_CRYPT_MIN_ROUNDS" to a value no lower than "5000": + +-password sufficient pam_unix.so sha512 rounds=5000Check that a minimum number of hash rounds is configured by running the following command: ++SHA_CRYPT_MIN_ROUNDS 5000Check that a minimum number of hash rounds is configured by running the following command: + +-$ sudo grep rounds /etc/pam.d/password-auth ++$ sudo egrep "^SHA_CRYPT_" /etc/login.defs + +-password sufficient pam_unix.so sha512 rounds=5000 ++If only one of "SHA_CRYPT_MIN_ROUNDS" or "SHA_CRYPT_MAX_ROUNDS" is set, and this value is below "5000", this is a finding. + +-If "rounds" has a value below "5000", or is commented out, this is a finding.SRG-OS-000080-GPOS-00048<GroupDescription></GroupDescription>RHEL-08-010140RHEL 8 operating systems booted with United Extensible Firmware Interface (UEFI) must require authentication upon booting into single-user mode and maintenance.<VulnDiscussion>If the system does not require valid authentication before it boots into single-user or maintenance mode, anyone who invokes single-user or maintenance mode is granted privileged access to all files on the system. GRUB 2 is the default boot loader for RHEL 8 and is designed to require a password to boot into single-user mode or make modifications to the boot menu.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000213Configure the system to require a grub bootloader password for the grub superusers account with the grub2-setpassword command, which creates/overwrites the /boot/efi/EFI/redhat/user.cfg file. ++If both "SHA_CRYPT_MIN_ROUNDS" and "SHA_CRYPT_MAX_ROUNDS" are set, and the highest value for either is below "5000", this is a finding.SRG-OS-000080-GPOS-00048<GroupDescription></GroupDescription>RHEL-08-010140RHEL 8 operating systems booted with United Extensible Firmware Interface (UEFI) must require authentication upon booting into single-user mode and maintenance.<VulnDiscussion>If the system does not require valid authentication before it boots into single-user or maintenance mode, anyone who invokes single-user or maintenance mode is granted privileged access to all files on the system. GRUB 2 is the default boot loader for RHEL 8 and is designed to require a password to boot into single-user mode or make modifications to the boot menu.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000213Configure the system to require a grub bootloader password for the grub superusers account with the grub2-setpassword command, which creates/overwrites the /boot/efi/EFI/redhat/user.cfg file. + + Generate an encrypted grub2 password for the grub superusers account with the following command: + +@@ -404,21 +404,21 @@ $ sudo grep sulogin-shell /usr/lib/systemd/system/rescue.service + + ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue + +-If the "ExecStart" line is configured for anything other than "/usr/lib/systemd/systemd-sulogin-shell rescue", commented out, or missing, this is a finding.SRG-OS-000120-GPOS-00061<GroupDescription></GroupDescription>RHEL-08-010160The RHEL 8 pam_unix.so module must be configured in the password-auth file to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication.<VulnDiscussion>Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and DoD data may be compromised. ++If the "ExecStart" line is configured for anything other than "/usr/lib/systemd/systemd-sulogin-shell rescue", commented out, or missing, this is a finding.SRG-OS-000120-GPOS-00061<GroupDescription></GroupDescription>RHEL-08-010160The RHEL 8 pam_unix.so module must be configured in the password-auth file to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication.<VulnDiscussion>Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and DoD data may be compromised. + + RHEL 8 systems utilizing encryption are required to use FIPS-compliant mechanisms for authenticating to cryptographic modules. + +-FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules utilize authentication that meets DoD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000803Configure RHEL 8 to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication. ++FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules utilize authentication that meets DoD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000803Configure RHEL 8 to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication. + + Edit/modify the following line in the "/etc/pam.d/password-auth" file to include the sha512 option for pam_unix.so: + +-password sufficient pam_unix.so sha512 rounds=5000Verify that the pam_unix.so module is configured to use sha512. ++password sufficient pam_unix.so sha512Verify that the pam_unix.so module is configured to use sha512. + + Check that the pam_unix.so module is configured to use sha512 in /etc/pam.d/password-auth with the following command: + + $ sudo grep password /etc/pam.d/password-auth | grep pam_unix + +-password sufficient pam_unix.so sha512 rounds=5000 ++password sufficient pam_unix.so sha512 + + If "sha512" is missing, or is commented out, this is a finding.SRG-OS-000120-GPOS-00061<GroupDescription></GroupDescription>RHEL-08-010161RHEL 8 must prevent system daemons from using Kerberos for authentication.<VulnDiscussion>Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and DoD data may be compromised. + +@@ -661,25 +661,40 @@ $ sudo update-crypto-policies --show + + FIPS + +-If the system-wide crypto policy is set to anything other than "FIPS", this is a finding.SRG-OS-000250-GPOS-00093<GroupDescription></GroupDescription>RHEL-08-010294The RHEL 8 operating system must implement DoD-approved TLS encryption in the OpenSSL package.<VulnDiscussion>Without cryptographic integrity protections, information can be altered by unauthorized users without detection. +- +-Remote access (e.g., RDP) is access to DoD nonpublic information systems by an authorized user (or an information system) communicating through an external, non-organization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. +- +-Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash. +- +-RHEL 8 incorporates system-wide crypto policies by default. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/openssl.config file. +- +-Satisfies: SRG-OS-000250-GPOS-00093, SRG-OS-000393-GPOS-00173, SRG-OS-000394-GPOS-00174, SRG-OS-000125-GPOS-00065</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001453Configure the RHEL 8 OpenSSL library to use only DoD-approved TLS encryption by editing the following line in the "/etc/crypto-policies/back-ends/opensslcnf.config" file: +- +-MinProtocol = TLSv1.2 +- +-A reboot is required for the changes to take effect.Verify the OpenSSL library is configured to use only DoD-approved TLS encryption: +- +-$ sudo grep -i MinProtocol /etc/crypto-policies/back-ends/opensslcnf.config +- +-MinProtocol = TLSv1.2 +- +-If the "MinProtocol" is set to anything older than "TLSv1.2", this is a finding.SRG-OS-000250-GPOS-00093<GroupDescription></GroupDescription>RHEL-08-010295The RHEL 8 operating system must implement DoD-approved TLS encryption in the GnuTLS package.<VulnDiscussion>Without cryptographic integrity protections, information can be altered by unauthorized users without detection. ++If the system-wide crypto policy is set to anything other than "FIPS", this is a finding.SRG-OS-000250-GPOS-00093<GroupDescription></GroupDescription>RHEL-08-010294The RHEL 8 operating system must implement DoD-approved TLS encryption in the OpenSSL package.<VulnDiscussion>Without cryptographic integrity protections, information can be altered by unauthorized users without detection. ++ ++Remote access (e.g., RDP) is access to DoD nonpublic information systems by an authorized user (or an information system) communicating through an external, non-organization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. ++ ++Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash. ++ ++RHEL 8 incorporates system-wide crypto policies by default. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/openssl.config file. ++ ++Satisfies: SRG-OS-000250-GPOS-00093, SRG-OS-000393-GPOS-00173, SRG-OS-000394-GPOS-00174, SRG-OS-000125-GPOS-00065</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001453Configure the RHEL 8 OpenSSL library to use only DoD-approved TLS encryption by editing the following line in the "/etc/crypto-policies/back-ends/opensslcnf.config" file: ++ ++For versions prior to crypto-policies-20210617-1.gitc776d3e.el8.noarch: ++MinProtocol = TLSv1.2 ++ ++For version crypto-policies-20210617-1.gitc776d3e.el8.noarch and newer: ++TLS.MinProtocol = TLSv1.2 ++DTLS.MinProtocol = DTLSv1.2 ++A reboot is required for the changes to take effect.Verify the OpenSSL library is configured to use only DoD-approved TLS encryption: ++ ++For versions prior to crypto-policies-20210617-1.gitc776d3e.el8.noarch: ++ ++$ sudo grep -i MinProtocol /etc/crypto-policies/back-ends/opensslcnf.config ++ ++MinProtocol = TLSv1.2 ++ ++If the "MinProtocol" is set to anything older than "TLSv1.2", this is a finding. ++ ++For version crypto-policies-20210617-1.gitc776d3e.el8.noarch and newer: ++ ++$ sudo grep -i MinProtocol /etc/crypto-policies/back-ends/opensslcnf.config ++ ++TLS.MinProtocol = TLSv1.2 ++DTLS.MinProtocol = DTLSv1.2 ++ ++If the "TLS.MinProtocol" is set to anything older than "TLSv1.2" or the "DTLS.MinProtocol" is set to anything older than DTLSv1.2, this is a finding.SRG-OS-000250-GPOS-00093<GroupDescription></GroupDescription>RHEL-08-010295The RHEL 8 operating system must implement DoD-approved TLS encryption in the GnuTLS package.<VulnDiscussion>Without cryptographic integrity protections, information can be altered by unauthorized users without detection. + + Transport Layer Security (TLS) encryption is a required security setting as a number of known vulnerabilities have been reported against Secure Sockets Layer (SSL) and earlier versions of TLS. Encryption of private information is essential to ensuring data confidentiality. If private information is not encrypted, it can be intercepted and easily read by an unauthorized party. SQL Server must use a minimum of FIPS 140-2-approved TLS version 1.2, and all non-FIPS-approved SSL and TLS versions must be disabled. NIST SP 800-52 specifies the preferred configurations for government systems. + +@@ -1077,23 +1092,23 @@ $ sudo yum list installed openssl-pkcs11 + + openssl-pkcs11.x86_64 0.4.8-2.el8 @anaconda + +-If the "openssl-pkcs11" package is not installed, ask the administrator to indicate what type of multifactor authentication is being utilized and what packages are installed to support it. If there is no evidence of multifactor authentication being used, this is a finding.SRG-OS-000375-GPOS-00160<GroupDescription></GroupDescription>RHEL-08-010400RHEL 8 must implement certificate status checking for multifactor authentication.<VulnDiscussion>Using an authentication device, such as a DoD Common Access Card (CAC) or token that is separate from the information system, ensures that even if the information system is compromised, credentials stored on the authentication device will not be affected. ++If the "openssl-pkcs11" package is not installed, ask the administrator to indicate what type of multifactor authentication is being utilized and what packages are installed to support it. If there is no evidence of multifactor authentication being used, this is a finding.SRG-OS-000375-GPOS-00160<GroupDescription></GroupDescription>RHEL-08-010400RHEL 8 must implement certificate status checking for multifactor authentication.<VulnDiscussion>Using an authentication device, such as a DoD Common Access Card (CAC) or token that is separate from the information system, ensures that even if the information system is compromised, credentials stored on the authentication device will not be affected. + + Multifactor solutions that require devices separate from information systems gaining access include, for example, hardware tokens providing time-based or challenge-response authenticators and smart cards such as the U.S. Government Personal Identity Verification (PIV) card and the DoD CAC. + + RHEL 8 includes multiple options for configuring certificate status checking, but for this requirement focuses on the System Security Services Daemon (SSSD). By default, sssd performs Online Certificate Status Protocol (OCSP) checking and certificate verification using a sha256 digest function. + +-Satisfies: SRG-OS-000375-GPOS-00160, SRG-OS-000377-GPOS-00162</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001948Configure the operating system to implement certificate status checking for multifactor authentication. ++Satisfies: SRG-OS-000375-GPOS-00160, SRG-OS-000377-GPOS-00162</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001948Configure the operating system to implement certificate status checking for multifactor authentication. + + Review the "/etc/sssd/sssd.conf" file to determine if the system is configured to prevent OCSP or certificate verification. + +-Add the following line to the "/etc/sssd/sssd.conf" file: ++Add the following line to the [sssd] section of the "/etc/sssd/sssd.conf" file: + + certificate_verification = ocsp_dgst=sha1 + + The "sssd" service must be restarted for the changes to take effect. To restart the "sssd" service, run the following command: + +-$ sudo systemctl restart sssd.serviceVerify the operating system implements certificate status checking for multifactor authentication. ++$ sudo systemctl restart sssd.serviceVerify the operating system implements certificate status checking for multifactor authentication. + + Check to see if Online Certificate Status Protocol (OCSP) is enabled and using the proper digest value on the system with the following command: + +@@ -1455,23 +1470,7 @@ $ sudo grep -i PermitRootLogin /etc/ssh/sshd_config + + PermitRootLogin no + +-If the "PermitRootLogin" keyword is set to "yes", is missing, or is commented out, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010560The auditd service must be running in RHEL 8.<VulnDiscussion>Configuring RHEL 8 to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. +- +-Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example: registry settings; account, file, directory permission settings; and settings for functions, ports, protocols, services, and remote connections.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Start the auditd service, and enable the auditd service with the following commands: +- +-$ sudo systemctl start auditd.service +- +-$ sudo systemctl enable auditd.serviceVerify the audit service is enabled and active with the following commands: +- +-$ sudo systemctl is-enabled auditd +- +-enabled +- +-$ sudo systemctl is-active auditd +- +-active +- +-If the service is not "enabled" and "active" this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010561The rsyslog service must be running in RHEL 8.<VulnDiscussion>Configuring RHEL 8 to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. ++If the "PermitRootLogin" keyword is set to "yes", is missing, or is commented out, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010561The rsyslog service must be running in RHEL 8.<VulnDiscussion>Configuring RHEL 8 to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across the DoD that reflects the most restrictive security posture consistent with operational requirements. + + Configuration settings are the set of parameters that can be changed in hardware, software, or firmware components of the system that affect the security posture and/or functionality of the system. Security-related parameters are those parameters impacting the security state of the system, including the parameters required to satisfy other security control requirements. Security-related parameters include, for example: registry settings; account, file, directory permission settings; and settings for functions, ports, protocols, services, and remote connections.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Start the auditd service, and enable the rsyslog service with the following commands: + +@@ -2361,23 +2360,41 @@ $ sudo grep -i lock-command /etc/tmux.conf + + set -g lock-command vlock + +-If the "lock-command" is not set in the global settings to call "vlock", this is a finding.SRG-OS-000028-GPOS-00009<GroupDescription></GroupDescription>RHEL-08-020041RHEL 8 must ensure session control is automatically started at shell initialization.<VulnDiscussion>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 log out because of the temporary nature of the absence. +- +-The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. +- +-Tmux is a terminal multiplexer that enables a number of terminals to be created, accessed, and controlled from a single screen. Red Hat endorses tmux as the recommended session controlling package. +- +-Satisfies: SRG-OS-000028-GPOS-00009, SRG-OS-000030-GPOS-00011</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000056Configure the operating system to initialize the tmux terminal multiplexer as each shell is called by adding the following line to the end of the "/etc/bashrc" configuration file: +- +-[ -n "$PS1" -a -z "$TMUX" ] && exec tmux +- +-This setting will take effect at next logon.Verify the operating system shell initialization file is configured to start each shell with the tmux terminal multiplexer with the following command: +- +-$ sudo grep -i tmux /etc/bashrc ++If the "lock-command" is not set in the global settings to call "vlock", this is a finding.SRG-OS-000028-GPOS-00009<GroupDescription></GroupDescription>RHEL-08-020041RHEL 8 must ensure session control is automatically started at shell initialization.<VulnDiscussion>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 log out because of the temporary nature of the absence. ++ ++The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. ++ ++Tmux is a terminal multiplexer that enables a number of terminals to be created, accessed, and controlled from a single screen. Red Hat endorses tmux as the recommended session controlling package. ++ ++Satisfies: SRG-OS-000028-GPOS-00009, SRG-OS-000030-GPOS-00011</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000056Configure the operating system to initialize the tmux terminal multiplexer as each shell is called by adding the following lines to a custom.sh shell script in the /etc/profile.d/ directory: + +-[ -n "$PS1" -a -z "$TMUX" ] && exec tmux ++If [ "$PS1" ]; then ++parent=$(ps -o ppid= -p $$) ++name=$(ps -o comm= -p $parent) ++case "$name" in (sshd|login) exec tmux ;; esac ++fi + +-If "tmux" is not configured as the example above, is commented out, or missing from the "/etc/bashrc" initialization file, this is a finding.SRG-OS-000028-GPOS-00009<GroupDescription></GroupDescription>RHEL-08-020042RHEL 8 must prevent users from disabling session control mechanisms.<VulnDiscussion>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 log out because of the temporary nature of the absence. ++This setting will take effect at next logon.Verify the operating system shell initialization file is configured to start each shell with the tmux terminal multiplexer with the following commands: ++ ++Determine if tmux is currently running: ++$ sudo ps all | grep tmux | grep -v grep ++ ++If the command does not produce output, this is a finding. ++ ++Determine the location of the tmux script: ++$ sudo grep tmux /etc/bashrc/etc/profile.d/* ++ ++/etc/profile.d/tmux.sh: case "$name" in (sshd|login) exec tmux ;; esac ++ ++Review the tmux script by using the following example: ++$ sudo cat /etc/profile.d/tmux.sh ++If [ "$PS1" ]; then ++parent=$(ps -o ppid= -p $$) ++name=$(ps -o comm= -p $parent) ++case "$name" in (sshd|login) exec tmux ;; esac ++fi ++ ++If "tmux" is not configured as the example above, is commented out, or is missing, this is a finding.SRG-OS-000028-GPOS-00009<GroupDescription></GroupDescription>RHEL-08-020042RHEL 8 must prevent users from disabling session control mechanisms.<VulnDiscussion>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 log out because of the temporary nature of the absence. + + The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, RHEL 8 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity. + +@@ -2520,31 +2537,23 @@ matchrule =<SAN>.*EDIPI@mil + maprule = (userCertificate;binary={cert!bin}) + domains = testing.test + +-If the certmap section does not exist, ask the System Administrator to indicate how certificates are mapped to accounts. If there is no evidence of certificate mapping, this is a finding.SRG-OS-000069-GPOS-00037<GroupDescription></GroupDescription>RHEL-08-020100RHEL 8 must ensure a password complexity module is enabled.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. +- +-RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. This is set in both: +-/etc/pam.d/password-auth +-/etc/pam.d/system-auth +- +-Note the value of "retry" set in these configuration files should be between "1" and "3". Manual changes to the listed files may be overwritten by the "authselect" program.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000192Configure the operating system to use "pwquality" to enforce password complexity rules. ++If the certmap section does not exist, ask the System Administrator to indicate how certificates are mapped to accounts. If there is no evidence of certificate mapping, this is a finding.SRG-OS-000069-GPOS-00037<GroupDescription></GroupDescription>RHEL-08-020100RHEL 8 must ensure the password complexity module is enabled in the password-auth file.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. ++ ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure the operating system to use "pwquality" to enforce password complexity rules. + +-Add the following line to both "/etc/pam.d/password-auth" and "/etc/pam.d/system-auth" (or modify the line to have the required value): ++Add the following line to the "/etc/pam.d/password-auth" file (or modify the line to have the required value): + +-password required pam_pwquality.so retry=3Verify the operating system uses "pwquality" to enforce the password complexity rules. ++password required pam_pwquality.soVerify the operating system uses "pwquality" to enforce the password complexity rules. + +-Check for the use of "pwquality" with the following commands: ++Check for the use of "pwquality" in the password-auth file with the following command: + + $ sudo cat /etc/pam.d/password-auth | grep pam_pwquality + +-password required pam_pwquality.so retry=3 +- +-$ sudo cat /etc/pam.d/system-auth | grep pam_pwquality ++password required pam_pwquality.so + +-password required pam_pwquality.so retry=3 +- +-If both commands do not return a line containing the value "pam_pwquality.so", or the line is commented out, this is a finding. +- +-If the value of "retry" is set to "0" or greater than "3", this is a finding.SRG-OS-000069-GPOS-00037<GroupDescription></GroupDescription>RHEL-08-020110RHEL 8 must enforce password complexity by requiring that at least one uppercase character be used.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. ++If the command does not return a line containing the value "pam_pwquality.so", or the line is commented out, this is a finding.SRG-OS-000069-GPOS-00037<GroupDescription></GroupDescription>RHEL-08-020110RHEL 8 must enforce password complexity by requiring that at least one uppercase character be used.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + + Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +@@ -2586,7 +2595,7 @@ $ sudo grep dcredit /etc/security/pwquality.conf + + dcredit = -1 + +-If the value of "dcredit" is a positive number or is commented out, this is a finding.SRG-OS-000072-GPOS-00040<GroupDescription></GroupDescription>RHEL-08-020140RHEL 8 must require the maximum number of repeating characters of the same character class be limited to four when passwords are changed.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. ++If the value of "dcredit" is a positive number or is commented out, this is a finding.SRG-OS-000072-GPOS-00040<GroupDescription></GroupDescription>RHEL-08-020140RHEL 8 must require the maximum number of repeating characters of the same character class be limited to four when passwords are changed.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + + Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +@@ -2594,13 +2603,13 @@ RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. The " + + Add the following line to "/etc/security/pwquality.conf" conf (or modify the line to have the required value): + +-maxclassrepeat = 4Check for the value of the "maxclassrepeat" option in "/etc/security/pwquality.conf" with the following command: ++maxclassrepeat = 4Check for the value of the "maxclassrepeat" option in "/etc/security/pwquality.conf" with the following command: + + $ sudo grep maxclassrepeat /etc/security/pwquality.conf + + maxclassrepeat = 4 + +-If the value of "maxclassrepeat" is set to more than "4" or is commented out, this is a finding.SRG-OS-000072-GPOS-00040<GroupDescription></GroupDescription>RHEL-08-020150RHEL 8 must require the maximum number of repeating characters be limited to three when passwords are changed.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. ++If the value of "maxclassrepeat" is set to "0", more than "4" or is commented out, this is a finding.SRG-OS-000072-GPOS-00040<GroupDescription></GroupDescription>RHEL-08-020150RHEL 8 must require the maximum number of repeating characters be limited to three when passwords are changed.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. + + Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. + +@@ -2675,21 +2684,21 @@ $ sudo awk -F: '$5 > 60 {print $1 " " $5}' /etc/shadow + + $ sudo awk -F: '$5 <= 0 {print $1 " " $5}' /etc/shadow + +-If any results are returned that are not associated with a system account, this is a finding.SRG-OS-000077-GPOS-00045<GroupDescription></GroupDescription>RHEL-08-020220RHEL 8 passwords must be prohibited from reuse for a minimum of five generations.<VulnDiscussion>Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. If the information system or application allows the user to reuse their password consecutively when that password has exceeded its defined lifetime, the end result is a password that is not changed per policy requirements. +- +-RHEL 8 utilizes "pwquality" consecutively as a mechanism to enforce password complexity. This is set in both: +-/etc/pam.d/password-auth +-/etc/pam.d/system-auth. +- +-Note that manual changes to the listed files may be overwritten by the "authselect" program.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000200Configure the operating system to prohibit password reuse for a minimum of five generations. ++If any results are returned that are not associated with a system account, this is a finding.SRG-OS-000077-GPOS-00045<GroupDescription></GroupDescription>RHEL-08-020220RHEL 8 must be configured in the password-auth file to prohibit password reuse for a minimum of five generations.<VulnDiscussion>Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. If the information system or application allows the user to reuse their password consecutively when that password has exceeded its defined lifetime, the end result is a password that is not changed per policy requirements. ++ ++RHEL 8 uses "pwhistory" consecutively as a mechanism to prohibit password reuse. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth. ++ ++Note that manual changes to the listed files may be overwritten by the "authselect" program.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000200Configure the operating system in the password-auth file to prohibit password reuse for a minimum of five generations. + +-Add the following line in "/etc/pam.d/system-auth" and "/etc/pam.d/password-auth" (or modify the line to have the required value): ++Add the following line in "/etc/pam.d/password-auth" (or modify the line to have the required value): + +-password required pam_pwhistory.so use_authtok remember=5 retry=3Verify the operating system prohibits password reuse for a minimum of five generations. ++password required pam_pwhistory.so use_authtok remember=5 retry=3Verify the operating system is configured in the password-auth file to prohibit password reuse for a minimum of five generations. + +-Check for the value of the "remember" argument in "/etc/pam.d/system-auth" and "/etc/pam.d/password-auth" with the following command: ++Check for the value of the "remember" argument in "/etc/pam.d/password-auth" with the following command: + +-$ sudo grep -i remember /etc/pam.d/system-auth /etc/pam.d/password-auth ++$ sudo grep -i remember /etc/pam.d/password-auth + + password required pam_pwhistory.so use_authtok remember=5 retry=3 + +@@ -3065,23 +3074,7 @@ $ sudo grep disk_error_action /etc/audit/auditd.conf + + disk_error_action = HALT + +-If the value of the "disk_error_action" option is not "SYSLOG", "SINGLE", or "HALT", or the line is commented out, ask the system administrator to indicate how the system takes appropriate action when an audit process failure occurs. If there is no evidence of appropriate action, this is a finding.SRG-OS-000047-GPOS-00023<GroupDescription></GroupDescription>RHEL-08-030050The RHEL 8 System Administrator (SA) and Information System Security Officer (ISSO) (at a minimum) must be alerted when the audit storage volume is full.<VulnDiscussion>It is critical that when RHEL 8 is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. +- +-When availability is an overriding concern, other approved actions in response to an audit failure are as follows: +- +-1) If the failure was caused by the lack of audit record storage capacity, RHEL 8 must continue generating audit records if possible (automatically restarting the audit service if necessary) and overwriting the oldest audit records in a first-in-first-out manner. +- +-2) If audit records are sent to a centralized collection server and communication with this server is lost or the server fails, RHEL 8 must queue audit records locally until communication is restored or until the audit records are retrieved manually. Upon restoration of the connection to the centralized collection server, action should be taken to synchronize the local audit data with the collection server.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000140Configure RHEL 8 to notify the System Administrator (SA) and Information System Security Officer (ISSO) when the audit storage volume is full by configuring the "max_log_file_action" parameter in the "/etc/audit/auditd.conf" file with the a value of "syslog" or "keep_logs": +- +-max_log_file_action = syslogVerify that the SA and ISSO (at a minimum) are notified when the audit storage volume is full. +- +-Check which action RHEL 8 takes when the audit storage volume is full with the following command: +- +-$ sudo grep max_log_file_action /etc/audit/auditd.conf +- +-max_log_file_action=syslog +- +-If the value of the "max_log_file_action" option is set to "ignore", "rotate", or "suspend", or the line is commented out, ask the system administrator to indicate how the system takes appropriate action when an audit storage volume is full. If there is no evidence of appropriate action, this is a finding.SRG-OS-000047-GPOS-00023<GroupDescription></GroupDescription>RHEL-08-030060The RHEL 8 audit system must take appropriate action when the audit storage volume is full.<VulnDiscussion>It is critical that when RHEL 8 is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. ++If the value of the "disk_error_action" option is not "SYSLOG", "SINGLE", or "HALT", or the line is commented out, ask the system administrator to indicate how the system takes appropriate action when an audit process failure occurs. If there is no evidence of appropriate action, this is a finding.SRG-OS-000047-GPOS-00023<GroupDescription></GroupDescription>RHEL-08-030060The RHEL 8 audit system must take appropriate action when the audit storage volume is full.<VulnDiscussion>It is critical that when RHEL 8 is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. + + When availability is an overriding concern, other approved actions in response to an audit failure are as follows: + +@@ -3453,127 +3446,40 @@ $ sudo grep -w /usr/bin/su /etc/audit/audit.rules + + -a always,exit -F path=/usr/bin/su -F perm=x -F auid>=1000 -F auid!=unset -k privileged-priv_change + +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030200The RHEL 8 audit system must be configured to audit any usage of the lremovexattr system call.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Lremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from symbolic links. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure RHEL 8 to audit the execution of the "lremovexattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S lremovexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S lremovexattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify if RHEL 8 is configured to audit the execution of the "lremovexattr" system call, by running the following command: +- +-$ sudo grep -w lremovexattr /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S lremovexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S lremovexattr -F auid=0 -k perm_mod +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030210The RHEL 8 audit system must be configured to audit any usage of the removexattr system call.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Removexattr" is a system call that removes extended attributes. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure RHEL 8 to audit the execution of the "removexattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S removexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S removexattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S removexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S removexattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify if RHEL 8 is configured to audit the execution of the "removexattr" system call, by running the following command: +- +-$ sudo grep -w removexattr /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S removexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S removexattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S removexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S removexattr -F auid=0 -k perm_mod +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030220The RHEL 8 audit system must be configured to audit any usage of the lsetxattr system call.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Lsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a symbolic link. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure RHEL 8 to audit the execution of the "lsetxattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S lsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S lsetxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S lsetxattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify if RHEL 8 is configured to audit the execution of the "lsetxattr" system call, by running the following command: +- +-$ sudo grep -w lsetxattr /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S lsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S lsetxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S lsetxattr -F auid=0 -k perm_mod +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030230The RHEL 8 audit system must be configured to audit any usage of the fsetxattr system call.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Fsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a file. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The auid representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure RHEL 8 to audit the execution of the "fsetxattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S fsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S fsetxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S fsetxattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify if RHEL 8 is configured to audit the execution of the "fsetxattr" system call, by running the following command: +- +-$ sudo grep -w fsetxattr /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S fsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fsetxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S fsetxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S fsetxattr -F auid=0 -k perm_mod +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030240The RHEL 8 audit system must be configured to audit any usage of the fremovexattr system call.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Fremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from a file. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure RHEL 8 to audit the execution of the "fremovexattr" system call by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": ++If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030200The RHEL 8 audit system must be configured to audit any usage of the setxattr, fsetxattr, lsetxattr, removexattr, fremovexattr, and lremovexattr system calls.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++Audit records can be generated from various components within the information system (e.g., module or policy filter). ++ ++"Setxattr" is a system call used to set an extended attribute value. ++"Fsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a file. ++"Lsetxattr" is a system call used to set an extended attribute value. This is used to set extended attributes on a symbolic link. ++"Removexattr" is a system call that removes extended attributes. ++"Fremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from a file. ++"Lremovexattr" is a system call that removes extended attributes. This is used for removal of extended attributes from symbolic links. ++ ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure RHEL 8 to audit the execution of the "setxattr", "fsetxattr", "lsetxattr", "removexattr", "fremovexattr", and "lremovexattr" system calls by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": + +--a always,exit -F arch=b32 -S fremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fremovexattr -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod + +--a always,exit -F arch=b32 -S fremovexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S fremovexattr -F auid=0 -k perm_mod ++-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod ++-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod + +-The audit daemon must be restarted for the changes to take effect.Verify if RHEL 8 is configured to audit the execution of the "fremovexattr" system call, by running the following command: ++The audit daemon must be restarted for the changes to take effect.Verify if RHEL 8 is configured to audit the execution of the "setxattr", "fsetxattr", "lsetxattr", "removexattr", "fremovexattr", and "lremovexattr" system calls by running the following command: + +-$ sudo grep -w fremovexattr /etc/audit/audit.rules ++$ sudo grep xattr /etc/audit/audit.rules + +--a always,exit -F arch=b32 -S fremovexattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fremovexattr -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod + +--a always,exit -F arch=b32 -S fremovexattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S fremovexattr -F auid=0 -k perm_mod ++-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod ++-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod + +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030250Successful/unsuccessful uses of the chage command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++If the command does not return an audit rule for "setxattr", "fsetxattr", "lsetxattr", "removexattr", "fremovexattr", and "lremovexattr" or any of the lines returned are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030250Successful/unsuccessful uses of the chage command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + + Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chage" command is used to change or view user password expiry information. + +@@ -3605,31 +3511,7 @@ $ sudo grep -w chcon /etc/audit/audit.rules + + -a always,exit -F path=/usr/bin/chcon -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod + +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030270The RHEL 8 audit system must be configured to audit any usage of the setxattr system call.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). "Setxattr" is a system call used to set an extended attribute value. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure RHEL 8 to audit the execution of the "setxattr" system call, by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S setxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S setxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S setxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S setxattr -F auid=0 -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify if RHEL 8 is configured to audit the execution of the "setxattr" system call, by running the following command: +- +-$ sudo grep -w setxattr /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S setxattr -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S setxattr -F auid>=1000 -F auid!=unset -k perm_mod +- +--a always,exit -F arch=b32 -S setxattr -F auid=0 -k perm_mod +--a always,exit -F arch=b64 -S setxattr -F auid=0 -k perm_mod +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030280Successful/unsuccessful uses of the ssh-agent in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030280Successful/unsuccessful uses of the ssh-agent in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + + Audit records can be generated from various components within the information system (e.g., module or policy filter). The "ssh-agent" is a program to hold private keys used for public key authentication. + +@@ -3903,115 +3785,52 @@ $ sudo grep -w newgrp /etc/audit/audit.rules + + -a always,exit -F path=/usr/bin/newgrp -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd + +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030360Successful/unsuccessful uses of the init_module command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "init_module" command is used to load a kernel module. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "init_module" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S init_module -F auid>=1000 -F auid!=unset -k module_chng +--a always,exit -F arch=b64 -S init_module -F auid>=1000 -F auid!=unset -k module_chng +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "init_module" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w "init_module" /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S init_module -F auid>=1000 -F auid!=unset -k module_chng +--a always,exit -F arch=b64 -S init_module -F auid>=1000 -F auid!=unset -k module_chng +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030361Successful/unsuccessful uses of the rename command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rename" command will rename the specified files by replacing the first occurrence of expression in their name by replacement. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "rename" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S rename -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S rename -F auid>=1000 -F auid!=unset -k delete +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "rename" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w "rename" /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S rename -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S rename -F auid>=1000 -F auid!=unset -k delete +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030362Successful/unsuccessful uses of the renameat command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "renameat" command renames a file, moving it between directories if required. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "renameat" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S renameat -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S renameat -F auid>=1000 -F auid!=unset -k delete +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "renameat" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w "renameat" /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S renameat -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S renameat -F auid>=1000 -F auid!=unset -k delete +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030363Successful/unsuccessful uses of the rmdir command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rmdir" command removes empty directories. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "rmdir" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S rmdir -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S rmdir -F auid>=1000 -F auid!=unset -k delete +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "rmdir" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w "rmdir" /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S rmdir -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S rmdir -F auid>=1000 -F auid!=unset -k delete +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030364Successful/unsuccessful uses of the unlink command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "unlink" command deletes a name from the filesystem. If that name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "unlink" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S unlink -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S unlink -F auid>=1000 -F auid!=unset -k delete +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "unlink" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w "unlink" /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S unlink -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S unlink -F auid>=1000 -F auid!=unset -k delete +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030365Successful/unsuccessful uses of the unlinkat command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "unlinkat" system call operates in exactly the same way as either "unlink" or "rmdir" except for the differences described in the manual page. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "unlinkat" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S unlinkat -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S unlinkat -F auid>=1000 -F auid!=unset -k delete +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "unlinkat" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w "unlinkat" /etc/audit/audit.rules ++If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030360Successful/unsuccessful uses of the init_module and finit_module system calls in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "init_module" and "finit_module" system calls are used to load a kernel module. ++ ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "init_module" and "finit_module" system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: ++ ++-a always,exit -F arch=b32 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng ++-a always,exit -F arch=b64 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng ++ ++The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record upon successful/unsuccessful attempts to use the "init_module" and "finit_module" system calls by using the following command to check the file system rules in "/etc/audit/audit.rules": ++ ++$ sudo grep init_module /etc/audit/audit.rules ++ ++-a always,exit -F arch=b32 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng ++-a always,exit -F arch=b64 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng ++ ++If the command does not return an audit rule for "init_module" and "finit_module" or any of the lines returned are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030361Successful/unsuccessful uses of the rename, unlink, rmdir, renameat, and unlinkat system calls in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "rename" system call will rename the specified files by replacing the first occurrence of expression in their name by replacement. ++ ++The "unlink" system call deletes a name from the filesystem. If that name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse. ++The "rmdir" system call removes empty directories. ++The "renameat" system call renames a file, moving it between directories if required. ++The "unlinkat" system call operates in exactly the same way as either "unlink" or "rmdir" except for the differences described in the manual page. ++ ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. Performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "rename", "unlink", "rmdir", "renameat", and "unlinkat" system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: + +--a always,exit -F arch=b32 -S unlinkat -F auid>=1000 -F auid!=unset -k delete +--a always,exit -F arch=b64 -S unlinkat -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F arch=b32 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F arch=b64 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete + +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030370Successful/unsuccessful uses of the gpasswd command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record upon successful/unsuccessful attempts to use the "rename", "unlink", "rmdir", "renameat", and "unlinkat" system calls by using the following command to check the file system rules in "/etc/audit/audit.rules": ++ ++$ sudo grep 'rename\|unlink\|rmdir' /etc/audit/audit.rules ++ ++-a always,exit -F arch=b32 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete ++-a always,exit -F arch=b64 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete ++ ++If the command does not return an audit rule for "rename", "unlink", "rmdir", "renameat", and "unlinkat" or any of the lines returned are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030370Successful/unsuccessful uses of the gpasswd command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + + Audit records can be generated from various components within the information system (e.g., module or policy filter). The "gpasswd" command is used to administer /etc/group and /etc/gshadow. Every group can have administrators, members and a password. + +@@ -4027,24 +3846,6 @@ $ sudo grep -w gpasswd /etc/audit/audit.rules + + -a always,exit -F path=/usr/bin/gpasswd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-gpasswd + +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030380Successful/unsuccessful uses of the finit_module command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "finit_module" command is used to load a kernel module. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "finit_module" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S finit_module -F auid>=1000 -F auid!=unset -k module_chng +--a always,exit -F arch=b64 -S finit_module -F auid>=1000 -F auid!=unset -k module_chng +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "finit_module" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w "finit_module" /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S finit_module -F auid>=1000 -F auid!=unset -k module_chng +--a always,exit -F arch=b64 -S finit_module -F auid>=1000 -F auid!=unset -k module_chng +- + If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030390Successful/unsuccessful uses of the delete_module command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + + Audit records can be generated from various components within the information system (e.g., module or policy filter). The "delete_module" command is used to unload a kernel module. +@@ -4095,277 +3896,87 @@ $ sudo grep -w chsh /etc/audit/audit.rules + + -a always,exit -F path=/usr/bin/chsh -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd + +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030420Successful/unsuccessful uses of the truncate command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "truncate" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S truncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S truncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S truncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S truncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "truncate" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -iw truncate /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S truncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S truncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S truncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S truncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030430Successful/unsuccessful uses of the openat system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "openat" system call opens a file specified by a relative pathname. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "openat" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S openat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S openat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S openat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S openat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "openat" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -iw openat /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S openat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S openat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S openat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S openat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030440Successful/unsuccessful uses of the open system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "open system" call opens a file specified by a pathname. If the specified file does not exist, it may optionally be created by "open". +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "open" system call by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S open -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S open -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "open" system call by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -iw open /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S open -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S open -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030450Successful/unsuccessful uses of the open_by_handle_at system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "name_to_handle_at" and "open_by_handle_at" system calls split the functionality of openat into two parts: "name_to_handle_at" returns an opaque handle that corresponds to a specified file; "open_by_handle_at" opens the file corresponding to a handle returned by a previous call to "name_to_handle_at" and returns an open file descriptor. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "open_by_handle_at" system call by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "open_by_handle_at" system call by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -iw open_by_handle_at /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030460Successful/unsuccessful uses of the ftruncate command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "ftruncate" command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "ftruncate" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -iw ftruncate /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030470Successful/unsuccessful uses of the creat system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "creat" system call is used to open and possibly create a file or device. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "creat" system call by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: +- +--a always,exit -F arch=b32 -S creat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S creat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S creat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S creat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "creat" system call by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -iw creat /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S creat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S creat -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access +- +--a always,exit -F arch=b32 -S creat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +--a always,exit -F arch=b64 -S creat -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access +- +-If the command does not return all lines, or the lines are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030480Successful/unsuccessful uses of the chown command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chown" command is used to change file owner and group. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chown" command by adding or updating the following line to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S chown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S chown -F auid>=1000 -F auid!=unset -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "chown" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w chown /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S chown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S chown -F auid>=1000 -F auid!=unset -k perm_mod +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030490Successful/unsuccessful uses of the chmod command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chmod" command changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chmod" command by adding or updating the following line to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S chmod -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S chmod -F auid>=1000 -F auid!=unset -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "chmod" command by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w chmod /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S chmod -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S chmod -F auid>=1000 -F auid!=unset -k perm_mod +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030500Successful/unsuccessful uses of the lchown system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "lchown" system call is used to change the ownership of the file specified by a path, which does not dereference symbolic links. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "lchown" system call by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S lchown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lchown -F auid>=1000 -F auid!=unset -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "lchown" system call by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w lchown /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S lchown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S lchown -F auid>=1000 -F auid!=unset -k perm_mod +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030510Successful/unsuccessful uses of the fchownat system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchownat" system call is used to change ownership of a file relative to a directory file descriptor. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "fchownat" system call by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S fchownat -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchownat -F auid>=1000 -F auid!=unset -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "fchownat" system call by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w fchownat /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S fchownat -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchownat -F auid>=1000 -F auid!=unset -k perm_mod +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030520Successful/unsuccessful uses of the fchown system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchown" system call is used to change the ownership of a file referred to by the open file descriptor. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "fchown" system call by adding or updating the following line to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S fchown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchown -F auid>=1000 -F auid!=unset -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "fchown" system call by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w fchown /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S fchown -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchown -F auid>=1000 -F auid!=unset -k perm_mod +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030530Successful/unsuccessful uses of the fchmodat system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchmodat" system call is used to change permissions of a file relative to a directory file descriptor. +- +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. +- +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "fchmodat" system call by adding or updating the following lines to "/etc/audit/rules.d/audit.rules": +- +--a always,exit -F arch=b32 -S fchmodat -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchmodat -F auid>=1000 -F auid!=unset -k perm_mod +- +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "fchmodat" system call by performing the following command to check the file system rules in "/etc/audit/audit.rules": +- +-$ sudo grep -w fchmodat /etc/audit/audit.rules +- +--a always,exit -F arch=b32 -S fchmodat -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchmodat -F auid>=1000 -F auid!=unset -k perm_mod +- +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030540Successful/unsuccessful uses of the fchmod system call in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. +- +-Audit records can be generated from various components within the information system (e.g., module or policy filter). The "fchmod" system call is used to change permissions of a file. ++If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030420Successful/unsuccessful uses of the truncate, ftruncate, creat, open, openat, and open_by_handle_at system calls in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "truncate" and "ftruncate" functions are used to truncate a file to a specified length. ++ ++The "creat" system call is used to open and possibly create a file or device. ++The "open" system call opens a file specified by a pathname. If the specified file does not exist, it may optionally be created by "open". ++The "openat" system call opens a file specified by a relative pathname. ++The "name_to_handle_at" and "open_by_handle_at" system calls split the functionality of "openat" into two parts: "name_to_handle_at" returns an opaque handle that corresponds to a specified file; "open_by_handle_at" opens the file corresponding to a handle returned by a previous call to "name_to_handle_at" and returns an open file descriptor. ++ ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "truncate", "ftruncate", "creat", "open", "openat", and "open_by_handle_at" system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file: + +-When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access + +-Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "fchmod" system call by adding or updating the following line to "/etc/audit/rules.d/audit.rules": ++-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access + +--a always,exit -F arch=b32 -S fchmod -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchmod -F auid>=1000 -F auid!=unset -k perm_mod ++The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record upon successful/unsuccessful attempts to use the "truncate", "ftruncate", "creat", "open", "openat", and "open_by_handle_at" system calls by using the following command to check the file system rules in "/etc/audit/audit.rules": ++ ++$ sudo grep 'open\|truncate\|creat' /etc/audit/audit.rules ++ ++-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access ++ ++-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access ++ ++If the output does not produce rules containing "-F exit=-EPERM", this is a finding. ++If the output does not produce rules containing "-F exit=-EACCES", this is a finding. ++If the command does not return an audit rule for "truncate", "ftruncate", "creat", "open", "openat", and "open_by_handle_at" or any of the lines returned are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030480Successful/unsuccessful uses of the chown, fchown, fchownat, and lchown system calls in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chown" command is used to change file owner and group. ++ ++The "fchown" system call is used to change the ownership of a file referred to by the open file descriptor. ++The "fchownat" system call is used to change ownership of a file relative to a directory file descriptor. ++The "lchown" system call is used to change the ownership of the file specified by a path, which does not dereference symbolic links. ++ ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chown", "fchown", "fchownat", and "lchown" system calls by adding or updating the following line to "/etc/audit/rules.d/audit.rules": + +-The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record when successful/unsuccessful attempts to use the "fchmod" system call by performing the following command to check the file system rules in "/etc/audit/audit.rules": ++-a always,exit -F arch=b32 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod + +-$ sudo grep -w fchmod /etc/audit/audit.rules ++The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record upon successful/unsuccessful attempts to use the "chown", "fchown", "fchownat" and "lchown" system calls by using the following command to check the file system rules in "/etc/audit/audit.rules": ++ ++$ sudo grep chown /etc/audit/audit.rules ++ ++-a always,exit -F arch=b32 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod ++ ++If audit rules are not defined for "chown", "fchown", "fchownat", and "lchown" or any of the lines returned are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030490Successful/unsuccessful uses of the chmod, fchmod, and fchmodat system calls in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++ ++Audit records can be generated from various components within the information system (e.g., module or policy filter). The "chmod" system call changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits. ++ ++The "fchmod" system call is used to change permissions of a file. ++The "fchmodat" system call is used to change permissions of a file relative to a directory file descriptor. ++ ++When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way. ++ ++The system call rules are loaded into a matching engine that intercepts each syscall made by all programs on the system. Therefore, it is very important to use syscall rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. Performance can be helped, however, by combining syscalls into one rule whenever possible. ++ ++Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000169Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chmod", "fchmod", and "fchmodat" syscalls by adding or updating the following line to "/etc/audit/rules.d/audit.rules": + +--a always,exit -F arch=b32 -S fchmod -F auid>=1000 -F auid!=unset -k perm_mod +--a always,exit -F arch=b64 -S fchmod -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod + +-If the command does not return a line, or the line is commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030550Successful/unsuccessful uses of the sudo command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. ++The audit daemon must be restarted for the changes to take effect.Verify RHEL 8 generates an audit record upon successful/unsuccessful attempts to use the "chmod", "fchmod", and "fchmodat" syscalls by using the following command to check the file system rules in "/etc/audit/audit.rules": ++ ++$ sudo grep chmod /etc/audit/audit.rules ++ ++-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod ++-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod ++ ++If the command does not return an audit rule for "chmod", "fchmod", and "fchmodat", or any of the lines returned are commented out, this is a finding.SRG-OS-000062-GPOS-00031<GroupDescription></GroupDescription>RHEL-08-030550Successful/unsuccessful uses of the sudo command in RHEL 8 must generate an audit record.<VulnDiscussion>Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. + + Audit records can be generated from various components within the information system (e.g., module or policy filter). The "sudo" command allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. + +@@ -4714,17 +4325,17 @@ $ sudo egrep '(\/usr\/sbin\/(audit|au))' /etc/aide.conf + /usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512 + /usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512 + +-If any of the audit tools listed above do not have an appropriate selection line, ask the system administrator to indicate what cryptographic mechanisms are being used to protect the integrity of the audit tools. If there is no evidence of integrity protection, this is a finding.SRG-OS-000341-GPOS-00132<GroupDescription></GroupDescription>RHEL-08-030660RHEL 8 must allocate audit record storage capacity to store at least one week of audit records, when audit records are not immediately sent to a central audit record storage facility.<VulnDiscussion>To ensure RHEL 8 systems have a sufficient storage capacity in which to write the audit logs, RHEL 8 needs to be able to allocate audit record storage capacity. ++If any of the audit tools listed above do not have an appropriate selection line, ask the system administrator to indicate what cryptographic mechanisms are being used to protect the integrity of the audit tools. If there is no evidence of integrity protection, this is a finding.SRG-OS-000341-GPOS-00132<GroupDescription></GroupDescription>RHEL-08-030660RHEL 8 must allocate audit record storage capacity to store at least one week of audit records, when audit records are not immediately sent to a central audit record storage facility.<VulnDiscussion>To ensure RHEL 8 systems have a sufficient storage capacity in which to write the audit logs, RHEL 8 needs to be able to allocate audit record storage capacity. + + The task of allocating audit record storage capacity is usually performed during initial installation of RHEL 8.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001849Allocate enough storage capacity for at least one week of audit records when audit records are not immediately sent to a central audit record storage facility. + + If audit records are stored on a partition made specifically for audit records, resize the partition with sufficient space to contain one week of audit records. + +-If audit records are not stored on a partition made specifically for audit records, a new partition with sufficient space will need be to be created.Verify RHEL 8 allocates audit record storage capacity to store at least one week of audit records when audit records are not immediately sent to a central audit record storage facility. ++If audit records are not stored on a partition made specifically for audit records, a new partition with sufficient space will need be to be created.Verify RHEL 8 allocates audit record storage capacity to store at least one week of audit records when audit records are not immediately sent to a central audit record storage facility. + + Determine to which partition the audit records are being written with the following command: + +-$ sudo grep log_file /etc/audit/auditd.conf ++$ sudo grep -iw log_file /etc/audit/auditd.conf + log_file = /var/log/audit/audit.log + + Check the size of the partition to which audit records are written (with the example being /var/log/audit/) with the following command: +@@ -5016,29 +4627,18 @@ $ sudo yum remove rsh-serverSRG-OS-000095-GPOS-00049<GroupDescription></GroupDescription>RHEL-08-040020RHEL 8 must cover or disable the built-in or attached camera when not in use.<VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++If the rsh-server package is installed, this is a finding.SRG-OS-000095-GPOS-00049<GroupDescription></GroupDescription>RHEL-08-040020RHEL 8 must cover or disable the built-in or attached camera when not in use.<VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + + Failing to disconnect from collaborative computing devices (i.e., cameras) can result in subsequent compromises of organizational information. Providing easy methods to physically disconnect from such devices after a collaborative computing session helps to ensure participants actually carry out the disconnect activity without having to go through complex and tedious procedures. + +-Satisfies: SRG-OS-000095-GPOS-00049, SRG-OS-000370-GPOS-00155</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000381Configure the operating system to disable the built-in or attached camera when not in use. +- +-First determine the driver being used by the camera with the following command: ++Satisfies: SRG-OS-000095-GPOS-00049, SRG-OS-000370-GPOS-00155</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000381Configure the operating system to disable the built-in or attached camera when not in use. + +-$ sudo dmesg | grep -i video ++Build or modify the "/etc/modprobe.d/blacklist.conf" file by using the following example: + +-[ 44.630131] ACPI: Video Device [VGA] +-[ 46.655714] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/LNXVIDEO:00/input/input7 +-[ 46.670133] videodev: Linux video capture interface: v2.00 +-[ 47.226424] uvcvideo: Found UVC 1.00 device WebCam (0402:7675) +-[ 47.235752] usbcore: registered new interface driver uvcvideo +-[ 47.235756] USB Video Class driver (1.1.1) +- +-Next, build or modify the "/etc/modprobe.d/blacklist.conf" file by using the following example: +- +-##Disable WebCam ++install uvcvideo /bin/true + blacklist uvcvideo + +-Reboot the system for the settings to take effect.If the device or operating system does not have a camera installed, this requirement is not applicable. ++Reboot the system for the settings to take effect.If the device or operating system does not have a camera installed, this requirement is not applicable. + + This requirement is not applicable to mobile devices (smartphones and tablets), where the use of the camera is a local AO decision. + +@@ -5050,24 +4650,21 @@ For a built-in camera, the camera must be protected by a camera cover (e.g., lap + + If the camera is not disconnected, covered, or physically disabled, determine if it is being disabled via software with the following commands: + +-Determine if the camera is disabled via blacklist with the following command: ++Verify the operating system disables the ability to load the uvcvideo kernel module. + +-$ sudo grep blacklist /etc/modprobe.d/* ++$ sudo grep -r uvcvideo /etc/modprobe.d/* | grep "/bin/true" + +-/etc/modprobe.d/blacklist.conf:blacklist uvcvideo ++install uvcvideo /bin/true + +-Determine if a camera driver is in use with the following command: ++If the command does not return any output, or the line is commented out, and the collaborative computing device has not been authorized for use, this is a finding. + +-$ sudo dmesg | grep -i video ++Verify the camera is disabled via blacklist with the following command: + +-[ 44.630131] ACPI: Video Device [VGA] +-[ 46.655714] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/LNXVIDEO:00/input/input7 +-[ 46.670133] videodev: Linux video capture interface: v2.00 +-[ 47.226424] uvcvideo: Found UVC 1.00 device WebCam (0402:7675) +-[ 47.235752] usbcore: registered new interface driver uvcvideo +-[ 47.235756] USB Video Class driver (1.1.1) ++$ sudo grep -r uvcvideo /etc/modprobe.d/* | grep "blacklist" ++ ++blacklist uvcvideo + +-If the camera driver blacklist is missing, a camera driver is determined to be in use, and the collaborative computing device has not been authorized for use, this is a finding.SRG-OS-000095-GPOS-00049<GroupDescription></GroupDescription>RHEL-08-040021RHEL 8 must disable the asynchronous transfer mode (ATM) protocol.<VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. ++If the command does not return any output or the output is not "blacklist uvcvideo", and the collaborative computing device has not been authorized for use, this is a finding.SRG-OS-000095-GPOS-00049<GroupDescription></GroupDescription>RHEL-08-040021RHEL 8 must disable the asynchronous transfer mode (ATM) protocol.<VulnDiscussion>It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors. + + Failing to disconnect unused protocols can result in a system compromise. + +@@ -5270,25 +4867,16 @@ autofs.service - Automounts filesystems on demand + Loaded: loaded (/usr/lib/systemd/system/autofs.service; disabled) + Active: inactive (dead) + +-If the "autofs" status is set to "active" and is not documented with the Information System Security Officer (ISSO) as an operational requirement, this is a finding.SRG-OS-000114-GPOS-00059<GroupDescription></GroupDescription>RHEL-08-040080RHEL 8 must be configured to disable USB mass storage.<VulnDiscussion>USB mass storage permits easy introduction of unknown devices, thereby facilitating malicious activity. ++If the "autofs" status is set to "active" and is not documented with the Information System Security Officer (ISSO) as an operational requirement, this is a finding.SRG-OS-000114-GPOS-00059<GroupDescription></GroupDescription>RHEL-08-040080RHEL 8 must be configured to disable USB mass storage.<VulnDiscussion>USB mass storage permits easy introduction of unknown devices, thereby facilitating malicious activity. + +-Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000778Configure the operating system to disable the ability to use the USB Storage kernel module. ++Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000778Configure the operating system to disable the ability to use the USB Storage kernel module and the ability to use USB mass storage devices. + +-Create a file under "/etc/modprobe.d" with the following command: +- +-$ sudo touch /etc/modprobe.d/usb-storage.conf +- +-Add the following line to the created file: ++Add or update the following lines in the file "/etc/modprobe.d/blacklist.conf": + + install usb-storage /bin/true ++blacklist usb-storage + +-Configure the operating system to disable the ability to use USB mass storage devices. +- +-$ sudo vi /etc/modprobe.d/blacklist.conf +- +-Add or update the line: +- +-blacklist usb-storageVerify the operating system disables the ability to load the USB Storage kernel module. ++Reboot the system for the settings to take effect.Verify the operating system disables the ability to load the USB Storage kernel module. + + $ sudo grep -r usb-storage /etc/modprobe.d/* | grep -i "/bin/true" + +@@ -5304,19 +4892,28 @@ $ sudo grep usb-storage /etc/modprobe.d/* | grep -i "blacklist" + + blacklist usb-storage + +-If the command does not return any output or the output is not "blacklist usb-storage", and use of USB storage devices is not documented with the Information System Security Officer (ISSO) as an operational requirement, this is a finding.SRG-OS-000297-GPOS-00115<GroupDescription></GroupDescription>RHEL-08-040090A RHEL 8 firewall must employ a deny-all, allow-by-exception policy for allowing connections to other systems.<VulnDiscussion>Failure to restrict network connectivity only to authorized systems permits inbound connections from malicious systems. It also permits outbound connections that may facilitate exfiltration of DoD data. ++If the command does not return any output or the output is not "blacklist usb-storage" and use of USB storage devices is not documented with the Information System Security Officer (ISSO) as an operational requirement, this is a finding.SRG-OS-000297-GPOS-00115<GroupDescription></GroupDescription>RHEL-08-040090A RHEL 8 firewall must employ a deny-all, allow-by-exception policy for allowing connections to other systems.<VulnDiscussion>Failure to restrict network connectivity only to authorized systems permits inbound connections from malicious systems. It also permits outbound connections that may facilitate exfiltration of DoD data. + +-RHEL 8 incorporates the "firewalld" daemon, which allows for many different configurations. One of these configurations is zones. Zones can be utilized to a deny-all, allow-by-exception approach. The default "drop" zone will drop all incoming network packets unless it is explicitly allowed by the configuration file or is related to an outgoing network connection.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-002314Configure the "firewalld" daemon to employ a deny-all, allow-by-exception with the following commands: ++RHEL 8 incorporates the "firewalld" daemon, which allows for many different configurations. One of these configurations is zones. Zones can be utilized to a deny-all, allow-by-exception approach. The default "drop" zone will drop all incoming network packets unless it is explicitly allowed by the configuration file or is related to an outgoing network connection.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-002314Configure the "firewalld" daemon to employ a deny-all, allow-by-exception with the following commands: + + $ sudo firewall-cmd --permanent --new-zone=[custom] + + $ sudo cp /usr/lib/firewalld/zones/drop.xml /etc/firewalld/zones/[custom].xml + +-This will provide a clean configuration file to work with that employs a deny-all approach. Next, add the exceptions that are required for mission functionality. ++This will provide a clean configuration file to work with that employs a deny-all approach. Note: Add the exceptions that are required for mission functionality and update the short title in the xml file to match the [custom] zone name. + ++Reload the firewall rules to make the new [custom] zone available to load: ++$ sudo firewall-cmd --reload ++ ++Set the default zone to the new [custom] zone: + $ sudo firewall-cmd --set-default-zone=[custom] + +-Note: This is a runtime and permanent change.Verify "firewalld" is configured to employ a deny-all, allow-by-exception policy for allowing connections to other systems with the following commands: ++Note: This is a runtime and permanent change. ++Add any interfaces to the new [custom] zone: ++$ sudo firewall-cmd --permanent --zone=[custom] --change-interface=ens33 ++ ++Reload the firewall rules for changes to take effect: ++$ sudo firewall-cmd --reloadVerify "firewalld" is configured to employ a deny-all, allow-by-exception policy for allowing connections to other systems with the following commands: + + $ sudo firewall-cmd --state + +@@ -6467,22 +6064,13 @@ $ sudo egrep "[+]?acl" /etc/aide.conf + + VarFile = OwnerMode+n+l+X+acl + +-If the "acl" rule is not being used on all selection lines in the "/etc/aide.conf" file, is commented out, or ACLs are not being checked by another file integrity tool, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-040320The graphical display manager must not be installed on RHEL 8 unless approved.<VulnDiscussion>Internet services that are not required for system or application processes must not be active to decrease the attack surface of the system. Graphical display managers have a long history of security vulnerabilities and must not be used, unless approved and documented.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Document the requirement for a graphical user interface with the ISSO or reinstall the operating system without the graphical user interface. If reinstallation is not feasible, then continue with the following procedure: ++If the "acl" rule is not being used on all selection lines in the "/etc/aide.conf" file, is commented out, or ACLs are not being checked by another file integrity tool, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-040320The graphical display manager must not be installed on RHEL 8 unless approved.<VulnDiscussion>Internet services that are not required for system or application processes must not be active to decrease the attack surface of the system. Graphical display managers have a long history of security vulnerabilities and must not be used, unless approved and documented.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Document the requirement for a graphical user interface with the ISSO or reinstall the operating system without the graphical user interface. If reinstallation is not feasible, then continue with the following procedure: + + Open an SSH session and enter the following commands: + +-$ sudo systemctl set-default multi-user.target +- + $ sudo yum remove xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-server-Xwayland + +-A reboot is required for the changes to take effect.Verify that the system is configured to boot to the command line: +- +-$ systemctl get-default +-multi-user.target +- +-If the system default target is not set to "multi-user.target" and the Information System Security Officer (ISSO) lacks a documented requirement for a graphical user interface, this is a finding. +- +-Verify that a graphical user interface is not installed: ++A reboot is required for the changes to take effect.Verify that a graphical user interface is not installed: + + $ rpm -qa | grep xorg | grep server + +@@ -6610,11 +6198,11 @@ $ sudo grep -iw 'ALL' /etc/sudoers /etc/sudoers.d/* + + If the either of the following entries are returned, this is a finding: + ALL ALL=(ALL) ALL +-ALL ALL=(ALL:ALL) ALLSRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010383RHEL 8 must use the invoking user's password for privilege escalation when using "sudo".<VulnDiscussion>The sudoers security policy requires that users authenticate themselves before they can use sudo. When sudoers requires authentication, it validates the invoking user's credentials. If the rootpw, targetpw, or runaspw flags are defined and not disabled, by default the operating system will prompt the invoking user for the "root" user password. ++ALL ALL=(ALL:ALL) ALLSRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010383RHEL 8 must use the invoking user's password for privilege escalation when using "sudo".<VulnDiscussion>The sudoers security policy requires that users authenticate themselves before they can use sudo. When sudoers requires authentication, it validates the invoking user's credentials. If the rootpw, targetpw, or runaspw flags are defined and not disabled, by default the operating system will prompt the invoking user for the "root" user password. + For more information on each of the listed configurations, reference the sudoers(5) manual page.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-002227Define the following in the Defaults section of the /etc/sudoers file or a configuration file in the /etc/sudoers.d/ directory: + Defaults !targetpw + Defaults !rootpw +-Defaults !runaspwVerify that the sudoers security policy is configured to use the invoking user's password for privilege escalation. ++Defaults !runaspwVerify that the sudoers security policy is configured to use the invoking user's password for privilege escalation. + + $ sudo egrep -i '(!rootpw|!targetpw|!runaspw)' /etc/sudoers /etc/sudoers.d/* | grep -v '#' + +@@ -6622,10 +6210,11 @@ $ sudo egrep -i '(!rootpw|!targetpw|!runaspw)' /etc/sudoers /etc/sudoers.d/* | g + /etc/sudoers:Defaults !rootpw + /etc/sudoers:Defaults !runaspw + +-If no results are returned, this is a finding ++If no results are returned, this is a finding. ++If results are returned from more than one file location, this is a finding. + If "Defaults !targetpw" is not defined, this is a finding. + If "Defaults !rootpw" is not defined, this is a finding. +-If "Defaults !runaspw" is not defined, this is a finding.SRG-OS-000373-GPOS-00156<GroupDescription></GroupDescription>RHEL-08-010384RHEL 8 must require re-authentication when using the "sudo" command.<VulnDiscussion>Without re-authentication, users may access resources or perform tasks for which they do not have authorization. ++If "Defaults !runaspw" is not defined, this is a finding.SRG-OS-000373-GPOS-00156<GroupDescription></GroupDescription>RHEL-08-010384RHEL 8 must require re-authentication when using the "sudo" command.<VulnDiscussion>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 the organization requires the user to re-authenticate when using the "sudo" command. + +@@ -6635,11 +6224,13 @@ $ sudo visudo + + Add or modify the following line: + Defaults timestamp_timeout=[value] +-Note: The "[value]" must be a number that is greater than or equal to "0".Verify the operating system requires re-authentication when using the "sudo" command to elevate privileges. ++Note: The "[value]" must be a number that is greater than or equal to "0".Verify the operating system requires re-authentication when using the "sudo" command to elevate privileges. + + $ sudo grep -i 'timestamp_timeout' /etc/sudoers /etc/sudoers.d/* + /etc/sudoers:Defaults timestamp_timeout=0 + ++If results are returned from more than one file location, this is a finding. ++ + If "timestamp_timeout" is set to a negative number, is commented out, or no results are returned, this is a finding.SRG-OS-000023-GPOS-00006<GroupDescription></GroupDescription>RHEL-08-010049RHEL 8 must display a banner before granting local or remote access to the system via a graphical user logon.<VulnDiscussion>Display of a standardized and approved use notification before granting access to the operating system ensures privacy and security notification verbiage used is consistent with applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance. + + System use notifications are required only for access via logon interfaces with human users and are not required when such human interfaces do not exist. +@@ -6670,19 +6261,7 @@ $ sudo grep banner-message-enable /etc/dconf/db/local.d/* + + banner-message-enable=true + +-If "banner-message-enable" is set to "false" or is missing, this is a finding.SRG-OS-000073-GPOS-00041<GroupDescription></GroupDescription>RHEL-08-010131The RHEL 8 system-auth file must be configured to use a sufficient number of hashing rounds.<VulnDiscussion>The system must use a strong hashing algorithm to store the password. The system must use a sufficient number of hashing rounds to ensure the required level of entropy. +- +-Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000196Configure RHEL 8 to encrypt all stored passwords with a strong cryptographic hash. +- +-Edit/modify the following line in the "etc/pam.d/system-auth" file and set "rounds" to a value no lower than "5000": +- +-password sufficient pam_unix.so sha512 rounds=5000Check that a minimum number of hash rounds is configured by running the following command: +- +-$ sudo grep rounds /etc/pam.d/system-auth +- +-password sufficient pam_unix.so sha512 rounds=5000 +- +-If "rounds" has a value below "5000", or is commented out, this is a finding.SRG-OS-000080-GPOS-00048<GroupDescription></GroupDescription>RHEL-08-010141RHEL 8 operating systems booted with United Extensible Firmware Interface (UEFI) must require a unique superusers name upon booting into single-user mode and maintenance.<VulnDiscussion>If the system does not require valid authentication before it boots into single-user or maintenance mode, anyone who invokes single-user or maintenance mode is granted privileged access to all files on the system. GRUB 2 is the default boot loader for RHEL 8 and is designed to require a password to boot into single-user mode or make modifications to the boot menu. ++If "banner-message-enable" is set to "false" or is missing, this is a finding.SRG-OS-000080-GPOS-00048<GroupDescription></GroupDescription>RHEL-08-010141RHEL 8 operating systems booted with United Extensible Firmware Interface (UEFI) must require a unique superusers name upon booting into single-user mode and maintenance.<VulnDiscussion>If the system does not require valid authentication before it boots into single-user or maintenance mode, anyone who invokes single-user or maintenance mode is granted privileged access to all files on the system. GRUB 2 is the default boot loader for RHEL 8 and is designed to require a password to boot into single-user mode or make modifications to the boot menu. + + The GRUB 2 superuser account is an account of last resort. Establishing a unique username for this account hardens the boot loader against brute force attacks. Due to the nature of the superuser account database being distinct from the OS account database, this allows the use of a username that is not among those within the OS account database. Examples of non-unique superusers names are root, superuser, unlock, etc.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000213Configure the system to have a unique name for the grub superusers account. + +@@ -6730,21 +6309,21 @@ $ sudo grep sulogin-shell /usr/lib/systemd/system/emergency.service + + ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency + +-If the "ExecStart" line is configured for anything other than "/usr/lib/systemd/systemd-sulogin-shell emergency", commented out, or missing, this is a finding.SRG-OS-000120-GPOS-00061<GroupDescription></GroupDescription>RHEL-08-010159The RHEL 8 pam_unix.so module must be configured in the system-auth file to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication.<VulnDiscussion>Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and DoD data may be compromised. ++If the "ExecStart" line is configured for anything other than "/usr/lib/systemd/systemd-sulogin-shell emergency", commented out, or missing, this is a finding.SRG-OS-000120-GPOS-00061<GroupDescription></GroupDescription>RHEL-08-010159The RHEL 8 pam_unix.so module must be configured in the system-auth file to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication.<VulnDiscussion>Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and DoD data may be compromised. + + RHEL 8 systems utilizing encryption are required to use FIPS-compliant mechanisms for authenticating to cryptographic modules. + +-FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules utilize authentication that meets DoD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000803Configure RHEL 8 to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication. ++FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules utilize authentication that meets DoD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000803Configure RHEL 8 to use a FIPS 140-2 approved cryptographic hashing algorithm for system authentication. + + Edit/modify the following line in the "/etc/pam.d/system-auth" file to include the sha512 option for pam_unix.so: + +-password sufficient pam_unix.so sha512 rounds=5000Verify that pam_unix.so module is configured to use sha512. ++password sufficient pam_unix.so sha512Verify that pam_unix.so module is configured to use sha512. + + Check that pam_unix.so module is configured to use sha512 in /etc/pam.d/system-auth with the following command: + + $ sudo grep password /etc/pam.d/system-auth | grep pam_unix + +-password sufficient pam_unix.so sha512 rounds=5000 ++password sufficient pam_unix.so sha512 + + If "sha512" is missing, or is commented out, this is a finding.SRG-OS-000163-GPOS-00072<GroupDescription></GroupDescription>RHEL-08-010201The RHEL 8 SSH daemon must be configured with a timeout interval.<VulnDiscussion>Terminating an idle SSH session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended. In addition, quickly terminating an idle SSH session will also free up resources committed by the managed network element. + +@@ -6769,7 +6348,7 @@ $ sudo grep -i clientalive /etc/ssh/sshd_config + ClientAliveInterval 600 + ClientAliveCountMax 0 + +-If "ClientAliveInterval" does not exist, does not have a value of "600" or less in "/etc/ssh/sshd_config", or is commented out, this is a finding.SRG-OS-000250-GPOS-00093<GroupDescription></GroupDescription>RHEL-08-010287The RHEL 8 SSH daemon must be configured to use system-wide crypto policies.<VulnDiscussion>Without cryptographic integrity protections, information can be altered by unauthorized users without detection. ++If "ClientAliveInterval" does not exist, does not have a value of "600" or less in "/etc/ssh/sshd_config", or is commented out, this is a finding.SRG-OS-000250-GPOS-00093<GroupDescription></GroupDescription>RHEL-08-010287The RHEL 8 SSH daemon must be configured to use system-wide crypto policies.<VulnDiscussion>Without cryptographic integrity protections, information can be altered by unauthorized users without detection. + + Remote access (e.g., RDP) is access to DoD nonpublic information systems by an authorized user (or an information system) communicating through an external, non-organization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. + +@@ -6777,17 +6356,17 @@ Cryptographic mechanisms used for protecting the integrity of information includ + + RHEL 8 incorporates system-wide crypto policies by default. The SSH configuration file has no effect on the ciphers, MACs, or algorithms unless specifically defined in the /etc/sysconfig/sshd file. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/ directory. + +-Satisfies: SRG-OS-000250-GPOS-00093, SRG-OS-000393-GPOS-00173, SRG-OS-000394-GPOS-00174, SRG-OS-000125-GPOS-00065</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001453Configure the RHEL 8 SSH daemon to use system-wide crypto policies by adding the following line to /etc/sysconfig/sshd: ++Satisfies: SRG-OS-000250-GPOS-00093, SRG-OS-000393-GPOS-00173, SRG-OS-000394-GPOS-00174, SRG-OS-000125-GPOS-00065</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001453Configure the RHEL 8 SSH daemon to use system-wide crypto policies by adding the following line to /etc/sysconfig/sshd: + +-# crypto_policy= ++# CRYPTO_POLICY= + +-A reboot is required for the changes to take effect.Verify that system-wide crypto policies are in effect: ++A reboot is required for the changes to take effect.Verify that system-wide crypto policies are in effect: + +-$ sudo grep -i crypto_policy /etc/sysconfig/sshd ++$ sudo grep CRYPTO_POLICY /etc/sysconfig/sshd + +-# crypto_policy= ++# CRYPTO_POLICY= + +-If the "crypto_policy" is uncommented, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010472RHEL 8 must have the packages required to use the hardware random number generator entropy gatherer service.<VulnDiscussion>The most important characteristic of a random number generator is its randomness, namely its ability to deliver random numbers that are impossible to predict. Entropy in computer security is associated with the unpredictability of a source of randomness. The random source with high entropy tends to achieve a uniform distribution of random values. Random number generators are one of the most important building blocks of cryptosystems. ++If the "CRYPTO_POLICY " is uncommented, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010472RHEL 8 must have the packages required to use the hardware random number generator entropy gatherer service.<VulnDiscussion>The most important characteristic of a random number generator is its randomness, namely its ability to deliver random numbers that are impossible to predict. Entropy in computer security is associated with the unpredictability of a source of randomness. The random source with high entropy tends to achieve a uniform distribution of random values. Random number generators are one of the most important building blocks of cryptosystems. + + The rngd service feeds random data from hardware device to kernel random device. Quality (non-predictable) random number generation is important for several security functions (i.e., ciphers).</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Install the packages required to enabled the hardware random number generator entropy gatherer service with the following command: + +@@ -6819,13 +6398,13 @@ $ sudo grep /var/tmp /etc/fstab + + UUID=c274f65f /var/tmp xfs noatime,nobarrier 1 2 + +-If a separate entry for "/var/tmp" is not in use, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010572RHEL 8 must prevent files with the setuid and setgid bit set from being executed on the /boot/efi directory.<VulnDiscussion>The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure the "/etc/fstab" to use the "nosuid" option on the /boot/efi directory.For systems that use BIOS, this is Not Applicable. ++If a separate entry for "/var/tmp" is not in use, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010572RHEL 8 must prevent files with the setuid and setgid bit set from being executed on the /boot/efi directory.<VulnDiscussion>The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure the "/etc/fstab" to use the "nosuid" option on the /boot/efi directory.For systems that use BIOS, this is Not Applicable. + + Verify the /boot/efi directory is mounted with the "nosuid" option with the following command: + + $ sudo mount | grep '\s/boot/efi\s' + +-/dev/sda1 on /boot/efi type xfs (rw,nosuid,relatime,seclabe,attr2,inode64,noquota) ++/dev/sda1 on /boot/efi type vfat (rw,nosuid,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro) + + If the /boot/efi file system does not have the "nosuid" option set, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010731All RHEL 8 local interactive user home directory files must have mode 0750 or less permissive.<VulnDiscussion>Excessive permissions on local interactive user home directories may allow unauthorized access to user files by other users.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Set the mode on files and directories in the local interactive user home directory with the following command: + +@@ -7114,7 +6693,7 @@ fapolicyd.service - File Access Policy Daemon + Loaded: loaded (/usr/lib/systemd/system/fapolicyd.service; enabled; vendor preset: disabled) + Active: active (running) + +-If fapolicyd is not enabled and running, this is a finding.SRG-OS-000368-GPOS-00154<GroupDescription></GroupDescription>RHEL-08-040137The RHEL 8 fapolicy module must be configured to employ a deny-all, permit-by-exception policy to allow the execution of authorized software programs.<VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. ++If fapolicyd is not enabled and running, this is a finding.SRG-OS-000368-GPOS-00154<GroupDescription></GroupDescription>RHEL-08-040137The RHEL 8 fapolicy module must be configured to employ a deny-all, permit-by-exception policy to allow the execution of authorized software programs.<VulnDiscussion>The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as whitelisting. + + Utilizing a whitelist provides a configuration management method for allowing the execution of only authorized software. Using only authorized software decreases risk by limiting the number of potential vulnerabilities. Verification of whitelisted software occurs prior to execution or at system startup. + +@@ -7124,11 +6703,7 @@ RHEL 8 ships with many optional packages. One such package is a file access poli + + Proceed with caution with enforcing the use of this daemon. Improper configuration may render the system non-functional. The "fapolicyd" API is not namespace aware and can cause issues when launching or running containers. + +-Satisfies: SRG-OS-000368-GPOS-00154, SRG-OS-000370-GPOS-00155, SRG-OS-000480-GPOS-00232</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001764Configure RHEL 8 to employ a deny-all, permit-by-exception application whitelisting policy with "fapolicyd" using the following command: +- +-Note: Running this command requires a root shell +- +-# mount | egrep '^tmpfs| ext4| ext3| xfs' | awk '{ printf "%s\n", $3 }' >> /etc/fapolicyd/fapolicyd.mounts ++Satisfies: SRG-OS-000368-GPOS-00154, SRG-OS-000370-GPOS-00155, SRG-OS-000480-GPOS-00232</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001764Configure RHEL 8 to employ a deny-all, permit-by-exception application whitelisting policy with "fapolicyd". + + With the "fapolicyd" installed and enabled, configure the daemon to function in permissive mode until the whitelist is built correctly to avoid system lockout. Do this by editing the "/etc/fapolicyd/fapolicyd.conf" file with the following line: + +@@ -7138,7 +6713,7 @@ Build the whitelist in the "/etc/fapolicyd/fapolicyd.rules" file ensuring the la + + Once it is determined the whitelist is built correctly, set the fapolicyd to enforcing mode by editing the "permissive" line in the /etc/fapolicyd/fapolicyd.conf file. + +-permissive = 0Verify the RHEL 8 "fapolicyd" employs a deny-all, permit-by-exception policy. ++permissive = 0Verify the RHEL 8 "fapolicyd" employs a deny-all, permit-by-exception policy. + + Check that "fapolicyd" is in enforcement mode with the following command: + +@@ -7146,7 +6721,7 @@ $ sudo grep permissive /etc/fapolicyd/fapolicyd.conf + + permissive = 0 + +-Check that fapolicyd employs a deny-all policy on system mounts with the following commands: ++Check that fapolicyd employs a deny-all policy on system mounts with the following command: + + $ sudo tail /etc/fapolicyd/fapolicyd.rules + +@@ -7154,18 +6729,7 @@ allow exe=/usr/bin/python3.7 : ftype=text/x-python + deny_audit perm=any pattern=ld_so : all + deny perm=any all : all + +-$ sudo cat /etc/fapolicyd/fapolicyd.mounts +- +-/dev/shm +-/run +-/sys/fs/cgroup +-/ +-/home +-/boot +-/run/user/42 +-/run/user/1000 +- +-If fapolicyd is not running in enforcement mode on all system mounts with a deny-all, permit-by-exception policy, this is a finding.SRG-OS-000378-GPOS-00163<GroupDescription></GroupDescription>RHEL-08-040139RHEL 8 must have the USBGuard installed.<VulnDiscussion>Without authenticating devices, unidentified or unknown devices may be introduced, thereby facilitating malicious activity. ++If fapolicyd is not running in enforcement mode with a deny-all, permit-by-exception policy, this is a finding.SRG-OS-000378-GPOS-00163<GroupDescription></GroupDescription>RHEL-08-040139RHEL 8 must have the USBGuard installed.<VulnDiscussion>Without authenticating devices, unidentified or unknown devices may be introduced, thereby facilitating malicious activity. + Peripherals include, but are not limited to, such devices as flash drives, external storage, and printers. + A new feature that RHEL 8 provides is the USBGuard software framework. The USBguard-daemon is the main component of the USBGuard software framework. It runs as a service in the background and enforces the USB device authorization policy for all USB devices. The policy is defined by a set of rules using a rule language described in the usbguard-rules.conf file. The policy and the authorization state of USB devices can be modified during runtime using the usbguard tool. + +@@ -7511,4 +7075,201 @@ $ sudo grep -r net.ipv4.conf.all.forwarding /etc/sysctl.d/*.conf + + If "net.ipv4.conf.all.forwarding" is not set to "0", is missing or commented out, this is a finding. + +-If the configuration file does not begin with "99-", this is a finding. +\ No newline at end of file ++If the configuration file does not begin with "99-", this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010121The RHEL 8 operating system must not have accounts configured with blank or null passwords.<VulnDiscussion>If an account has an empty password, anyone could log on and run commands with the privileges of that account. Accounts with empty passwords should never be used in operational environments.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure all accounts on the system to have a password or lock the account with the following commands: ++ ++Perform a password reset: ++$ sudo passwd [username] ++Lock an account: ++$ sudo passwd -l [username]Check the "/etc/shadow" file for blank passwords with the following command: ++ ++$ sudo awk -F: '!$2 {print $1}' /etc/shadow ++ ++If the command returns any results, this is a finding.SRG-OS-000259-GPOS-00100<GroupDescription></GroupDescription>RHEL-08-010331RHEL 8 library directories must have mode 755 or less permissive.<VulnDiscussion>If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. ++ ++This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001499Configure the library directories to be protected from unauthorized access. Run the following command, replacing "[DIRECTORY]" with any library directory with a mode more permissive than 755. ++ ++$ sudo chmod 755 [DIRECTORY]Verify the system-wide shared library directories within "/lib", "/lib64", "/usr/lib" and "/usr/lib64" have mode "755" or less permissive with the following command: ++ ++$ sudo find /lib /lib64 /usr/lib /usr/lib64 -perm /022 -type d -exec stat -c "%n %a" '{}' \; ++ ++If any system-wide shared library directories are found to be group-writable or world-writable, this is a finding.SRG-OS-000259-GPOS-00100<GroupDescription></GroupDescription>RHEL-08-010341RHEL 8 library directories must be owned by root.<VulnDiscussion>If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. ++ ++This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001499Configure the system-wide shared library directories within (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access. ++ ++Run the following command, replacing "[DIRECTORY]" with any library directory not owned by "root". ++ ++$ sudo chown root [DIRECTORY]Verify the system-wide shared library directories are owned by "root" with the following command: ++ ++$ sudo find /lib /lib64 /usr/lib /usr/lib64 ! -user root -type d -exec stat -c "%n %U" '{}' \; ++ ++If any system-wide shared library directory is returned, this is a finding.SRG-OS-000259-GPOS-00100<GroupDescription></GroupDescription>RHEL-08-010351RHEL 8 library directories must be group-owned by root or a system account.<VulnDiscussion>If RHEL 8 were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. ++ ++This requirement applies to RHEL 8 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges. Only qualified and authorized individuals will be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-001499Configure the system-wide shared library directories (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access. ++ ++Run the following command, replacing "[DIRECTORY]" with any library directory not group-owned by "root". ++ ++$ sudo chgrp root [DIRECTORY]Verify the system-wide shared library directories are group-owned by "root" with the following command: ++ ++$ sudo find /lib /lib64 /usr/lib /usr/lib64 ! -group root -type d -exec stat -c "%n %G" '{}' \; ++ ++If any system-wide shared library directory is returned and is not group-owned by a required system account, this is a finding.SRG-OS-000445-GPOS-00199<GroupDescription></GroupDescription>RHEL-08-010359The RHEL 8 operating system must use a file integrity tool to verify correct operation of all security functions.<VulnDiscussion>Without verification of the security functions, security functions may not operate correctly, and the failure may go unnoticed. Security function is defined as the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Security functionality includes, but is not limited to, establishing system accounts, configuring access authorizations (i.e., permissions, privileges), setting events to be audited, and setting intrusion detection parameters. ++ ++This requirement applies to the RHEL 8 operating system performing security function verification/testing and/or systems and environments that require this functionality.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-002696Install the AIDE package by running the following command: ++ ++$ sudo yum install aideVerify that Advanced Intrusion Detection Environment (AIDE) is installed and verifies the correct operation of all security functions. ++ ++Check that the AIDE package is installed with the following command: ++ ++$ sudo rpm -q aide ++ ++aide-0.16-14.el8.x86_64 ++ ++If AIDE is not installed, ask the System Administrator how file integrity checks are performed on the system. ++ ++If there is no application installed to perform integrity checks, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-010379RHEL 8 must specify the default "include" directory for the /etc/sudoers file.<VulnDiscussion>The "sudo" command allows authorized users to run programs (including shells) as other users, system users, and root. The "/etc/sudoers" file is used to configure authorized "sudo" users as well as the programs they are allowed to run. Some configuration options in the "/etc/sudoers" file allow configured users to run programs without re-authenticating. Use of these configuration options makes it easier for one compromised account to be used to compromise other accounts. ++ ++It is possible to include other sudoers files from within the sudoers file currently being parsed using the #include and #includedir directives. When sudo reaches this line it will suspend processing of the current file (/etc/sudoers) and switch to the specified file/directory. Once the end of the included file(s) is reached, the rest of /etc/sudoers will be processed. Files that are included may themselves include other files. A hard limit of 128 nested include files is enforced to prevent include file loops.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure the /etc/sudoers file to only include the /etc/sudoers.d directory. ++ ++Edit the /etc/sudoers file with the following command: ++ ++$ sudo visudo ++ ++Add or modify the following line: ++#includedir /etc/sudoers.dVerify the operating system specifies only the default "include" directory for the /etc/sudoers file with the following command: ++ ++$ sudo grep include /etc/sudoers ++ ++#includedir /etc/sudoers.d ++ ++If the results are not "/etc/sudoers.d" or additional files or directories are specified, this is a finding. ++ ++Verify the operating system does not have nested "include" files or directories within the /etc/sudoers.d directory with the following command: ++ ++$ sudo grep include /etc/sudoers.d/* ++ ++If results are returned, this is a finding.SRG-OS-000373-GPOS-00156<GroupDescription></GroupDescription>RHEL-08-010385The RHEL 8 operating system must not be configured to bypass password requirements for privilege escalation.<VulnDiscussion>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 the user re-authenticate. ++ ++Satisfies: SRG-OS-000373-GPOS-00156, SRG-OS-000373-GPOS-00157, SRG-OS-000373-GPOS-00158</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-002038Configure the operating system to require users to supply a password for privilege escalation. ++ ++Check the configuration of the "/etc/ pam.d/sudo" file with the following command: ++$ sudo vi /etc/pam.d/sudo ++ ++Remove any occurrences of "pam_succeed_if" in the file.Verify the operating system is not be configured to bypass password requirements for privilege escalation. ++ ++Check the configuration of the "/etc/pam.d/sudo" file with the following command: ++ ++$ sudo grep pam_succeed_if /etc/pam.d/sudo ++ ++If any occurrences of "pam_succeed_if" is returned from the command, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-020101RHEL 8 must ensure the password complexity module is enabled in the system-auth file.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. ++ ++RHEL 8 uses "pwquality" as a mechanism to enforce password complexity. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure the operating system to use "pwquality" to enforce password complexity rules. ++ ++Add the following line to the "/etc/pam.d/system-auth" file(or modify the line to have the required value): ++ ++password required pam_pwquality.soVerify the operating system uses "pwquality" to enforce the password complexity rules. ++ ++Check for the use of "pwquality" in the system-auth file with the following command: ++ ++$ sudo cat /etc/pam.d/system-auth | grep pam_pwquality ++ ++password required pam_pwquality.so ++ ++If the command does not return a line containing the value "pam_pwquality.so", or the line is commented out, this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-020102RHEL 8 systems below version 8.4 must ensure the password complexity module in the system-auth file is configured for three retries or less.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. ++ ++RHEL 8 uses "pwquality" as a mechanism to enforce password complexity. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth ++ ++By limiting the number of attempts to meet the pwquality module complexity requirements before returning with an error, the system will audit abnormal attempts at password changes.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure the operating system to limit the "pwquality" retry option to 3. ++ ++Add the following line to the "/etc/pam.d/system-auth" file (or modify the line to have the required value): ++ ++password required pam_pwquality.so retry=3Note: This requirement applies to RHEL versions 8.0 through 8.3. If the system is RHEL version 8.4 or newer, this requirement is not applicable. ++ ++Verify the operating system is configured to limit the "pwquality" retry option to 3. ++ ++Check for the use of the "pwquality" retry option in the system-auth file with the following command: ++ ++$ sudo cat /etc/pam.d/system-auth | grep pam_pwquality ++ ++password required pam_pwquality.so retry=3 ++ ++If the value of "retry" is set to "0" or greater than "3", this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-020103RHEL 8 systems below version 8.4 must ensure the password complexity module in the password-auth file is configured for three retries or less.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. ++ ++RHEL 8 uses "pwquality" as a mechanism to enforce password complexity. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth ++ ++By limiting the number of attempts to meet the pwquality module complexity requirements before returning with an error, the system will audit abnormal attempts at password changes.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure the operating system to limit the "pwquality" retry option to 3. ++ ++Add the following line to the "/etc/pam.d/password-auth" file (or modify the line to have the required value): ++ ++password required pam_pwquality.so retry=3Note: This requirement applies to RHEL versions 8.0 through 8.3. If the system is RHEL version 8.4 or newer, this requirement is not applicable. ++ ++Verify the operating system is configured to limit the "pwquality" retry option to 3. ++ ++Check for the use of the "pwquality" retry option in the password-auth file with the following command: ++ ++$ sudo cat /etc/pam.d/password-auth | grep pam_pwquality ++ ++password required pam_pwquality.so retry=3 ++ ++If the value of "retry" is set to "0" or greater than "3", this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-020104RHEL 8 systems, version 8.4 and above, must ensure the password complexity module is configured for three retries or less.<VulnDiscussion>Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system. ++ ++RHEL 8 utilizes "pwquality" as a mechanism to enforce password complexity. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth ++By limiting the number of attempts to meet the pwquality module complexity requirements before returning with an error, the system will audit abnormal attempts at password changes.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Configure the operating system to limit the "pwquality" retry option to 3. ++ ++Add the following line to the "/etc/security/pwquality.conf" file(or modify the line to have the required value): ++ ++retry = 3Note: This requirement applies to RHEL versions 8.4 or newer. If the system is RHEL below version 8.4, this requirement is not applicable. ++ ++Verify the operating system is configured to limit the "pwquality" retry option to 3. ++ ++Check for the use of the "pwquality" retry option with the following command: ++ ++$ sudo grep retry /etc/security/pwquality.conf ++ ++retry = 3 ++ ++If the value of "retry" is set to "0" or greater than "3", is commented out or missing, this is a finding. ++ ++Check for the use of the "pwquality" retry option in the system-auth and password-auth files with the following command: ++ ++$ sudo grep retry /etc/pam.d/system-auth /etc/pam.d/password-auth ++ ++If the command returns any results, this is a finding.SRG-OS-000077-GPOS-00045<GroupDescription></GroupDescription>RHEL-08-020221RHEL 8 must be configured in the system-auth file to prohibit password reuse for a minimum of five generations.<VulnDiscussion>Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. If the information system or application allows the user to reuse their password consecutively when that password has exceeded its defined lifetime, the end result is a password that is not changed per policy requirements. ++ ++RHEL 8 uses "pwhistory" consecutively as a mechanism to prohibit password reuse. This is set in both: ++/etc/pam.d/password-auth ++/etc/pam.d/system-auth. ++ ++Note that manual changes to the listed files may be overwritten by the "authselect" program.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000200Configure the operating system in the system-auth file to prohibit password reuse for a minimum of five generations. ++ ++Add the following line in "/etc/pam.d/system-auth" (or modify the line to have the required value): ++ ++password required pam_pwhistory.so use_authtok remember=5 retry=3Verify the operating system is configured in the system-auth file to prohibit password reuse for a minimum of five generations. ++ ++Check for the value of the "remember" argument in "/etc/pam.d/password-auth" with the following command: ++ ++$ sudo grep -i remember /etc/pam.d/password-auth ++ ++password required pam_pwhistory.so use_authtok remember=5 retry=3 ++ ++If the line containing "pam_pwhistory.so" does not have the "remember" module argument set, is commented out, or the value of the "remember" module argument is set to less than "5", this is a finding.SRG-OS-000480-GPOS-00227<GroupDescription></GroupDescription>RHEL-08-040321The graphical display manager must not be the default target on RHEL 8 unless approved.<VulnDiscussion>Internet services that are not required for system or application processes must not be active to decrease the attack surface of the system. Graphical display managers have a long history of security vulnerabilities and must not be used, unless approved and documented.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target Red Hat Enterprise Linux 8DISADPMS TargetRed Hat Enterprise Linux 82921CCI-000366Document the requirement for a graphical user interface with the ISSO or reinstall the operating system without the graphical user interface. If reinstallation is not feasible, then continue with the following procedure: ++ ++Open an SSH session and enter the following commands: ++ ++$ sudo systemctl set-default multi-user.target ++ ++A reboot is required for the changes to take effect.Verify that the system is configured to boot to the command line: ++ ++$ systemctl get-default ++multi-user.target ++ ++If the system default target is not set to "multi-user.target" and the Information System Security Officer (ISSO) lacks a documented requirement for a graphical user interface, this is a finding. +\ No newline at end of file +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index b5621425b96..9c157b7134d 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -1,7 +1,7 @@ + title: DISA STIG for Red Hat Enterprise Linux 8 + description: 'This profile contains configuration checks that align to the + +- DISA STIG for Red Hat Enterprise Linux 8 V1R4. ++ DISA STIG for Red Hat Enterprise Linux 8 V1R5. + + + In addition to being applicable to Red Hat Enterprise Linux 8, DISA recognizes +@@ -23,7 +23,7 @@ description: 'This profile contains configuration checks that align to the + - Red Hat Containers with a Red Hat Enterprise Linux 8 image' + extends: null + metadata: +- version: V1R4 ++ version: V1R5 + SMEs: + - mab879 + - ggbecker +diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile +index 31221ed632c..470669753f5 100644 +--- a/tests/data/profile_stability/rhel8/stig_gui.profile ++++ b/tests/data/profile_stability/rhel8/stig_gui.profile +@@ -1,7 +1,7 @@ + title: DISA STIG with GUI for Red Hat Enterprise Linux 8 + description: 'This profile contains configuration checks that align to the + +- DISA STIG with GUI for Red Hat Enterprise Linux 8 V1R4. ++ DISA STIG with GUI for Red Hat Enterprise Linux 8 V1R5. + + + In addition to being applicable to Red Hat Enterprise Linux 8, DISA recognizes +@@ -34,7 +34,7 @@ description: 'This profile contains configuration checks that align to the + standard DISA STIG for Red Hat Enterprise Linux 8 profile.' + extends: null + metadata: +- version: V1R4 ++ version: V1R5 + SMEs: + - mab879 + - ggbecker diff --git a/SOURCES/scap-security-guide-0.1.61-update_RHEL_STIG-PR_8130.patch b/SOURCES/scap-security-guide-0.1.61-update_RHEL_STIG-PR_8130.patch new file mode 100644 index 0000000..8c79a50 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update_RHEL_STIG-PR_8130.patch @@ -0,0 +1,685 @@ +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/rule.yml +index dac47a1c6d1..3a6167a5717 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/rule.yml +@@ -39,7 +39,7 @@ references: + nist: CM-5(6),CM-5(6).1 + srg: SRG-OS-000259-GPOS-00100 + stigid@ol8: OL08-00-010350 +- stigid@rhel8: RHEL-08-010350 ++ stigid@rhel8: RHEL-08-010351 + stigid@sle12: SLES-12-010876 + stigid@sle15: SLES-15-010356 + stigid@ubuntu2004: UBTU-20-010431 +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/all_dirs_ok.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/all_dirs_ok.pass.sh +index 50fdb17bd2e..6a05a2b82ea 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/all_dirs_ok.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/all_dirs_ok.pass.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,Red Hat Enterprise Linux 8,multi_platform_fedora ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora + + DIRS="/lib /lib64 /usr/lib /usr/lib64" + for dirPath in $DIRS; do +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/correct_groupowner.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/correct_groupowner.pass.sh +new file mode 100644 +index 00000000000..6a05a2b82ea +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/correct_groupowner.pass.sh +@@ -0,0 +1,6 @@ ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora ++ ++DIRS="/lib /lib64 /usr/lib /usr/lib64" ++for dirPath in $DIRS; do ++ find "$dirPath" -type d -exec chgrp root '{}' \; ++done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/incorrect_groupowner.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/incorrect_groupowner.fail.sh +new file mode 100644 +index 00000000000..36461f5e5c3 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/incorrect_groupowner.fail.sh +@@ -0,0 +1,6 @@ ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora ++ ++DIRS="/lib /lib64 /usr/lib /usr/lib64" ++for dirPath in $DIRS; do ++ mkdir -p "$dirPath/testme" && chgrp nobody "$dirPath/testme" ++done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/incorrect_groupowner_2.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/incorrect_groupowner_2.fail.sh +new file mode 100644 +index 00000000000..3f09e3dd018 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/incorrect_groupowner_2.fail.sh +@@ -0,0 +1,6 @@ ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora ++ ++DIRS="/lib /lib64 /usr/lib /usr/lib64" ++for dirPath in $DIRS; do ++ mkdir -p "$dirPath/testme/test2" && chgrp nobody "$dirPath/testme/test2" ++done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/nobody_group_owned_dir_on_lib.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/nobody_group_owned_dir_on_lib.fail.sh +index 043ad6b2dee..36461f5e5c3 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/nobody_group_owned_dir_on_lib.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/tests/nobody_group_owned_dir_on_lib.fail.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,Red Hat Enterprise Linux 8,multi_platform_fedora ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora + + DIRS="/lib /lib64 /usr/lib /usr/lib64" + for dirPath in $DIRS; do +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_binary_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_binary_dirs/rule.yml +index e2362388678..ba923d8ac55 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_binary_dirs/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_binary_dirs/rule.yml +@@ -27,7 +27,7 @@ references: + srg: SRG-OS-000258-GPOS-00099 + stigid@ubuntu2004: UBTU-20-010424 + +-ocil_clause: 'any system exectables directories are found to not be owned by root' ++ocil_clause: 'any system executables directories are found to not be owned by root' + + ocil: |- + System executables are stored in the following directories by default: +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/oval/shared.xml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/oval/shared.xml +deleted file mode 100644 +index 28e193f827c..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/oval/shared.xml ++++ /dev/null +@@ -1,28 +0,0 @@ +- +- +- {{{ oval_metadata(" +- Checks that /lib, /lib64, /usr/lib, /usr/lib64, /lib/modules, and +- directories therein, are owned by root. +- ") }}} +- +- +- +- +- +- +- +- +- +- +- +- +- ^\/lib(|64)\/|^\/usr\/lib(|64)\/ +- +- state_owner_library_dirs_not_root +- +- +- +- 0 +- +- +- +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/rule.yml +index d6a0beddf6e..f0781b307b3 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/rule.yml +@@ -27,6 +27,8 @@ rationale: |- + severity: medium + + identifiers: ++ cce@rhel8: CCE-89021-0 ++ cce@rhel9: CCE-89022-8 + cce@sle12: CCE-83236-0 + cce@sle15: CCE-85735-9 + +@@ -34,6 +36,7 @@ references: + disa: CCI-001499 + nist: CM-5(6),CM-5(6).1 + srg: SRG-OS-000259-GPOS-00100 ++ stigid@rhel8: RHEL-08-010341 + stigid@sle12: SLES-12-010874 + stigid@sle15: SLES-15-010354 + stigid@ubuntu2004: UBTU-20-010429 +@@ -49,3 +52,14 @@ ocil: |- + For each of these directories, run the following command to find files not + owned by root: +
    $ sudo find -L $DIR ! -user root -type d -exec chown root {} \;
    ++ ++template: ++ name: file_owner ++ vars: ++ filepath: ++ - /lib/ ++ - /lib64/ ++ - /usr/lib/ ++ - /usr/lib64/ ++ recursive: 'true' ++ fileuid: '0' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/all_dirs_ok.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/correct_owner.pass.sh +similarity index 69% +rename from linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/all_dirs_ok.pass.sh +rename to linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/correct_owner.pass.sh +index 01891664f64..a0d4990582e 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/all_dirs_ok.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/correct_owner.pass.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle ++# platform = multi_platform_sle,multi_platform_rhel + DIRS="/lib /lib64 /usr/lib /usr/lib64" + for dirPath in $DIRS; do + find "$dirPath" -type d -exec chown root '{}' \; +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/nobody_owned_dir_on_lib.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/incorrect_owner.fail.sh +similarity index 63% +rename from linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/nobody_owned_dir_on_lib.fail.sh +rename to linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/incorrect_owner.fail.sh +index 59b8a1867eb..f366c2d7922 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/nobody_owned_dir_on_lib.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_ownership_library_dirs/tests/incorrect_owner.fail.sh +@@ -1,4 +1,5 @@ +-# platform = multi_platform_sle ++# platform = multi_platform_sle,multi_platform_rhel ++groupadd nogroup + DIRS="/lib /lib64" + for dirPath in $DIRS; do + mkdir -p "$dirPath/testme" && chown nobody:nogroup "$dirPath/testme" +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/oval/shared.xml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/oval/shared.xml +index a0e4e24b4f4..add26b2e778 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/oval/shared.xml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/oval/shared.xml +@@ -1,8 +1,8 @@ + + + {{{ oval_metadata(" +- Checks that /lib, /lib64, /usr/lib, /usr/lib64, /lib/modules, and +- objects therein, are not group-writable or world-writable. ++ Checks that the directories /lib, /lib64, /usr/lib and /usr/lib64 ++ are not group-writable or world-writable. + ") }}} + + +@@ -19,7 +19,7 @@ + ^\/lib(|64)|^\/usr\/lib(|64) + + dir_state_perms_nogroupwrite_noworldwrite +- dir_perms_state_symlink ++ dir_perms_state_nogroupwrite_noworldwrite_symlink + + + +@@ -27,7 +27,7 @@ + true + + +- ++ + symbolic link + + +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/rule.yml +index db89a5e47a1..6e62e8c6bbf 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_permissions_library_dirs/rule.yml +@@ -60,3 +60,14 @@ ocil: |- + To find shared libraries that are group-writable or world-writable, + run the following command for each directory DIR which contains shared libraries: +
    $ sudo find -L DIR -perm /022 -type d
    ++ ++template: ++ name: file_permissions ++ vars: ++ filepath: ++ - /lib/ ++ - /lib64/ ++ - /usr/lib/ ++ - /usr/lib64/ ++ recursive: 'true' ++ filemode: '0755' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/ansible/shared.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/ansible/shared.yml +index 6b3a2905068..eec7485f90c 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/ansible/shared.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/ansible/shared.yml +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,Oracle Linux 8,Red Hat Enterprise Linux 8,multi_platform_fedora ++# platform = multi_platform_sle,Oracle Linux 8,multi_platform_rhel,multi_platform_fedora + # reboot = false + # strategy = restrict + # complexity = medium +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/bash/shared.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/bash/shared.sh +index a9e8c7d8e25..e352dd34a67 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/bash/shared.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_groupownership_system_commands_dirs/bash/shared.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,Oracle Linux 8,Red Hat Enterprise Linux 8,multi_platform_fedora,multi_platform_ubuntu ++# platform = multi_platform_sle,Oracle Linux 8,multi_platform_rhel,multi_platform_fedora,multi_platform_ubuntu + + for SYSCMDFILES in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin + do +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/ansible/shared.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/ansible/shared.yml +deleted file mode 100644 +index de81a3703b4..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/ansible/shared.yml ++++ /dev/null +@@ -1,18 +0,0 @@ +-# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel,multi_platform_ol,multi_platform_sle +-# reboot = false +-# strategy = restrict +-# complexity = medium +-# disruption = medium +-- name: "Read list libraries without root ownership" +- command: "find -L /usr/lib /usr/lib64 /lib /lib64 \\! -user root" +- register: libraries_not_owned_by_root +- changed_when: False +- failed_when: False +- check_mode: no +- +-- name: "Set ownership of system libraries to root" +- file: +- path: "{{ item }}" +- owner: "root" +- with_items: "{{ libraries_not_owned_by_root.stdout_lines }}" +- when: libraries_not_owned_by_root | length > 0 +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/bash/shared.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/bash/shared.sh +deleted file mode 100644 +index c75167d2fe7..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/bash/shared.sh ++++ /dev/null +@@ -1,8 +0,0 @@ +-# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel,multi_platform_ol,multi_platform_sle +-for LIBDIR in /usr/lib /usr/lib64 /lib /lib64 +-do +- if [ -d $LIBDIR ] +- then +- find -L $LIBDIR \! -user root -exec chown root {} \; +- fi +-done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/oval/shared.xml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/oval/shared.xml +deleted file mode 100644 +index 59ee3d82a21..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/oval/shared.xml ++++ /dev/null +@@ -1,39 +0,0 @@ +- +- +- {{{ oval_metadata(" +- Checks that /lib, /lib64, /usr/lib, /usr/lib64, /lib/modules, and +- objects therein, are owned by root. +- ") }}} +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ^\/lib(|64)\/|^\/usr\/lib(|64)\/ +- +- state_owner_libraries_not_root +- +- +- +- +- ^\/lib(|64)\/|^\/usr\/lib(|64)\/ +- ^.*$ +- state_owner_libraries_not_root +- +- +- +- 0 +- +- +- +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/rule.yml +index d80681c1e65..b6bc18e8310 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/rule.yml +@@ -60,3 +60,14 @@ ocil: |- + For each of these directories, run the following command to find files not + owned by root: +
    $ sudo find -L $DIR ! -user root -exec chown root {} \;
    ++ ++template: ++ name: file_owner ++ vars: ++ filepath: ++ - /lib/ ++ - /lib64/ ++ - /usr/lib/ ++ - /usr/lib64/ ++ file_regex: ^.*$ ++ fileuid: '0' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/tests/correct_owner.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/tests/correct_owner.pass.sh +new file mode 100644 +index 00000000000..92c6a0889d4 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/tests/correct_owner.pass.sh +@@ -0,0 +1,9 @@ ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora,multi_platform_ubuntu ++ ++for SYSLIBDIRS in /lib /lib64 /usr/lib /usr/lib64 ++do ++ if [[ -d $SYSLIBDIRS ]] ++ then ++ find $SYSLIBDIRS ! -user root -type f -exec chown root '{}' \; ++ fi ++done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/tests/incorrect_owner.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/tests/incorrect_owner.fail.sh +new file mode 100644 +index 00000000000..84da71f45f7 +--- /dev/null ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_ownership_library_dirs/tests/incorrect_owner.fail.sh +@@ -0,0 +1,11 @@ ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora,multi_platform_ubuntu ++ ++useradd user_test ++for TESTFILE in /lib/test_me /lib64/test_me /usr/lib/test_me /usr/lib64/test_me ++do ++ if [[ ! -f $TESTFILE ]] ++ then ++ touch $TESTFILE ++ fi ++ chown user_test $TESTFILE ++done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/ansible/shared.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/ansible/shared.yml +deleted file mode 100644 +index cf9eebace8b..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/ansible/shared.yml ++++ /dev/null +@@ -1,18 +0,0 @@ +-# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel,multi_platform_ol,multi_platform_sle +-# reboot = false +-# strategy = restrict +-# complexity = high +-# disruption = medium +-- name: "Read list of world and group writable files in libraries directories" +- command: "find /lib /lib64 /usr/lib /usr/lib64 -perm /022 -type f" +- register: world_writable_library_files +- changed_when: False +- failed_when: False +- check_mode: no +- +-- name: "Disable world/group writability to library files" +- file: +- path: "{{ item }}" +- mode: "go-w" +- with_items: "{{ world_writable_library_files.stdout_lines }}" +- when: world_writable_library_files.stdout_lines | length > 0 +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/bash/shared.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/bash/shared.sh +deleted file mode 100644 +index af04ad625d3..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/bash/shared.sh ++++ /dev/null +@@ -1,5 +0,0 @@ +-# platform = multi_platform_all +-DIRS="/lib /lib64 /usr/lib /usr/lib64" +-for dirPath in $DIRS; do +- find "$dirPath" -perm /022 -type f -exec chmod go-w '{}' \; +-done +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/oval/shared.xml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/oval/shared.xml +deleted file mode 100644 +index f25c52260c4..00000000000 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/oval/shared.xml ++++ /dev/null +@@ -1,46 +0,0 @@ +- +- +- {{{ oval_metadata(" +- Checks that /lib, /lib64, /usr/lib, /usr/lib64, /lib/modules, and +- objects therein, are not group-writable or world-writable. +- ") }}} +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ^\/lib(|64)|^\/usr\/lib(|64) +- +- state_perms_nogroupwrite_noworldwrite +- perms_state_symlink +- +- +- +- +- ^\/lib(|64)|^\/usr\/lib(|64) +- ^.*$ +- state_perms_nogroupwrite_noworldwrite +- perms_state_symlink +- +- +- +- true +- true +- +- +- +- symbolic link +- +- +- +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/rule.yml +index 9a07e76929e..5a708cf78c3 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/rule.yml +@@ -61,3 +61,14 @@ ocil: |- + To find shared libraries that are group-writable or world-writable, + run the following command for each directory DIR which contains shared libraries: +
    $ sudo find -L DIR -perm /022 -type f
    ++ ++template: ++ name: file_permissions ++ vars: ++ filepath: ++ - /lib/ ++ - /lib64/ ++ - /usr/lib/ ++ - /usr/lib64/ ++ file_regex: ^.*$ ++ filemode: '0755' +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/incorrect_permissions.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/lenient_permissions.fail.sh +similarity index 100% +rename from linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/incorrect_permissions.fail.sh +rename to linux_os/guide/system/permissions/files/permissions_within_important_dirs/file_permissions_library_dirs/tests/lenient_permissions.fail.sh +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/rule.yml b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/rule.yml +index eaf04c8d36c..ec135b5279c 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/rule.yml ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/rule.yml +@@ -4,7 +4,7 @@ prodtype: fedora,ol8,rhel8,rhel9,sle12,sle15,ubuntu2004 + + title: |- + Verify the system-wide library files in directories +- "/lib", "/lib64", "/usr/lib/" and "/usr/lib64" are owned by root. ++ "/lib", "/lib64", "/usr/lib/" and "/usr/lib64" are group-owned by root. + + description: |- + System-wide library files are stored in the following directories +@@ -15,7 +15,7 @@ description: |- + /usr/lib64 + + All system-wide shared library files should be protected from unauthorised +- access. If any of these files is not owned by root, correct its owner with ++ access. If any of these files is not group-owned by root, correct its group-owner with + the following command: +
    $ sudo chgrp root FILE
    + +@@ -48,7 +48,7 @@ references: + stigid@sle15: SLES-15-010355 + stigid@ubuntu2004: UBTU-20-01430 + +-ocil_clause: 'system wide library files are not group owned by root' ++ocil_clause: 'system wide library files are not group-owned by root' + + ocil: |- + System-wide library files are stored in the following directories: +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_groupowner.pass.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_groupowner.pass.sh +index 0e982c3b8ca..5356d3742d3 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_groupowner.pass.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/correct_groupowner.pass.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,Red Hat Enterprise Linux 8,multi_platform_fedora,multi_platform_ubuntu ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora,multi_platform_ubuntu + + for SYSLIBDIRS in /lib /lib64 /usr/lib /usr/lib64 + do +diff --git a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_groupowner.fail.sh b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_groupowner.fail.sh +index 23a7703f57d..7352b60aa4b 100644 +--- a/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_groupowner.fail.sh ++++ b/linux_os/guide/system/permissions/files/permissions_within_important_dirs/root_permissions_syslibrary_files/tests/incorrect_groupowner.fail.sh +@@ -1,4 +1,4 @@ +-# platform = multi_platform_sle,Red Hat Enterprise Linux 8,multi_platform_fedora,multi_platform_ubuntu ++# platform = multi_platform_sle,multi_platform_rhel,multi_platform_fedora,multi_platform_ubuntu + + groupadd group_test + for TESTFILE in /lib/test_me /lib64/test_me /usr/lib/test_me /usr/lib64/test_me +diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile +index ff23f83cfbf..88b3a7e3783 100644 +--- a/products/rhel8/profiles/stig.profile ++++ b/products/rhel8/profiles/stig.profile +@@ -235,8 +235,13 @@ selections: + # RHEL-08-010340 + - file_ownership_library_dirs + ++ # RHEL-08-010341 ++ - dir_ownership_library_dirs ++ + # RHEL-08-010350 + - root_permissions_syslibrary_files ++ ++ # RHEL-08-010351 + - dir_group_ownership_library_dirs + + # RHEL-08-010360 +diff --git a/products/rhel9/profiles/stig.profile b/products/rhel9/profiles/stig.profile +index 8cc6d132591..65465be2c07 100644 +--- a/products/rhel9/profiles/stig.profile ++++ b/products/rhel9/profiles/stig.profile +@@ -236,8 +236,13 @@ selections: + # RHEL-08-010340 + - file_ownership_library_dirs + ++ # RHEL-08-010341 ++ - dir_ownership_library_dirs ++ + # RHEL-08-010350 + - root_permissions_syslibrary_files ++ ++ # RHEL-08-010351 + - dir_group_ownership_library_dirs + + # RHEL-08-010360 +diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt +index 8aad24b20f7..eb3f17f4f3d 100644 +--- a/shared/references/cce-redhat-avail.txt ++++ b/shared/references/cce-redhat-avail.txt +@@ -2957,8 +2957,6 @@ CCE-89017-8 + CCE-89018-6 + CCE-89019-4 + CCE-89020-2 +-CCE-89021-0 +-CCE-89022-8 + CCE-89023-6 + CCE-89024-4 + CCE-89025-1 +diff --git a/shared/templates/file_groupowner/ansible.template b/shared/templates/file_groupowner/ansible.template +index 68fc2e1e17e..0b4ab594155 100644 +--- a/shared/templates/file_groupowner/ansible.template ++++ b/shared/templates/file_groupowner/ansible.template +@@ -12,6 +12,7 @@ + paths: "{{{ path }}}" + patterns: {{{ FILE_REGEX[loop.index0] }}} + use_regex: yes ++ hidden: yes + register: files_found + + - name: Ensure group owner on {{{ path }}} file(s) matching {{{ FILE_REGEX[loop.index0] }}} +diff --git a/shared/templates/file_groupowner/oval.template b/shared/templates/file_groupowner/oval.template +index fd2e5db5d93..64a494471a8 100644 +--- a/shared/templates/file_groupowner/oval.template ++++ b/shared/templates/file_groupowner/oval.template +@@ -45,6 +45,10 @@ + {{%- else %}} + {{{ filepath }}} + {{%- endif %}} ++ symlink_file_groupowner{{{ FILEID }}}_uid_{{{ FILEGID }}} + + {{% endfor %}} ++ ++ symbolic link ++ +
    +diff --git a/shared/templates/file_owner/ansible.template b/shared/templates/file_owner/ansible.template +index 590c9fc6055..dba9e65a277 100644 +--- a/shared/templates/file_owner/ansible.template ++++ b/shared/templates/file_owner/ansible.template +@@ -12,6 +12,7 @@ + paths: "{{{ path }}}" + patterns: {{{ FILE_REGEX[loop.index0] }}} + use_regex: yes ++ hidden: yes + register: files_found + + - name: Ensure group owner on {{{ path }}} file(s) matching {{{ FILE_REGEX[loop.index0] }}} +diff --git a/shared/templates/file_owner/oval.template b/shared/templates/file_owner/oval.template +index 105e29c81c8..777831d790d 100644 +--- a/shared/templates/file_owner/oval.template ++++ b/shared/templates/file_owner/oval.template +@@ -44,6 +44,10 @@ + {{%- else %}} + {{{ filepath }}} + {{%- endif %}} ++ symlink_file_owner{{{ FILEID }}}_uid_{{{ FILEUID }}} + + {{% endfor %}} ++ ++ symbolic link ++ + +diff --git a/shared/templates/file_permissions/ansible.template b/shared/templates/file_permissions/ansible.template +index fc211bdc4c3..6d4dedcee51 100644 +--- a/shared/templates/file_permissions/ansible.template ++++ b/shared/templates/file_permissions/ansible.template +@@ -12,6 +12,7 @@ + paths: "{{{ path }}}" + patterns: {{{ FILE_REGEX[loop.index0] }}} + use_regex: yes ++ hidden: yes + register: files_found + + - name: Set permissions for {{{ path }}} file(s) +diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile +index b5621425b96..c5a9b6a32ad 100644 +--- a/tests/data/profile_stability/rhel8/stig.profile ++++ b/tests/data/profile_stability/rhel8/stig.profile +@@ -181,6 +181,7 @@ selections: + - dconf_gnome_screensaver_idle_delay + - dconf_gnome_screensaver_lock_enabled + - dir_group_ownership_library_dirs ++- dir_ownership_library_dirs + - dir_permissions_library_dirs + - dir_perms_world_writable_root_owned + - dir_perms_world_writable_sticky_bits +diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile +index 31221ed632c..32d195e28aa 100644 +--- a/tests/data/profile_stability/rhel8/stig_gui.profile ++++ b/tests/data/profile_stability/rhel8/stig_gui.profile +@@ -192,6 +192,7 @@ selections: + - dconf_gnome_screensaver_idle_delay + - dconf_gnome_screensaver_lock_enabled + - dir_group_ownership_library_dirs ++- dir_ownership_library_dirs + - dir_permissions_library_dirs + - dir_perms_world_writable_root_owned + - dir_perms_world_writable_sticky_bits diff --git a/SOURCES/scap-security-guide-0.1.61-update_accounts_password_template-PR_8164.patch b/SOURCES/scap-security-guide-0.1.61-update_accounts_password_template-PR_8164.patch new file mode 100644 index 0000000..1092362 --- /dev/null +++ b/SOURCES/scap-security-guide-0.1.61-update_accounts_password_template-PR_8164.patch @@ -0,0 +1,161 @@ +diff --git a/docs/templates/template_reference.md b/docs/templates/template_reference.md +index 65bc439225e..fef4679be39 100644 +--- a/docs/templates/template_reference.md ++++ b/docs/templates/template_reference.md +@@ -2,17 +2,20 @@ + + #### accounts_password + - Checks if PAM enforces password quality requirements. Checks the +- configuration in `/etc/pam.d/system-auth` (for RHEL 6 systems) or +- `/etc/security/pwquality.conf` (on other systems). ++ configuration in `/etc/security/pwquality.conf`. + + - Parameters: + +- - **variable** - PAM `pam_cracklib` (on RHEL 6) or `pam_pwquality` +- (on other systems) module name, eg. `ucredit`, `ocredit` ++ - **variable** - PAM `pam_pwquality` password quality ++ requirement, eg. `ucredit`, `ocredit` + + - **operation** - OVAL operation, eg. `less than or equal` + +-- Languages: OVAL ++ - **zero_comparison_operation** - (optional) OVAL operation, eg. `greater than`. ++ When set, it will test if the **variable** value matches the OVAL operation ++ when compared to zero. ++ ++- Languages: Ansible, Bash, OVAL + + #### auditd_lineinfile + - Checks configuration options of the Audit Daemon in +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/rule.yml b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/rule.yml +index 912c783650a..9a829ac5119 100644 +--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/rule.yml ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/rule.yml +@@ -47,7 +47,7 @@ ocil_clause: 'that is not the case' + ocil: |- + To check the value for maximum consecutive repeating characters, run the following command: +
    $ grep maxclassrepeat /etc/security/pwquality.conf
    +- For DoD systems, the output should show maxclassrepeat=4. ++ For DoD systems, the output should show maxclassrepeat=4 or less but greater than zero. + + platform: pam + +@@ -56,3 +56,4 @@ template: + vars: + variable: maxclassrepeat + operation: less than or equal ++ zero_comparison_operation: greater than +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/correct_value.pass.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/correct_value.pass.sh +new file mode 100644 +index 00000000000..5d91559d4a2 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/correct_value.pass.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++ ++if grep -q 'maxclassrepeat' /etc/security/pwquality.conf; then ++ sed -i 's/.*maxclassrepeat.*/maxclassrepeat = 4/' /etc/security/pwquality.conf ++else ++ echo "maxclassrepeat = 4" >> /etc/security/pwquality.conf ++fi ++ +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/correct_value_less_than_variable.pass.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/correct_value_less_than_variable.pass.sh +new file mode 100644 +index 00000000000..4bd8070eb7e +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/correct_value_less_than_variable.pass.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++ ++if grep -q 'maxclassrepeat' /etc/security/pwquality.conf; then ++ sed -i 's/.*maxclassrepeat.*/maxclassrepeat = 2/' /etc/security/pwquality.conf ++else ++ echo "maxclassrepeat = 2" >> /etc/security/pwquality.conf ++fi ++ +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/negative_value.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/negative_value.fail.sh +new file mode 100644 +index 00000000000..61538a4945f +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/negative_value.fail.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++ ++if grep -q 'maxclassrepeat' /etc/security/pwquality.conf; then ++ sed -i 's/.*maxclassrepeat.*/maxclassrepeat = -1/' /etc/security/pwquality.conf ++else ++ echo "maxclassrepeat = -1" >> /etc/security/pwquality.conf ++fi +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/wrong_value.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/wrong_value.fail.sh +new file mode 100644 +index 00000000000..2218250ec7b +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/wrong_value.fail.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++ ++if grep -q 'maxclassrepeat' /etc/security/pwquality.conf; then ++ sed -i 's/.*maxclassrepeat.*/maxclassrepeat = 5/' /etc/security/pwquality.conf ++else ++ echo "maxclassrepeat = 5" >> /etc/security/pwquality.conf ++fi ++ +diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/wrong_value_0.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/wrong_value_0.fail.sh +new file mode 100644 +index 00000000000..780873c6a86 +--- /dev/null ++++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat/tests/wrong_value_0.fail.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++ ++if grep -q 'maxclassrepeat' /etc/security/pwquality.conf; then ++ sed -i 's/.*maxclassrepeat.*/maxclassrepeat = 0/' /etc/security/pwquality.conf ++else ++ echo "maxclassrepeat = 0" >> /etc/security/pwquality.conf ++fi ++ +diff --git a/shared/templates/accounts_password/oval.template b/shared/templates/accounts_password/oval.template +index 332a2800317..b995db11ea4 100644 +--- a/shared/templates/accounts_password/oval.template ++++ b/shared/templates/accounts_password/oval.template +@@ -7,11 +7,14 @@ + +
    + +- + + ++ {{%- if ZERO_COMPARISON_OPERATION %}} ++ ++ {{%- endif %}} + + + +@@ -24,5 +27,11 @@ + + + ++ {{%- if ZERO_COMPARISON_OPERATION %}} ++ ++ 0 ++ ++ {{%- endif %}} ++ + + +diff --git a/shared/templates/accounts_password/template.py b/shared/templates/accounts_password/template.py +index 65c25ec7991..ab849d1fa72 100644 +--- a/shared/templates/accounts_password/template.py ++++ b/shared/templates/accounts_password/template.py +@@ -1,4 +1,7 @@ ++from ssg.utils import parse_template_boolean_value ++ + def preprocess(data, lang): + if lang == "oval": + data["sign"] = "-?" if data["variable"].endswith("credit") else "" ++ data["zero_comparison_operation"] = data.get("zero_comparison_operation", None) + return data diff --git a/SPECS/scap-security-guide.spec b/SPECS/scap-security-guide.spec index cc92ea1..7f57276 100644 --- a/SPECS/scap-security-guide.spec +++ b/SPECS/scap-security-guide.spec @@ -2,30 +2,64 @@ # For more details see: # https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds %global _vpath_builddir build +%global _default_patch_fuzz 2 Name: scap-security-guide -Version: 0.1.57 -Release: 5%{?dist} +Version: 0.1.60 +Release: 4%{?dist} Summary: Security guidance and baselines in SCAP formats License: BSD-3-Clause URL: https://github.com/ComplianceAsCode/content/ Source0: https://github.com/ComplianceAsCode/content/releases/download/v%{version}/scap-security-guide-%{version}.tar.bz2 BuildArch: noarch -Patch0: scap-security-guide-0.1.58-fix_service_disabled-PR_7296.patch -Patch1: scap-security-guide-0.1.58-sshd_directory-PR_6926.patch -Patch2: scap-security-guide-0.1.58-sshd_config_basename-PR_7410.patch -Patch3: scap-security-guide-0.1.58-various_fixes-PR_7335.patch -Patch4: scap-security-guide-0.1.58-dont_remove_all_whitespace-PR_7393.patch -Patch5: scap-security-guide-0.1.58-fix_gpgkey-PR_7321.patch -Patch6: scap-security-guide-0.1.58-s390x_arch-PR_7385.patch -Patch7: scap-security-guide-0.1.58-ism_ks-PR_7392.patch -Patch8: scap-security-guide-0.1.58-cis_def-PR_6976.patch -Patch9: scap-security-guide-0.1.58-rhel9_cis_crypto_policy_default-PR_7452.patch -Patch10: scap-security-guide-0.1.58-fix_broken_link-PR_7409.patch -Patch11: scap-security-guide-0.1.58-cis_build_system_fix-PR_7226.patch -Patch12: scap-security-guide-0.1.58-rhel9_cis-PR_7415.patch -Patch13: scap-security-guide-0.1.58-zipl_remediation_applicability-PR_7458.patch +# Patch allows only OSPP, PCI-DSS, E8 and STIG profiles in RHEL8 datastream +Patch0: scap-security-guide-0.1.61-file_groupowner-PR_7791.patch +Patch1: scap-security-guide-0.1.61-file_owner-PR_7789.patch +Patch2: scap-security-guide-0.1.61-file_permissions-PR_7788.patch +Patch3: scap-security-guide-0.1.61-update_RHEL_08_010287-PR_8051.patch +Patch4: scap-security-guide-0.1.61-add_RHEL_08_010331-PR_8055.patch +Patch5: scap-security-guide-0.1.61-rhel8_stig_v1r5-PR_8050.patch +Patch6: scap-security-guide-0.1.61-RC_277_245-PR_8069.patch +Patch7: scap-security-guide-0.1.61-RC_248_249-PR_8071.patch +Patch8: scap-security-guide-0.1.61-RC_251-PR_8072.patch +Patch9: scap-security-guide-0.1.61-RC_246_250-PR_8070.patch +Patch10: scap-security-guide-0.1.61-RC_247-PR_8114.patch +Patch11: scap-security-guide-0.1.61-RC_254-PR_8113.patch +Patch12: scap-security-guide-0.1.61-RC_253-PR_8111.patch +Patch13: scap-security-guide-0.1.61-RC_255-PR_8112.patch +Patch14: scap-security-guide-0.1.61-add_RHEL_08_010359-PR_8131.patch +Patch15: scap-security-guide-0.1.61-RC_244-PR_8133.patch +Patch16: scap-security-guide-0.1.61-update_RHEL_STIG-PR_8130.patch +Patch17: scap-security-guide-0.1.61-update_RHEL_08_STIG-PR_8139.patch +Patch18: scap-security-guide-0.1.61-remove_RHEL_08_010560-PR_8145.patch +Patch19: scap-security-guide-0.1.61-add_RHEL_08_040321-PR_8169.patch +Patch20: scap-security-guide-0.1.61-add_RHEL_08_020221-PR_8173.patch +Patch21: scap-security-guide-0.1.61-update_RHEL_08_040320-PR_8170.patch +Patch22: scap-security-guide-0.1.61-rhel8_stig_audit_rules-PR_8174.patch +Patch23: scap-security-guide-0.1.61-update_RHEL_08_010030-PR_8183.patch +Patch24: scap-security-guide-0.1.61-selinux_state_rhel8_anssi_enhanced-PR_8182.patch +Patch25: scap-security-guide-0.1.61-update_accounts_password_template-PR_8164.patch +Patch26: scap-security-guide-0.1.61-update_RHEL_08_010383-PR_8138.patch +Patch27: scap-security-guide-0.1.61-remove_client_alive_max-PR_8197.patch +Patch28: scap-security-guide-0.1.61-pwquality-PR_8185.patch +Patch29: scap-security-guide-0.1.61-update_RHEL_08_020041-PR_8146.patch +Patch30: scap-security-guide-0.1.61-rhel86_ospp_fix_audit_ospp_general-PR_8152.patch +Patch31: scap-security-guide-0.1.61-ospp-remove-kernel-disable-rules-PR_8093.patch +Patch32: scap-security-guide-0.1.61-ospp-boot-parametersb-PR_8092.patch +Patch33: scap-security-guide-0.1.61-ospp-audit.conf-rules-PR_8188.patch +Patch34: scap-security-guide-0.1.61-distributed-sshd-rekeylimit-PR_8148.patch +Patch35: scap-security-guide-0.1.61-supported-rhel9-PR_8202.patch +Patch36: scap-security-guide-0.1.61-chrony_maxpoll-PR_8187.patch +Patch37: scap-security-guide-0.1.61-add_missing_srgs-PR_8218.patch +Patch38: scap-security-guide-0.1.61-sudoers_timestamp_timeout-PR_8220.patch +Patch39: scap-security-guide-0.1.61-grub2_rule_desc_update-PR_8184.patch +Patch40: scap-security-guide-0.1.61-grub2_template_fix-PR_8180.patch +Patch41: scap-security-guide-0.1.61-rear_not_applicable_aarch64-PR_8221.patch +Patch42: scap-security-guide-0.1.61-add_RHEL_08_0103789_include_sudoers-PR_8196.patch +Patch43: scap-security-guide-0.1.61-fix-ansible-service-disabled-task-PR_8226.patch +Patch44: scap-security-guide-0.1.61-update-ospp-description-PR_8232.patch +Patch45: scap-security-guide-0.1.61-add-rule-page_alloc_shuffle_argument-PR_8234.patch BuildRequires: libxslt BuildRequires: expat @@ -112,6 +146,34 @@ rm %{buildroot}/%{_docdir}/%{name}/Contributors.md %endif %changelog +* Tue Feb 15 2022 Watson Sato - 0.1.60-4 +- Fix Ansible service disabled tasks (RHBZ#2014561) +- Update description of OSPP profile (RHBZ#2045386) +- Add page_aloc.shuffle rules for OSPP profile (RHBZ#2055118) + +* Mon Feb 14 2022 Gabriel Becker - 0.1.60-3 +- Update sudoers rules in RHEL8 STIG V1R5 (RHBZ#2045403) +- Add missing SRG references in RHEL8 STIG V1R5 rules (RHBZ#2045403) +- Update chronyd_or_ntpd_set_maxpoll to disregard server and poll directives (RHBZ#2045403) +- Fix GRUB2 rule template to configure the module correctly on RHEL8 (RHBZ#2014561) +- Update GRUB2 rule descriptions (RHBZ#2020623) +- Make package_rear_installed not applicable on AARCH64 (RHBZ#2014561) + +* Fri Feb 11 2022 Watson Sato - 0.1.60-2 +- Update OSPP profile (RHBZ#2016038, RHBZ#2043036, RHBZ#2020670, RHBZ#2046289) + +* Thu Jan 27 2022 Watson Sato - 0.1.60-1 +- Rebase to a new upstream release (RHBZ#2014561) + +* Wed Dec 08 2021 Gabriel Becker - 0.1.59-1 +- Rebase to a new upstream release (RHBZ#2014561) +- Enable Centos Stream 9 content (RHBZ#2021284) + +* Fri Oct 15 2021 Matej Tyc - 0.1.58-1 +- Rebase to a new upstream release (RHBZ#2014561) +- Disable profiles that we disable in RHEL8 +- Add a VM wait handling to fix issues with tests. + * Wed Aug 25 2021 Matej Tyc - 0.1.57-5 - Fix remediations applicability of zipl rules Resolves: rhbz#1996847