diff --git a/security_tools/openscap_scanner/control b/security_tools/openscap_scanner/control new file mode 100755 index 000000000..0e0c4838b --- /dev/null +++ b/security_tools/openscap_scanner/control @@ -0,0 +1,11 @@ +AUTHOR = " Anup Kumar, anupkumk@in.ibm.com " +NAME = "openscap_scanner" +TEST_CATEGORY = "Functional" +TEST_CLASS = "Security Tools" +TEST_TYPE = "client" +TIME = 'SHORT' +DOC = ''' + Security Scan through openvas + ''' +path = '/usr/local/autotest_base/autotest-client-tests/security_tools' +job.run_test('openscap_scanner',test_path=path) diff --git a/security_tools/openscap_scanner/openscap.py b/security_tools/openscap_scanner/openscap.py new file mode 100755 index 000000000..57637193f --- /dev/null +++ b/security_tools/openscap_scanner/openscap.py @@ -0,0 +1,198 @@ +#!/usr/bin/env python + +""" +The contents of this file are classes and functions to automate opescap +from the source and scan the target system for predefined security compliance +Author: Anup Kumar +""" +import re +import sys +import os +import time +import csv +import logging + + +class openscap(object): + + def __init__(self): + + self.output_file = 'output_file' + self.openscap_dir = 'openscap' + self.oval_eval_file = 'ssg-centos7-ds.xml' + + def openscap_setup(self, reinstall=0): + """ + Function will install the Build dependencies + """ + build_cmd = "autogen.sh" + config_cmd = "configure" + mk_cmd = "make" + install_log = "openscap_setup_log" + logging.info("Installing the build related package") + + pkg_list = ( + "dbus-devel", + "GConf2-devel", + "libacl-devel", + "libblkid-devel", + "libcap-devel", + "libcurl-devel", + "libgcrypt-devel", + "libselinux-devel", + "python-devel", + "libxml2-devel", + "git", + "libxslt-devel", + "make", + "openldap-devel", + "perl-devel", + "pcre-devel", + "rpm-devel", + "perl-XML-Parser", + "perl-XML-XPath", + "swig", + "bzip2-devel") + + for pkg in pkg_list: + os.system( + "yum %s -y %s >%s" % + (('install', 'reinstall')[reinstall], pkg, self.output_file)) + + # install openvas from source + check_oscap = os.system("which oscap > %s" % self.output_file) + if check_oscap != 0: + try: + mycwd = os.getcwd() + logging.info("installing the oscap tools from git source") + os.system("git clone https://github.com/OpenSCAP/openscap.git") + os.chdir(self.openscap_dir) + os.system("/bin/bash %s > %s" % (build_cmd, install_log)) + os.system("/bin/bash %s > %s" % (config_cmd, install_log)) + os.system("%s > %s" % (mk_cmd, install_log)) + os.system("%s install > %s" % (mk_cmd, install_log)) + logging.debug("oscap tools Installed successfully") + os.chdir(mycwd) + + except OSError as err: + logging.info("OPENSCAP Failed to Install") + logging.debug(err) + sys.exit() + else: + logging.debug("oscap tools are available to scan") + + def openscap_oval_scan(self): + """ + Function will Used to Scan the Target Based on OVAL definition + """ + f1 = os.popen("cat /etc/os-release").read() + d_name = re.search('ID="(\S+)"', f1).group(1) + v_id = re.search('VERSION_ID="(\S+)"', f1).group(1) + arch_os_ver = os.popen( + "uname -r").read().rstrip('\n').split('.')[-1] + full_name = "".join([d_name, v_id]) + self.full_project = "-".join([full_name, arch_os_ver]) + + self.cmd_output = "openscap_output-%s-%s" % ( + self.full_project, time.strftime('%Y-%m-%d')) + self.xml_result = "openscap_results-%s-%s.xml" % ( + self.full_project, time.strftime('%Y-%m-%d')) + self.html_report = "openscap_report-%s-%s.html" % ( + self.full_project, time.strftime('%Y-%m-%d')) + try: + logging.info("Check the system compliance based on oval file") + os.popen( + "oscap oval eval --results %s --report %s %s > %s" % + (self.xml_result, self.html_report, self.oval_eval_file, self.cmd_output)) + + except IOError as err: + logging.info("Openscap Failed to Scan the Target") + logging.debug(err) + sys.exit() + logging.debug( + "OSCAP Scan result generated in %s xml file" % + self.xml_result) + logging.debug( + "OSCAP Scan report available in %s html file" % + self.html_report) + + def result_parsing(self): + """ + Function will generate the pass and failed compliance result + """ + tool_name = 'openscap' + os_ref = self.full_project.split('-')[0] + arch = self.full_project.split('-')[-1] + result_dir = '/root/Security_Results' + reg_report = "reg_%s-%s-%s.csv" % (tool_name, + self.full_project, + time.strftime('%Y-%m-%d')) + pass_report = "pass_%s-%s-%s.csv" % (tool_name, + self.full_project, + time.strftime('%Y-%m-%d')) + logging.info("Generating pass/fail result") + + with open(reg_report, 'w') as fl, open(pass_report, 'w') as ps, open(self.cmd_output, 'r') as fh: + stripped = (line.strip() for line in fh) + reg_writer = csv.writer(fl) + pass_writer = csv.writer(ps) + reg_writer.writerow( + ('Tools', 'OS_Name', 'Arch', 'Compliance_Type', 'Severity')) + pass_writer.writerow( + ('Tools', 'OS_Name', 'Arch', 'Compliance_Type', 'Severity')) + + for line in stripped: + if "Evaluation" not in line: + t_flag = line.split(":")[4].strip('\n') + ucase_flag = line.split(":")[1].split("-")[1].strip('\n') + data = [tool_name, os_ref, arch, ucase_flag, t_flag] + if t_flag.lstrip() == 'true': + pass_writer.writerow(data) + else: + reg_writer.writerow(data) + fh.close() + ps.close() + fl.close() + no_of_failed_comp = os.popen("cat %s | wc -l" % reg_report).read() + no_of_passed_comp = os.popen("cat %s | wc -l" % pass_report).read() + #logging.info("TOTAL FAILED COMPLIANCE:%s\nCheck \"%s\" for failed details\n" %(no_of_failed_comp, compl_fail)) + #logging.info("TOTAL PASSED COMPLIANCE:%s\nCheck \"%s\" for passed details\n" %(no_of_passed_comp, compl_pass)) + logging.debug( + "Open %s html file from browser for detail analysis" % + self.html_report) + logging.info("Copying the Result Common directory") + logging.info("Result path is %s" % result_dir) + if not os.path.exists(result_dir): + os.makedirs(result_dir) + os.system( + "cp %s %s %s %s" % + (reg_report, + pass_report, + self.html_report, + result_dir)) + + def cleanup(self): + """ + Cleanup function for unused file, data + """ + try: + logging.debug("Deleting Unused file") + os.system("rm %s" % self.output_file) + os.system("rm openscap_setup_log") + os.system("rm %s" % self.cmd_output) + logging.info("Cleanup Done") + + except IOError as err: + logging.debug(err) + + +if __name__ == "__main__": + + try: + obj = openscap() + obj.openscap_setup() + obj.openscap_oval_scan() + obj.result_parsing() + + finally: + obj.cleanup() diff --git a/security_tools/openscap_scanner/openscap_scanner.py b/security_tools/openscap_scanner/openscap_scanner.py new file mode 100755 index 000000000..10e5148ef --- /dev/null +++ b/security_tools/openscap_scanner/openscap_scanner.py @@ -0,0 +1,51 @@ +#!/bin/python +import os +import subprocess +import logging + +from autotest.client import test +from autotest.client.shared import error + + +class openscap_scanner(test.test): + + """ + Autotest module for running the openscap tools + + """ + version = 1 + nfail = 0 + path = '' + + def initialize(self): + """ + Sets the overall failure counter for the test. + """ + self.nfail = 0 + logging.info('\n Test initialize successfully') + + def run_once(self, test_path=''): + """ + Trigger test run + """ + try: + cwd = os.getcwd() + os.chdir(cwd) + ret_val = subprocess.Popen( + ['./openscap.py'], + cwd="%s/openscap_scanner" % + (test_path)) + ret_val.communicate() + if ret_val.returncode != 0: + self.nfail += 1 + + except error.CmdError as e: + self.nfail += 1 + logging.error("Test Failed: %s", e) + + def postprocess(self): + if self.nfail != 0: + logging.info('\n nfails is non-zero') + raise error.TestError('\nTest failed') + else: + logging.info('\n Test completed successfully ') diff --git a/security_tools/openscap_scanner/ssg-centos7-ds.xml b/security_tools/openscap_scanner/ssg-centos7-ds.xml new file mode 100755 index 000000000..06d505236 --- /dev/null +++ b/security_tools/openscap_scanner/ssg-centos7-ds.xml @@ -0,0 +1,67709 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + python + 2.7.5 + 5.11 + 2016-12-05T12:48:07 + + + + + Set Accounts to Expire Following Password Expiration + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The accounts should be configured to expire automatically following password expiration. + + + + + + + + + Set All Accounts To Have Unique Names + + + All accounts on the system should have unique names for proper accountability. + + + + + + + + + + + Set Maximum Number of Concurrent Login Sessions Per User + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The maximum number of concurrent login sessions per user should meet + minimum requirements. + + + + + + + + + Set Password Expiration Parameters + + + The maximum password age policy should meet minimum requirements. + + + + + + + + + + + Set Password Expiration Parameters + + + The minimum password age policy should be set appropriately. + + + + + + + + + + + UID 0 Belongs Only To Root + + + Only the root account should be assigned a user id of 0. + + + + + + + + + + All Password Hashes Shadowed + + + All password hashes should be shadowed. + + + + + + + + + Set Password Expiration Parameters + + + The password minimum length should be set appropriately. + + + + + + + + + + + Set Password dcredit Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password dcredit should meet minimum requirements + + + + + + + + + + Set Password difok Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password difok should meet minimum requirements + + + + + + + + + + Set Password lcredit Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password lcredit should meet minimum requirements + + + + + + + + + + Set Password maxclassrepeat Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password maxclassrepeat should meet minimum + requirements using pam_pwquality + + + + + + + + + + Set Password maxrepeat Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password maxrepeat should meet minimum + requirements using pam_pwquality + + + + + + + + + + Set Password minclass Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password minclass should meet the minimum requirements + + + + + + + + + + Set Password minlen Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password minlen should meet minimum requirements + + + + + + + + + + Set Password ocredit Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password ocredit should meet minimum requirements + + + + + + + + + + Check pam_pwquality Existence in system-auth + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Check that pam_pwquality.so exists in system-auth + + + + + + + + + + Set Password retry Requirements + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + The password retry should meet minimum requirements + + + + + + + + + + + + + + + + + Set Password ucredit Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password ucredit should meet minimum requirements + + + + + + + + + + Limit Password Reuse + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The passwords to remember should be set correctly. + + + + + + + + + + + + Set Password Expiration Parameters + + + The password expiration warning age should be set appropriately. + + + + + + + + + + + Lock out account after failed login attempts + + + The number of allowed failed logins should be set correctly. + + + + + + + + + + + + + + + + Lock out account after failed login attempts + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The number of allowed failed logins should be set correctly. + + + + + + + + + + + + Lock out account after failed login attempts + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The number of allowed failed logins should be set correctly. + + + + + + + + + + + + + + Write permissions are disabled for group and other in all + directories in Root's Path + + + Check each directory in root's path and make use it does + not grant write permission to group and other + + + + + + + + + + + Set Interactive Session Timeout + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Checks interactive shell timeout + + + + + + + + + + Ensure that Users Have Sensible Umask Values set for bash + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The default umask for users of the bash shell + + + + + + + + + + Ensure that Users Have Sensible Umask Values set for csh + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The default umask for users of the csh shell + + + + + + + + + + Ensure that Users Have Sensible Umask Values in /etc/login.defs + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The default umask for all users specified in /etc/login.defs + + + + + + + + + + Ensure that Users Have Sensible Umask Values in /etc/profile + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The default umask for all users should be set correctly + + + + + + + + + + Aide Database Must Exist + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + CentOS 4 + CentOS 5 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + + The aide database must be initialized. + + + + + + + + + + + + Configure Periodic Execution of AIDE + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + By default, AIDE does not install itself for periodic + execution. Periodically running AIDE is necessary to reveal + unexpected changes in installed files. + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - chmod + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - chown + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fchmod + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fchmodat + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fchown + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fchownat + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fremovexattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fsetxattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - lchown + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - lremovexattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - lsetxattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - removexattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - setxattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit File Deletion Events + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit files deletion events. + + + + + + + + + + + + + + + + + Make Audit Configuration Immutable + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Force a reboot to change audit rules is enabled + + + + + + + + + + + + + + + + + + + Audit Kernel Module Loading and Unloading + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The audit rules should be configured to log information about kernel module loading and unloading. + + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Login and Logout Events + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules should be configured to log successful and unsuccessful login and logout events. + + + + + + + + + + + + + + + + + + + + + + + Record Events that Modify the System's Mandatory Access Controls + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules that detect changes to the system's mandatory access controls (SELinux) are enabled. + + + + + + + + + + + + + + + + + + + Audit Information Export To Media + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules that detect the mounting of filesystems should be enabled. + + + + + + + + + + + + + + + + + Record Events that Modify the System's Network Environment + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The network environment should not be modified by anything other than + administrator action. Any change to network parameters should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Ensure auditd Collects Information on the Use of Privileged Commands + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules about the information on the use of privileged commands are enabled. + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Process and Session Initiation Information + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules should capture information about session initiation. + + + + + + + + + + + + + + + + + + + + + + + Audit System Administrator Actions + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit actions taken by system administrators on the system. + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through Adjtimex + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through adjtimex. + + + + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through Clock_settime + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through clock_settime. + + + + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through Settimeofday + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through settimeofday. + + + + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through Stime + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through stime. Note that on + 64-bit architectures the stime system call is not defined in the audit + system calls lookup table. + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through the Localtime File + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through /etc/localtime. + + + + + + + + + + + + + + + + + + + Ensure auditd Collects Unauthorized Access Attempts to Files (unsuccessful) + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules about the unauthorized access attempts to files (unsuccessful) are enabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit User/Group Modification + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit user/group modification. + + + + + + + + + + + + + + + + + + + + + + + + + The syslog Plugin Of the Audit Event Multiplexor (audispd) Is Activated + + + active setting in /etc/audisp/plugins.d/syslog.conf is set to 'yes' + + + + + + + + + + + Auditd Email Account to Notify Upon Action + + + action_mail_acct setting in /etc/audit/auditd.conf is set to a certain account + + + + + + + + + + + Auditd Action to Take When Disk is Low on Space + + + admin_space_left_action setting in /etc/audit/auditd.conf is set to a certain action + + + + + + + + + + + Auditd priority for flushing data to disk + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The setting for flush in /etc/audit/auditd.conf + + + + + + + + + Auditd Maximum Log File Size + + + max_log_file setting in /etc/audit/auditd.conf is set to at least a certain value + + + + + + + + + + + Auditd Action to Take When Maximum Log Size Reached + + + max_log_file_action setting in /etc/audit/auditd.conf is set to a certain action + + + + + + + + + + + Auditd Maximum Number of Logs to Retain + + + num_logs setting in /etc/audit/auditd.conf is set to at least a certain value + + + + + + + + + + + Auditd Action to Take When Disk Starting to Run Low on Space + + + space_left_action setting in /etc/audit/auditd.conf is set to a certain action + + + + + + + + + + + System Login Banner Compliance + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The system login banner text should be set correctly. + + + + + + + + + + Enable Auditing for Processes Which Start Prior to the Audit Daemon + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Look for argument audit=1 in the kernel line in /etc/default/grub. + + + + + + + + + + + + + + Disable Kernel Support for USB via Bootloader Configuration + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Look for 'nousb' argument in the kernel line in /etc/default/grub + + + + + + + + + + Set Boot Loader Password + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The grub2 boot loader should have password protection enabled. + + + + + + + + + + + + + Set the UEFI Boot Loader Password + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The UEFI grub2 boot loader should have password protection enabled. + + + + + + + + + + + + + Disable Printer Browsing Entirely if Possible + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The CUPS print service can be configured to broadcast a list + of available printers to the network. Other machines on the network, also + running the CUPS print service, can be configured to listen to these + broadcasts and add and configure these printers for immediate use. By + disabling this browsing capability, the machine will no longer generate + or receive such broadcasts. + + + + + + + + + + Disable Printer Server if Possible + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + By default, locally configured printers will not be shared + over the network, but if this functionality has somehow been enabled, + these recommendations will disable it again. Be sure to disable outgoing + printer list broadcasts, or remote users will still be able to see the + locally configured printers, even if they cannot actually print to them. + To limit print serving to a particular set of users, use the Policy + directive. + + + + + + + + + + Enable GNOME3 Login Warning Banner + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Enable the GNOME3 Login warning banner. + + + + + + + + + + + + + + Disable GNOME3 Automounting + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The system's default desktop environment, GNOME3, will mount + devices and removable media (such as DVDs, CDs and USB flash drives) + whenever they are inserted into the system. Disable automount and autorun + within GNOME3. + + + + + + + + + + + + + + + + + + Disable Ctrl-Alt-Del Reboot Key Sequence in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 ctrl-alt-del reboot key sequence in GNOME3. + + + + + + + + + + + + + + Disable Geolocation in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable GNOME3 Geolocation for the clock and system. + + + + + + + + + + + + + + + + Disable Power Settings in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable GNOME3 power settings. + + + + + + + + + + + + + + Disable the GNOME3 Login Restart and Shutdown Buttons + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 Login GUI Restart and Shutdown buttons to all users on the login screen. + + + + + + + + + + + + + + Disable All GNOME3 Thumbnailers + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The system's default desktop environment, GNOME3, uses a + number of different thumbnailer programs to generate thumbnails for any + new or modified content in an opened folder. Disable the execution of + these thumbnail applications within GNOME3. + + + + + + + + + + + + + + Disable User Administration in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable GNOME3's ability to give users some administrative rights. + + + + + + + + + + + + + + Disable the GNOME3 Login User List + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 GUI listing of all known users on the login screen. + + + + + + + + + + + + + + Disable WIFI Network Connection Creation in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 wireless network creation settings. + + + + + + + + + + + + + + Disable WIFI Network Notification in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 wireless network notification. + + + + + + + + + + + + + + Enable the GNOME3 Login Smartcard Authentication + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Enable smartcard authentication in the GNOME3 Login GUI. + + + + + + + + + + + + + + Enable GUI Warning Banner + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Enable the GUI warning banner. + + + + + + + + + + + + + + Set the GNOME3 Login Number of Failures + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Set the GNOME3 number of login failure attempts. + + + + + + + + + + + + + + Require Credential Prompting for Remote Access in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Configure GNOME3 to require credential prompting for remote access. + + + + + + + + + + + + + + Require Encryption for Remote Access in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Configure GNOME3 to require encryption for remote access connections. + + + + + + + + + + + + + + Enable GNOME3 Screensaver Idle Activation + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Idle activation of the screen saver should be enabled. + + + + + + + + + + + + + + Configure the GNOME3 GUI Screen locking + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The allowed period of inactivity before the screensaver is activated. + + + + + + + + + + + + + + + Enable GNOME3 Screensaver Lock After Idle Period + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Idle activation of the screen lock should be enabled. + + + + + + + + + + + + + + + + + + Implement Blank Screensaver + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The GNOME3 screensaver should be blank. + + + + + + + + + + + + + + Disable Full User Name on Splash Shield + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + GNOME3 screen splash shield should not display full name of logged in user. + + + + + + + + + + + + + + Directory /etc/httpd/conf/ Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Directory permissions for /etc/httpd/conf/ should be set to 0750 (or stronger). + + + + + + + + + + Directory /var/log/httpd/ Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Directory permissions for /var/log/httpd should be set to 0700 (or stronger). + + + + + + + + + + Verify that All World-Writable Directories Have Sticky Bits Set + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The sticky bit should be set for all world-writable directories. + + + + + + + + Find world writable directories not owned by a system account + + Red Hat Enterprise Linux 7 + + All world writable directories should be owned by a system user. + + + + + + + + Disable Host-Based Authentication + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + SSH host-based authentication should be disabled. + + + + + + + + + + Verify that Interactive Boot is Disabled + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The ability for users to perform interactive startups should + be disabled. + + + + + + + + + + + + + + Disable Core Dumps + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Core dumps for all users should be disabled + + + + + + + + + Set Last Login/Access Notification + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Configure the system to notify users of last login/access using pam_lastlog. + + + + + + + + + + Implement Local DB for DConf User Profile + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The DConf User profile should have the local DB configured. + + + + + + + + + Enable SELinux in the GRUB2 Bootloader" + + Red Hat Enterprise Linux 7 + + + Check if selinux=0 OR enforcing=0 within the GRUB2 configuration files, fail if found. + + + + + + + + + + + + Ensure the logrotate utility performs the automatic rotation of log files on daily basis + + Debian 8 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + + The frequency of automatic log files rotation performed by the logrotate utility should be configured to run daily + + + + + + + + + + + File grub.cfg Owned By root Group + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The grub.cfg file should be owned by the root group. By default, this file is located at /boot/grub2/grub.cfg or, for EFI systems, at /boot/efi/EFI/redhat/grub.cfg + + + + + + + + + + Verify group who owns 'group' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/group file should be owned by the appropriate + group. + + + + + + + + + Verify group who owns 'gshadow' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/gshadow file should be owned by the appropriate + group. + + + + + + + + + Verify group who owns 'passwd' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/passwd file should be owned by the appropriate + group. + + + + + + + + + Verify user who owns 'group' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/group file should be owned by the appropriate + user. + + + + + + + + + Verify user who owns 'gshadow' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/gshadow file should be owned by the appropriate + user. + + + + + + + + + Verify user who owns 'passwd' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/passwd file should be owned by the appropriate + user. + + + + + + + + + Verify that System Executables Have Root Ownership + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + CentOS 4 + CentOS 5 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + + + Checks that /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, + /usr/local/sbin, /usr/libexec, and objects therein, are owned by root. + + + + + + + + + + + Verify that Shared Library Files Have Root Ownership + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + + Checks that /lib, /lib64, /usr/lib, /usr/lib64, /lib/modules, and + objects therein, are owned by root. + + + + + + + + + + + Verify /var/log/audit Ownership + + + Checks that all /var/log/audit files and directories are owned by the root user and group. + + + + + + + + + + + + + + + + + + + Verify that System Executables Have Restrictive Permissions + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + CentOS 4 + CentOS 5 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + + + Checks that binary files under /bin, /sbin, /usr/bin, /usr/sbin, + /usr/local/bin, /usr/local/sbin, and /usr/libexec are not group-writable or world-writable. + + + + + + + + + + Verify permissions on 'group' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + File permissions for /etc/group should be set + correctly. + + + + + + + + + Verify /etc/gshadow Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + This test makes sure that /etc/gshadow is owned by 0, group owned by 0, and has mode 0000. If + the target file or directory has an extended ACL then it will fail the mode check. + + + + + + + + + Verify /etc/passwd Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + This test makes sure that /etc/passwd is owned by 0, group owned by 0, and has mode 0644 (or stronger). If + the target file or directory has an extended ACL then it will fail the mode check. + + + + + + + + + Verify /etc/shadow Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + This test makes sure that /etc/shadow is owned by 0, group owned by 0, and has mode 0000. If + the target file or directory has an extended ACL then it will fail the mode check. + + + + + + + + + File grub.cfg Permissions + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + File permissions for grub.cfg should be set to 0600 (or stronger). By default, this file is located at /boot/grub2/grub.cfg or, for EFI systems, at /boot/efi/EFI/redhat/grub.cfg + + + + + + + + + + Proper Permissions User Home Directories + + + File permissions should be set correctly for the home directories for all user accounts. + + + + + + + + + + + Verify Permissions On Apache Web Server Configuration Files + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/httpd/conf/* files should have the appropriate permissions (0640 or stronger). + + + + + + + + + + Verify that Shared Library Files Have Restrictive Permissions + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + + Checks that /lib, /lib64, /usr/lib, /usr/lib64, /lib/modules, and + objects therein, are not group-writable or world-writable. + + + + + + + + + + + Find Unauthorized World-Writable Files + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The world-write permission should be disabled for all files. + + + + + + + + Find files unowned by a group + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + CentOS 4 + CentOS 5 + + All files should be owned by a group + + + + + + + + Verify /var/log/audit Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Checks for correct permissions for all log files in /var/log/audit. + + + + + + + + + + + + File grub.cfg Owned By root User + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The grub.cfg file should be owned by the root user. By default, this file is located at /boot/grub2/grub.cfg or, for EFI systems, at /boot/efi/EFI/redhat/grub.cfg + + + + + + + + + + Disallow inbound firewall access to the SSH Server port + + Red Hat Enterprise Linux 7 + + If inbound SSH access is not needed, the firewall should disallow or reject access to + the SSH port (22). + + + + + + + + + + + + Banner for FTP Users + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + To trace malicious activity facilitated by the FTP + service, it must be configured to ensure that all commands sent to + the FTP server are logged using the verbose vsftpd log format. + + + + + + + + + + + + + + + Banner for FTP Users + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + This setting will cause the system greeting banner to be + used for FTP connections as well. + + + + + + + + + + All GIDs Are Present In /etc/group + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + CentOS 4 + CentOS 5 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + + All GIDs referenced in /etc/passwd must be defined in /etc/group. + + + + + + + + + + + Disable GDM Automatic Login + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 7 + + Disable the GNOME Display Manager (GDM) ability to allow users to + automatically login. + + + + + + + + + + Disable GDM Guest Login + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 7 + + Disable the GNOME Display Manager (GDM) ability to allow guest users + to login. + + + + + + + + + + Verify group who owns 'shadow' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/shadow file should be owned by the appropriate + group. + + + + + + + + + Disable dccp Kernel Module + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel module dccp should be disabled. + + + + + + + + + + + + + Disable usb-storage Kernel Module + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel module usb-storage should be disabled. + + + + + + + + + + + + + Configure LDAP to Use TLS for All Transactions + + Red Hat Enterprise Linux 7 + + Require the use of TLS for ldap clients. + + + + + + + + + + Configure LDAP CA Certificate Path + + Red Hat Enterprise Linux 7 + + Require the use of TLS for ldap clients. + + + + + + + + + + + Ensure Logwatch HostLimit Configured + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Test if HostLimit line in logwatch.conf is set appropriately. + + + + + + + + + Ensure Logwatch SplitHosts Configured + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Check if SplitHosts line in logwatch.conf is set appropriately. + + + + + + + + + Add nodev Option to /dev/shm + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Legitimate character and block devices should not exist + within temporary directories like /dev/shm. The nodev mount option should + be specified for /dev/shm. + + + + + + + + + Add noexec Option to /dev/shm + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + It can be dangerous to allow the execution of binaries from + world-writable temporary storage directories such as /dev/shm. The noexec + mount option prevents binaries from being executed out of + /dev/shm. + + + + + + + + + Add nosuid Option to /dev/shm + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nosuid mount option should be set for temporary storage + partitions such as /dev/shm. The suid/sgid permissions should not be + required in these world-writable directories. + + + + + + + + + Add nodev Option to Non-Root Local Partitions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nodev mount option prevents files from being interpreted + as character or block devices. Legitimate character and block devices + should exist in the /dev directory on the root partition or within chroot + jails built for system services. All other locations should not allow + character and block devices. + + + + + + + + + Mount Remote Filesystems with nodev + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nodev option should be enabled for all NFS mounts in /etc/fstab. + + + + + + + + + + + + Add nodev Option to Removable Media Partitions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nodev mount option prevents files from being interpreted + as character or block devices. Legitimate character and block devices + should exist in the /dev directory on the root partition or within chroot + jails built for system services. All other locations should not allow + character and block devices. + + + + + + + + + + + + + + + + + + + + + Add noexec Option to Removable Media Partitions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The noexec mount option prevents the direct execution of + binaries on the mounted filesystem. Users should not be allowed to + execute binaries that exist on partitions mounted from removable media + (such as a USB key). The noexec option prevents code from being executed + directly from the media itself, and may therefore provide a line of + defense against certain types of worms or malicious code. + + + + + + + + + + + + + + + + + + + + + Mount Remote Filesystems with nosuid + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nosuid option should be enabled for all NFS mounts in /etc/fstab. + + + + + + + + + + + + Verify No netrc Files Exist + + + The .netrc files contain login information used to auto-login into FTP servers and reside in the user's home directory. Any .netrc files should be removed. + + + + + + + + + Add nosuid Option to Removable Media Partitions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nosuid mount option prevents set-user-identifier (suid) + and set-group-identifier (sgid) permissions from taking effect. These + permissions allow users to execute binaries with the same permissions as + the owner and group of the file respectively. Users should not be allowed + to introduce suid and guid files into the system via partitions mounted + from removeable media. + + + + + + + + + + + + + + + + + + + + + Require Client SMB Packet Signing, if using + mount.cifs + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Require packet signing of clients who mount + Samba shares using the mount.cifs program (e.g., those who + specify shares in /etc/fstab). To do so, ensure that signing + options (either sec=krb5i or sec=ntlmv2i) are + used. + + + + + + + + + + + + + + + + + Add nodev Option to /tmp + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Legitimate character and block devices should not exist + within temporary directories like /tmp. The nodev mount option should be + specified for /tmp. + + + + + + + + + Add noexec Option to /tmp + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + It can be dangerous to allow the execution of binaries from + world-writable temporary storage directories such as /tmp. The noexec + mount option prevents binaries from being executed out of + /tmp. + + + + + + + + + Add nosuid Option to /tmp + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nosuid mount option should be set for temporary storage + partitions such as /tmp. The suid/sgid permissions should not be required + in these world-writable directories. + + + + + + + + + Bind Mount /var/tmp To /tmp + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /var/tmp directory should be bind mounted to /tmp in + order to consolidate temporary storage into one location protected by the + same techniques as /tmp. + + + + + + + + + + Disable Zeroconf Networking + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Disable Zeroconf automatic route assignment in the + 169.254.0.0 subnet. + + + + + + + + + Manually Assign IPv6 Router Address + + Red Hat Enterprise Linux 7 + + Define default gateways for IPv6 traffic + + + + + + + + + Disable Support for RPC IPv6 + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Disable ipv6 based rpc services + + + + + + + + + Enable Privacy Extensions for IPv6 + + Red Hat Enterprise Linux 7 + + Enable privacy extensions for IPv6 + + + + + + + + + Manually Assign Global IPv6 Address + + Red Hat Enterprise Linux 7 + + Manually configure addresses for IPv6 + + + + + + + + + Disable the network sniffer + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Disable the network sniffer + + + + + + + + + Direct root Logins Not Allowed + + + Preventing direct root logins help ensure accountability for actions + taken on the system using the root account. + + + + + + + + + + No nullok Option in /etc/pam.d/system-auth + + + The file /etc/pam.d/system-auth should not contain the nullok option + + + + + + + + + Find files unowned by a user + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + All files should be owned by a user + + + + + + + + + Ensure insecure_locks is disabled + + + Allowing insecure file locking could allow for sensitive + data to be viewed or edited by an unauthorized user. + + + + + + + + + No Legacy .rhosts Or hosts.equiv Files + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + There should not be any .rhosts or hosts.equiv files on the system. + + + + + + + + + + + System Accounts Do Not Run a Shell + + + The root account is the only system account that should have + a login shell. + + + + + + + + + + + + + + + + + + + + + + + Package aide Installed + + Red Hat Enterprise Linux 7 + + The RPM package aide should be installed. + + + + + + + + + Package audit Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package audit should be installed. + + + + + + + + + + Package bind Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package bind should be removed. + + + + + + + + + Package dconf Installed + + Red Hat Enterprise Linux 7 + + The RPM package dconf should be installed. + + + + + + + + + Package dhcp Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package dhcp should be removed. + + + + + + + + + Package dovecot Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package dovecot should be removed. + + + + + + + + + Package dracut-fips Installed + + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 7 + + The RPM package dracut-fips should be installed. + + + + + + + + + Package gdm Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package gdm should be installed. + + + + + + + + + Package httpd Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package httpd should be removed. + + + + + + + + + Package libreswan Installed + + Red Hat Enterprise Linux 7 + + The RPM package libreswan should be installed. + + + + + + + + + Package mcstrans Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package mcstrans should be removed. + + + + + + + + + Package net-snmp Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package net-snmp should be removed. + + + + + + + + + Package nss-pam-ldapd Removed + + Red Hat Enterprise Linux 7 + + The RPM package nss-pam-ldapd should be removed. + + + + + + + + + Package ntp Installed + + Red Hat Enterprise Linux 7 + + The RPM package ntp should be installed. + + + + + + + + + Package openldap-servers Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package openldap-servers should be removed. + + + + + + + + + Package openssh-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package openssh-server should be removed. + + + + + + + + + Package prelink Removed + + + The RPM package prelink should be removed. + + + + + + + + + + + Package rsh-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package rsh-server should be removed. + + + + + + + + + Package rsh Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package rsh should be removed. + + + + + + + + + Package rsyslog Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package rsyslog should be installed. + + + + + + + + + Package samba-common Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package samba-common should be removed. + + + + + + + + + Package screen Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package screen should be installed. + + + + + + + + + Package sendmail Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package sendmail should be removed. + + + + + + + + + Package setroubleshoot Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package setroubleshoot should be removed. + + + + + + + + + Package squid Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package squid should be removed. + + + + + + + + + Package talk-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package talk-server should be removed. + + + + + + + + + + Package talk Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package talk should be removed. + + + + + + + + + + Package telnet-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package telnet-server should be removed. + + + + + + + + + Package telnet Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package telnet should be removed. + + + + + + + + + Package tftp-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package tftp-server should be removed. + + + + + + + + + Package tftp Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package tftp should be removed. + + + + + + + + + Package vsftpd Installed + + Red Hat Enterprise Linux 7 + + The RPM package vsftpd should be installed. + + + + + + + + + Package vsftpd Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package vsftpd should be removed. + + + + + + + + + Package xinetd Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package xinetd should be removed. + + + + + + + + + Package xorg-x11-server-common Removed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package xorg-x11-server-common should be removed. + + + + + + + + + + Package ypbind Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package ypbind should be removed. + + + + + + + + + Package ypserv Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package ypserv should be removed. + + + + + + + + + Ensure /home Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + If user home directories will be stored locally, create a + separate partition for /home. If /home will be mounted from another + system such as an NFS server, then creating a separate partition is not + necessary at this time, and the mountpoint can instead be configured + later. + + + + + + + + + + Ensure /tmp Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /tmp directory is a world-writable directory used for + temporary file storage. Verify that it has its own partition or logical + volume. + + + + + + + + + + Ensure /var Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Ensuring that /var is mounted on its own partition enables + the setting of more restrictive mount options, which is used as temporary + storage by many program, particularly system services such as daemons. It + is not uncommon for the /var directory to contain world-writable + directories, installed by other software packages. + + + + + + + + + + Ensure /var/log Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + System logs are stored in the /var/log directory. Ensure + that it has its own partition or logical volume. + + + + + + + + + + Ensure /var/log/audit Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Audit logs are stored in the /var/log/audit directory. + Ensure that it has its own partition or logical volume. Make absolutely + certain that it is large enough to store all audit logs that will be + created by the auditing daemon. + + + + + + + + + + Configure Postfix Against Unnecessary Release of Information + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Protect against unnecessary release of information. + + + + + + + + + Require Authentication for Single-User Mode + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The requirement for a password to boot into single-user mode + should be configured correctly. + + + + + + + + + + + + Require Client SMB Packet Signing in smb.conf + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Require samba clients which use smb.conf, such as smbclient, + to use packet signing. A Samba client should only communicate with + servers who can support SMB packet signing. + + + + + + + + + + Restrict Serial Port Root Logins + + + Preventing direct root login to serial port interfaces helps + ensure accountability for actions taken on the system using the root + account. + + + + + + + + + Ensure that No Dangerous Directories Exist in Root's Path + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The environment variable PATH should be set correctly for + the root user. + + + + + + + + + + + + + + Verify File Hashes with RPM + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + Verify the RPM digests of system binaries using the RPM database. + + + + + + + + + + + Verify File Ownership And Permissions Using RPM + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Verify the integrity of installed packages + by comparing the installed files with information about the + files taken from the package metadata stored in the RPM + database. + + + + + + + + + + + + + Disable Rsyslogd from Accepting Remote Messages on Loghosts + Only + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + rsyslogd should reject remote messages + + + + + + + + + Send Logs to a Remote Loghost + + Debian 8 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Syslog logs should be sent to a remote loghost + + + + + + + + + + Restrict Virtual Console Root Logins + + + Preventing direct root login to virtual console devices + helps ensure accountability for actions taken on the system using the + root account. + + + + + + + + + Change the default firewalld zone to drop + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Change the default firewalld zone to drop. + + + + + + + + + Set SHA512 Password Hashing Algorithm in /etc/libuser.conf + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The password hashing algorithm should be set correctly in /etc/libuser.conf. + + + + + + + + + Set SHA512 Password Hashing Algorithm in /etc/login.defs + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The password hashing algorithm should be set correctly in /etc/login.defs. + + + + + + + + + + + Set Password Hashing Algorithm in /etc/pam.d/system-auth + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The password hashing algorithm should be set correctly in /etc/pam.d/system-auth. + + + + + + + + + SNMP default communities disabled + + + SNMP default communities must be removed. + + + + + + + + + + SNMP use newer protocols + + + SNMP version 1 and 2c must not be enabled. + + + + + + + + + + Ensure Only Protocol 2 Connections Allowed + + Debian 8 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The OpenSSH daemon should be running protocol 2. + + + + + + + + + + + Disable .rhosts Files + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Emulation of the rsh command through the ssh server should + be disabled (and dependencies are met) + + + + + + + + + + Disable root Login via SSH + + + Root login via SSH should be disabled (and dependencies are + met) + + + + + + + + + + Do Not Allow Users to Set Environment Options + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + PermitUserEnvironment should be disabled + + + + + + + + + + Enable a Warning Banner + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + SSH warning banner should be enabled (and dependencies are + met) + + + + + + + + + + Set OpenSSH Idle Timeout Interval + + + The SSH idle timeout interval should be set to an + appropriate value. + + + + + + + + + + + Use Only Approved Ciphers + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Limit the ciphers to those which are FIPS-approved and only + use ciphers in counter (CTR) mode. + + + + + + + + + + Disable DHCP Client + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + DHCP configuration should be static for all + interfaces. + + + + + + + + + Kernel "kernel.dmesg_restrict" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The "kernel.dmesg_restrict" kernel parameter should be set to "1" in both system configuration and system runtime. + + + + + + + + + + Kernel Runtime Parameter "kernel.exec-shield" Check + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel runtime parameter "kernel.exec-shield" should not be disabled and set to 1 on 32-bit systems. + + + + + + + + + + + + + + + + + + + Kernel Runtime Parameter IPv6 Check + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disables IPv6 for all network interfaces. + + + + + + + + + + + + Kernel "kernel.randomize_va_space" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "kernel.randomize_va_space" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "kernel.dmesg_restrict" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The kernel "kernel.dmesg_restrict" parameter should be set to "1" in system runtime. + + + + + + + + + Kernel "kernel.randomize_va_space" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "kernel.randomize_va_space" parameter should be set to "2" in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.disable_ipv6" Parameter Runtime Check + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.disable_ipv6" parameter should be set to "1" in system runtime. + + + + + + + + + Kernel "kernel.dmesg_restrict" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The kernel "kernel.dmesg_restrict" parameter should be set to "1" in the system configuration. + + + + + + + + + + + + + + Kernel "kernel.randomize_va_space" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "kernel.randomize_va_space" parameter should be set to "2" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.disable_ipv6" Parameter Configuration Check + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.disable_ipv6" parameter should be set to "1" in the system configuration. + + + + + + + + + + + + + TFTP Daemon Uses Secure Mode + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The TFTP daemon should use secure mode. + + + + + + + + + + Verify user who owns 'shadow' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/shadow file should be owned by the + appropriate user. + + + + + + + + + Deactivate Wireless Interfaces + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + All wireless interfaces should be disabled. + + + + + + + + Ensure that FAIL_DELAY is Configured in /etc/login.defs + + Red Hat Enterprise Linux 7 + + The delay between failed authentication attempts should be + set for all users specified in /etc/login.defs + + + + + + + + + Lock out the root account after failed login attempts + + Red Hat Enterprise Linux 7 + + The root account should be configured to deny access after the number of defined + failed attempts has been reached. + + + + + + + + + + + + Ensure YUM Removes Previous Package Versions + + Red Hat Enterprise Linux 7 + + The clean_requirements_on_remove option should be used to ensure that old + versions of software components are removed after updating. + + + + + + + + + Enable X11 Forwarding + + Red Hat Enterprise Linux 7 + + Enable X11Forwarding to encrypt X11 remote connections over SSH. + + + + + + + + + + Ensure gpgcheck Enabled for Local Packages + + Red Hat Enterprise Linux 7 + + The localpkg_gpgcheck option should be used to ensure that checking + of an RPM package's signature always occurs prior to its + installation. + + + + + + + + + Ensure gpgcheck Enabled for Repository Metadata + + Red Hat Enterprise Linux 7 + + The repo_gpgcheck option should be used to ensure that checking + of repository metadata always occurs. + + + + + + + + + SSH Server Private Key Permissions + + Red Hat Enterprise Linux 7 + + File permissions for the SSH Server's private keys should be +set to 0600 (or stronger). By default, these files are located at /etc/ssh. + + + + + + + + + SSHD Service Public Key Permissions + + Red Hat Enterprise Linux 7 + + File permissions for the SSH Server's public keys should be +set to 0644 (or stronger). By default, these files are located at /etc/ssh. + + + + + + + + + Find setgid files system packages + + Red Hat Enterprise Linux 7 + + All files with setgid should be owned by a base system package + + + + + + + + + Find setuid files from system packages + + Red Hat Enterprise Linux 7 + + All files with setuid should be owned by a base system package + + + + + + + + + Enable FIPS Mode in GRUB2 + + Red Hat Enterprise Linux 7 + + Look for argument fips=1 in the kernel line in /etc/default/grub. + + + + + + + + + + + + + + + + + Package kernel-PAE Installed + + Red Hat Enterprise Linux 7 + + The RPM package kernel-PAE should be installed on 32-bit + systems. + + + + + + + + + + + + Install McAfee Host-Based Intrusion Detection Software (HBSS) + + Red Hat Enterprise Linux 7 + + McAfee Host-Based Intrusion Detection Software (HBSS) software + should be installed. + + + + + + + + + + + + Disable bluetooth Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module bluetooth should be disabled. + + + + + + + + + + + + + Disable cramfs Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module cramfs should be disabled. + + + + + + + + + + + + + Disable freevxfs Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module freevxfs should be disabled. + + + + + + + + + + + + + Disable hfs Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module hfs should be disabled. + + + + + + + + + + + + + Disable hfsplus Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module hfsplus should be disabled. + + + + + + + + + + + + + Disable jffs2 Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module jffs2 should be disabled. + + + + + + + + + + + + + Disable sctp Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module sctp should be disabled. + + + + + + + + + + + + + Disable squashfs Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module squashfs should be disabled. + + + + + + + + + + + + + Disable udf Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module udf should be disabled. + + + + + + + + + + + + + Mount Remote Filesystems with Kerberos Security + + Red Hat Enterprise Linux 7 + + The Kerberos security option should be enabled for all NFS mounts in /etc/fstab. + + + + + + + + + + + Disable Client Dynamic DNS Updates + + Red Hat Enterprise Linux 7 + + Clients should not automatically update their own + DNS record. + + + + + + + + + + + Service nails Enabled + + Red Hat Enterprise Linux 7 + + The nails service should be enabled if possible. + + + + + + + + + + + + + + Service sshd Disabled + + Red Hat Enterprise Linux 7 + + The sshd service should be disabled if possible. + + + + + + + + + + + + Disable Compression Or Set Compression to delayed + + Red Hat Enterprise Linux 7 + + SSH should either have compression disabled or set to delayed. + + + + + + + + + + Disable Kerberos Authentication + + Red Hat Enterprise Linux 7 + + Unless needed, disable the Kerberos authentication option for +the SSH Server. + + + + + + + + + + Enable SSH Server's Strict Mode + + Red Hat Enterprise Linux 7 + + Enable StrictMode to check users home directory permissions +and configurations. + + + + + + + + + + Enable Print Last Log + + Red Hat Enterprise Linux 7 + + Enable PrintLastLogStrict to display user's last login time +and date. + + + + + + + + + + Use Priviledge Separation + + Red Hat Enterprise Linux 7 + + Use priviledge separation to cause the SSH process to drop +root privileges when not needed. + + + + + + + + + + Configure SSSD's Memory Cache to Expire + + Red Hat Enterprise Linux 7 + + SSSD's memory cache should be configured to set to expire records after 1 day. + + + + + + + + + Configure SSSD to Expire Offline Credentials + + Red Hat Enterprise Linux 7 + + SSSD should be configured to expire offline credentials after 1 day. + + + + + + + + + Configure SSSD to Expire SSH Known Hosts + + Red Hat Enterprise Linux 7 + + SSSD should be configured to expire keys from known SSH hosts after 1 day. + + + + + + + + + Ensure !authenticate Is Not Used in Sudo + + Red Hat Enterprise Linux 7 + + Checks interactive shell timeout + + + + + + + + + + Ensure NOPASSWD Is Not Used in Sudo + + Red Hat Enterprise Linux 7 + + Checks interactive shell timeout + + + + + + + + + + Kernel "fs.suid_dumpable" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "fs.suid_dumpable" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.accept_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.accept_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.accept_source_route" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.accept_source_route" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.log_martians" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.log_martians" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.rp_filter" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.rp_filter" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.secure_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.secure_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.send_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.send_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.accept_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.accept_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.accept_source_route" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.accept_source_route" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.log_martians" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.log_martians" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.rp_filter" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.rp_filter" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.secure_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.secure_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.send_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.send_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.icmp_echo_ignore_broadcasts" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.icmp_echo_ignore_broadcasts" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.icmp_ignore_bogus_error_responses" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.icmp_ignore_bogus_error_responses" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.ip_forward" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.ip_forward" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.tcp_syncookies" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.tcp_syncookies" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_ra" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.all.accept_ra" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.all.accept_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_source_route" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.all.accept_source_route" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.forwarding" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.all.forwarding" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_ra" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.default.accept_ra" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.default.accept_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_source_route" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.default.accept_source_route" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "fs.suid_dumpable" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "fs.suid_dumpable" parameter should be set to "0" in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.accept_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.accept_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.accept_source_route" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.accept_source_route" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.log_martians" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.log_martians" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.rp_filter" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.rp_filter" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.secure_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.secure_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.send_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.send_redirects" parameter should be set to "0" in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.accept_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.accept_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.accept_source_route" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.accept_source_route" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.log_martians" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.log_martians" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.rp_filter" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.rp_filter" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.ip_forward" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.ip_forward" parameter should be set to "0" in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.secure_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.secure_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.send_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.send_redirects" parameter should be set to "0" in system runtime. + + + + + + + + + Kernel "net.ipv4.icmp_echo_ignore_broadcasts" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.icmp_echo_ignore_broadcasts" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.icmp_ignore_bogus_error_responses" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.icmp_ignore_bogus_error_responses" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.tcp_syncookies" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.tcp_syncookies" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.accept_ra" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_ra" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.accept_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.accept_source_route" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_source_route" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.forwarding" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.forwarding" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.default.accept_ra" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_ra" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.default.accept_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.default.accept_source_route" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_source_route" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "fs.suid_dumpable" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "fs.suid_dumpable" parameter should be set to "0" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.accept_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.accept_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.accept_source_route" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.accept_source_route" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.log_martians" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.log_martians" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.rp_filter" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.rp_filter" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.secure_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.secure_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.send_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.send_redirects" parameter should be set to "0" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.accept_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.accept_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.accept_source_route" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.accept_source_route" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.log_martians" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.log_martians" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.rp_filter" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.rp_filter" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.secure_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.secure_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.send_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.send_redirects" parameter should be set to "0" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.icmp_echo_ignore_broadcasts" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.icmp_echo_ignore_broadcasts" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.icmp_ignore_bogus_error_responses" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.icmp_ignore_bogus_error_responses" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.ip_forward" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.ip_forward" parameter should be set to "0" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.tcp_syncookies" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.tcp_syncookies" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_ra" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_ra" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_source_route" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_source_route" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.forwarding" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.forwarding" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_ra" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_ra" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_source_route" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_source_route" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Use Kerberos Security on All Exports + + Red Hat Enterprise Linux 7 + + Using Kerberos Security allows to cryptography authenticate a + valid user to an NFS share. + + + + + + + + + + Specify Multiple Remote chronyd NTP Servers for Time Data + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Multiple chronyd NTP Servers for time synchronization should be specified. + + + + + + + + + + Specify a Remote NTP Server for Time Data + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + A remote NTP Server for time synchronization should be + specified (and dependencies are met) + + + + + + + + + + Disable Ctrl-Alt-Del Reboot Activation + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + By default, the system will reboot when the + Ctrl-Alt-Del key sequence is pressed. + + + + + + + + + Disable Plaintext Authentication in Dovecot + + Red Hat Enterprise Linux 7 + + Plaintext authentication of mail clients should be disabled. + + + + + + + + + + Enable SSL in Dovecot + + Red Hat Enterprise Linux 7 + + SSL capabilities should be enabled for the mail server. + + + + + + + + + + Specify Multiple Remote ntpd NTP Server for Time Data + + Red Hat Enterprise Linux 7 + + Multiple ntpd NTP Servers for time synchronization should be specified. + + + + + + + + + Specify a Remote ntpd NTP Server for Time Data + + Red Hat Enterprise Linux 7 + + A remote ntpd NTP Server for time synchronization should be + specified (and dependencies are met) + + + + + + + + + Package chrony Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package chrony should be installed. + + + + + + + + + + Package cronie Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package cronie should be installed. + + + + + + + + + + Package firewalld Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package firewalld should be installed. + + + + + + + + + + Postfix network listening should be disabled + + Red Hat Enterprise Linux 7 + + Postfix network listening should be disabled + + + + + + + + + + + + Confirm Existence and Permissions of System Log Files + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + All syslog log files should be owned by the appropriate group. + + + + + + + + + + + Confirm Existence and Permissions of System Log Files + + Debian 8 + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + All syslog log files should be owned by the appropriate user. + + + + + + + + + + + Confirm Existence and Permissions of System Log Files + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + File permissions for all syslog log files should be set correctly. + + + + + + + + + + + Service dovecot Disabled + + Red Hat Enterprise Linux 7 + + The dovecot service should be disabled if possible. + + + + + + + + + + + + Specify Multiple Remote chronyd Or ntpd NTP Servers for Time Data + + Red Hat Enterprise Linux 7 + + Multiple remote chronyd or ntpd NTP Servers for time synchronization should be specified (and dependencies are met) + + + + + + + + + + + + + + + + Specify Remote NTP chronyd Or ntpd Server for Time Data + + Red Hat Enterprise Linux 7 + + A remote chronyd or ntpd NTP Server for time synchronization should be specified (and dependencies are met) + + + + + + + + + + + + + + + + Package abrt Removed + + Red Hat Enterprise Linux 7 + + The RPM package abrt should be removed. + + + + + + + + + Package acpid Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package acpid should be removed. + + + + + + + + + Package at Removed + + Red Hat Enterprise Linux 7 + + The RPM package at should be removed. + + + + + + + + + Package autofs Removed + + Red Hat Enterprise Linux 7 + + The RPM package autofs should be removed. + + + + + + + + + Package avahi Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package avahi should be removed. + + + + + + + + + Package bluez Removed + + Red Hat Enterprise Linux 7 + + The RPM package bluez should be removed. + + + + + + + + + Package certmonger Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package certmonger should be removed. + + + + + + + + + Package cups Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package cups should be removed. + + + + + + + + + Package cyrus-sasl Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package cyrus-sasl should be removed. + + + + + + + + + Package dbus Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package dbus should be removed. + + + + + + + + + Package esc Installed + + Red Hat Enterprise Linux 7 + + The RPM package esc should be installed. + + + + + + + + + Package iputils Removed + + Red Hat Enterprise Linux 7 + + The RPM package iputils should be removed. + + + + + + + + + Package irqbalance Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package irqbalance should be installed. + + + + + + + + + Package kernel-tools Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package kernel-tools should be removed. + + + + + + + + + Package kexec-tools Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package kexec-tools should be removed. + + + + + + + + + Package libcgroup-tools Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package libcgroup-tools should be removed. + + + + + + + + + Package libcgroup Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package libcgroup should be removed. + + + + + + + + + Package mdadm Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package mdadm should be removed. + + + + + + + + + Package nfs-utils Removed + + Red Hat Enterprise Linux 7 + + The RPM package nfs-utils should be removed. + + + + + + + + + Package ntpdate Removed + + Red Hat Enterprise Linux 7 + + The RPM package ntpdate should be removed. + + + + + + + + + Package oddjob Removed + + Red Hat Enterprise Linux 7 + + The RPM package oddjob should be removed. + + + + + + + + + Package openssh-server Installed + + Red Hat Enterprise Linux 7 + + The RPM package openssh-server should be installed. + + + + + + + + + Package pam_pkcs11 Installed + + Red Hat Enterprise Linux 7 + + The RPM package pam_pkcs11 should be installed. + + + + + + + + + Package pcsc-lite Installed + + Red Hat Enterprise Linux 7 + + The RPM package pcsc-lite should be installed. + + + + + + + + + Package portreserve Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package portreserve should be removed. + + + + + + + + + Package postfix Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package postfix should be installed. + + + + + + + + + Package psacct Installed + + Red Hat Enterprise Linux 7 + + The RPM package psacct should be installed. + + + + + + + + + Package qpid-cpp-server Removed + + Red Hat Enterprise Linux 7 + + The RPM package qpid-cpp-server should be removed. + + + + + + + + + Package quagga Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package quagga should be removed. + + + + + + + + + Package quota-nld Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package quota-nld should be removed. + + + + + + + + + Package rhnsd Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package rhnsd should be removed. + + + + + + + + + Package samba Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package samba should be removed. + + + + + + + + + Package smartmontools Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package smartmontools should be removed. + + + + + + + + + Package sssd Installed + + Red Hat Enterprise Linux 7 + + The RPM package sssd should be installed. + + + + + + + + + Package subscription-manager Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package subscription-manager should be removed. + + + + + + + + + Package sysstat Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package sysstat should be removed. + + + + + + + + + Package tcp_wrappers Installed + + Red Hat Enterprise Linux 7 + + The RPM package tcp_wrappers should be installed. + + + + + + + + + + Package xinetd Installed + + Red Hat Enterprise Linux 7 + + The RPM package xinetd should be installed. + + + + + + + + + pcscd.socket Activation Socket Enabled + + Red Hat Enterprise Linux 7 + + The pcscd.socket activation socket should be enabled if possible. + + + + + + + + + + + + Service abrtd Disabled + + Red Hat Enterprise Linux 7 + + The abrtd service should be disabled if possible. + + + + + + + + + + + + Service acpid Disabled + + Red Hat Enterprise Linux 7 + + The acpid service should be disabled if possible. + + + + + + + + + + + + Service atd Disabled + + Red Hat Enterprise Linux 7 + + The atd service should be disabled if possible. + + + + + + + + + + + + Service auditd Enabled + + Red Hat Enterprise Linux 7 + + The auditd service should be enabled if possible. + + + + + + + + + + + + Service autofs Disabled + + Red Hat Enterprise Linux 7 + + The autofs service should be disabled if possible. + + + + + + + + + + + + Service avahi-daemon Disabled + + Red Hat Enterprise Linux 7 + + The avahi-daemon service should be disabled if possible. + + + + + + + + + + + + Service bluetooth Disabled + + Red Hat Enterprise Linux 7 + + The bluetooth service should be disabled if possible. + + + + + + + + + + + + Service certmonger Disabled + + Red Hat Enterprise Linux 7 + + The certmonger service should be disabled if possible. + + + + + + + + + + + + Service cgconfig Disabled + + Red Hat Enterprise Linux 7 + + The cgconfig service should be disabled if possible. + + + + + + + + + + + + Service cgred Disabled + + Red Hat Enterprise Linux 7 + + The cgred service should be disabled if possible. + + + + + + + + + + + + Service chronyd Enabled + + Red Hat Enterprise Linux 7 + + The chronyd service should be enabled if possible. + + + + + + + + + + + + Service chronyd Or Service ntpd Enabled + + Red Hat Enterprise Linux 7 + + At least one of the chronyd or ntpd services should be enabled if possible. + + + + + + + + + + Service cpupower Disabled + + Red Hat Enterprise Linux 7 + + The cpupower service should be disabled if possible. + + + + + + + + + + + + Service crond Enabled + + Red Hat Enterprise Linux 7 + + The crond service should be enabled if possible. + + + + + + + + + + + + Service cups Disabled + + Red Hat Enterprise Linux 7 + + The cups service should be disabled if possible. + + + + + + + + + + + + Service debug-shell Disabled + + Red Hat Enterprise Linux 7 + + The debug-shell service should be disabled if possible. + + + + + + + + + Service dhcpd Disabled + + Red Hat Enterprise Linux 7 + + The dhcpd service should be disabled if possible. + + + + + + + + + + + + Service firewalld Enabled + + Red Hat Enterprise Linux 7 + + The firewalld service should be enabled if possible. + + + + + + + + + + + + Service httpd Disabled + + Red Hat Enterprise Linux 7 + + The httpd service should be disabled if possible. + + + + + + + + + + + + Service irqbalance Enabled + + Red Hat Enterprise Linux 7 + + The irqbalance service should be enabled if possible. + + + + + + + + + + + + Service kdump Disabled + + Red Hat Enterprise Linux 7 + + The kdump service should be disabled if possible. + + + + + + + + + + + + Service mdmonitor Disabled + + Red Hat Enterprise Linux 7 + + The mdmonitor service should be disabled if possible. + + + + + + + + + + + + Service messagebus Disabled + + Red Hat Enterprise Linux 7 + + The messagebus service should be disabled if possible. + + + + + + + + + + + + Service named Disabled + + Red Hat Enterprise Linux 7 + + The named service should be disabled if possible. + + + + + + + + + + + + Service netconsole Disabled + + Red Hat Enterprise Linux 7 + + The netconsole service should be disabled if possible. + + + + + + + + + Service nfs Disabled + + Red Hat Enterprise Linux 7 + + The nfs service should be disabled if possible. + + + + + + + + + + + + Service nfslock Disabled + + Red Hat Enterprise Linux 7 + + The nfslock service should be disabled if possible. + + + + + + + + + + + + Service ntpd Enabled + + Red Hat Enterprise Linux 7 + + The ntpd service should be enabled if possible. + + + + + + + + + + + + Service ntpdate Disabled + + Red Hat Enterprise Linux 7 + + The ntpdate service should be disabled if possible. + + + + + + + + + + + + Service oddjobd Disabled + + Red Hat Enterprise Linux 7 + + The oddjobd service should be disabled if possible. + + + + + + + + + + + + Service portreserve Disabled + + Red Hat Enterprise Linux 7 + + The portreserve service should be disabled if possible. + + + + + + + + + + + + Service postfix Enabled + + Red Hat Enterprise Linux 7 + + The postfix service should be enabled if possible. + + + + + + + + + + + + Service psacct Enabled + + Red Hat Enterprise Linux 7 + + The psacct service should be enabled if possible. + + + + + + + + + + + + Service qpidd Disabled + + Red Hat Enterprise Linux 7 + + The qpidd service should be disabled if possible. + + + + + + + + + + + + Service quota_nld Disabled + + Red Hat Enterprise Linux 7 + + The quota_nld service should be disabled if possible. + + + + + + + + + + + + Service rdisc Disabled + + Red Hat Enterprise Linux 7 + + The rdisc service should be disabled if possible. + + + + + + + + + + + + Service rexec Disabled + + Red Hat Enterprise Linux 7 + + The rexec service should be disabled if possible. + + + + + + + + + + + + + Service rhnsd Disabled + + Red Hat Enterprise Linux 7 + + The rhnsd service should be disabled if possible. + + + + + + + + + + + + Service rhsmcertd Disabled + + Red Hat Enterprise Linux 7 + + The rhsmcertd service should be disabled if possible. + + + + + + + + + + + + Service rlogin Disabled + + Red Hat Enterprise Linux 7 + + The rlogin service should be disabled if possible. + + + + + + + + + + + + + Service rpcbind Disabled + + Red Hat Enterprise Linux 7 + + The rpcbind service should be disabled if possible. + + + + + + + + + + + + Service rpcgssd Disabled + + Red Hat Enterprise Linux 7 + + The rpcgssd service should be disabled if possible. + + + + + + + + + + + + Service rpcidmapd Disabled + + Red Hat Enterprise Linux 7 + + The rpcidmapd service should be disabled if possible. + + + + + + + + + + + + Service rpcsvcgssd Disabled + + Red Hat Enterprise Linux 7 + + The rpcsvcgssd service should be disabled if possible. + + + + + + + + + + + + Service rsh Disabled + + Red Hat Enterprise Linux 7 + + The rsh service should be disabled if possible. + + + + + + + + + + + + + Service rsyslog Enabled + + Red Hat Enterprise Linux 7 + + The rsyslog service should be enabled if possible. + + + + + + + + + + + + Service saslauthd Disabled + + Red Hat Enterprise Linux 7 + + The saslauthd service should be disabled if possible. + + + + + + + + + + + + Service smartd Disabled + + Red Hat Enterprise Linux 7 + + The smartd service should be disabled if possible. + + + + + + + + + + + + Service smb Disabled + + Red Hat Enterprise Linux 7 + + The smb service should be disabled if possible. + + + + + + + + + + + + Service snmpd Disabled + + Red Hat Enterprise Linux 7 + + The snmpd service should be disabled if possible. + + + + + + + + + + + + Service squid Disabled + + Red Hat Enterprise Linux 7 + + The squid service should be disabled if possible. + + + + + + + + + + + + Service sshd Enabled + + Red Hat Enterprise Linux 7 + + The sshd service should be enabled if possible. + + + + + + + + + + + + Service sssd Enabled + + Red Hat Enterprise Linux 7 + + The sssd service should be enabled if possible. + + + + + + + + + + + + Service sysstat Disabled + + Red Hat Enterprise Linux 7 + + The sysstat service should be disabled if possible. + + + + + + + + + + + + Service ypbind Disabled + + Red Hat Enterprise Linux 7 + + The ypbind service should be disabled if possible. + + + + + + + + + + + + Enable Smart Card Login + + Red Hat Enterprise Linux 7 + + Enable Smart Card logins + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /etc/default/useradd + ^\s*INACTIVE\s*=\s*(\d+)\s*$ + 1 + + + /etc/passwd + + ^([^:]+):.*$ + 1 + + + oval:ssg-variable_count_of_all_usernames_from_etc_passwd:var:1 + + + /etc/security/limits.conf + ^[\s]*\*[\s]+(?:(?:hard)|(?:-))[\s]+maxlogins[\s]+(\d+)\s*$ + 1 + + + + + /etc/login.defs + + .*\n[^#]*(PASS_MAX_DAYS\s+\d+)\s*\n + 1 + + + oval:ssg-variable_last_pass_max_days_instance_value:var:1 + + + + + /etc/login.defs + + .*\n[^#]*(PASS_MIN_DAYS\s+\d+)\s*\n + 1 + + + oval:ssg-variable_last_pass_min_days_instance_value:var:1 + + + /etc/passwd + ^(?!root:)[^:]*:[^:]*:0 + 1 + + + .* + + + + + /etc/login.defs + + .*\n[^#]*(PASS_MIN_LEN\s+\d+)\s*\n + 1 + + + oval:ssg-variable_last_pass_min_len_instance_value:var:1 + + + /etc/security/pwquality.conf + ^dcredit[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^difok[\s]*=[\s]*(\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^lcredit[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^maxclassrepeat[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^maxrepeat[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^minclass[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^minlen[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^ocredit[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_pwquality\.so.*$ + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_cracklib\.so.*retry=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_pwquality\.so.*retry=([0-9]*).*$ + 1 + + + /etc/security/pwquality.conf + ^ucredit[s\]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:sufficient)|(?:required))\s+pam_unix\.so.*remember=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:requisite)|(?:required))\s+pam_pwhistory\.so.*remember=([0-9]*).*$ + 1 + + + + + /etc/login.defs + + .*\n[^#]*(PASS_WARN_AGE\s+\d+)\s*\n + 1 + + + oval:ssg-variable_last_pass_warn_age_instance_value:var:1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*auth[\s]+required[\s]+pam_faillock\.so[\s]+preauth[\s]+silent[\s]+[^\n]*deny=([0-9]+)[\s]*(?s).*[\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]+(?s).*[\n][\s]*auth[\s]+\[default=die\][\s]+pam_faillock\.so[\s]+authfail[\s]+[^\n]*deny=([0-9]+)[^\n]*[\n] + + 1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*account[\s]+required[\s]+pam_faillock\.so[^\n]*[\n][\s]*account[\s]+required[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*auth[\s]+required[\s]+pam_faillock\.so[\s]+preauth[\s]+silent[\s]+[^\n]*deny=([0-9]+)[\s]*(?s).*[\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]+(?s).*[\n][\s]*auth[\s]+\[default=die\][\s]+pam_faillock\.so[\s]+authfail[\s]+[^\n]*deny=([0-9]+)[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*account[\s]+required[\s]+pam_faillock\.so[^\n]*[\n][\s]*account[\s]+required[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + /etc/pam.d/system-auth + ^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*fail_interval=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*fail_interval=([0-9]*).*$ + 1 + + + /etc/pam.d/password-auth + ^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*fail_interval=([0-9]*).*$ + 1 + + + /etc/pam.d/password-auth + ^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*fail_interval=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*unlock_time=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*unlock_time=([0-9]*).*$ + 1 + + + /etc/pam.d/password-auth + ^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*unlock_time=([0-9]*).*$ + 1 + + + /etc/pam.d/password-auth + ^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*unlock_time=([0-9]*).*$ + 1 + + + + PATH + + + + + oval:ssg-state_accounts_root_path_dirs_wrong_perms:ste:1 + oval:ssg-state_accounts_root_path_dirs_symlink:ste:1 + + + /etc/profile + ^[\s]*TMOUT[\s]*=[\s]*(.*)[\s]*$ + 1 + + + /etc/profile.d + ^.*\.sh$ + ^[\s]*TMOUT[\s]*=[\s]*(.*)[\s]*$ + 1 + + + /etc/bashrc + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_bashrc_umask_as_number:var:1 + + + /etc/csh.cshrc + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_csh_cshrc_umask_as_number:var:1 + + + /etc/login.defs + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_login_defs_umask_as_number:var:1 + + + /etc/profile + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_profile_umask_as_number:var:1 + + + /etc/aide.conf + ^@@define[\s]DBDIR[\s]+(/.*)$ + 1 + + + /etc/aide.conf + ^database_out=file:@@{DBDIR}/([a-z.]+)$ + + 1 + + + + + + /etc/crontab + ^[0-9]*[\s]*[0-9]*[\s]*\*[\s]*\*[\s]*\*[\s]*root[\s]*/usr/sbin/aide[\s]*\-\-check.*$ + 1 + + + /etc/cron.d + ^.*$ + ^[0-9]*[\s]*[0-9]*[\s]*\*[\s]*\*[\s]*\*[\s]*root[\s]*/usr/sbin/aide[\s]*\-\-check.*$ + 1 + + + /var/spool/cron/root + ^[0-9]*[\s]*[0-9]*[\s]*\*[\s]*\*[\s]*\*[\s]*(root|)/usr/sbin/aide[\s]*\-\-check.*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+chmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+chmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+chmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+chmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+chown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+chown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+chown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+chown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchmodat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchmodat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchmodat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchmodat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchownat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchownat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchownat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchownat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+removexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+removexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+removexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+removexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+setxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+setxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+setxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+setxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+rmdir\s+\-S\s+unlink\s+\-S\s+unlinkat\s+\-S\s+rename\s+\-S\s+renameat\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+rmdir\s+\-S\s+unlink\s+\-S\s+unlinkat\s+\-S\s+rename\s+\-S\s+renameat\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-e\s+2\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-e\s+2\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/usr/sbin/insmod[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/usr/sbin/rmmod[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/usr/sbin/modprobe[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+init_module\s+\-S\s+delete_module\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/usr/sbin/insmod[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/usr/sbin/rmmod[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/usr/sbin/modprobe[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+init_module\s+\-S\s+delete_module\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/log/tallylog\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/run/faillock/\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/log/lastlog\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/log/tallylog\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/run/faillock/\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/log/lastlog\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/selinux/[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/selinux/[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+mount\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+mount\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+sethostname\s+\-S\s+setdomainname\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/issue[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/issue\.net[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/hosts[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/sysconfig/network[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+sethostname\s+\-S\s+setdomainname\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/issue[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/issue\.net[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/hosts[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/sysconfig/network[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + + / + + [a-z]+ + oval:ssg-state_setuid_or_setgid_set:ste:1 + oval:ssg-state_dev_proc_sys_dirs:ste:1 + + + oval:ssg-variable_count_of_suid_sgid_binaries_on_system:var:1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*(-a always,exit -F path=[^\n]+ -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged)[\s]*$ + 1 + oval:ssg-state_proper_audit_rule_but_for_unprivileged_command:ste:1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*(-a always,exit -F path=[^\n]+ -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged)[\s]*$ + 1 + oval:ssg-state_proper_audit_rule_but_for_unprivileged_command:ste:1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/run/utmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/log/btmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/log/wtmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/run/utmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/log/btmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/log/wtmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/sudoers[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/sudoers[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32[\s]+-S[\s]+clock_settime[\s]+-F[\s]+a0=(?:0x)?0[\s]+(?:-F[\s]+key=|-k[\s]+)time-change[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64[\s]+-S[\s]+clock_settime[\s]+-F[\s]+a0=(?:0x)?0[\s]+(?:-F[\s]+key=|-k[\s]+)time-change[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32[\s]+-S[\s]+clock_settime[\s]+-F[\s]+a0=(?:0x)?0[\s]+(?:-F[\s]+key=|-k[\s]+)time-change[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64[\s]+-S[\s]+clock_settime[\s]+-F[\s]+a0=(?:0x)?0[\s]+(?:-F[\s]+key=|-k[\s]+)time-change[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+settimeofday[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+settimeofday[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+settimeofday[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+settimeofday[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+stime[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+stime[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-w[\s]+\/etc\/localtime[\s]+-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-w[\s]+\/etc\/localtime[\s]+-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+\-F\s+arch=b32\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EACCES\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+\-F\s+arch=b32\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EPERM\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+\-F\s+arch=b64\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EACCES\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+\-F\s+arch=b64\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EPERM\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+\-F\s+arch=b32\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EACCES\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+\-F\s+arch=b32\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EPERM\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+\-F\s+arch=b64\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EACCES\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+\-F\s+arch=b64\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EPERM\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/group[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s+]\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/passwd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/gshadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/shadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/security/opasswd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/group[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s+]\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/passwd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/gshadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/shadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/security/opasswd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audisp/plugins.d/syslog.conf + + + ^[ ]*active[ ]+=[ ]+yes[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*action_mail_acct[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*admin_space_left_action[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*flush[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*max_log_file[ ]+=[ ]+(\d+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*max_log_file_action[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*num_logs[ ]+=[ ]+(\d+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*space_left_action[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/issue + + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX="(.*)"$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX_DEFAULT="(.*)"$ + 1 + + + /etc/default/grub + ^\s*GRUB_DISABLE_RECOVERY=(.*)$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX="(.*)"$ + 1 + + + /boot/grub2/grub.cfg + + + /boot/grub2/grub2.cfg + ^[\s]*set[\s]+superusers=\"(?i)(?!root|admin|administrator)(?-i).*\"$ + 1 + + + /boot/grub2/grub2.cfg + ^[\s]*password_pbkdf2[\s]+.*[\s]+grub\.pbkdf2\.sha512.*$ + 1 + + + /boot/efi/EFI/(redhat|fedora)/grub.cfg + + + /boot/efi/EFI/(redhat|fedora)/grub.cfg + ^[\s]*set[\s]+superusers=\"(?i)(?!root|admin|administrator)(?-i).*\"$ + 1 + + + /boot/efi/EFI/(redhat|fedora)/grub.cfg + ^[\s]*password_pbkdf2[\s]+.*[\s]+grub\.pbkdf2\.sha512.*$ + 1 + + + /etc/cups/cupsd.conf + ^[\s]*Browsing[\s]+(?:Off|No) + 1 + + + /etc/cups/cupsd.conf + ^[\s]*BrowseAllow[\s]+(?:none) + 1 + + + /etc/cups/cupsd.conf + ^[\s]*Port[\s]+(\d)+ + 1 + + + /etc/cups/cupsd.conf + ^[\s]*Listen[\s]+(?:localhost|127\.0\.0\.1|::1):(\d)+ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?banner-message-enable=true$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/banner-message-enable$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/media-handling]([^\n]*\n+)+?automount=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/media-handling/automount$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/media-handling]([^\n]*\n+)+?automount-open=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/media-handling/automount-open$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/media-handling]([^\n]*\n+)+?autorun-never=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/media-handling/autorun-never$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/settings-daemon/plugins/media-keys]([^\n]*\n+)+?logout=''$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/settings-daemon/plugins/media-keys/logout$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/system/location]([^\n]*\n+)+?enabled=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/system/location/enabled$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/clocks]([^\n]*\n+)+?geolocation=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/clocks/geolocation$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/settings-daemon/plugins/power/active]([^\n]*\n+)+?active=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/settings-daemon/plugins/power/active$ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?disable-restart-buttons=true$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/disable-restart-buttons$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/thumbnailers]([^\n]*\n+)+?disable-all=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/thumbnailers/disable-all$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/lockdown]([^\n]*\n+)+?user-administratrion-enabled=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/lockdown/user-administration-disabled$ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?disable-user-list=true$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/disable-user-list$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/nm-applet]([^\n]*\n+)+?disable-wifi-create=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/nm-applet/disable-wifi-create$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/nm-applet]([^\n]*\n+)+?suppress-wireless-networks-available=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/nm-applet/suppress-wireless-networks-available$ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?enable-smartcard-authentication=true$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/enable-smartcard-authentication$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/banner-message-text$ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^banner-message-text=[\s']*([^']*) + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?allowed-failures=3$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/allowed-failures$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/Vino]([^\n]*\n+)+?authentication-methods=\['vnc'\]$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/Vino/authentication-methods$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/Vino]([^\n]*\n+)+?require-encryption=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/Vino/require-encryption$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?idle-activation-enabled=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/idle-activation-enabled$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + + ^\[org/gnome/desktop/session]([^\n]*\n+)+?idle-delay=uint32[\s][0-9]*$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/session/idle-delay$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + + ^idle-delay[\s=]*uint32[\s]([^=\s]*) + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?lock-enabled=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/lock-enabled$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?lock-delay=uint32[\s]0$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/lock-delay$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?picture-uri=string[\s]\'\'$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/picture-uri$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?show-full-name-in-top-bar=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$ + 1 + + + /etc/httpd/conf + + + + /var/log/httpd + + + + + / + + oval:ssg-state_world_writable_and_not_sticky:ste:1 + + + + / + + oval:ssg-state_gid_is_user_and_world_writable:ste:1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)HostbasedAuthentication(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX=".*systemd.confirm_spawn=(?:1|yes|true|on).*$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX_DEFAULT=".*systemd.confirm_spawn=(?:1|yes|true|on).*$ + 1 + + + /etc/sysconfig/prelink + ^[\s]*PRELINKING=no[\s]* + 1 + + + /etc/security/limits.conf + ^[\s]*\*[\s]+(?:hard|-)[\s]+core[\s]+([\d]+) + 1 + + + + + /etc/pam.d/postlogin + [\n][\s]*session[\s]+\[default=1\][\s]+pam_lastlog.so[\s\w\d\=]+showfailed[\s\w\d\=]*\n[\s]*session[\s]+optional[\s]+pam_lastlog.so[\s\w\d\=]+showfailed[\s\w\d\=]*[\n] + 1 + + + /etc/dconf/profile/user + ^user-db:user\nsystem-db:local$ + 1 + + + /etc/default/grub + ^[\s]*GRUB_CMDLINE_LINUX.*(selinux|enforcing)=0.*$ + 1 + + + /etc/grub2.cfg + ^.*(selinux|enforcing)=0.*$ + 1 + + + /etc/grub.d + ^.*$ + ^.*(selinux|enforcing)=0.*$ + 1 + + + /etc/yum.conf + ^\s*gpgcheck\s*=\s*1\s*$ + 1 + + + /etc/dnf/dnf.conf + ^\s*gpgcheck\s*=\s*1\s*$ + 1 + + + /etc/yum.repos.d + .* + ^\s*gpgcheck\s*=\s*0\s*$ + 1 + + + + + /etc/logrotate.conf + + (?:daily)*.*(?=[\n][\s]*daily)(.*)$ + 1 + + oval:ssg-state_another_rotate_interval_after_daily:ste:1 + + + /etc/cron.daily/logrotate + ^[\s]*/usr/sbin/logrotate[\s]*/etc/logrotate.conf(?:.*)$ + 1 + + + gpg-pubkey + + + /boot/grub2/grub.cfg + + + /boot/efi/EFI/redhat/grub.cfg + + + /etc/group + + + /etc/gshadow + + + /etc/passwd + + + /etc/group + + + /etc/gshadow + + + /etc/passwd + + + + ^\/(|s)bin|^\/usr\/(|local\/)(|s)bin|^\/usr\/libexec + + oval:ssg-state_owner_binaries_not_root:ste:1 + + + + ^\/(|s)bin|^\/usr\/(|local\/)(|s)bin|^\/usr\/libexec + ^.*$ + oval:ssg-state_owner_binaries_not_root:ste:1 + + + + ^\/lib(|64)\/|^\/usr\/lib(|64)\/ + + oval:ssg-state_owner_libraries_not_root:ste:1 + + + + ^\/lib(|64)\/|^\/usr\/lib(|64)\/ + ^.*$ + oval:ssg-state_owner_libraries_not_root:ste:1 + + + /etc/audit/auditd.conf + ^[ ]*log_group[ ]+=[ ]+root[ ]*$ + 1 + + + + /var/log/audit + + oval:ssg-state_owner_not_root_root_var_log_audit:ste:1 + + + + /var/log/audit + ^.*$ + oval:ssg-state_owner_not_root_root_var_log_audit:ste:1 + + + + /var/log/audit + + oval:ssg-state_owner_not_root_var_log_audit-non_root:ste:1 + + + + /var/log/audit + ^.*$ + oval:ssg-state_owner_not_root_var_log_audit-non_root:ste:1 + + + + ^\/(|s)bin|^\/usr\/(|local\/)(|s)bin|^\/usr\/libexec + ^.*$ + oval:ssg-state_perms_binary_files_nogroupwrite_noworldwrite:ste:1 + oval:ssg-state_perms_binary_files_symlink:ste:1 + + + /etc/group + + + /etc/gshadow + + + /etc/passwd + + + /etc/shadow + + + /boot/grub2/grub.cfg + + + /boot/efi/EFI/redhat/grub.cfg + + + + /home + + oval:ssg-state_home_dirs_home_itself:ste:1 + oval:ssg-state_home_dirs_wrong_perm:ste:1 + + + + /etc/httpd/conf + ^.*$ + + + + ^\/lib(|64)|^\/usr\/lib(|64) + + oval:ssg-state_perms_nogroupwrite_noworldwrite:ste:1 + oval:ssg-perms_state_symlink:ste:1 + + + + ^\/lib(|64)|^\/usr\/lib(|64) + ^.*$ + oval:ssg-state_perms_nogroupwrite_noworldwrite:ste:1 + oval:ssg-perms_state_symlink:ste:1 + + + + / + ^.*$ + oval:ssg-state_file_permissions_unauthorized_world_write:ste:1 + + oval:ssg-state_file_permissions_unauthorized_world_write_exclude_special_selinux_files:ste:1 + oval:ssg-state_file_permissions_unauthorized_world_write_exclude_proc:ste:1 + oval:ssg-state_file_permissions_unauthorized_world_write_exclude_sys:ste:1 + + + + + / + .* + oval:ssg-state_file_permissions_ungroupowned:ste:1 + + + /etc/group + ^[^:]+:[^:]*:([\d]+):[^:]*$ + 1 + + + + /var/log/audit + ^.*$ + oval:ssg-state_not_mode_0640:ste:1 + + + + /var/log/audit + ^.*$ + oval:ssg-state_not_mode_0600:ste:1 + + + /boot/grub2/grub.cfg + + + /boot/efi/EFI/redhat/grub.cfg + + + /etc/firewalld/services + ^.*\.xml$ + /service/service[@name='ssh'] + + + /etc/firewalld/services + ^.*\.xml$ + /service/port[@port='22'] + + + /etc/firewalld/zones + ^.*\.xml$ + /zone/service[@name='ssh'] + + + /etc/firewalld/zones + ^.*\.xml$ + /zone/port[@port='22'] + + + /etc/vsftpd/vsftpd.conf + ^[\s]*xferlog_enable[\s]*=[\s]*YES$ + 1 + + + /etc/vsftpd/vsftpd.conf + ^[\s]*xferlog_std_format[\s]*=[\s]*NO$ + 1 + + + /etc/vsftpd/vsftpd.conf + ^[\s]*log_ftp_protocol[\s]*=[\s]*YES$ + 1 + + + /etc/vsftpd/vsftpd.conf + ^[\s]*banner_file[\s]*=[\s]*/etc/issue*$ + 1 + + + /etc/group + + ^.*:x:([0-9]+): + 1 + + + /etc/passwd + + ^.*:[0-9]+:([0-9]+): + 1 + + + /etc/gdm/custom.conf + ^\[daemon]([^\n]*\n+)+?AutomaticLoginEnable=[Ff]alse$ + 1 + + + /etc/gdm/custom.conf + ^\[daemon]([^\n]*\n+)+?TimedLoginEnable=[Ff]alse$ + 1 + + + /etc/shadow + + + McAfeeVSEForLinux + + + + centos-release + + + centos-release + + + fedora-release + + + /etc/system-release-cpe + ^cpe:\/o:fedoraproject:fedora:[\d]+$ + 1 + + + redhat-release-workstation + + + redhat-release-server + + + redhat-release-computenode + + + + redhat-release-workstation + + + redhat-release-server + + + redhat-release-computenode + + + sl-release + + + sl-release + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /etc/nslcd.conf + ^[\s]*ssl[\s]+start_tls[\s]*$ + 1 + + + /etc/nslcd.conf + ^[\s]*tls_cacertdir[\s]+/etc/pki/tls/CA$ + 1 + + + /etc/nslcd.conf + ^[\s]*tls_cacertfile[\s]+/etc/pki/tls/CA/.*\.(pem|crt)$ + 1 + + + /etc/logwatch/conf/logwatch.conf + ^[\s]HostLimit[\s]*=[\s]*no[\s]*$ + 1 + + + /etc/logwatch/conf/logwatch.conf + ^[\s]SplitHosts[\s]*=[\s]*yes[\s]*$ + 1 + + + /dev/shm + + + /dev/shm + + + /dev/shm + + + + ^/\w.*$ + oval:ssg-state_local_nodev:ste:1 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+(.*)$ + + 0 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+.*$ + + 0 + + + + + + oval:ssg-var_removable_partition:var:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_nodev_runtime_cd_dvd_drive:ste:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_nodev_runtime_not_cd_dvd_drive:ste:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_noexec_runtime_cd_dvd_drive:ste:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_noexec_runtime_not_cd_dvd_drive:ste:1 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+(.*)$ + + 0 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+.*$ + + 0 + + + + /home + ^\.netrc$ + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_nosuid_runtime_cd_dvd_drive:ste:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_nosuid_runtime_not_cd_dvd_drive:ste:1 + + + /etc/fstab + ^[\s]*[\S]+[\s]+[\S]+[\s]+cifs[\s]+([\S]+) + 1 + + + /etc/mtab + ^[\s]*[\S]+[\s]+[\S]+[\s]+cifs[\s]+([\S]+) + 1 + + + /tmp + + + /tmp + + + /tmp + + + /var/tmp + + + /etc/mtab + ^[\s]*/tmp[\s]+/var/tmp[\s]+.*bind.*$ + + 1 + + + /etc/sysconfig/network + ^[\s]*NOZEROCONF[\s]*=[\s]*yes + 1 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^IPV6_DEFAULTGW=.+$ + 1 + + + /etc/netconfig + ^udp6\s+tpi_clts\s+v\s+inet6\s+udp\s+-\s+-$ + 1 + + + /etc/netconfig + ^tcp6\s+tpi_cots_ord\s+v\s+inet6\s+tcp\s+-\s+-$ + 1 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^IPV6_PRIVACY=rfc3041$ + 1 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^IPV6ADDR=.+$ + 1 + + + ^.*$ + oval:ssg-state_promisc:ste:1 + + + /etc/securetty + ^.*$ + 1 + + + /etc/securetty + ^$ + 1 + + + /etc/pam.d/system-auth + \s*nullok\s* + 1 + + + /etc/passwd + ^[^:]+:[^:]+:([\d]+):[\d]+:[^:]*:[^:]+:[^:]*$ + 1 + + + + / + .* + oval:ssg-file_permissions_unowned_userid_list_match:ste:1 + + + /etc/exports + ^(.*?(\binsecure_locks\b)[^$]*)$ + 1 + + + /root + ^\.(r|s)hosts$ + + + + /home + ^\.(r|s)hosts$ + + + /etc + ^s?hosts\.equiv$ + + + + /etc/login.defs + + .*\n(?!#|SYS_)(UID_MIN[\s]+[\d]+)\s*\n + 1 + + + + /etc/login.defs + + .*\n[^#]*(SYS_UID_MIN[\s]+[\d]+)\s*\n + 1 + + + + /etc/login.defs + + .*\n[^#]*(SYS_UID_MAX[\s]+[\d]+)\s*\n + 1 + + + /etc/passwd + ^(?!root).*:x:([\d]+):[\d]+:[^:]*:[^:]*:(?!\/sbin\/nologin|\/bin\/sync|\/sbin\/shutdown|\/sbin\/halt).*$ + 1 + + + oval:ssg-variable_default_range_quad_expr:var:1 + + + oval:ssg-variable_reserved_range_quad_expr:var:1 + + + oval:ssg-variable_dynalloc_range_quad_expr:var:1 + + + aide + + + audit + + + bind + + + dconf + + + dhcp + + + dovecot + + + dracut-fips + + + gdm + + + httpd + + + libreswan + + + mcstrans + + + net-snmp + + + nss-pam-ldapd + + + ntp + + + openldap-servers + + + openssh-server + + + prelink + + + rsh-server + + + rsh + + + rsyslog + + + samba-common + + + screen + + + sendmail + + + setroubleshoot + + + squid + + + talk-server + + + talk + + + telnet-server + + + telnet + + + tftp-server + + + tftp + + + vsftpd + + + vsftpd + + + xinetd + + + xorg-x11-server-common + + + ypbind + + + ypserv + + + /home + + + /tmp + + + /var + + + /var/log + + + /var/log/audit + + + /etc/postfix/main.cf + ^[\s]*smtpd_banner[\s]*=[\s]*\$myhostname[\s]+ESMTP[\s]*$ + 1 + + + /usr/lib/systemd/system/rescue.service + ^ExecStart=\-.*/sbin/sulogin + 1 + + + /usr/lib/systemd/system/runlevel1.target + ^Requires=.*rescue.service + 1 + + + + /etc/systemd/system + ^rescue.service$ + + + + /etc/systemd/system + ^runlevel1.target$ + + + /etc/samba/smb.conf + ^[\s]*client[\s]+signing[\s]*=[\s]*mandatory + 1 + + + /etc/securetty + ^ttyS[0-9]+$ + 1 + + + + PATH + + + + .* + .* + .* + .* + .* + ^.*bin/.*$ + oval:ssg-state_files_fail_md5_hash:ste:1 + + + + .* + .* + .* + .* + .* + .* + oval:ssg-state_files_fail_user_ownership:ste:1 + + + + .* + .* + .* + .* + .* + .* + oval:ssg-state_files_fail_group_ownership:ste:1 + + + + .* + .* + .* + .* + .* + .* + oval:ssg-state_files_fail_mode:ste:1 + + + /etc/rsyslog.conf + ^[\s]*\$(?:Input(?:TCP|RELP)|UDP)ServerRun + 1 + + + /etc/rsyslog.conf + ^\*\.\*[\s]+(?:@|\:omrelp\:) + 1 + + + /etc/rsyslog.d + .* + ^\*\.\*[\s]+(?:@|\:omrelp\:) + 1 + + + /etc/securetty + ^vc/[0-9]+$ + 1 + + + + /dev + ^.*$ + oval:ssg-state_selinux_all_devicefiles_labeled:ste:1 + + + + /proc + ^.*$ + oval:ssg-state_selinux_confinement_of_daemons:ste:1 + + + /etc/selinux/config + ^[\s]*SELINUXTYPE[\s]*=[\s]*([^\s]*) + 1 + + + /etc/selinux/config + ^[\s]*SELINUX[\s]*=[\s]*(.*)[\s]*$ + 1 + + + /etc/firewalld/firewalld.conf + ^DefaultZone=drop$ + 1 + + + /etc/libuser.conf + ^[\s]*crypt_style[\s]+=[\s]+(?i)sha512[\s]*$ + 1 + + + + + /etc/login.defs + + .*\n[^#]*(ENCRYPT_METHOD\s+\w+)\s*\n + 1 + + + oval:ssg-variable_last_encrypt_method_instance_value:var:1 + + + /etc/pam.d/system-auth + ^[\s]*password[\s]+(?:(?:required)|(?:sufficient))[\s]+pam_unix\.so[\s]+.*sha512.*$ + 1 + + + /etc/snmp/snmpd.conf + ^[\s]*(com2se|rocommunity|rwcommunity|createUser).*(public|private) + 1 + + + /etc/snmp/snmpd.conf + ^[\s]*(com2se|rocommunity|rwcommunity) + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)Protocol[\s]+2[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)PermitEmptyPasswords(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)IgnoreRhosts(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)PermitRootLogin(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)PermitUserEnvironment(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)Banner(?-i)[\s]+/etc/issue[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)ClientAliveInterval[\s]+(\d+)[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)ClientAliveCountMax[\s]+([\d]+)[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)Ciphers(?-i)[\s]+aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)MACs(?-i)[\s]+hmac-sha2-512,hmac-sha2-256,hmac-sha1[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^[\s]*BOOTPROTO[\s]*=[\s"]*([^#"\s]*) + 1 + + + /etc/sysctl.conf + ^[\s]*kernel.exec-shield[\s]*=[\s]*1[\s]*$ + 1 + + + kernel.exec-shield + + + /boot/grub2/grub.cfg + [\s]*noexec[\s]*=[\s]*off + 1 + + + /etc/init.d/functions + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_init_d_functions_umask_as_number:var:1 + + + kernel.dmesg_restrict + + + kernel.randomize_va_space + + + net.ipv6.conf.all.disable_ipv6 + + + + + /etc/sysctl.d + + ^.*$ + (?:^|.*\n)[^#]*kernel.dmesg_restrict[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*kernel.dmesg_restrict[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + ^[\s]*kernel.randomize_va_space[\s]*=[\s]*2[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*kernel.randomize_va_space[\s]*=[\s]*2[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*kernel.randomize_va_space[\s]*=[\s]*2[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*kernel.randomize_va_space[\s]*=[\s]*2[\s]*$ + 1 + + + /etc/sysctl.conf + ^[\s]*net.ipv6.conf.all.disable_ipv6[\s]*=[\s]*1[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv6.conf.all.disable_ipv6[\s]*=[\s]*1[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv6.conf.all.disable_ipv6[\s]*=[\s]*1[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv6.conf.all.disable_ipv6[\s]*=[\s]*1[\s]*$ + 1 + + + + + + + /etc/xinetd.d/tftp + ^[\s]*server_args[\s]+=[\s]+\-s[\s]+.+$ + 1 + + + /etc/shadow + + + /proc/net/wireless + ^\s*[-\w]+: + 1 + + + /etc/login.defs + ^[\s]*(?i)FAIL_DELAY(?-i)[\s]+([^#\s]*) + 1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*auth[\s]+required[\s]+pam_faillock\.so[\s]+preauth[\s]+silent[\s]+[^\n]*even_deny_root[\s]*(?s).*[\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]+(?s).*[\n][\s]*auth[\s]+\[default=die\][\s]+pam_faillock\.so[\s]+authfail[\s]+[^\n]*even_deny_root[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*auth[\s]+required[\s]+pam_faillock\.so[\s]+preauth[\s]+silent[\s]+[^\n]*even_deny_root[\s]*(?s).*[\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]+(?s).*[\n][\s]*auth[\s]+\[default=die\][\s]+pam_faillock\.so[\s]+authfail[\s]+[^\n]*even_deny_root[^\n]*[\n] + + 1 + + + /etc/yum.conf + ^\s*clean_requirements_on_remove\s*=\s*(1|True|yes)\s*$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)X11Forwarding(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/yum.conf + ^\s*localpkg_gpgcheck\s*=\s*(1|True|yes)\s*$ + 1 + + + /etc/yum.conf + ^\s*repo_gpgcheck\s*=\s*(1|True|yes)\s*$ + 1 + + + /etc/ssh/ + ^.*key$ + + + /etc/ssh/ + ^.*key.pub$ + + + + / + ^.*$ + oval:ssg-state_file_permissions_unauthorized_sgid:ste:1 + oval:ssg-state_sgid_whitelist:ste:1 + + + + / + ^.*$ + oval:ssg-state_file_permissions_unauthorized_suid:ste:1 + oval:ssg-state_suid_whitelist:ste:1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX="(.*)"$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX_DEFAULT="(.*)"$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX_DEFAULT=.*$ + 1 + + + kernel-PAE + + + MFErt + + + MFEcma + + + /opt/McAfee/accm/bin + accm + + + /opt/McAfee/auditengine/bin + auditmanager + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+(.*)$ + + 0 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+.*$ + + 0 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^[\s]*DHCP_HOSTNAME[\s]*=.*$ + 1 + + + /etc/dhclient.*\.conf + ^[\s]*send[\s]+host-name.*$ + 1 + + + /etc/dhcp + ^.*$ + ^[\s]*send[\s]+host-name.*$ + 1 + + + nails + 0 + + + nails + 1 + + + nails + 2 + + + nails + 3 + + + nails + 4 + + + nails + 5 + + + nails + 6 + + + multi-user.target + + + /etc/ssh/sshd_config + ^[\s]*(?i)Compression(?-i)[\s]+(no|delayed)[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)GSSAPIAuthentication(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)KerberosAuthentication(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)StrictModes(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)PrintLastLog(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)UsePrivilegeSeparation(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/sssd/sssd.conf + ^\[nss]([^\n]*\n+)+?memcache_timeout[\s]+=[\s]+86400$ + 1 + + + /etc/sssd/sssd.conf + ^\[nss]([^\n]*\n+)+?offline_credentials_expiration[\s]+=[\s]+1$ + 1 + + + /etc/sssd/sssd.conf + ^\[nss]([^\n]*\n+)+?ssh_known_hosts_timeout[\s]+=[\s]+86400$ + 1 + + + /etc/sudoers + ^(?!#).*[\s]+\!authenticate.*$ + 1 + + + /etc/sudoers.d + ^.*$ + ^(?!#).*[\s]+\!authenticate.*$ + 1 + + + /etc/sudoers + ^(?!#).*[\s]+NOPASSWD[\s]*\:.*$ + 1 + + + /etc/sudoers.d + ^.*$ + ^(?!#).*[\s]+NOPASSWD[\s]*\:.*$ + 1 + + + fs.suid_dumpable + + + net.ipv4.conf.all.accept_redirects + + + net.ipv4.conf.all.accept_source_route + + + net.ipv4.conf.all.log_martians + + + net.ipv4.conf.all.rp_filter + + + net.ipv4.conf.all.secure_redirects + + + net.ipv4.conf.all.send_redirects + + + net.ipv4.conf.default.accept_redirects + + + net.ipv4.conf.default.accept_source_route + + + net.ipv4.conf.default.log_martians + + + net.ipv4.conf.default.rp_filter + + + net.ipv4.ip_forward + + + net.ipv4.conf.default.secure_redirects + + + net.ipv4.conf.default.send_redirects + + + net.ipv4.icmp_echo_ignore_broadcasts + + + net.ipv4.icmp_ignore_bogus_error_responses + + + net.ipv4.tcp_syncookies + + + net.ipv6.conf.all.accept_ra + + + net.ipv6.conf.all.accept_redirects + + + net.ipv6.conf.all.accept_source_route + + + net.ipv6.conf.all.forwarding + + + net.ipv6.conf.default.accept_ra + + + net.ipv6.conf.default.accept_redirects + + + net.ipv6.conf.default.accept_source_route + + + /etc/sysctl.conf + ^[\s]*fs.suid_dumpable[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*fs.suid_dumpable[\s]*=[\s]*0[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*fs.suid_dumpable[\s]*=[\s]*0[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*fs.suid_dumpable[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + ^[\s]*net.ipv4.conf.all.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.all.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.all.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.all.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + ^[\s]*net.ipv4.conf.default.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.default.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.default.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.default.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.icmp_echo_ignore_broadcasts[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_echo_ignore_broadcasts[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_echo_ignore_broadcasts[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_echo_ignore_broadcasts[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.icmp_ignore_bogus_error_responses[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_ignore_bogus_error_responses[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_ignore_bogus_error_responses[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_ignore_bogus_error_responses[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + ^[\s]*net.ipv4.ip_forward[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.ip_forward[\s]*=[\s]*0[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.ip_forward[\s]*=[\s]*0[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.ip_forward[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.tcp_syncookies[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.tcp_syncookies[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.tcp_syncookies[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.tcp_syncookies[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.all.forwarding[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.forwarding[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.forwarding[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.forwarding[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/exports + ^\/.*\((\S+)\)$ + 0 + + + /etc/exports + ^\/.*$ + 0 + + + /etc/chrony.conf + ^([\s]*server[\s]+.+$){2,}$ + 1 + + + /etc/chrony.conf + ^[\s]*server[\s]+.+$ + 1 + + + /etc/systemd/system/ctrl-alt-del.target + + + /etc/dovecot/conf.d/10-auth.conf + ^[\s]*disable_plaintext_auth[\s]*=[\s]*yes[\s]*$ + 1 + + + /etc/dovecot/conf.d/10-ssl.conf + ^[\s]*ssl[\s]*=[\s]*yes[\s]*$ + 1 + + + /etc/ntp.conf + ^([\s]*server[\s]+.+$){2,}$ + 1 + + + /etc/ntp.conf + ^[\s]*server[\s]+.+$ + 1 + + + chrony + + + cronie + + + firewalld + + + /etc/postfix/main.cf + ^[\s]*inet_interfaces[\s]*=[\s]*localhost[\s]*$ + 1 + + + /etc/rsyslog.conf + ^\$IncludeConfig[\s]+([^\s;]+) + 1 + + + + + ^[^(\s|#|\$)]+[\s]+.*[\s]+-?(/+[^:;\s]+);*.*$ + 1 + + + + + + /etc/rsyslog.conf + ^\$IncludeConfig[\s]+([^\s;]+) + 1 + + + + + ^[^(\s|#|\$)]+[\s]+.*[\s]+-?(/+[^:;\s]+);*.*$ + 1 + + + + + + /etc/rsyslog.conf + ^\$IncludeConfig[\s]+([^\s;]+) + 1 + + + + + ^[^(\s|#|\$)]+[\s]+.*[\s]+-?(/+[^:;\s]+);*.*$ + 1 + + + + + + multi-user.target + + + /etc/systemd/system/default.target + + + abrt + + + acpid + + + at + + + autofs + + + avahi + + + bluez + + + certmonger + + + cups + + + cyrus-sasl + + + dbus + + + esc + + + iputils + + + irqbalance + + + kernel-tools + + + kexec-tools + + + libcgroup-tools + + + libcgroup + + + mdadm + + + nfs-utils + + + ntpdate + + + oddjob + + + openssh-server + + + pam_pkcs11 + + + pcsc-lite + + + portreserve + + + postfix + + + psacct + + + qpid-cpp-server + + + quagga + + + quota-nld + + + rhnsd + + + samba + + + smartmontools + + + sssd + + + subscription-manager + + + sysstat + + + tcp_wrappers + + + xinetd + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/xinetd.d/rexec + ^\s*disable\s+=\s+yes\s*$ + 1 + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/xinetd.d/rlogin + ^\s*disable\s+=\s+yes\s*$ + 1 + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/xinetd.d/rsh + ^\s*disable\s+=\s+yes\s*$ + 1 + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/xinetd.d/telnet + ^\s*disable\s+=\s+no\s*$ + 1 + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/pam_pkcs11/pam_pkcs11.conf + + ^[\s]*cert_policy[ ]=(.*)$ + 1 + + + + /etc/pam.d/system-auth + + 1 + + + + /etc/pam.d/system-auth + + 1 + + + + /etc/pam.d/smartcard-auth + + 1 + + + + + + + + -1 + + + + + + + + + + + + + + + x + + + + + + 1 + + + + 1 + + + + 1 + + + + + + + + + + 1 + + + + 1 + + + + 1 + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + symbolic link + + + + + + + + + + + + + + + + + + true + true + + + ^\/(dev|proc|sys)\/.*$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ^.*audit=1.*$ + + + ^true|"true"$ + + + ^.*nousb.*$ + + + + + + + + + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + false + + + false + true + + + 1000 + true + + + 0 + + + + }[^{]+[\n][\s]*(weekly|monthly|yearly)|[\n][\s]*(weekly|monthly|yearly)[^}]+{ + + + 4ae0493b + fd431d51 + + + 45700c69 + 2fa658e0 + + + 53a7ff4b + f4a80eb5 + + + 4e0fd3a3 + c105b9de + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + 0 + + + 0 + 0 + + + true + true + + + symbolic link + + + false + false + false + false + false + false + false + false + + + 0 + + + 0 + + + false + false + false + false + false + false + false + false + false + false + false + false + + + 0 + + + 0 + + + false + false + false + false + false + false + false + false + + + 0 + + + 0 + + + false + false + false + false + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + + + + /home + + + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + false + + + true + true + + + symbolic link + + + regular + true + + + ^/selinux/(?:(?:member)|(?:user)|(?:relabel)|(?:create)|(?:access)|(?:context))$ + + + ^/proc/.*$ + + + ^/sys/.*$ + + + + + + + true + true + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + true + + + 0 + + + + + + 0 + + + unix + + + ^6.*$ + + + ^7.*$ + + + ^6.*$ + + + ^6.*$ + + + ^6.*$ + + + unix + + + ^7.*$ + + + ^7.*$ + + + ^7.*$ + + + ^6.*$ + + + ^7.*$ + + + nodev + + + noexec + + + nosuid + + + + ^/dev/.*$ + nodev + + + ^.*nodev.*$ + + + /dev/cdrom + + + ^.*,?nodev,?.*$ + + + + nodev + + + ^.*,?nodev,?.* + + + + nodev + + + ^.*,?noexec,?.*$ + + + + noexec + + + ^.*,?noexec,?.* + + + + noexec + + + ^.*nosuid.*$ + + + ^.*,?nosuid,?.*$ + + + + nosuid + + + ^.*,?nosuid,?.* + + + + nosuid + + + 2 + sec=(krb5i|ntlmv2i) + + + nodev + + + noexec + + + nosuid + + + PROMISC + + + + + + 0 + + + 0 + + + 0 + + + ^[:\.] + + + :: + + + \.\. + + + [:\.]$ + + + ^[^/] + + + [^\\]:[^/] + + + fail + + + + + + + + fail + + + fail + + + fail + + + device_t + + + initrc_t + + + + + + + + + SHA512 + + + + + + 0 + + + 0 + + + ^(static|none)$ + + + 1 + + + + + + 1 + + + 2 + + + 1 + + + 1 + + + ppc64 + + + ppc64le + + + i686 + + + x86_64 + + + 0 + + + + + + false + false + false + false + false + false + false + + + false + false + false + false + false + + + true + + + + + + true + + + + + + ^.*fips=1.*$ + + + ^.*sec=krb5:krb5i:krb5p.*$ + + + true + false + + + sshd.service + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ^.*,sec=krb5\:krb5i\:krb5p.*$ + + + /etc/systemd/system/ctrl-alt-del.target + /dev/null + + + regular + 0 + + + regular + 0 + + + regular + false + false + false + false + false + false + false + + + dovecot.service + + + /etc/systemd/system/default.target + /lib/systemd/system/multi-user.target$ + + + pcscd.socket + + + abrtd.service + + + acpid.service + + + atd.service + + + auditd.service + + + autofs.service + + + avahi-daemon.service + + + bluetooth.service + + + certmonger.service + + + cgconfig.service + + + cgred.service + + + chronyd.service + + + cpupower.service + + + crond.service + + + cups.service + + + debug-shell.service + + + dhcpd.service + + + firewalld.service + + + httpd.service + + + irqbalance.service + + + kdump.service + + + mdmonitor.service + + + messagebus.service + + + named.service + + + netconsole.service + + + nfs.service + + + nfslock.service + + + ntpd.service + + + ntpdate.service + + + oddjobd.service + + + portreserve.service + + + postfix.service + + + psacct.service + + + qpidd.service + + + quota_nld.service + + + rdisc.service + + + rexec.socket + + + rhnsd.service + + + rhsmcertd.service + + + rlogin.socket + + + rpcbind.service + + + rpcgssd.service + + + rpcidmapd.service + + + rpcsvcgssd.service + + + rsh.socket + + + rsyslog.service + + + saslauthd.service + + + smartd.service + + + smb.service + + + snmpd.service + + + squid.service + + + sshd.service + + + sssd.service + + + sysstat.service + + + telnet.socket + + + tftp.service + + + vsftpd.service + + + xinetd.service + + + ypbind.service + + + zebra.service + + + ^.*ocsp_on.*$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + / + + + + + + -a always,exit -F path= + + -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /dev/cdrom + /dev/dvd + /dev/scd0 + /dev/sr0 + + + + ^[\s]* + + + [\s]+[/\w]+[\s]+[\w]+[\s]+([^\s]+)(?:[\s]+[\d]+){2}$ + + + + + ^[\s]* + + + [\s]+[/\w]+[\s]+[\w]+[\s]+([^\s]+)(?:[\s]+[\d]+){2}$ + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + + + -1 + + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + /usr/bin/cgclassify + /usr/bin/cgexec + /usr/sbin/netreport + /usr/bin/crontab + /usr/bin/gnomine + /usr/bin/iagno + /usr/bin/locate + /usr/bin/lockfile + /usr/bin/same-gnome + /usr/bin/screen + /usr/bin/ssh-agent + /usr/bin/wall + /usr/bin/write + /usr/lib/vte/gnome-pty-helper + /usr/lib/vte-2.90/gnome-pty-helper + /usr/lib/vte-2.91/gnome-pty-helper + /usr/lib64/vte/gnome-pty-helper + /usr/lib64/vte-2.90/gnome-pty-helper + /usr/lib64/vte-2.91/gnome-pty-helper + /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache + /usr/libexec/kde4/kdesud + /usr/libexec/openssh/ssh-keysign + /usr/libexec/utempter/utempter + /usr/lib/mailman/cgi-bin/admindb + /usr/lib/mailman/cgi-bin/admin + /usr/lib/mailman/cgi-bin/confirm + /usr/lib/mailman/cgi-bin/create + /usr/lib/mailman/cgi-bin/edithtml + /usr/lib/mailman/cgi-bin/listinfo + /usr/lib/mailman/cgi-bin/options + /usr/lib/mailman/cgi-bin/private + /usr/lib/mailman/cgi-bin/rmlist + /usr/lib/mailman/cgi-bin/roster + /usr/lib/mailman/cgi-bin/subscribe + /usr/lib/mailman/mail/mailman + /usr/sbin/lockdev + /usr/sbin/postdrop + /usr/sbin/postqueue + /usr/sbin/sendmail.sendmail + + + /usr/bin/abrt-action-install-debuginfo-to-abrt-cache + /usr/bin/at + /usr/bin/chage + /usr/bin/chfn + /usr/bin/chsh + /usr/bin/crontab + /usr/bin/fusermount + /usr/bin/gpasswd + /usr/bin/ksu + /usr/bin/mount + /usr/bin/newgrp + /usr/bin/passwd + /usr/bin/pkexec + /usr/bin/staprun + /usr/bin/sudoedit + /usr/bin/sudo + /usr/bin/su + /usr/bin/umount + /usr/bin/Xorg + /usr/lib64/amanda/application/amgtar + /usr/lib64/amanda/application/amstar + /usr/lib64/amanda/calcsize + /usr/lib64/amanda/dumper + /usr/lib64/amanda/killpgrp + /usr/lib64/amanda/planner + /usr/lib64/amanda/rundump + /usr/lib64/amanda/runtar + /usr/lib64/dbus-1/dbus-daemon-launch-helper + /usr/lib/amanda/application/amgtar + /usr/lib/amanda/application/amstar + /usr/lib/amanda/calcsize + /usr/lib/amanda/dumper + /usr/lib/amanda/killpgrp + /usr/lib/amanda/planner + /usr/lib/amanda/rundump + /usr/lib/amanda/runtar + /usr/lib/dbus-1/dbus-daemon-launch-helper + /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache + /usr/libexec/kde4/kpac_dhcp_helper + /usr/libexec/qemu-bridge-helper + /usr/libexec/spice-gtk-x86_64/spice-client-glib-usb-acl-helper + /usr/libexec/sssd/krb5_child + /usr/libexec/sssd/ldap_child + /usr/libexec/sssd/proxy_child + /usr/libexec/sssd/selinux_child + /usr/lib/polkit-1/polkit-agent-helper-1 + /usr/sbin/amcheck + /usr/sbin/amservice + /usr/sbin/mount.nfs + /usr/sbin/pam_timestamp_check + /usr/sbin/unix_chkpwd + /usr/sbin/userhelper + /usr/sbin/usernetctl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %/etc/rsyslog.conf + + + + + + + + + + + + + + + + + + + %/etc/rsyslog.conf + + + + + + + + + + + + + + + + + + + %/etc/rsyslog.conf + + + + + + + + + + + + + \nauth[\s]+required[\s]+pam_env.so + \nauth[\s]+\[success=1[\s]default=ignore\][\s]pam_succeed_if.so[\s]service[\s]notin[\s] + login:gdm:xdm:kdm:xscreensaver:gnome-screensaver:kscreensaver[\s]quiet[\s]use_uid + \nauth[\s]+\[success=done[\s]authinfo_unavail=ignore[\s]ignore=ignore[\s]default=die\][\s] + pam_pkcs11.so[\s]nodebug\n + + + + + \nauth[\s]+required[\s]+pam_env.so + \nauth[\s]+\[success=1[\s]default=ignore\][\s]pam_succeed_if.so[\s]service[\s]notin[\s] + login:gdm:xdm:kdm:xscreensaver:gnome-screensaver:kscreensaver[\s]quiet[\s]use_uid + \nauth[\s]+\[success=done[\s]ignore=ignore[\s]default=die\][\s] + pam_pkcs11.so[\s]nodebug[\s]wait_for_card\n + + + + + \nauth[\s]+required[\s]+pam_env.so + \nauth[\s]+\[success=done[\s]ignore=ignore[\s]default=die\][\s] + pam_pkcs11.so[\s]nodebug[\s]wait_for_card\n.* + \npassword[\s]+required[\s]+pam_pkcs11.so\n + + + + + + + + + 2.0 + 2016-12-05T12:48:06Z + + + + Ensure /tmp Located On Separate Partition + + ocil:ssg-partition_for_tmp_action:testaction:1 + + + + Ensure /var Located On Separate Partition + + ocil:ssg-partition_for_var_action:testaction:1 + + + + Ensure /var/log Located On Separate Partition + + ocil:ssg-partition_for_var_log_action:testaction:1 + + + + Ensure /var/log/audit Located On Separate Partition + + ocil:ssg-partition_for_var_log_audit_action:testaction:1 + + + + Ensure /home Located On Separate Partition + + ocil:ssg-partition_for_home_action:testaction:1 + + + + Encrypt Partitions + + ocil:ssg-encrypt_partitions_action:testaction:1 + + + + Ensure Red Hat GPG Key Installed + + ocil:ssg-ensure_redhat_gpgkey_installed_action:testaction:1 + + + + Ensure gpgcheck Enabled In Main Yum Configuration + + ocil:ssg-ensure_gpgcheck_globally_activated_action:testaction:1 + + + + Ensure gpgcheck Enabled For All Yum Package Repositories + + ocil:ssg-ensure_gpgcheck_never_disabled_action:testaction:1 + + + + Ensure Software Patches Installed + + ocil:ssg-security_patches_up_to_date_action:testaction:1 + + + + Ensure YUM Removes Previous Package Versions + + ocil:ssg-clean_components_post_updating_action:testaction:1 + + + + Ensure gpgcheck Enabled for Local Packages + + ocil:ssg-ensure_gpgcheck_local_packages_action:testaction:1 + + + + Ensure gpgcheck Enabled for Repository Metadata + + ocil:ssg-ensure_gpgcheck_repo_metadata_action:testaction:1 + + + + Install AIDE + + ocil:ssg-package_aide_installed_action:testaction:1 + + + + Build and Test AIDE Database + + ocil:ssg-aide_build_database_action:testaction:1 + + + + Configure Periodic Execution of AIDE + + ocil:ssg-aide_periodic_cron_checking_action:testaction:1 + + + + Verify and Correct File Permissions with RPM + + ocil:ssg-rpm_verify_permissions_action:testaction:1 + + + + Verify File Hashes with RPM + + ocil:ssg-rpm_verify_hashes_action:testaction:1 + + + + Install Intrusion Detection Software + + ocil:ssg-install_hids_action:testaction:1 + + + + Install Virus Scanning Software + + ocil:ssg-install_antivirus_action:testaction:1 + + + + Install McAfee Host-Based Intrusion Detection Software (HBSS) + + ocil:ssg-install_mcafee_hbss_action:testaction:1 + + + + Install McAfee Virus Scanning Software + + ocil:ssg-install_mcafee_antivirus_action:testaction:1 + + + + Enable nails Service + + ocil:ssg-service_nails_enabled_action:testaction:1 + + + + Virus Scanning Software Definitions Are Updated + + ocil:ssg-mcafee_antivirus_definitions_updated_action:testaction:1 + + + + Install the dracut-fips Package + + ocil:ssg-package_dracut-fips_installed_action:testaction:1 + + + + Enable FIPS Mode in GRUB2 + + ocil:ssg-grub2_enable_fips_mode_action:testaction:1 + + + + Configure GNOME3 DConf User Profile + + ocil:ssg-enable_dconf_user_profile_action:testaction:1 + + + + Disable GDM Automatic Login + + ocil:ssg-gnome_gdm_disable_automatic_login_action:testaction:1 + + + + Disable GDM Guest Login + + ocil:ssg-gnome_gdm_disable_guest_login_action:testaction:1 + + + + Disable the GNOME3 Login User List + + ocil:ssg-dconf_gnome_disable_user_list_action:testaction:1 + + + + Disable the GNOME3 Login Restart and Shutdown Buttons + + ocil:ssg-dconf_gnome_disable_restart_shutdown_action:testaction:1 + + + + Enable the GNOME3 Login Smartcard Authentication + + ocil:ssg-dconf_gnome_enable_smartcard_auth_action:testaction:1 + + + + Set the GNOME3 Login Number of Failures + + ocil:ssg-dconf_gnome_login_retries_action:testaction:1 + + + + Set GNOME3 Screensaver Inactivity Timeout + + ocil:ssg-dconf_gnome_screensaver_idle_delay_action:testaction:1 + + + + Enable GNOME3 Screensaver Idle Activation + + ocil:ssg-dconf_gnome_screensaver_idle_activation_enabled_action:testaction:1 + + + + Enable GNOME3 Screensaver Lock After Idle Period + + ocil:ssg-dconf_gnome_screensaver_lock_enabled_action:testaction:1 + + + + Implement Blank Screensaver + + ocil:ssg-dconf_gnome_screensaver_mode_blank_action:testaction:1 + + + + Disable Full User Name on Splash Shield + + ocil:ssg-dconf_gnome_screensaver_user_info_action:testaction:1 + + + + Disable Ctrl-Alt-Del Reboot Key Sequence in GNOME3 + + ocil:ssg-dconf_gnome_disable_ctrlaltdel_reboot_action:testaction:1 + + + + Disable User Administration in GNOME3 + + ocil:ssg-dconf_gnome_disable_user_admin_action:testaction:1 + + + + Disable Power Settings in GNOME3 + + ocil:ssg-dconf_gnome_disable_power_settings_action:testaction:1 + + + + Disable Geolocation in GNOME3 + + ocil:ssg-dconf_gnome_disable_geolocation_action:testaction:1 + + + + Disable WIFI Network Connection Creation in GNOME3 + + ocil:ssg-dconf_gnome_disable_wifi_create_action:testaction:1 + + + + Disable WIFI Network Notification in GNOME3 + + ocil:ssg-dconf_gnome_disable_wifi_notification_action:testaction:1 + + + + Require Credential Prompting for Remote Access in GNOME3 + + ocil:ssg-dconf_gnome_remote_access_credential_prompt_action:testaction:1 + + + + Require Encryption for Remote Access in GNOME3 + + ocil:ssg-dconf_gnome_remote_access_encryption_action:testaction:1 + + + + Disable GNOME3 Automounting + + ocil:ssg-dconf_gnome_disable_automount_action:testaction:1 + + + + Disable All GNOME3 Thumbnailers + + ocil:ssg-dconf_gnome_disable_thumbnailers_action:testaction:1 + + + + Ensure NOPASSWD Is Not Used in Sudo + + ocil:ssg-sudo_remove_nopasswd_action:testaction:1 + + + + Ensure !authenticate Is Not Used in Sudo + + ocil:ssg-sudo_remove_no_authenticate_action:testaction:1 + + + + Add noexec Option to Removable Media Partitions + + ocil:ssg-mount_option_noexec_removable_partitions_action:testaction:1 + + + + Disable Modprobe Loading of USB Storage Driver + + ocil:ssg-kernel_module_usb-storage_disabled_action:testaction:1 + + + + Disable the Automounter + + ocil:ssg-service_autofs_disabled_action:testaction:1 + + + + Verify User Who Owns shadow File + + ocil:ssg-userowner_shadow_file_action:testaction:1 + + + + Verify Group Who Owns shadow File + + ocil:ssg-groupowner_shadow_file_action:testaction:1 + + + + Verify Permissions on shadow File + + ocil:ssg-file_permissions_etc_shadow_action:testaction:1 + + + + Verify User Who Owns group File + + ocil:ssg-file_owner_etc_group_action:testaction:1 + + + + Verify Group Who Owns group File + + ocil:ssg-file_groupowner_etc_group_action:testaction:1 + + + + Verify Permissions on group File + + ocil:ssg-file_permissions_etc_group_action:testaction:1 + + + + Verify User Who Owns gshadow File + + ocil:ssg-file_owner_etc_gshadow_action:testaction:1 + + + + Verify Group Who Owns gshadow File + + ocil:ssg-file_groupowner_etc_gshadow_action:testaction:1 + + + + Verify Permissions on gshadow File + + ocil:ssg-file_permissions_etc_gshadow_action:testaction:1 + + + + Verify User Who Owns passwd File + + ocil:ssg-file_owner_etc_passwd_action:testaction:1 + + + + Verify Group Who Owns passwd File + + ocil:ssg-file_groupowner_etc_passwd_action:testaction:1 + + + + Verify Permissions on passwd File + + ocil:ssg-file_permissions_etc_passwd_action:testaction:1 + + + + Verify that Shared Library Files Have Restrictive Permissions + + ocil:ssg-file_permissions_library_dirs_action:testaction:1 + + + + Verify that Shared Library Files Have Root Ownership + + ocil:ssg-file_ownership_library_dirs_action:testaction:1 + + + + Verify that System Executables Have Restrictive Permissions + + ocil:ssg-file_permissions_binary_dirs_action:testaction:1 + + + + Verify that System Executables Have Root Ownership + + ocil:ssg-file_ownership_binary_dirs_action:testaction:1 + + + + Verify that All World-Writable Directories Have Sticky Bits Set + + ocil:ssg-dir_perms_world_writable_sticky_bits_action:testaction:1 + + + + Ensure No World-Writable Files Exist + + ocil:ssg-file_permissions_unauthorized_world_writable_action:testaction:1 + + + + Ensure All SGID Executables Are Authorized + + ocil:ssg-file_permissions_unauthorized_sgid_action:testaction:1 + + + + Ensure All SUID Executables Are Authorized + + ocil:ssg-file_permissions_unauthorized_suid_action:testaction:1 + + + + Ensure All Files Are Owned by a User + + ocil:ssg-no_files_unowned_by_user_action:testaction:1 + + + + Ensure All Files Are Owned by a Group + + ocil:ssg-file_permissions_ungroupowned_action:testaction:1 + + + + Ensure All World-Writable Directories Are Owned by a System Account + + ocil:ssg-dir_perms_world_writable_system_owned_action:testaction:1 + + + + Set Daemon Umask + + ocil:ssg-umask_for_daemons_action:testaction:1 + + + + Disable Core Dumps for All Users + + ocil:ssg-disable_users_coredumps_action:testaction:1 + + + + Disable Core Dumps for SUID programs + + ocil:ssg-sysctl_fs_suid_dumpable_action:testaction:1 + + + + Enable ExecShield + + ocil:ssg-sysctl_kernel_exec_shield_action:testaction:1 + + + + Enable Randomized Layout of Virtual Address Space + + ocil:ssg-sysctl_kernel_randomize_va_space_action:testaction:1 + + + + Restrict Access to Kernel Message Buffer + + ocil:ssg-sysctl_kernel_dmesg_restrict_action:testaction:1 + + + + Ensure SELinux Not Disabled in /etc/default/grub + + ocil:ssg-enable_selinux_bootloader_action:testaction:1 + + + + Ensure SELinux State is Enforcing + + ocil:ssg-selinux_state_action:testaction:1 + + + + Configure SELinux Policy + + ocil:ssg-selinux_policytype_action:testaction:1 + + + + Ensure No Device Files are Unlabeled by SELinux + + ocil:ssg-selinux_all_devicefiles_labeled_action:testaction:1 + + + + Direct root Logins Not Allowed + + ocil:ssg-no_direct_root_logins_action:testaction:1 + + + + Restrict Virtual Console Root Logins + + ocil:ssg-securetty_root_login_console_only_action:testaction:1 + + + + Restrict Serial Port Root Logins + + ocil:ssg-restrict_serial_port_logins_action:testaction:1 + + + + Restrict Web Browser Use for Administrative Accounts + + ocil:ssg-no_root_webbrowsing_action:testaction:1 + + + + Ensure that System Accounts Do Not Run a Shell Upon Login + + ocil:ssg-no_shelllogin_for_systemaccounts_action:testaction:1 + + + + Verify Only Root Has UID 0 + + ocil:ssg-accounts_no_uid_except_zero_action:testaction:1 + + + + Root Path Must Be Vendor Default + + ocil:ssg-root_path_default_action:testaction:1 + + + + Prevent Log In to Accounts With Empty Password + + ocil:ssg-no_empty_passwords_action:testaction:1 + + + + Verify All Account Password Hashes are Shadowed + + ocil:ssg-accounts_password_all_shadowed_action:testaction:1 + + + + All GIDs referenced in /etc/passwd must be defined in /etc/group + + ocil:ssg-gid_passwd_group_same_action:testaction:1 + + + + Verify No netrc Files Exist + + ocil:ssg-no_netrc_files_action:testaction:1 + + + + Set Password Minimum Length in login.defs + + ocil:ssg-accounts_password_minlen_login_defs_action:testaction:1 + + + + Set Password Minimum Age + + ocil:ssg-accounts_minimum_age_login_defs_action:testaction:1 + + + + Set Password Maximum Age + + ocil:ssg-accounts_maximum_age_login_defs_action:testaction:1 + + + + Set Password Warning Age + + ocil:ssg-accounts_password_warn_age_login_defs_action:testaction:1 + + + + Set Account Expiration Following Inactivity + + ocil:ssg-account_disable_post_pw_expiration_action:testaction:1 + + + + Ensure All Accounts on the System Have Unique Names + + ocil:ssg-account_unique_name_action:testaction:1 + + + + Assign Expiration Date to Temporary Accounts + + ocil:ssg-account_temp_expire_date_action:testaction:1 + + + + Set Last Logon/Access Notification + + ocil:ssg-display_login_attempts_action:testaction:1 + + + + Set Password Retry Prompts Permitted Per-Session + + ocil:ssg-accounts_password_pam_retry_action:testaction:1 + + + + Set Password to Maximum of Three Consecutive Repeating Characters + + ocil:ssg-accounts_password_pam_maxrepeat_action:testaction:1 + + + + Set Password to Maximum of Consecutive Repeating Characters from Same Character Class + + ocil:ssg-accounts_password_pam_maxclassrepeat_action:testaction:1 + + + + Set Password Strength Minimum Digit Characters + + ocil:ssg-accounts_password_pam_dcredit_action:testaction:1 + + + + Set Password Minimum Length + + ocil:ssg-accounts_password_pam_minlen_action:testaction:1 + + + + Set Password Strength Minimum Uppercase Characters + + ocil:ssg-accounts_password_pam_ucredit_action:testaction:1 + + + + Set Password Strength Minimum Special Characters + + ocil:ssg-accounts_password_pam_ocredit_action:testaction:1 + + + + Set Password Strength Minimum Lowercase Characters + + ocil:ssg-accounts_password_pam_lcredit_action:testaction:1 + + + + Set Password Strength Minimum Different Characters + + ocil:ssg-accounts_password_pam_difok_action:testaction:1 + + + + Set Password Strength Minimum Different Categories + + ocil:ssg-accounts_password_pam_minclass_action:testaction:1 + + + + Set Deny For Failed Password Attempts + + ocil:ssg-accounts_passwords_pam_faillock_deny_action:testaction:1 + + + + Set Lockout Time For Failed Password Attempts + + ocil:ssg-accounts_passwords_pam_faillock_unlock_time_action:testaction:1 + + + + Configure the root Account for Failed Password Attempts + + ocil:ssg-accounts_passwords_pam_faillock_deny_root_action:testaction:1 + + + + Set Interval For Counting Failed Password Attempts + + ocil:ssg-accounts_passwords_pam_faillock_interval_action:testaction:1 + + + + Limit Password Reuse + + ocil:ssg-accounts_password_pam_unix_remember_action:testaction:1 + + + + Set PAM's Password Hashing Algorithm + + ocil:ssg-set_password_hashing_algorithm_systemauth_action:testaction:1 + + + + Set Password Hashing Algorithm in /etc/login.defs + + ocil:ssg-set_password_hashing_algorithm_logindefs_action:testaction:1 + + + + Set Password Hashing Algorithm in /etc/libuser.conf + + ocil:ssg-set_password_hashing_algorithm_libuserconf_action:testaction:1 + + + + Set Interactive Session Timeout + + ocil:ssg-accounts_tmout_action:testaction:1 + + + + Limit the Number of Concurrent Login Sessions Allowed Per User + + ocil:ssg-accounts_max_concurrent_login_sessions_action:testaction:1 + + + + Ensure the Logon Failure Delay is Set Correctly in login.defs + + ocil:ssg-accounts_logon_fail_delay_action:testaction:1 + + + + Ensure that Root's Path Does Not Include World or Group-Writable Directories + + ocil:ssg-accounts_root_path_dirs_no_write_action:testaction:1 + + + + Ensure that User Home Directories are not Group-Writable or World-Readable + + ocil:ssg-file_permissions_home_dirs_action:testaction:1 + + + + Ensure the Default Bash Umask is Set Correctly + + ocil:ssg-accounts_umask_etc_bashrc_action:testaction:1 + + + + Ensure the Default C Shell Umask is Set Correctly + + ocil:ssg-accounts_umask_etc_csh_cshrc_action:testaction:1 + + + + Ensure the Default Umask is Set Correctly in /etc/profile + + ocil:ssg-accounts_umask_etc_profile_action:testaction:1 + + + + Ensure the Default Umask is Set Correctly in login.defs + + ocil:ssg-accounts_umask_etc_login_defs_action:testaction:1 + + + + Verify /boot/grub2/grub.cfg User Ownership + + ocil:ssg-file_user_owner_grub2_cfg_action:testaction:1 + + + + Verify /boot/grub2/grub.cfg Group Ownership + + ocil:ssg-file_group_owner_grub2_cfg_action:testaction:1 + + + + Verify /boot/grub2/grub.cfg Permissions + + ocil:ssg-file_permissions_grub2_cfg_action:testaction:1 + + + + Set Boot Loader Password + + ocil:ssg-bootloader_password_action:testaction:1 + + + + Set the UEFI Boot Loader Password + + ocil:ssg-bootloader_uefi_password_action:testaction:1 + + + + Require Authentication for Single User Mode + + ocil:ssg-require_singleuser_auth_action:testaction:1 + + + + Disable debug-shell SystemD Service + + ocil:ssg-service_debug-shell_disabled_action:testaction:1 + + + + Disable Ctrl-Alt-Del Reboot Activation + + ocil:ssg-disable_ctrlaltdel_reboot_action:testaction:1 + + + + Verify that Interactive Boot is Disabled + + ocil:ssg-disable_interactive_boot_action:testaction:1 + + + + Install the screen Package + + ocil:ssg-package_screen_installed_action:testaction:1 + + + + Enable Smart Card Login + + ocil:ssg-smartcard_auth_action:testaction:1 + + + + Modify the System Login Banner + + ocil:ssg-banner_etc_issue_action:testaction:1 + + + + Enable GNOME3 Login Warning Banner + + ocil:ssg-dconf_gnome_banner_enabled_action:testaction:1 + + + + Set the GNOME3 Login Warning Banner Text + + ocil:ssg-dconf_gnome_login_banner_text_action:testaction:1 + + + + Disable Client Dynamic DNS Updates + + ocil:ssg-network_disable_ddns_interfaces_action:testaction:1 + + + + Disable Kernel Parameter for Sending ICMP Redirects by Default + + ocil:ssg-sysctl_net_ipv4_conf_default_send_redirects_action:testaction:1 + + + + Disable Kernel Parameter for Sending ICMP Redirects for All Interfaces + + ocil:ssg-sysctl_net_ipv4_conf_all_send_redirects_action:testaction:1 + + + + Disable Kernel Parameter for IP Forwarding + + ocil:ssg-sysctl_net_ipv4_ip_forward_action:testaction:1 + + + + Configure Kernel Parameter for Accepting Source-Routed Packets for All Interfaces + + ocil:ssg-sysctl_net_ipv4_conf_all_accept_source_route_action:testaction:1 + + + + Configure Kernel Parameter for Accepting ICMP Redirects for All Interfaces + + ocil:ssg-sysctl_net_ipv4_conf_all_accept_redirects_action:testaction:1 + + + + Configure Kernel Parameter for Accepting Secure Redirects for All Interfaces + + ocil:ssg-sysctl_net_ipv4_conf_all_secure_redirects_action:testaction:1 + + + + Configure Kernel Parameter to Log Martian Packets + + ocil:ssg-sysctl_net_ipv4_conf_all_log_martians_action:testaction:1 + + + + Configure Kernel Parameter to Log Martian Packets By Default + + ocil:ssg-sysctl_net_ipv4_conf_default_log_martians_action:testaction:1 + + + + Configure Kernel Parameter for Accepting Source-Routed Packets By Default + + ocil:ssg-sysctl_net_ipv4_conf_default_accept_source_route_action:testaction:1 + + + + Configure Kernel Parameter for Accepting ICMP Redirects By Default + + ocil:ssg-sysctl_net_ipv4_conf_default_accept_redirects_action:testaction:1 + + + + Configure Kernel Parameter for Accepting Secure Redirects By Default + + ocil:ssg-sysctl_net_ipv4_conf_default_secure_redirects_action:testaction:1 + + + + Configure Kernel Parameter to Ignore ICMP Broadcast Echo Requests + + ocil:ssg-sysctl_net_ipv4_icmp_echo_ignore_broadcasts_action:testaction:1 + + + + Configure Kernel Parameter to Ignore Bogus ICMP Error Responses + + ocil:ssg-sysctl_net_ipv4_icmp_ignore_bogus_error_responses_action:testaction:1 + + + + Configure Kernel Parameter to Use TCP Syncookies + + ocil:ssg-sysctl_net_ipv4_tcp_syncookies_action:testaction:1 + + + + Configure Kernel Parameter to Use Reverse Path Filtering for All Interfaces + + ocil:ssg-sysctl_net_ipv4_conf_all_rp_filter_action:testaction:1 + + + + Configure Kernel Parameter to Use Reverse Path Filtering by Default + + ocil:ssg-sysctl_net_ipv4_conf_default_rp_filter_action:testaction:1 + + + + Disable Bluetooth Service + + ocil:ssg-service_bluetooth_disabled_action:testaction:1 + + + + Disable Bluetooth Kernel Modules + + ocil:ssg-kernel_module_bluetooth_disabled_action:testaction:1 + + + + Disable IPv6 Networking Support Automatic Loading + + ocil:ssg-sysctl_kernel_ipv6_disable_action:testaction:1 + + + + Configure Kernel Parameter for Accepting Source-Routed Packets for All Interfaces + + ocil:ssg-sysctl_net_ipv6_conf_all_accept_source_route_action:testaction:1 + + + + Configure Accepting IPv6 Router Advertisements + + ocil:ssg-sysctl_net_ipv6_conf_all_accept_ra_action:testaction:1 + + + + Configure Accepting IPv6 Router Advertisements + + ocil:ssg-sysctl_net_ipv6_conf_default_accept_ra_action:testaction:1 + + + + Configure Accepting IPv6 Redirects By Default + + ocil:ssg-sysctl_net_ipv6_conf_all_accept_redirects_action:testaction:1 + + + + Configure Accepting IPv6 Redirects By Default + + ocil:ssg-sysctl_net_ipv6_conf_default_accept_redirects_action:testaction:1 + + + + Configure Kernel Parameter for Accepting Source-Routed Packets for Interfaces By Default + + ocil:ssg-sysctl_net_ipv6_conf_default_accept_source_route_action:testaction:1 + + + + Disable Kernel Parameter for IPv6 Forwarding + + ocil:ssg-sysctl_net_ipv6_conf_all_forwarding_action:testaction:1 + + + + Verify firewalld Enabled + + ocil:ssg-service_firewalld_enabled_action:testaction:1 + + + + Set Default firewalld Zone for Incoming Packets + + ocil:ssg-set_firewalld_default_zone_action:testaction:1 + + + + Disable DCCP Support + + ocil:ssg-kernel_module_dccp_disabled_action:testaction:1 + + + + Disable SCTP Support + + ocil:ssg-kernel_module_sctp_disabled_action:testaction:1 + + + + Install libreswan Package + + ocil:ssg-package_libreswan_installed_action:testaction:1 + + + + Verify Any Configured IPSec Tunnel Connections + + ocil:ssg-libreswan_approved_tunnels_action:testaction:1 + + + + Ensure rsyslog is Installed + + ocil:ssg-package_rsyslog_installed_action:testaction:1 + + + + Enable rsyslog Service + + ocil:ssg-service_rsyslog_enabled_action:testaction:1 + + + + Ensure Log Files Are Owned By Appropriate User + + ocil:ssg-rsyslog_files_ownership_action:testaction:1 + + + + Ensure Log Files Are Owned By Appropriate Group + + ocil:ssg-rsyslog_files_groupownership_action:testaction:1 + + + + Ensure System Log Files Have Correct Permissions + + ocil:ssg-rsyslog_files_permissions_action:testaction:1 + + + + Ensure Logs Sent To Remote Host + + ocil:ssg-rsyslog_remote_loghost_action:testaction:1 + + + + Ensure Logrotate Runs Periodically + + ocil:ssg-ensure_logrotate_activated_action:testaction:1 + + + + Enable auditd Service + + ocil:ssg-service_auditd_enabled_action:testaction:1 + + + + Enable Auditing for Processes Which Start Prior to the Audit Daemon + + ocil:ssg-bootloader_audit_argument_action:testaction:1 + + + + Configure auditd Number of Logs Retained + + ocil:ssg-auditd_data_retention_num_logs_action:testaction:1 + + + + Configure auditd Max Log File Size + + ocil:ssg-auditd_data_retention_max_log_file_action:testaction:1 + + + + Configure auditd max_log_file_action Upon Reaching Maximum Log Size + + ocil:ssg-auditd_data_retention_max_log_file_action_action:testaction:1 + + + + Configure auditd space_left Action on Low Disk Space + + ocil:ssg-auditd_data_retention_space_left_action_action:testaction:1 + + + + Configure auditd admin_space_left Action on Low Disk Space + + ocil:ssg-auditd_data_retention_admin_space_left_action_action:testaction:1 + + + + Configure auditd mail_acct Action on Low Disk Space + + ocil:ssg-auditd_data_retention_action_mail_acct_action:testaction:1 + + + + Configure auditd flush priority + + ocil:ssg-auditd_data_retention_flush_action:testaction:1 + + + + Configure auditd to use audispd's syslog plugin + + ocil:ssg-auditd_audispd_syslog_plugin_activated_action:testaction:1 + + + + Record attempts to alter time through adjtimex + + ocil:ssg-audit_rules_time_adjtimex_action:testaction:1 + + + + Record attempts to alter time through settimeofday + + ocil:ssg-audit_rules_time_settimeofday_action:testaction:1 + + + + Record Attempts to Alter Time Through stime + + ocil:ssg-audit_rules_time_stime_action:testaction:1 + + + + Record Attempts to Alter Time Through clock_settime + + ocil:ssg-audit_rules_time_clock_settime_action:testaction:1 + + + + Record Attempts to Alter the localtime File + + ocil:ssg-audit_rules_time_watch_localtime_action:testaction:1 + + + + Record Events that Modify User/Group Information + + ocil:ssg-audit_rules_usergroup_modification_action:testaction:1 + + + + Record Events that Modify the System's Network Environment + + ocil:ssg-audit_rules_networkconfig_modification_action:testaction:1 + + + + System Audit Logs Must Have Mode 0640 or Less Permissive + + ocil:ssg-file_permissions_var_log_audit_action:testaction:1 + + + + System Audit Logs Must Be Owned By Root + + ocil:ssg-file_ownership_var_log_audit_action:testaction:1 + + + + Record Events that Modify the System's Mandatory Access Controls + + ocil:ssg-audit_rules_mac_modification_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - chmod + + ocil:ssg-audit_rules_dac_modification_chmod_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - chown + + ocil:ssg-audit_rules_dac_modification_chown_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - fchmod + + ocil:ssg-audit_rules_dac_modification_fchmod_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - fchmodat + + ocil:ssg-audit_rules_dac_modification_fchmodat_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - fchown + + ocil:ssg-audit_rules_dac_modification_fchown_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - fchownat + + ocil:ssg-audit_rules_dac_modification_fchownat_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - fremovexattr + + ocil:ssg-audit_rules_dac_modification_fremovexattr_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - fsetxattr + + ocil:ssg-audit_rules_dac_modification_fsetxattr_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - lchown + + ocil:ssg-audit_rules_dac_modification_lchown_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - lremovexattr + + ocil:ssg-audit_rules_dac_modification_lremovexattr_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - lsetxattr + + ocil:ssg-audit_rules_dac_modification_lsetxattr_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - removexattr + + ocil:ssg-audit_rules_dac_modification_removexattr_action:testaction:1 + + + + Record Events that Modify the System's Discretionary Access Controls - setxattr + + ocil:ssg-audit_rules_dac_modification_setxattr_action:testaction:1 + + + + Ensure auditd Collects Unauthorized Access Attempts to Files (unsuccessful) + + ocil:ssg-audit_rules_unsuccessful_file_modification_action:testaction:1 + + + + Ensure auditd Collects Information on the Use of Privileged Commands + + ocil:ssg-audit_rules_privileged_commands_action:testaction:1 + + + + Ensure auditd Collects Information on Exporting to Media (successful) + + ocil:ssg-audit_rules_media_export_action:testaction:1 + + + + Ensure auditd Collects File Deletion Events by User + + ocil:ssg-audit_rules_file_deletion_events_action:testaction:1 + + + + Ensure auditd Collects System Administrator Actions + + ocil:ssg-audit_rules_sysadmin_actions_action:testaction:1 + + + + Ensure auditd Collects Information on Kernel Module Loading and Unloading + + ocil:ssg-audit_rules_kernel_module_loading_action:testaction:1 + + + + Disable xinetd Service + + ocil:ssg-service_xinetd_disabled_action:testaction:1 + + + + Uninstall xinetd Package + + ocil:ssg-package_xinetd_removed_action:testaction:1 + + + + Install tcp_wrappers Package + + ocil:ssg-package_tcp_wrappers_installed_action:testaction:1 + + + + Disable telnet Service + + ocil:ssg-service_telnet_disabled_action:testaction:1 + + + + Uninstall telnet-server Package + + ocil:ssg-package_telnet-server_removed_action:testaction:1 + + + + Remove telnet Clients + + ocil:ssg-package_telnet_removed_action:testaction:1 + + + + Uninstall rsh-server Package + + ocil:ssg-package_rsh-server_removed_action:testaction:1 + + + + Disable rexec Service + + ocil:ssg-service_rexec_disabled_action:testaction:1 + + + + Disable rsh Service + + ocil:ssg-service_rsh_disabled_action:testaction:1 + + + + Uninstall rsh Package + + ocil:ssg-package_rsh_removed_action:testaction:1 + + + + Disable rlogin Service + + ocil:ssg-service_rlogin_disabled_action:testaction:1 + + + + Remove Rsh Trust Files + + ocil:ssg-no_rsh_trust_files_action:testaction:1 + + + + Uninstall ypserv Package + + ocil:ssg-package_ypserv_removed_action:testaction:1 + + + + Disable ypbind Service + + ocil:ssg-service_ypbind_disabled_action:testaction:1 + + + + Remove NIS Client + + ocil:ssg-package_ypbind_removed_action:testaction:1 + + + + Disable tftp Service + + ocil:ssg-service_tftp_disabled_action:testaction:1 + + + + Uninstall tftp-server Package + + ocil:ssg-package_tftp-server_removed_action:testaction:1 + + + + Remove tftp Daemon + + ocil:ssg-package_tftp_removed_action:testaction:1 + + + + Ensure tftp Daemon Uses Secure Mode + + ocil:ssg-tftpd_uses_secure_mode_action:testaction:1 + + + + Uninstall talk-server Package + + ocil:ssg-package_talk-server_removed_action:testaction:1 + + + + Uninstall talk Package + + ocil:ssg-package_talk_removed_action:testaction:1 + + + + Disable Automatic Bug Reporting Tool (abrtd) + + ocil:ssg-service_abrtd_disabled_action:testaction:1 + + + + Disable Advanced Configuration and Power Interface (acpid) + + ocil:ssg-service_acpid_disabled_action:testaction:1 + + + + Disable Certmonger Service (certmonger) + + ocil:ssg-service_certmonger_disabled_action:testaction:1 + + + + Disable Control Group Config (cgconfig) + + ocil:ssg-service_cgconfig_disabled_action:testaction:1 + + + + Disable Control Group Rules Engine (cgred) + + ocil:ssg-service_cgred_disabled_action:testaction:1 + + + + Disable CPU Speed (cpupower) + + ocil:ssg-service_cpupower_disabled_action:testaction:1 + + + + Enable IRQ Balance (irqbalance) + + ocil:ssg-service_irqbalance_enabled_action:testaction:1 + + + + Disable KDump Kernel Crash Analyzer (kdump) + + ocil:ssg-service_kdump_disabled_action:testaction:1 + + + + Disable Software RAID Monitor (mdmonitor) + + ocil:ssg-service_mdmonitor_disabled_action:testaction:1 + + + + Disable D-Bus IPC Service (messagebus) + + ocil:ssg-service_messagebus_disabled_action:testaction:1 + + + + Disable Network Console (netconsole) + + ocil:ssg-service_netconsole_disabled_action:testaction:1 + + + + Disable ntpdate Service (ntpdate) + + ocil:ssg-service_ntpdate_disabled_action:testaction:1 + + + + Disable Odd Job Daemon (oddjobd) + + ocil:ssg-service_oddjobd_disabled_action:testaction:1 + + + + Disable Portreserve (portreserve) + + ocil:ssg-service_portreserve_disabled_action:testaction:1 + + + + Enable Process Accounting (psacct) + + ocil:ssg-service_psacct_enabled_action:testaction:1 + + + + Disable Apache Qpid (qpidd) + + ocil:ssg-service_qpidd_disabled_action:testaction:1 + + + + Disable Quota Netlink (quota_nld) + + ocil:ssg-service_quota_nld_disabled_action:testaction:1 + + + + Disable Network Router Discovery Daemon (rdisc) + + ocil:ssg-service_rdisc_disabled_action:testaction:1 + + + + Disable Red Hat Network Service (rhnsd) + + ocil:ssg-service_rhnsd_disabled_action:testaction:1 + + + + Disable Red Hat Subscription Manager Daemon (rhsmcertd) + + ocil:ssg-service_rhsmcertd_disabled_action:testaction:1 + + + + Disable Cyrus SASL Authentication Daemon (saslauthd) + + ocil:ssg-service_saslauthd_disabled_action:testaction:1 + + + + Disable SMART Disk Monitoring Service (smartd) + + ocil:ssg-service_smartd_disabled_action:testaction:1 + + + + Disable System Statistics Reset Service (sysstat) + + ocil:ssg-service_sysstat_disabled_action:testaction:1 + + + + Enable cron Service + + ocil:ssg-service_crond_enabled_action:testaction:1 + + + + Disable anacron Service + + ocil:ssg-disable_anacron_action:testaction:1 + + + + Disable At Service (atd) + + ocil:ssg-service_atd_disabled_action:testaction:1 + + + + Install the OpenSSH Server Package + + ocil:ssg-package_openssh-server_installed_action:testaction:1 + + + + Enable the OpenSSH Service + + ocil:ssg-service_sshd_enabled_action:testaction:1 + + + + Verify Permissions on SSH Server Public *.pub Key Files + + ocil:ssg-file_permissions_sshd_pub_key_action:testaction:1 + + + + Verify Permissions on SSH Server Private *_key Key Files + + ocil:ssg-file_permissions_sshd_private_key_action:testaction:1 + + + + Allow Only SSH Protocol 2 + + ocil:ssg-sshd_allow_only_protocol2_action:testaction:1 + + + + Disable GSSAPI Authentication + + ocil:ssg-sshd_disable_gssapi_auth_action:testaction:1 + + + + Disable Kerberos Authentication + + ocil:ssg-sshd_disable_kerb_auth_action:testaction:1 + + + + Enable Use of StictModes + + ocil:ssg-sshd_enable_strictmodes_action:testaction:1 + + + + Enable Use of Privilege Separation + + ocil:ssg-sshd_use_priv_separation_action:testaction:1 + + + + Disable Compression Or Set Compression to delayed + + ocil:ssg-sshd_disable_compression_action:testaction:1 + + + + Print Last Log + + ocil:ssg-sshd_print_last_log_action:testaction:1 + + + + Set SSH Idle Timeout Interval + + ocil:ssg-sshd_set_idle_timeout_action:testaction:1 + + + + Set SSH Client Alive Count + + ocil:ssg-sshd_set_keepalive_action:testaction:1 + + + + Disable SSH Support for .rhosts Files + + ocil:ssg-sshd_disable_rhosts_action:testaction:1 + + + + Disable Host-Based Authentication + + ocil:ssg-disable_host_auth_action:testaction:1 + + + + Enable Encrypted X11 Fordwarding + + ocil:ssg-enable_x11_forwarding_action:testaction:1 + + + + Disable SSH Root Login + + ocil:ssg-sshd_disable_root_login_action:testaction:1 + + + + Disable SSH Access via Empty Passwords + + ocil:ssg-sshd_disable_empty_passwords_action:testaction:1 + + + + Enable SSH Warning Banner + + ocil:ssg-sshd_enable_warning_banner_action:testaction:1 + + + + Do Not Allow SSH Environment Options + + ocil:ssg-sshd_do_not_permit_user_env_action:testaction:1 + + + + Use Only Approved Ciphers + + ocil:ssg-sshd_use_approved_ciphers_action:testaction:1 + + + + Use Only FIPS Approved MACs + + ocil:ssg-sshd_use_approved_macs_action:testaction:1 + + + + Install the SSSD Package + + ocil:ssg-package_sssd_installed_action:testaction:1 + + + + Enable the SSSD Service + + ocil:ssg-service_sssd_enabled_action:testaction:1 + + + + Configure SSSD's Memory Cache to Expire + + ocil:ssg-sssd_memcache_timeout_action:testaction:1 + + + + Configure SSSD to Expire Offline Credentials + + ocil:ssg-sssd_offline_cred_expiration_action:testaction:1 + + + + Configure SSSD to Expire SSH Known Hosts + + ocil:ssg-sssd_ssh_known_hosts_timeout_action:testaction:1 + + + + Disable X Windows Startup By Setting Default Target + + ocil:ssg-xwindows_runlevel_setting_action:testaction:1 + + + + Remove the X Windows Package Group + + ocil:ssg-package_xorg-x11-server-common_removed_action:testaction:1 + + + + Disable Avahi Server Software + + ocil:ssg-service_avahi-daemon_disabled_action:testaction:1 + + + + Disable the CUPS Service + + ocil:ssg-service_cups_disabled_action:testaction:1 + + + + Disable DHCP Service + + ocil:ssg-service_dhcpd_disabled_action:testaction:1 + + + + Uninstall DHCP Server Package + + ocil:ssg-package_dhcp_removed_action:testaction:1 + + + + Disable DHCP Client + + ocil:ssg-sysconfig_networking_bootproto_ifcfg_action:testaction:1 + + + + Enable the NTP Daemon + + ocil:ssg-service_chronyd_or_ntpd_enabled_action:testaction:1 + + + + Specify a Remote NTP Server + + ocil:ssg-chronyd_or_ntpd_specify_remote_server_action:testaction:1 + + + + Enable Postfix Service + + ocil:ssg-service_postfix_enabled_action:testaction:1 + + + + Uninstall Sendmail Package + + ocil:ssg-package_sendmail_removed_action:testaction:1 + + + + Disable Postfix Network Listening + + ocil:ssg-postfix_network_listening_disabled_action:testaction:1 + + + + Configure LDAP Client to Use TLS For All Transactions + + ocil:ssg-ldap_client_start_tls_action:testaction:1 + + + + Configure Certificate Directives for LDAP Use of TLS + + ocil:ssg-ldap_client_tls_cacertpath_action:testaction:1 + + + + Uninstall openldap-servers Package + + ocil:ssg-package_openldap-servers_removed_action:testaction:1 + + + + Specify UID and GID for Anonymous NFS Connections + + ocil:ssg-nfs_no_anonymous_action:testaction:1 + + + + Disable Network File System (nfs) + + ocil:ssg-service_nfs_disabled_action:testaction:1 + + + + Disable Secure RPC Server Service (rpcsvcgssd) + + ocil:ssg-service_rpcsvcgssd_disabled_action:testaction:1 + + + + Mount Remote Filesystems with nodev + + ocil:ssg-mount_option_nodev_remote_filesystems_action:testaction:1 + + + + Mount Remote Filesystems with nosuid + + ocil:ssg-mount_option_nosuid_remote_filesystems_action:testaction:1 + + + + Mount Remote Filesystems with Kerberos Security + + ocil:ssg-mount_option_krb_sec_remote_filesystems_action:testaction:1 + + + + Ensure Insecure File Locking is Not Allowed + + ocil:ssg-no_insecure_locks_exports_action:testaction:1 + + + + Use Kerberos Security on All Exports + + ocil:ssg-use_kerberos_security_all_exports_action:testaction:1 + + + + Disable DNS Server + + ocil:ssg-service_named_disabled_action:testaction:1 + + + + Uninstall bind Package + + ocil:ssg-package_bind_removed_action:testaction:1 + + + + Disable vsftpd Service + + ocil:ssg-service_vsftpd_disabled_action:testaction:1 + + + + Uninstall vsftpd Package + + ocil:ssg-package_vsftpd_removed_action:testaction:1 + + + + Enable Logging of All FTP Transactions + + ocil:ssg-ftp_log_transactions_action:testaction:1 + + + + Create Warning Banners for All FTP Users + + ocil:ssg-ftp_present_banner_action:testaction:1 + + + + Disable httpd Service + + ocil:ssg-service_httpd_disabled_action:testaction:1 + + + + Uninstall httpd Package + + ocil:ssg-package_httpd_removed_action:testaction:1 + + + + Disable Dovecot Service + + ocil:ssg-service_dovecot_disabled_action:testaction:1 + + + + Uninstall dovecot Package + + ocil:ssg-package_dovecot_removed_action:testaction:1 + + + + Disable Quagga Service + + ocil:ssg-service_zebra_disabled_action:testaction:1 + + + + Uninstall quagga Package + + ocil:ssg-package_quagga_removed_action:testaction:1 + + + + Disable Samba + + ocil:ssg-service_smb_disabled_action:testaction:1 + + + + Uninstall Samba Package + + ocil:ssg-package_samba_removed_action:testaction:1 + + + + Require Client SMB Packet Signing, if using smbclient + + ocil:ssg-require_smb_client_signing_action:testaction:1 + + + + Require Client SMB Packet Signing, if using mount.cifs + + ocil:ssg-mount_option_smb_client_signing_action:testaction:1 + + + + Disable Squid + + ocil:ssg-service_squid_disabled_action:testaction:1 + + + + Uninstall squid Package + + ocil:ssg-package_squid_removed_action:testaction:1 + + + + Disable snmpd Service + + ocil:ssg-service_snmpd_disabled_action:testaction:1 + + + + Uninstall net-snmp Package + + ocil:ssg-package_net-snmp_removed_action:testaction:1 + + + + Configure SNMP Service to Use Only SNMPv3 or Newer + + ocil:ssg-snmpd_use_newer_protocol_action:testaction:1 + + + + Ensure Default SNMP Password Is Not Used + + ocil:ssg-snmpd_not_default_password_action:testaction:1 + + + + Product Meets this Requirement + + ocil:ssg-met_inherently_generic_action:testaction:1 + + + + Product Meets this Requirement + + ocil:ssg-met_inherently_auditing_action:testaction:1 + + + + Product Meets this Requirement + + ocil:ssg-met_inherently_nonselected_action:testaction:1 + + + + Guidance Does Not Meet this Requirement Due to Impracticality or Scope + + ocil:ssg-unmet_nonfinding_nonselected_scope_action:testaction:1 + + + + Implementation of the Requirement is Not Supported + + ocil:ssg-unmet_finding_nonselected_action:testaction:1 + + + + Guidance Does Not Meet this Requirement Due to Impracticality or Scope + + ocil:ssg-unmet_nonfinding_scope_action:testaction:1 + + + + A process for prompt installation of OS updates must exist. + + ocil:ssg-update_process_action:testaction:1 + + + + Procedural Requirement + + ocil:ssg-c2s_procedural_requirement_action:testaction:1 + + + + Product Meets this Requirement + + ocil:ssg-c2s_met_inherently_action:testaction:1 + + + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + PASS + + + FAIL + + + + + + + + Run the following command to determine if /tmp + is on its own partition or logical volume: + + $ mount | grep "on /tmp " + If /tmp has its own partition or volume group, a line + will be returned. + + + Is it the case that no line is returned? + + + + + + Run the following command to determine if /var + is on its own partition or logical volume: + + $ mount | grep "on /var " + If /var has its own partition or volume group, a line + will be returned. + + + Is it the case that no line is returned? + + + + + + Run the following command to determine if /var/log + is on its own partition or logical volume: + + $ mount | grep "on /var/log " + If /var/log has its own partition or volume group, a line + will be returned. + + + Is it the case that no line is returned? + + + + + + Run the following command to determine if /var/log/audit + is on its own partition or logical volume: + + $ mount | grep "on /var/log/audit " + If /var/log/audit has its own partition or volume group, a line + will be returned. + + + Is it the case that no line is returned? + + + + + + Run the following command to determine if /home + is on its own partition or logical volume: + + $ mount | grep "on /home " + If /home has its own partition or volume group, a line + will be returned. + + + Is it the case that no line is returned? + + + + +Determine if encryption must be used to protect data on the system. + + Is it the case that encryption must be used and is not employed? + + + + +To ensure that the GPG key is installed, run: +$ rpm -q --queryformat "%{SUMMARY}\n" gpg-pubkey +The command should return the string below: +gpg(Red Hat, Inc. (release key 2) <security@redhat.com> + + Is it the case that the Red Hat GPG Key is not installed? + + + + +To determine whether yum is configured to use gpgcheck, +inspect /etc/yum.conf and ensure the following appears in the +[main] section: +gpgcheck=1 +A value of 1 indicates that gpgcheck is enabled. Absence of a +gpgcheck line or a setting of 0 indicates that it is +disabled. + + Is it the case that GPG checking is not enabled? + + + + +To determine whether yum has been configured to disable +gpgcheck for any repos, inspect all files in +/etc/yum.repos.d and ensure the following does not appear in any +sections: +gpgcheck=0 +A value of 0 indicates that gpgcheck has been disabled for that repo. + + Is it the case that GPG checking is disabled? + + + + +If the system is joined to the Red Hat Network, a Red Hat Satellite Server, or +a yum server which provides updates, invoking the following command will +indicate if updates are available: +$ sudo yum check-update +If the system is not configured to update from one of these sources, +run the following command to list when each package was last updated: +$ rpm -qa -last +Compare this to Red Hat Security Advisories (RHSA) listed at +https://access.redhat.com/security/updates/active/ +to determine if the system is missing applicable updates. + + Is it the case that updates are not installed? + + + + +To verify that clean_requirements_on_remove is configured properly, run the +following command: +$ grep clean_requirements_on_remove /etc/yum.conf +The output should return something similar to: +clean_requirements_on_remove=1 + + Is it the case that clean_requirements_on_remove is not enabled or configured correctly? + + + + +To verify that localpkg_gpgcheck is configured properly, run the following +command: +$ grep localpkg_gpgcheck /etc/yum.conf +The output should return something similar to: +localpkg_gpgcheck=1 + + Is it the case that gpgcheck is not enabled or configured correctly to verify local packages? + + + + +To verify that repo_gpgcheck is configured properly, run the following +command: +$ grep repo_gpgcheck /etc/yum.conf +The output should return something similar to: +repo_gpgcheck=1 + + Is it the case that gpgcheck is not enabled or configured correctly to verify repository metadata? + + + + + + Run the following command to determine if the aide package is installed: + $ rpm -q aide + + Is it the case that the package is not installed? + + + + +To find the location of the AIDE databse file, run the following command: +$ sudo ls -l DBDIR/database_file_name + + Is it the case that there is no database file? + + + + +To determine that periodic AIDE execution has been scheduled, run the following command: +$ grep aide /etc/crontab + + Is it the case that there is no output? + + + + +The following command will list which files on the system have permissions different from what +is expected by the RPM database: +$ rpm -Va | grep '^.M' + + Is it the case that there is output? + + + + The following command will list which files on the system +have file hashes different from what is expected by the RPM database. +$ rpm -Va | awk '$1 ~ /..5/ && $2 != "c"' + + Is it the case that there is output? + + + + +Inspect the system to determine if intrusion detection software has been installed. +Verify this intrusion detection software is active. + + Is it the case that no host-based intrusion detection tools are installed? + + + + +Inspect the system for a cron job or system service which executes +a virus scanning tool regularly. + + +To verify the McAfee VSEL system service is operational, +run the following command: +$ sudo /sbin/service nails status + +To check on the age of uvscan virus definition files, run the following command: +$ sudo cd /opt/NAI/LinuxShield/engine/dat +$ sudo ls -la avvscan.dat avvnames.dat avvclean.dat + + Is it the case that virus scanning software does not run continuously, or at least daily, or has signatures that are out of date? + + + + +To verify that McAfee HBSS is installed, run the following command(s): +$ sudo ls /opt/McAfee/accm/bin/accm +$ sudo ls /opt/McAfee/auditengine/bin/auditmanager +$ rpm -q MFEcma && rpm -q MFErt + + Is it the case that McAfee HBSS is not installed? + + + + +To verify that McAfee VirusScan Enterprise for Linux is installed +and running, run the following command(s): +$ sudo systemctl status nails +$ rpm -q McAfeeVSEForLinux + + Is it the case that virus scanning software is not installed or running? + + + + + + Run the following command to determine the current status of the +nails service: + $ systemctl is-active nails + If the service is running, it should return the following: active + + Is it the case that ? + + + + +To check on the age of McAfee virus definition files, run the following command: +$ sudo cd /opt/NAI/LinuxShield/engine/dat +$ sudo ls -la avvscan.dat avvnames.dat avvclean.dat + + Is it the case that signatures are out of date? + + + + + + Run the following command to determine if the dracut-fips package is installed: + $ rpm -q dracut-fips + + Is it the case that the package is not installed? + + + + +To verify that FIPS is enabled properly in grub, run the following command: +$ grep fips /etc/default/grub +The output should contain fips=1 + + Is it the case that FIPS is not configured or enabled in grub? + + + + +To verify that the DConf User profile is configured correctly, run the following +command: +$ cat /etc/dconf/profile/user +The output should show the following: +user-db:user +system-db:local +system-db:site +system-db:distro + + Is it the case that DConf User profile does not exist or is not configured correctly? + + + + +To verify that automatic logins are disabled, run the following command: +$ grep -Pzoi "^\[daemon]\\nautomaticlogin.*" /etc/gdm/custom.conf +The output should show the following: +[daemon] +AutomaticLoginEnable=false + + Is it the case that GDM allows users to automatically login? + + + + +To verify that timed logins are disabled, run the following command: +$ grep -Pzoi "^\[daemon]\\ntimedlogin.*" /etc/gdm/custom.conf +The output should show the following: +[daemon] +TimedLoginEnable=false + + Is it the case that GDM allows a guest to login without credentials? + + + + +To ensure the user list is disabled, run the following command: +$ grep disable-user-list /etc/dconf/db/gdm.d/* +The output should be true. +To ensure that users cannot enable displaying the user list, run the following: +$ grep disable-user-list /etc/dconf/db/gdm.d/locks/* +If properly configured, the output should be /org/gnome/login-screen/disable-user-list + + Is it the case that disable-user-list has not been configured or is not disabled? + + + + +To ensure disable and restart on the login screen are disabled, run the following command: +$ grep disable-restart-buttons /etc/dconf/db/gdm.d/* +The output should be true. +To ensure that users cannot enable disable and restart on the login screen, run the following: +$ grep disable-restart-buttons /etc/dconf/db/gdm.d/locks/* +If properly configured, the output should be /org/gnome/login-screen/disable-restart-buttons + + Is it the case that disable-restart-buttons has not been configured or is not disabled? + + + + +To ensure smart card authentication on the login screen is enabled, run the following command: +$ grep enable-smartcard-authentication /etc/dconf/db/gdm.d/* +The output should be true. +To ensure that users cannot disable smart card authentication on the login screen, run the following: +$ grep enable-smartcard-authentication /etc/dconf/db/gdm.d/locks/* +If properly configured, the output should be /org/gnome/login-screen/enable-smartcard-authentication + + Is it the case that enable-smartcard-authentication has not been configured or is disabled? + + + + +To ensure the login screen resets after a specified number of failures, +run the following command: +$ grep allowed-failures /etc/dconf/db/gdm.d/* +The output should be 3 or less. +To ensure that users cannot change or configure the resets after a specified +number of failures on the login screen, run the following: +$ grep allowed-failures /etc/dconf/db/gdm.d/locks/* +If properly configured, the output should be /org/gnome/login-screen/allowed-failures + + Is it the case that allowed-failures is not equal to or less than the expected value? + + + + +To check the current idle time-out value, run the following command: +$ gsettings get org.gnome.desktop.session idle-delay +If properly configured, the output should be 'uint32 '. +To ensure that users cannot change the screensaver inactivity timeout setting, run the following: +$ grep idle-delay /etc/dconf/db/local.d/locks/* +If properly configured, the output should be /org/gnome/desktop/session/idle-delay + + Is it the case that idle-delay is not equal to or less than the expected value? + + + + +To check the screensaver mandatory use status, run the following command: +$ gsettings get org.gnome.desktop.screensaver idle-activation-enabled +If properly configured, the output should be true. +To ensure that users cannot disable the screensaver idle inactivity setting, run the following: +$ grep idle-activation-enabled /etc/dconf/db/local.d/locks/* +If properly configured, the output should be /org/gnome/desktop/screensaver/idle-activation-enabled + + Is it the case that idle_activation_enabled is not enabled or configured? + + + + +To check the status of the idle screen lock activation, run the following command: +$ gsettings get org.gnome.desktop.screensaver lock-enabled +If properly configured, the output should be true. +To check that the screen locks immediately when activated, run the following command: +$ gsettings get org.gnome.desktop.screensaver lock-delay +If properly configured, the output should be 'uint32 0'. +To ensure that users cannot change how long until the the screensaver locks, run the following: +$ grep 'lock-enabled\|lock-delay' /etc/dconf/db/local.d/locks/* +If properly configured, the output for lock-enabled should be /org/gnome/desktop/screensaver/lock-enabled +If properly configured, the output for lock-delay should be /org/gnome/desktop/screensaver/lock-delay + + Is it the case that screensaver locking is not enabled and/or the screensaver lock delay has not been set or configured correctly? + + + + +To ensure the screensaver is configured to be blank, run the following command: +$ gsettings get org.gnome.desktop.screensaver picture-uri +If properly configured, the output should be ''. +To ensure that users cannot set the screensaver background, run the following: +$ grep picture-uri /etc/dconf/db/local.d/locks/* +If properly configured, the output should be /org/gnome/desktop/screensaver/picture-uri + + Is it the case that it is not set or configured properly? + + + + +To ensure the splash screen is configured not to show user name, run the following command: +$ gsettings get org.gnome.desktop.screensaver show-full-name-in-top-bar +If properly configured, the output should be false. +To ensure that users cannot enable user name on the lock screen, run the following: +$ grep show-full-name-in-top-bar /etc/dconf/db/local.d/locks/* +If properly configured, the output should be /org/gnome/desktop/screensaver/show-full-name-in-top-bar + + Is it the case that it is not set or configured properly? + + + + +To ensure the system is configured to ignore the Ctrl-Alt-Del sequence, +run the following command: +$ gsettings get org.gnome.settings-daemon.plugins.media-keys logout +If properly configured, the output should be ''. +To ensure that users cannot enable the Ctrl-Alt-Del sequence, run the following: +$ grep logout /etc/dconf/db/local.d/locks/* +If properly configured, the output should be +/org/gnome/settings-daemon/plugins/media-keys/logout + + Is it the case that GNOME3 is configured to reboot when Ctrl-Alt-Del is pressed? + + + + +To ensure the GUI does not allow user administratrion capabilities to all users, +run the following command: +$ gsettings get org.gnome.desktop.lockdown user-administration-disabled +If properly configured, the output should be true. +To ensure that users cannot enable user administration, run the following: +$ grep user-administration /etc/dconf/db/local.d/locks/* +If properly configured, the output should be +/org/gnome/desktop/lockdown/user-administration-disabled + + Is it the case that user administration is not configured or disabled? + + + + +To ensure that the GUI power settings are not active, run the following command: +$ gsettings get org.gnome.settings-daemon.plugins.power active +If properly configured, the output should be false. +To ensure that users cannot enable the power settings, run the following: +$ grep power /etc/dconf/db/local.d/locks/* +If properly configured, the output should be +/org/gnome/settings-daemon/plugins/power/active + + Is it the case that power settings are enabled and are not disabled? + + + + +To ensure that system location tracking is not active, run the following command: +$ gsettings get org.gnome.system.location enabled +$ gsettings get org.gnome.clocks geolocation +If properly configured, the output should be false. +To ensure that users cannot enable system location tracking, run the following: +$ grep location /etc/dconf/db/local.d/locks/* +If properly configured, the output should be +/org/gnome/system/location/enabled and /org/gnome/clocks/geolocation. + + Is it the case that geolocation is enabled and not disabled? + + + + +To ensure that WIFI connections caanot be created, run the following command: +$ gsettings get org.gnome.nm-applet disable-wifi-create +If properly configured, the output should be true. +To ensure that users cannot enable WIFI connection creation, run the following: +$ grep wifi-create /etc/dconf/db/local.d/locks/* +If properly configured, the output should be +/org/gnome/nm-applet/disable-wifi-create + + Is it the case that WIFI connections can be created through GNOME? + + + + +To ensure that wireless network notification is disabled, run the following command: +$ gsettings get org.gnome.nm-applet suppress-wireless-networks-available +If properly configured, the output should be true. +To ensure that users cannot enable wireless notification, run the following: +$ grep wireless-networks-available /etc/dconf/db/local.d/locks/* +If properly configured, the output should be +/org/gnome/nm-applet/suppress-wireless-networks-available + + Is it the case that wireless network notification is enabled and not disabled? + + + + +To ensure that remote access requires credentials, run the following command: +$ gsettings get org.gnome.Vino authentication-methods +If properly configured, the output should be false. +To ensure that users cannot disable credentials for remote access, run the following: +$ grep authentication-methods /etc/dconf/db/local.d/locks/* +If properly configured, the output should be +/org/gnome/Vino/authentication-methods + + Is it the case that wireless network notification is enabled and not disabled? + + + + +To ensure that remote access connections are encrypted, run the following command: +$ gsettings get org.gnome.Vino require-encrpytion +If properly configured, the output should be true. +To ensure that users cannot disable encrypted remote connections, run the following: +$ grep require-encryption /etc/dconf/db/local.d/locks/* +If properly configured, the output should be +/org/gnome/Vino/require-encryption + + Is it the case that remote access connections are not encrypted? + + + + +These settings can be verified by running the following: +$ gsettings get org.gnome.desktop.media-handling automount +$ gsettings get org.gnome.desktop.media-handling automount-open +$ gsettings get org.gnome.desktop.media-handling autorun-never +If properly configured, the output for automount should be false. +If properly configured, the output for automount-openshould be false. +If properly configured, the output for autorun-never should be true. +To ensure that users cannot enable automount and autorun in GNOME3, run the following: +$ grep 'automount\|autorun' /etc/dconf/db/local.d/locks/* +If properly configured, the output for automount should be /org/gnome/desktop/media-handling/automount +If properly configured, the output for automount-open should be /org/gnome/desktop/media-handling/auto-open +If properly configured, the output for autorun-never should be /org/gnome/desktop/media-handling/autorun-never + + Is it the case that GNOME automounting is not disabled? + + + + +These settings can be verified by running the following: +$ gsettings get org.gnome.desktop.thumbnailers disable-all +If properly configured, the output should be true. +To ensure that users cannot how long until the the screensaver locks, run the following: +$ grep disable-all /etc/dconf/db/local.d/locks/* +If properly configured, the output should be /org/gnome/desktop/thumbnailers/disable-all + + Is it the case that GNOME thumbnailers are not disabled? + + + + +To determine if NOPASSWD has been configured for sudo, run the following command: +$ sudo grep -ri nopasswd /etc/sudoers /etc/sudoers.d/ +The command should return no output. + + Is it the case that nopasswd is enabled in sudo? + + + + +To determine if !authenticate has not been configured for sudo, run the following command: +$ sudo grep -r \!authenticate /etc/sudoers /etc/sudoers.d/ +The command should return no output. + + Is it the case that !authenticate is enabled in sudo? + + + + +To verify that binaries cannot be directly executed from removable media, run the following command: +$ grep -v noexec /etc/fstab +The resulting output will show partitions which do not have the noexec flag. Verify all partitions +in the output are not removable media. + + Is it the case that removable media partitions are present? + + + + + +If the system is configured to prevent the loading of the +usb-storage kernel module, +it will contain lines inside any file in /etc/modprobe.d or the deprecated/etc/modprobe.conf. +These lines instruct the module loading system to run another program (such as +/bin/true) upon a module install event. +Run the following command to search for such lines in all files in /etc/modprobe.d +and the deprecated /etc/modprobe.conf: +preserve$ grep -r usb-storage /etc/modprobe.conf /etc/modprobe.d + + Is it the case that no line is returned? + + + + + + To check that the autofs service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled autofs + Output should indicate the autofs service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled autofsdisabled + + Run the following command to verify autofs is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active autofs + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check the ownership of /etc/shadow, run the command: + $ ls -lL /etc/shadow + If properly configured, the output should indicate the following owner: + root + + Is it the case that it does not? + + + + + + To check the group ownership of /etc/shadow, run the command: + $ ls -lL /etc/shadow + If properly configured, the output should indicate the following group-owner. + root + + Is it the case that it does not? + + + + + + To check the permissions of /etc/shadow, run the command: + $ ls -l /etc/shadow + If properly configured, the output should indicate the following permissions: + ---------- + + Is it the case that it does not? + + + + + + To check the ownership of /etc/group, run the command: + $ ls -lL /etc/group + If properly configured, the output should indicate the following owner: + root + + Is it the case that it does not? + + + + + + To check the group ownership of /etc/group, run the command: + $ ls -lL /etc/group + If properly configured, the output should indicate the following group-owner. + root + + Is it the case that it does not? + + + + + + To check the permissions of /etc/group, run the command: + $ ls -l /etc/group + If properly configured, the output should indicate the following permissions: + -rw-r--r-- + + Is it the case that it does not? + + + + + + To check the ownership of /etc/gshadow, run the command: + $ ls -lL /etc/gshadow + If properly configured, the output should indicate the following owner: + root + + Is it the case that it does not? + + + + + + To check the group ownership of /etc/gshadow, run the command: + $ ls -lL /etc/gshadow + If properly configured, the output should indicate the following group-owner. + root + + Is it the case that it does not? + + + + + + To check the permissions of /etc/gshadow, run the command: + $ ls -l /etc/gshadow + If properly configured, the output should indicate the following permissions: + ---------- + + Is it the case that it does not? + + + + + + To check the ownership of /etc/passwd, run the command: + $ ls -lL /etc/passwd + If properly configured, the output should indicate the following owner: + root + + Is it the case that it does not? + + + + + + To check the group ownership of /etc/passwd, run the command: + $ ls -lL /etc/passwd + If properly configured, the output should indicate the following group-owner. + root + + Is it the case that it does not? + + + + + + To check the permissions of /etc/passwd, run the command: + $ ls -l /etc/passwd + If properly configured, the output should indicate the following permissions: + -rw-r--r-- + + Is it the case that it does not? + + + + +Shared libraries are stored in the following directories: +/lib +/lib64 +/usr/lib +/usr/lib64 + +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 + + Is it the case that any of these files are group-writable or world-writable? + + + + +Shared libraries are stored in the following directories: +/lib +/lib64 +/usr/lib +/usr/lib64 + +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 {} \; + + Is it the case that any of these files are not owned by root? + + + + +System executables are stored in the following directories by default: +/bin +/sbin +/usr/bin +/usr/libexec +/usr/local/bin +/usr/local/sbin +/usr/sbin +To find system executables 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 f + + Is it the case that any system executables are found to be group or world writable? + + + + +System executables are stored in the following directories by default: +/bin +/sbin +/usr/bin +/usr/libexec +/usr/local/bin +/usr/local/sbin +/usr/sbin +To find system executables that are not owned by root, +run the following command for each directory DIR which contains system executables: +$ sudo find DIR/ \! -user root + + Is it the case that any system executables are found to not be owned by root? + + + + +To find world-writable directories that lack the sticky bit, run the following command: +$ sudo find / -xdev -type d -perm 002 ! -perm 1000 + + Is it the case that any world-writable directories are missing the sticky bit? + + + + +To find world-writable files, run the following command: +$ sudo find / -xdev -type f -perm -002 + + Is it the case that there is output? + + + + +To find world-writable files, run the following command: +$ sudo find / -xdev -type f -perm -002 + + Is it the case that there is output? + + + + +To find world-writable files, run the following command: +$ sudo find / -xdev -type f -perm -002 + + Is it the case that ? + + + + +The following command will discover and print any +files on local partitions which do not belong to a valid user. +Run it once for each local partition PART: +$ sudo find PART -xdev -nouser -print + + Is it the case that files exist that are not owned by a valid user? + + + + +The following command will discover and print any +files on local partitions which do not belong to a valid group. +Run it once for each local partition PART: +$ sudo find PART -xdev -nogroup -print + +Either remove all files and directories from the system that do not have a valid group, +or assign a valid group with the chgrp command: +$ sudo chgrp group file + + Is it the case that there is output? + + + + +The following command will discover and print world-writable directories that +are not owned by a system account, given the assumption that only system +accounts have a uid lower than 500. Run it once for each local partition PART: +$ sudo find PART -xdev -type d -perm -0002 -uid +499 -print + + Is it the case that there is output? + + + + +To check the value of the umask, run the following command: +$ grep umask /etc/init.d/functions +The output should show either 022 or 027. + + Is it the case that it does not? + + + + +To verify that core dumps are disabled for all users, run the following command: +$ grep core /etc/security/limits.conf +The output should be: +* hard core 0 + + Is it the case that it is not? + + + + + + The status of the fs.suid_dumpable kernel parameter can be queried + by running the following command: + preserve$ sysctl fs.suid_dumpable + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + +To verify ExecShield is enabled on 64-bit Red Hat Enterprise Linux 7 systems, +run the following command: +$ dmesg | grep '[NX|DX]*protection' +The output should not contain 'disabled by kernel command line option'. +To verify that ExecShield has not been disabled in the kernel configuration, +run the following command: +$ sudo grep noexec /boot/grub2/grub.cfg +The output should not return noexec=off. +For 32-bit Red Hat Enterprise Linux 7 systems, run the following command: +$ sysctl kernel.exec-shield +The output should be: + + To set the runtime status of the kernel.exec-shield kernel parameter, + run the following command: + preserve$ sudo sysctl -w kernel.exec-shield=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + preservekernel.exec-shield = 1 + + Is it the case that ExecShield is not supported by the hardware, is not enabled, or has been disabled by the kernel configuration.? + + + + + + The status of the kernel.randomize_va_space kernel parameter can be queried + by running the following command: + preserve$ sysctl kernel.randomize_va_space + The output of the command should indicate a value of 2. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the kernel.dmesg_restrict kernel parameter can be queried + by running the following command: + preserve$ sysctl kernel.dmesg_restrict + The output of the command should indicate a value of 1. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + +Inspect /etc/default/grub for any instances of selinux=0 +in the kernel boot arguments. Presence of selinux=0 indicates +that SELinux is disabled at boot time. + + Is it the case that SELinux is disabled at boot time? + + + + +Check the file /etc/selinux/config and ensure the following line appears: +SELINUX= + + Is it the case that SELINUX is not set to enforcing? + + + + +Check the file /etc/selinux/config and ensure the following line appears: +SELINUXTYPE= + + Is it the case that it does not? + + + + To check for unlabeled device files, run the following command: +$sudo find /dev -context *:device_t:* \( -type c -o -type b \) -printf "%p %Z\n" +It should produce no output in a well-configured system. + Is it the case that there is output? + + + + +To ensure root may not directly login to the system over physical consoles, +run the following command: +cat /etc/securetty +If any output is returned, this is a finding. + + Is it the case that the /etc/securetty file is not empty? + + + + +To check for virtual console entries which permit root login, run the +following command: +$ sudo grep ^vc/[0-9] /etc/securetty +If any output is returned, then root logins over virtual console devices is permitted. + + Is it the case that root login over virtual console devices is permitted? + + + + +To check for serial port entries which permit root login, +run the following command: +$ sudo grep ^ttyS/[0-9] /etc/securetty +If any output is returned, then root login over serial ports is permitted. + + Is it the case that root login over serial ports is permitted? + + + + +Check the root home directory for a .mozilla directory. If +one exists, ensure browsing is limited to local service administration. + + Is it the case that this is not the case? + + + + +To obtain a listing of all users, their UIDs, and their shells, run the +command: $ awk -F: '{print $1 ":" $3 ":" $7}' /etc/passwd Identify +the system accounts from this listing. These will primarily be the accounts +with UID numbers less than UID_MIN, other than root. Value of the UID_MIN +directive is set in /etc/login.defs configuration file. In the default +configuration UID_MIN is set to 1000. + + Is it the case that any system account (other than root) has a login shell? + + + + +To list all password file entries for accounts with UID 0, run the following command: +$ awk -F: '($3 == "0") {print}' /etc/passwd +This should print only one line, for the user root. + +If there is a finding, change the UID of the failing (non-root) user. If the account is +associated with the 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. + + Is it the case that any account other than root has a UID of 0? + + + + +To view the root user's PATH, run the following command: +$ sudo env | grep PATH +If correctly configured, the PATH must: use vendor default settings, +have no empty entries, and have no entries beginning with a character +other than a slash (/). + + Is it the case that any of these conditions are not met? + + + + +To verify that null passwords cannot be used, run the following command: +$ grep nullok /etc/pam.d/system-auth +If this produces any output, it may be possible to log into accounts +with empty passwords. + + Is it the case that NULL passwords can be used? + + + + +To check that no password hashes are stored in +/etc/passwd, run the following command: +$ awk -F: '($2 != "x") {print}' /etc/passwd +If it produces any output, then a password hash is +stored in /etc/passwd. + + Is it the case that any stored hashes are found in /etc/passwd? + + + + +To ensure all GIDs referenced in /etc/passwd are defined in /etc/group, +run the following command: +$ sudo pwck -qr +There should be no output. + + Is it the case that GIFs referenced in /etc/passwd are returned as not defined in /etc/group? + + + + +To check the system for the existence of any .netrc files, +run the following command: +$ sudo find /home -xdev -name .netrc + + + Is it the case that any .netrc files exist? + + + + +To check the minimum password length, run the command: +$ grep PASS_MIN_LEN /etc/login.defs +The DoD requirement is 14. + + Is it the case that it is not set to the required value? + + + + +To check the minimum password age, run the command: +$ grep PASS_MIN_DAYS /etc/login.defs + + Is it the case that it is not equal to or greater than the required value? + + + + +To check the maximum password age, run the command: +$ grep PASS_MAX_DAYS /etc/login.defs +The DoD and FISMA requirement is 60. +A value of 180 days is sufficient for many environments. + + Is it the case that PASS_MAX_DAYS is not set equal to or greater than the required value? + + + + +To check the password warning age, run the command: +$ grep PASS_WARN_AGE /etc/login.defs +The DoD requirement is 7. + + Is it the case that it is not set to the required value? + + + + +To verify the INACTIVE setting, run the following command: +grep "INACTIVE" /etc/default/useradd +The output should indicate the INACTIVE configuration option is set +to an appropriate integer as shown in the example below: +$ sudo grep "INACTIVE" /etc/default/useradd +INACTIVE= + Is it the case that it does not? + + + + +Run the following command to check for duplicate account names: +$ sudo pwck -qr +If there are no duplicate names, no line will be returned. + + Is it the case that a line is returned? + + + + +For every temporary and emergency account, run the following command +to obtain its account aging and expiration information: +$ sudo chage -l USER +Verify each of these accounts has an expiration date set as documented. + + Is it the case that any temporary or emergency accounts have no expiration date set or do not expire within a documented time frame? + + + + +To ensure that last logon/access notification is configured correctly, run +the following command: +$ grep pam_lastlog.so /etc/pam.d/postlogin +The output should show output showfailed. + + Is it the case that that is not the case? + + + + +To check how many retry attempts are permitted on a per-session basis, run the following command: +$ grep pam_pwquality /etc/pam.d/system-auth +The retry parameter will indicate how many attempts are permitted. +The DoD required value is less than or equal to 3. +This would appear as retry=3, or a lower value. + + Is it the case that it is not the required value? + + + + +To check the maximum value for consecutive repeating characters, run the following command: +$ grep maxrepeat /etc/security/pwquality.conf +Look for the value of the maxrepeat parameter. The DoD requirement is 2, which would appear as +maxrepeat = 2. + + Is it the case that maxrepeat is not found or not greater than or equal to the required value? + + + + +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. + + Is it the case that that is not the case? + + + + +To check how many digits are required in a password, run the following command: +$ grep dcredit /etc/security/pwquality.conf +The dcredit parameter (as a negative number) will indicate how many digits are required. +The DoD requires at least one digit in a password. This would appear as dcredit = -1. + + Is it the case that dcredit is not found or not equal to or less than the required value? + + + + +To check how many characters are required in a password, run the following command: +$ grep minlen /etc/security/pwquality.conf +Your output should contain minlen = + + Is it the case that minlen is not found, or not equal to or greater than the required value? + + + + +To check how many uppercase characters are required in a password, run the following command: +$ grep ucredit /etc/security/pwquality.conf +The ucredit parameter (as a negative number) will indicate how many uppercase characters are required. +The DoD and FISMA require at least one uppercase character in a password. +This would appear as ucredit = -1. + + Is it the case that ucredit is not found or not set to the required value? + + + + +To check how many special characters are required in a password, run the following command: +$ grep ocredit /etc/security/pwquality.conf +The ocredit parameter (as a negative number) will indicate how many special characters are required. +The DoD and FISMA require at least one special character in a password. +This would appear as ocredit = -1. + + Is it the case that ocredit is not found or not equal to or less than the required value? + + + + +To check how many lowercase characters are required in a password, run the following command: +$ grep lcredit /etc/security/pwquality.conf +The lcredit parameter (as a negative number) will indicate how many special characters are required. +The DoD and FISMA require at least one lowercase character in a password. This would appear as lcredit = -1. + + Is it the case that lcredit is not found or not equal to or less than the required value? + + + + +To check how many characters must differ during a password change, run the following command: +$ grep difok /etc/security/pwquality.conf +The difok parameter will indicate how many characters must differ. + + Is it the case that difok is not found or not equal to or greater than the required value? + + + + +To check how many categories of characters must be used in password during a password change, +run the following command: +$ grep minclass /etc/security/pwquality.conf +The minclass parameter will indicate how many character classes must be used. If +the requirement was for the password to contain characters from three different categories, +then this would appear as minclass = 3. + + Is it the case that minclass is not found or not set equal to or greater than the required value? + + + + +To ensure the failed password attempt policy is configured correctly, run the following command: +$ grep pam_faillock /etc/pam.d/system-auth +The output should show deny=. + + Is it the case that that is not the case? + + + + +To ensure the failed password attempt policy is configured correctly, run the following command: +$ grep pam_faillock /etc/pam.d/system-auth +The output should show unlock_time=<some-large-number>. + + Is it the case that that is not the case? + + + + +To ensure that even the root account is locked after a defined number of failed password +attempts, run the following command: +$ grep even_deny_root /etc/pam.d/system-auth +The output should show even_deny_root. + + Is it the case that that is not the case? + + + + +To ensure the failed password attempt policy is configured correctly, run the following command: +$ grep pam_faillock /etc/pam.d/system-auth /etc/pam.d/password-auth +For each file, the output should show fail_interval=<interval-in-seconds> where interval-in-seconds is + or greater. +If the fail_interval parameter is not set, the default setting of 900 seconds is acceptable. + + Is it the case that that is not the case? + + + + +To verify the password reuse setting is compliant, run the following command: +$ grep remember /etc/pam.d/system-auth +The output should show the following at the end of the line: +remember= + + Is it the case that the value of remember is not set equal to or less than the expected setting? + + + + +Inspect the password section of /etc/pam.d/system-auth and +ensure that the pam_unix.so module includes the argument +sha512: +$ grep sha512 /etc/pam.d/system-auth + + Is it the case that it does not? + + + + +Inspect /etc/login.defs and ensure the following line appears: +ENCRYPT_METHOD SHA512 + + Is it the case that it does not? + + + + +Inspect /etc/libuser.conf and ensure the following line appears +in the [default] section: +crypt_style = sha512 + + Is it the case that it does not? + + + + +Run the following command to ensure the TMOUT value is configured for all users +on the system: +$ sudo grep TMOUT /etc/profile + + Is it the case that value of TMOUT is not less than or equal to expected setting? + + + + +Run the following command to ensure the maxlogins value is configured for all users +on the system: +# grep "maxlogins" /etc/security/limits.conf +You should receive output similar to the following: +* hard maxlogins + + Is it the case that maxlogins is not equal to or less than the expected value? + + + + +Verify the FAIL_DELAY setting is configured correctly in the /etc/login.defs file by +running the following command: +# grep -i "FAIL_DELAY" /etc/login.defs +All output must show the value of umask set as shown in the below: +# grep -i "FAIL_DELAY" /etc/login.defs +fail_delay + + Is it the case that the above command returns no output, or FAIL_DELAY is configured incorrectly? + + + + +To ensure write permissions are disabled for group and other + for each element in root's path, run the following command: +# ls -ld DIR + + Is it the case that group or other write permissions exist? + + + + +To ensure the user home directory is not group-writable or world-readable, run the following: +# ls -ld /home/USER + + Is it the case that the user home directory is group-writable or world-readable? + + + + +Verify the umask setting is configured correctly in the /etc/bashrc file by +running the following command: +# grep "umask" /etc/bashrc +All output must show the value of umask set as shown below: +# grep "umask" /etc/bashrc +umask +umask + + Is it the case that the above command returns no output, or if the umask is configured incorrectly? + + + + +Verify the umask setting is configured correctly in the /etc/csh.cshrc file by +running the following command: +# grep "umask" /etc/csh.cshrc +All output must show the value of umask set as shown in the below: +# grep "umask" /etc/csh.cshrc +umask + + Is it the case that the above command returns no output, or if the umask is configured incorrectly? + + + + +Verify the umask setting is configured correctly in the /etc/profile file by +running the following command: +# grep "umask" /etc/profile +All output must show the value of umask set as shown in the below: +# grep "umask" /etc/profile +umask + + Is it the case that the above command returns no output, or if the umask is configured incorrectly? + + + + +Verify the UMASK setting is configured correctly in the /etc/login.defs file by +running the following command: +# grep -i "UMASK" /etc/login.defs +All output must show the value of umask set as shown in the below: +# grep -i "UMASK" /etc/login.defs +umask + + Is it the case that the above command returns no output, or if the umask is configured incorrectly? + + + + + + To check the ownership of /boot/grub2/grub.cfg, run the command: + $ ls -lL /boot/grub2/grub.cfg + If properly configured, the output should indicate the following owner: + root + + Is it the case that it does not? + + + + + + To check the group ownership of /boot/grub2/grub.cfg, run the command: + $ ls -lL /boot/grub2/grub.cfg + If properly configured, the output should indicate the following group-owner. + root + + Is it the case that it does not? + + + + +To check the permissions of /boot/grub2/grub.cfg, run the command: +$ sudo ls -lL /boot/grub2/grub.cfg +If properly configured, the output should indicate the following +permissions: -rw------- + + Is it the case that it does not? + + + + +To verify the boot loader superuser account and superuser account password have +been set, and the password encrypted, run the following command: +sudo grep -A1 "superusers\|password" /etc/grub2.cfg +The output should show the following: +set superusers="superusers-account" +password_pbkdf2 superusers-account password-hash + + Is it the case that it does not? + + + + +To verify the boot loader superuser account and superuser account password have +been set, and the password encrypted, run the following command: +sudo grep -A1 "superusers\|password" /etc/grub2-efi.cfg +The output should show the following: +set superusers="superusers-account" +password_pbkdf2 superusers-account password-hash + + Is it the case that it does not? + + + + +To check if authentication is required for single-user mode, run the following command: +$ grep sulogin /usr/lib/systemd/system/rescue.service +The output should be similar to the following, and the line must begin with +ExecStart and /sbin/sulogin: +ExecStart=-/sbin/sulogin + + Is it the case that the output is different? + + + + + + To check that the debug-shell service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled debug-shell + Output should indicate the debug-shell service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled debug-shelldisabled + + Run the following command to verify debug-shell is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active debug-shell + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + +To ensure the system is configured to mask the Ctrl-Alt-Del sequence, +enter the following command: +sudo ln -sf /dev/null /etc/systemd/system/ctrl-alt-del.target +or +sudo systemctl mask ctrl-alt-del.target + + Is it the case that the system is configured to reboot when Ctrl-Alt-Del is pressed? + + + + +Inspect /etc/default/grub for any instances of +systemd.confirm_spawn=(1|yes|true|on) in the kernel boot arguments. +Presence of a systemd.confirm_spawn=(1|yes|true|on) indicates +that interactive boot is enabled at boot time. + + Is it the case that Interactive boot is enabled at boot time? + + + + + + Run the following command to determine if the screen package is installed: + $ rpm -q screen + + Is it the case that the package is not installed? + + + + +Interview the SA to determine if all accounts not exempted by policy are +using CAC authentication. +For DoD systems, the following systems and accounts are exempt from using +smart card (CAC) authentication: +SIPRNET systemsStandalone systemsApplication accountsTemporary employee accounts, such as students or interns, who cannot easily receive a CAC or PIVOperational tactical locations that are not collocated with RAPIDS workstations to issue CAC or ALTTest systems, such as those with an Interim Approval to Test (IATT) and use a separate VPN, firewall, or security measure preventing access to network and system components from outside the protection boundary documented in the IATT. + + Is it the case that non-exempt accounts are not using CAC authentication? + + + + +To check if the system login banner is compliant, +run the following command: +$ cat /etc/issue + + Is it the case that it does not display the required banner? + + + + +To ensure a login warning banner is enabled, run the following: +$ grep banner-message-enable /etc/dconf/db/gdm.d/* +If properly configured, the output should be true. +To ensure a login warning banner is locked and cannot be changed by a user, run the following: +$ grep banner-message-enable /etc/dconf/db/gdm.d/locks/* +If properly configured, the output should be /org/gnome/login-screen/banner-message-enable. + + Is it the case that it is not? + + + + +To ensure the login warning banner text is properly set, run the following: +$ grep banner-message-text /etc/dconf/db/gdm.d/* +If properly configured, the proper banner text will appear. +To ensure the login warning banner text is locked and cannot be changed by a user, run the following: +$ grep banner-message-enable /etc/dconf/db/gdm.d/locks/* +If properly configured, the output should be /org/gnome/login-screen/banner-message-text. + + Is it the case that it does not? + + + + +To verify that clients cannot automatically update DNS records, perform the +following: +$ grep -i dhcp_hostname /etc/sysconfig/network-scripts/ifcfg-* +$ grep -rni "send host-name" /etc/dhclient.conf /etc/dhcp +The output should return no results. + + Is it the case that client Dynamic DNS updates are not disabled? + + + + + + The status of the net.ipv4.conf.default.send_redirects kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.default.send_redirects + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.all.send_redirects kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.all.send_redirects + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + The status of the net.ipv4.ip_forward kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.ip_forward + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + +The ability to forward packets is only appropriate for routers. + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.all.accept_source_route kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.all.accept_source_route + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.all.accept_redirects kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.all.accept_redirects + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.all.secure_redirects kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.all.secure_redirects + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.all.log_martians kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.all.log_martians + The output of the command should indicate a value of 1. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.default.log_martians kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.default.log_martians + The output of the command should indicate a value of 1. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.default.accept_source_route kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.default.accept_source_route + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.default.accept_redirects kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.default.accept_redirects + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.default.secure_redirects kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.default.secure_redirects + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.icmp_echo_ignore_broadcasts kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.icmp_echo_ignore_broadcasts + The output of the command should indicate a value of 1. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.icmp_ignore_bogus_error_responses kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.icmp_ignore_bogus_error_responses + The output of the command should indicate a value of 1. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.tcp_syncookies kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.tcp_syncookies + The output of the command should indicate a value of 1. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.all.rp_filter kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.all.rp_filter + The output of the command should indicate a value of 1. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv4.conf.default.rp_filter kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv4.conf.default.rp_filter + The output of the command should indicate a value of 1. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + To check that the bluetooth service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled bluetooth + Output should indicate the bluetooth service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled bluetoothdisabled + + Run the following command to verify bluetooth is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active bluetooth + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + +If the system is configured to prevent the loading of the +bluetooth kernel module, +it will contain lines inside any file in /etc/modprobe.d or the deprecated/etc/modprobe.conf. +These lines instruct the module loading system to run another program (such as +/bin/true) upon a module install event. +Run the following command to search for such lines in all files in /etc/modprobe.d +and the deprecated /etc/modprobe.conf: +preserve$ grep -r bluetooth /etc/modprobe.conf /etc/modprobe.d + + Is it the case that no line is returned? + + + + +If the system uses IPv6, this is not applicable. + +If the system is configured to prevent the usage of the +ipv6 on network interfaces, it will contain a line +of the form: +net.ipv6.conf.all.disable_ipv6 = 1 +Such lines may be inside any file in the /etc/sysctl.d directory. +This permits insertion of the IPv6 kernel module (which other parts of +the system expect to be present), but otherwise keeps all network interfaces +from using IPv6. +Run the following command to search for such +lines in all files in /etc/sysctl.d: +preserve$ grep -r ipv6 /etc/sysctl.d + + Is it the case that the ipv6 support is disabled on network interfaces? + + + + + + The status of the net.ipv6.conf.all.accept_source_route kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv6.conf.all.accept_source_route + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv6.conf.all.accept_ra kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv6.conf.all.accept_ra + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv6.conf.default.accept_ra kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv6.conf.default.accept_ra + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv6.conf.all.accept_redirects kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv6.conf.all.accept_redirects + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv6.conf.default.accept_redirects kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv6.conf.default.accept_redirects + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + + The status of the net.ipv6.conf.default.accept_source_route kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv6.conf.default.accept_source_route + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + + + Is it the case that the correct value is not returned? + + + + + The status of the net.ipv6.conf.all.forwarding kernel parameter can be queried + by running the following command: + preserve$ sysctl net.ipv6.conf.all.forwarding + The output of the command should indicate a value of 0. + If this value is not the default value, investigate how it could have been + adjusted at runtime, and verify it is not set improperly in + /etc/sysctl.conf. + +The ability to forward packets is only appropriate for routers. + + Is it the case that the correct value is not returned? + + + + + + Run the following command to determine the current status of the +firewalld service: + $ systemctl is-active firewalld + If the service is running, it should return the following: active + + Is it the case that ? + + + + +Inspect the file /etc/firewalld/firewalld.conf to determine +the default zone for the firewalld. It should be set to DefaultZone=drop: +$ sudo grep DefaultZone /etc/firewalld/firewalld.conf + + Is it the case that the default zone is not set to DROP? + + + + + +If the system is configured to prevent the loading of the +dccp kernel module, +it will contain lines inside any file in /etc/modprobe.d or the deprecated/etc/modprobe.conf. +These lines instruct the module loading system to run another program (such as +/bin/true) upon a module install event. +Run the following command to search for such lines in all files in /etc/modprobe.d +and the deprecated /etc/modprobe.conf: +preserve$ grep -r dccp /etc/modprobe.conf /etc/modprobe.d + + Is it the case that no line is returned? + + + + + +If the system is configured to prevent the loading of the +sctp kernel module, +it will contain lines inside any file in /etc/modprobe.d or the deprecated/etc/modprobe.conf. +These lines instruct the module loading system to run another program (such as +/bin/true) upon a module install event. +Run the following command to search for such lines in all files in /etc/modprobe.d +and the deprecated /etc/modprobe.conf: +preserve$ grep -r sctp /etc/modprobe.conf /etc/modprobe.d + + Is it the case that no line is returned? + + + + + + Run the following command to determine if the libreswan package is installed: + $ rpm -q libreswan + + Is it the case that the package is not installed? + + + + +To check for configured IPsec connections (conn), perform the following: +grep -rni conn /etc/ipsec.conf /etc/ipsec.d/ +Verify any returned results for organizational approval. + + Is it the case that the IPSec tunnels are not approved? + + + + + + Run the following command to determine if the rsyslog package is installed: + $ rpm -q rsyslog + + Is it the case that the package is not installed? + + + + + + Run the following command to determine the current status of the +rsyslog service: + $ systemctl is-active rsyslog + If the service is running, it should return the following: active + + Is it the case that ? + + + + +The owner of all log files written by rsyslog should be root. +These log files are determined by the second part of each Rule line in +/etc/rsyslog.conf and typically all appear in /var/log. +To see the owner of a given log file, run the following command: +$ ls -l LOGFILE + + Is it the case that the owner is not root? + + + + +The group-owner of all log files written by rsyslog should be root. +These log files are determined by the second part of each Rule line in +/etc/rsyslog.conf and typically all appear in /var/log. +To see the group-owner of a given log file, run the following command: +$ ls -l LOGFILE + + Is it the case that the group-owner is not root? + + + + +The file permissions for all log files written by rsyslog +should be set to 600, or more restrictive. +These log files are determined by the second part of each Rule line in +/etc/rsyslog.conf and typically all appear in /var/log. +To see the permissions of a given log file, run the following command: +$ ls -l LOGFILE +The permissions should be 600, or more restrictive. + + Is it the case that the permissions are not correct? + + + + +To ensure logs are sent to a remote host, examine the file +/etc/rsyslog.conf. +If using UDP, a line similar to the following should be present: + *.* @loghost.example.com +If using TCP, a line similar to the following should be present: + *.* @@loghost.example.com +If using RELP, a line similar to the following should be present: + *.* :omrelp:loghost.example.com + + Is it the case that none of these are present? + + + + +To determine the status and frequency of logrotate, run the following command: +$ sudo grep logrotate /var/log/cron* +If logrotate is configured properly, output should include references to +/etc/cron.daily. + + Is it the case that logrotate is not configured to run daily? + + + + + + Run the following command to determine the current status of the +auditd service: + $ systemctl is-active auditd + If the service is running, it should return the following: active + + Is it the case that ? + + + + +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. + + Is it the case that auditing is not enabled at boot time? + + + + +Inspect /etc/audit/auditd.conf and locate the following line to +determine how many logs the system is configured to retain after rotation: +$ sudo grep num_logs /etc/audit/auditd.conf +num_logs = 5 + + Is it the case that the system log file retention has not been properly configured? + + + + +Inspect /etc/audit/auditd.conf and locate the following line to +determine how much data the system will retain in each audit log file: +$ sudo grep max_log_file /etc/audit/auditd.conf +max_log_file = 8 +max_log_file_action = ROTATE + + Is it the case that the system audit data threshold has not been properly configured? + + + + +Inspect /etc/audit/auditd.conf and locate the following line to +determine if the system is configured to rotate logs when they reach their +maximum size: +$ sudo grep max_log_file_action /etc/audit/auditd.conf +max_log_file_action = ROTATE + + Is it the case that the system has not been properly configured to rotate audit logs? + + + + +Inspect /etc/audit/auditd.conf and locate the following line to +determine if the system is configured to email the administrator when +disk space is starting to run low: +$ sudo grep space_left_action /etc/audit/auditd.conf +space_left_action = SYSLOG +admin_space_left_action = SUSPEND +Acceptable values are email, suspend, single, and halt. + + Is it the case that the system is not configured to send an email to the system administrator when disk space is starting to run low? + + + + +Inspect /etc/audit/auditd.conf and locate the following line to +determine if the system is configured to either suspend, switch to single user mode, +or halt when disk space has run low: +admin_space_left_action single + + Is it the case that the system is not configured to switch to single user mode for corrective action? + + + + +Inspect /etc/audit/auditd.conf and locate the following line to +determine if the system is configured to send email to an +account when it needs to notify an administrator: +action_mail_acct = root + + Is it the case that auditd is not configured to send emails per identified actions? + + + + +Inspect /etc/audit/auditd.conf and locate the following line to +determine if the system is configured to synchronize audit event data +with the log files on the disk: +$ sudo grep flush /etc/audit/auditd.conf +flush = DATA +Acceptable values are DATA, and SYNC. The setting is +case-insensitive. + + Is it the case that auditd is not configured to synchronously write audit event data to disk? + + + + +To verify the audispd's syslog plugin is active, run the following command: +$ sudo grep active /etc/audisp/plugins.d/syslog.conf +If the plugin is active, the output will show yes. + + Is it the case that it is not? + + + + + +To determine if the system is configured to audit calls to +the adjtimex +system call, run the following command: +preserve$ sudo grep "adjtimex" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that the system is not configured to audit time changes? + + + + + +To determine if the system is configured to audit calls to +the settimeofday +system call, run the following command: +preserve$ sudo grep "settimeofday" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that the system is not configured to audit time changes? + + + + +If the system is not configured to audit time changes, this is a finding. +If the system is 64-bit only, this is not applicable + +To determine if the system is configured to audit calls to +the stime +system call, run the following command: +preserve$ sudo grep "stime" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that the system is not configured to audit time changes? + + + + + +To determine if the system is configured to audit calls to +the clock_settime +system call, run the following command: +preserve$ sudo grep "clock_settime" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that the system is not configured to audit time changes? + + + + +To determine if the system is configured to audit attempts to +alter time via the /etc/localtime file, run the following +command: +$ sudo auditctl -l | grep "watch=/etc/localtime" +If the system is configured to audit this activity, it will return a line. + + Is it the case that the system is not configured to audit time changes? + + + + +To determine if the system is configured to audit account changes, +run the following command: +auditctl -l | egrep '(/etc/passwd|/etc/shadow|/etc/group|/etc/gshadow|/etc/security/opasswd)' +If the system is configured to watch for account changes, lines should be returned for +each file specified (and with perm=wa for each). + + Is it the case that the system is not configured to audit account changes? + + + + +To determine if the system is configured to audit changes to its network configuration, +run the following command: +auditctl -l | egrep '(/etc/issue|/etc/issue.net|/etc/hosts|/etc/sysconfig/network)' +If the system is configured to watch for network configuration changes, a line should be returned for +each file specified (and perm=wa should be indicated for each). + + Is it the case that the system is not configured to audit changes of the network configuration? + + + + +Run the following command to check the mode of the system audit logs: +$ sudo ls -l /var/log/audit +Audit logs must be mode 0640 or less permissive. + + Is it the case that any are more permissive? + + + + + + To check the ownership of /var/log, run the command: + $ ls -lL /var/log + If properly configured, the output should indicate the following owner: + root + + Is it the case that it does not? + + + + +To determine if the system is configured to audit changes to its SELinux +configuration files, run the following command: +$ sudo auditctl -l | grep "dir=/etc/selinux" +If the system is configured to watch for changes to its SELinux +configuration, a line should be returned (including +perm=wa indicating permissions that are watched). + + Is it the case that the system is not configured to audit attempts to change the MAC policy? + + + + + +To determine if the system is configured to audit calls to +the chmod +system call, run the following command: +preserve$ sudo grep "chmod" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that the system is not configured to audit permission changes? + + + + + +To determine if the system is configured to audit calls to +the chown +system call, run the following command: +preserve$ sudo grep "chown" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the fchmod +system call, run the following command: +preserve$ sudo grep "fchmod" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the fchmodat +system call, run the following command: +preserve$ sudo grep "fchmodat" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the fchown +system call, run the following command: +preserve$ sudo grep "fchown" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the fchownat +system call, run the following command: +preserve$ sudo grep "fchownat" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the fremovexattr +system call, run the following command: +preserve$ sudo grep "fremovexattr" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the fsetxattr +system call, run the following command: +preserve$ sudo grep "fsetxattr" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the lchown +system call, run the following command: +preserve$ sudo grep "lchown" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the lremovexattr +system call, run the following command: +preserve$ sudo grep "lremovexattr" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the lsetxattr +system call, run the following command: +preserve$ sudo grep "lsetxattr" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the removexattr +system call, run the following command: +preserve$ sudo grep "removexattr" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + + +To determine if the system is configured to audit calls to +the setxattr +system call, run the following command: +preserve$ sudo grep "setxattr" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + +To verify that the audit system collects unauthorized file accesses, run the following commands: +$ sudo grep EACCES /etc/audit/audit.rules +$ sudo grep EPERM /etc/audit/audit.rules + + Is it the case that 32-bit and 64-bit system calls to creat, open, openat, open_by_handle_at, truncate, and ftruncate are not audited during EACCES and EPERM? + + + + +To verify that auditing of privileged command use is configured, run the +following command for each local partition PART to find relevant +setuid / setgid programs: +$ sudo find PART -xdev -type f -perm -4000 -o -type f -perm -2000 2>/dev/null +Run the following command to verify entries in the audit rules for all programs +found with the previous command: +$ sudo grep path /etc/audit/audit.rules +It should be the case that all relevant setuid / setgid programs have a line +in the audit rules. + + Is it the case that it is not the case? + + + + +To verify that auditing is configured for all media exportation events, run the following command: +$ sudo auditctl -l | grep syscall | grep mount + + Is it the case that there is not output? + + + + + +To determine if the system is configured to audit calls to +the rmdir +system call, run the following command: +preserve$ sudo grep "rmdir" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + +To determine if the system is configured to audit calls to +the unlink +system call, run the following command: +preserve$ sudo grep "unlink" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + +To determine if the system is configured to audit calls to +the unlinkat +system call, run the following command: +preserve$ sudo grep "unlinkat" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + +To determine if the system is configured to audit calls to +the rename +system call, run the following command: +preserve$ sudo grep "rename" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + +To determine if the system is configured to audit calls to +the renameat +system call, run the following command: +preserve$ sudo grep "renameat" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + +To verify that auditing is configured for system administrator actions, run the following command: +$ sudo auditctl -l | grep "watch=/etc/sudoers" + + Is it the case that there is not output? + + + + + +To determine if the system is configured to audit calls to +the init_module +system call, run the following command: +preserve$ sudo grep "init_module" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + +To determine if the system is configured to audit calls to +the delete_module +system call, run the following command: +preserve$ sudo grep "delete_module" /etc/audit/audit.rules +If the system is configured to audit this activity, it will return a line. + + + Is it the case that no line is returned? + + + + +If network services are using the xinetd service, this is not applicable. + + + To check that the xinetd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled xinetd + Output should indicate the xinetd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled xinetddisabled + + Run the following command to verify xinetd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active xinetd + + If the service is not running the command will return the following output: + inactive + Is it the case that ? + + + + +If network services are using the xinetd service, this is not applicable. + + + Run the following command to determine if the xinetd package is installed: + $ rpm -q xinetd + Is it the case that the package is installed? + + + + + + Run the following command to determine if the tcp_wrappers package is installed: + $ rpm -q tcp_wrappers + + Is it the case that the package is not installed? + + + + + + To check that the telnet socket is disabled in system boot configuration with systemd, run the following command: + $ systemctl is-enabled telnet + Output should indicate the telnet socket has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled telnetdisabled + + Run the following command to verify telnet is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active telnet + + If the socket is not running the command will return the following output: + inactive + + To check that the telnet service is disabled in system boot configuration with xinetd, run the following command: + $ chkconfig telnet --list + Output should indicate the telnet service has either not been installed, or has been disabled, as shown in the example below: + $ chkconfig telnet --list + + Note: This output shows SysV services only and does not include native + systemd services. SysV configuration data might be overridden by native + systemd configuration. + + If you want to list systemd services use 'systemctl list-unit-files'. + To see services enabled on particular target use + 'systemctl list-dependencies [target]'. + + telnet off + + Is it the case that ? + + + + + + Run the following command to determine if the telnet-server package is installed: + $ rpm -q telnet-server + + Is it the case that the package is installed? + + + + + + The telnet package can be removed with the following command: + $ sudo yum erase telnet + + Is it the case that ? + + + + + + Run the following command to determine if the rsh-server package is installed: + $ rpm -q rsh-server + + Is it the case that the package is installed? + + + + + + To check that the rexec socket is disabled in system boot configuration with systemd, run the following command: + $ systemctl is-enabled rexec + Output should indicate the rexec socket has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled rexecdisabled + + Run the following command to verify rexec is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active rexec + + If the socket is not running the command will return the following output: + inactive + + To check that the rexec service is disabled in system boot configuration with xinetd, run the following command: + $ chkconfig rexec --list + Output should indicate the rexec service has either not been installed, or has been disabled, as shown in the example below: + $ chkconfig rexec --list + + Note: This output shows SysV services only and does not include native + systemd services. SysV configuration data might be overridden by native + systemd configuration. + + If you want to list systemd services use 'systemctl list-unit-files'. + To see services enabled on particular target use + 'systemctl list-dependencies [target]'. + + rexec off + + Is it the case that ? + + + + + + To check that the rsh socket is disabled in system boot configuration with systemd, run the following command: + $ systemctl is-enabled rsh + Output should indicate the rsh socket has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled rshdisabled + + Run the following command to verify rsh is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active rsh + + If the socket is not running the command will return the following output: + inactive + + To check that the rsh service is disabled in system boot configuration with xinetd, run the following command: + $ chkconfig rsh --list + Output should indicate the rsh service has either not been installed, or has been disabled, as shown in the example below: + $ chkconfig rsh --list + + Note: This output shows SysV services only and does not include native + systemd services. SysV configuration data might be overridden by native + systemd configuration. + + If you want to list systemd services use 'systemctl list-unit-files'. + To see services enabled on particular target use + 'systemctl list-dependencies [target]'. + + rsh off + + Is it the case that ? + + + + + + The rsh package can be removed with the following command: + $ sudo yum erase rsh + + Is it the case that ? + + + + + + To check that the rlogin socket is disabled in system boot configuration with systemd, run the following command: + $ systemctl is-enabled rlogin + Output should indicate the rlogin socket has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled rlogindisabled + + Run the following command to verify rlogin is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active rlogin + + If the socket is not running the command will return the following output: + inactive + + To check that the rlogin service is disabled in system boot configuration with xinetd, run the following command: + $ chkconfig rlogin --list + Output should indicate the rlogin service has either not been installed, or has been disabled, as shown in the example below: + $ chkconfig rlogin --list + + Note: This output shows SysV services only and does not include native + systemd services. SysV configuration data might be overridden by native + systemd configuration. + + If you want to list systemd services use 'systemctl list-unit-files'. + To see services enabled on particular target use + 'systemctl list-dependencies [target]'. + + rlogin off + + Is it the case that ? + + + + +The existence of the file /etc/hosts.equiv or a file named +.rhosts inside a user home directory indicates the presence +of an Rsh trust relationship. + + Is it the case that these files exist? + + + + + + Run the following command to determine if the ypserv package is installed: + $ rpm -q ypserv + + Is it the case that the package is installed? + + + + + + To check that the ypbind service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled ypbind + Output should indicate the ypbind service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled ypbinddisabled + + Run the following command to verify ypbind is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active ypbind + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + The ypbind package can be removed with the following command: + $ sudo yum erase ypbind + + Is it the case that ? + + + + + + To check that the tftp service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled tftp + Output should indicate the tftp service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled tftpdisabled + + Run the following command to verify tftp is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active tftp + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the tftp-server package is installed: + $ rpm -q tftp-server + + Is it the case that the package is installed? + + + + + + The tftp package can be removed with the following command: + $ sudo yum erase tftp + + Is it the case that ? + + + + +If TFTP is not installed, this is not applicable. To determine if TFTP is installed, +run the following command: +$ rpm -qa | grep tftp + +Verify tftp is configured by with the -s option by running the +following command: +grep "server_args" /etc/xinetd.d/tftp +The output should indicate the server_args variable is configured with the -s +flag, matching the example below: +$ grep "server_args" /etc/xinetd.d/tftp +server_args = -s /var/lib/tftpboot + + Is it the case that this flag is missing? + + + + + + Run the following command to determine if the talk-server package is installed: + $ rpm -q talk-server + + Is it the case that the package is installed? + + + + + + Run the following command to determine if the talk package is installed: + $ rpm -q talk + + Is it the case that the package is installed? + + + + + + To check that the abrtd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled abrtd + Output should indicate the abrtd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled abrtddisabled + + Run the following command to verify abrtd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active abrtd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the acpid service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled acpid + Output should indicate the acpid service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled acpiddisabled + + Run the following command to verify acpid is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active acpid + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the certmonger service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled certmonger + Output should indicate the certmonger service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled certmongerdisabled + + Run the following command to verify certmonger is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active certmonger + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the cgconfig service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled cgconfig + Output should indicate the cgconfig service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled cgconfigdisabled + + Run the following command to verify cgconfig is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active cgconfig + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the cgred service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled cgred + Output should indicate the cgred service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled cgreddisabled + + Run the following command to verify cgred is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active cgred + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the cpupower service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled cpupower + Output should indicate the cpupower service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled cpupowerdisabled + + Run the following command to verify cpupower is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active cpupower + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the irqbalance service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled irqbalance + Output should indicate the irqbalance service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled irqbalancedisabled + + Run the following command to verify irqbalance is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active irqbalance + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the kdump service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled kdump + Output should indicate the kdump service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled kdumpdisabled + + Run the following command to verify kdump is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active kdump + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the mdmonitor service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled mdmonitor + Output should indicate the mdmonitor service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled mdmonitordisabled + + Run the following command to verify mdmonitor is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active mdmonitor + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the messagebus service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled messagebus + Output should indicate the messagebus service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled messagebusdisabled + + Run the following command to verify messagebus is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active messagebus + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the netconsole service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled netconsole + Output should indicate the netconsole service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled netconsoledisabled + + Run the following command to verify netconsole is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active netconsole + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the ntpdate service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled ntpdate + Output should indicate the ntpdate service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled ntpdatedisabled + + Run the following command to verify ntpdate is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active ntpdate + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the oddjobd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled oddjobd + Output should indicate the oddjobd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled oddjobddisabled + + Run the following command to verify oddjobd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active oddjobd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the portreserve service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled portreserve + Output should indicate the portreserve service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled portreservedisabled + + Run the following command to verify portreserve is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active portreserve + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the psacct service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled psacct + Output should indicate the psacct service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled psacctdisabled + + Run the following command to verify psacct is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active psacct + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the qpidd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled qpidd + Output should indicate the qpidd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled qpidddisabled + + Run the following command to verify qpidd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active qpidd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the quota_nld service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled quota_nld + Output should indicate the quota_nld service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled quota_nlddisabled + + Run the following command to verify quota_nld is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active quota_nld + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the rdisc service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled rdisc + Output should indicate the rdisc service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled rdiscdisabled + + Run the following command to verify rdisc is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active rdisc + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the rhnsd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled rhnsd + Output should indicate the rhnsd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled rhnsddisabled + + Run the following command to verify rhnsd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active rhnsd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the rhsmcertd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled rhsmcertd + Output should indicate the rhsmcertd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled rhsmcertddisabled + + Run the following command to verify rhsmcertd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active rhsmcertd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the saslauthd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled saslauthd + Output should indicate the saslauthd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled saslauthddisabled + + Run the following command to verify saslauthd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active saslauthd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the smartd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled smartd + Output should indicate the smartd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled smartddisabled + + Run the following command to verify smartd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active smartd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the sysstat service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled sysstat + Output should indicate the sysstat service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled sysstatdisabled + + Run the following command to verify sysstat is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active sysstat + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine the current status of the +crond service: + $ systemctl is-active crond + If the service is running, it should return the following: active + + Is it the case that ? + + + + + + Run the following command to determine if the cronie-anacron package is installed: + $ rpm -q cronie-anacron + + Is it the case that the package is installed? + + + + + + To check that the atd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled atd + Output should indicate the atd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled atddisabled + + Run the following command to verify atd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active atd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the openssh-server package is installed: + $ rpm -q openssh-server + + Is it the case that the package is not installed? + + + + + + Run the following command to determine the current status of the +sshd service: + $ systemctl is-active sshd + If the service is running, it should return the following: active + + Is it the case that ? + + + + + + To check the permissions of /etc/ssh/*.pub, run the command: + $ ls -l /etc/ssh/*.pub + If properly configured, the output should indicate the following permissions: + -rw-r--r-- + + Is it the case that it does not? + + + + + + To check the permissions of /etc/ssh/*_key, run the command: + $ ls -l /etc/ssh/*_key + If properly configured, the output should indicate the following permissions: + -rw------- + + Is it the case that it does not? + + + + +To check which SSH protocol version is allowed, run the following command: +$ sudo grep Protocol /etc/ssh/sshd_config +If configured properly, output should be Protocol 2 + + Is it the case that it is commented out or is not set correctly to Protocol 2? + + + + +To check if GSSAPIAuthentication is disabled or set correctly, run the following +command: +$ sudo grep GSSAPIAuthentication /etc/ssh/sshd_config +If configured properly, output should be no + + Is it the case that it is commented out or is not disabled? + + + + +To check if KerberosAuthentication is disabled or set correctly, run the +following command: +$ sudo grep KerberosAuthentication /etc/ssh/sshd_config +If configured properly, output should be no + + Is it the case that it is commented out or is not disabled? + + + + +To check if StrictModes is enabled or set correctly, run the +following command: +$ sudo grep StrictModes /etc/ssh/sshd_config +If configured properly, output should be yes + + Is it the case that it is commented out or is not enabled? + + + + +To check if UsePrivilegeSeparation is enabled or set correctly, run the +following command: +$ sudo grep UsePrivilegeSeparation /etc/ssh/sshd_config +If configured properly, output should be yes + + Is it the case that it is commented out or is not enabled? + + + + +To check if compression is enabled or set correctly, run the +following command: +$ sudo grep Compression /etc/ssh/sshd_config +If configured properly, output should be no or delayed. + + Is it the case that it is commented out or is not set to no or delayed? + + + + +To check if PrintLastLog is enabled or set correctly, run the +following command: +$ sudo grep PrintLastLog /etc/ssh/sshd_config +If configured properly, output should be yes + + Is it the case that it is commented out or is not enabled? + + + + +Run the following command to see what the timeout interval is: +$ sudo grep ClientAliveInterval /etc/ssh/sshd_config +If properly configured, the output should be: +ClientAliveInterval 600 + + Is it the case that it is commented out or not configured properly? + + + + +To ensure the SSH idle timeout will occur when the ClientAliveCountMax is set, run the following command: +$ sudo grep ClientAliveCountMax /etc/ssh/sshd_config +If properly configured, output should be: +ClientAliveCountMax 0 + + Is it the case that it is commented out or not configured properly? + + + + + + To determine how the SSH daemon's + IgnoreRhosts + option is set, run the following command: + preserve$ sudo grep -i IgnoreRhosts /etc/ssh/sshd_config + If no line, a commented line, or a line indicating the value + yes is returned, then the required value is set. + + + Is it the case that the required value is not set? + + + + + + To determine how the SSH daemon's + HostbasedAuthentication + option is set, run the following command: + preserve$ sudo grep -i HostbasedAuthentication /etc/ssh/sshd_config + If no line, a commented line, or a line indicating the value + no is returned, then the required value is set. + + + Is it the case that the required value is not set? + + + + + + To determine how the SSH daemon's + X11Forwarding + option is set, run the following command: + preserve$ sudo grep -i X11Forwarding /etc/ssh/sshd_config + If a line indicating yes is returned, then the required value is set. + + + Is it the case that the required value is not set? + + + + + + To determine how the SSH daemon's + PermitRootLogin + option is set, run the following command: + preserve$ sudo grep -i PermitRootLogin /etc/ssh/sshd_config + If a line indicating no is returned, then the required value is set. + + + Is it the case that the required value is not set? + + + + + + To determine how the SSH daemon's + PermitEmptyPasswords + option is set, run the following command: + preserve$ sudo grep -i PermitEmptyPasswords /etc/ssh/sshd_config + If no line, a commented line, or a line indicating the value + no is returned, then the required value is set. + + + Is it the case that the required value is not set? + + + + + + To determine how the SSH daemon's + Banner + option is set, run the following command: + preserve$ sudo grep -i Banner /etc/ssh/sshd_config + If a line indicating /etc/issue is returned, then the required value is set. + + + Is it the case that the required value is not set? + + + + +To ensure users are not able to present environment daemons, run the following command: +$ sudo grep PermitUserEnvironment /etc/ssh/sshd_config +If properly configured, output should be: +PermitUserEnvironment no + + Is it the case that PermitUserEnvironment is not disabled? + + + + +Only FIPS-approved ciphers should be used. To verify that only FIPS-approved +ciphers are in use, run the following command: +$ sudo grep Ciphers /etc/ssh/sshd_config +The output should contain only those ciphers which are FIPS-approved, namely, +aes128-ctr,aes192-ctr,aes256-ctr + + Is it the case that FIPS ciphers are not configured or the enabled ciphers are not FIPS-approved? + + + + +Only FIPS-approved MACs should be used. To verify that only FIPS-approved +MACs are in use, run the following command: +$ sudo grep -i macs /etc/ssh/sshd_config +The output should contain only those MACs which are FIPS-approved, namely, +hmac-sha2-512 and hmac-sha2-256 hash functions. + + + Is it the case that MACs option is commented out or not using FIPS-approved hash algorithms? + + + + + + Run the following command to determine if the sssd package is installed: + $ rpm -q sssd + + Is it the case that the package is not installed? + + + + + + Run the following command to determine the current status of the +sssd service: + $ systemctl is-active sssd + If the service is running, it should return the following: active + + Is it the case that ? + + + + +To verify that SSSD's in-memory cache expires after a day, run the following command: +$ sudo grep memcache_timeout /etc/sssd/sssd.conf +If configured properly, output should be memcache_timeout = 86400. + + Is it the case that it does not exist or is not configured properly? + + + + +To verify that SSSD expires offline credentials, run the following command: +$ sudo grep offline_credentials_expiration +If configured properly, output should be +offline_credentials_expiration = 1 + + Is it the case that it does not exist or is not configured properly? + + + + +To verify that SSSD expires known SSH host keys, run the following command: +$ sudo grep ssh_known_hosts_timeout +If configured properly, output should be +ssh_known_hosts_timeout = 86400 + + Is it the case that it does not exist or is not configured properly? + + + + +To verify the default target is multi-user, run the following command: +$ systemctl get-default +The output should show the following: +multi-user.target + + Is it the case that the X windows display server is running and/or has not been disabled? + + + + +To ensure the X Windows package group is removed, run the following command: +$ rpm -qi xorg-x11-server-common +The output should be: +package xorg-x11-server-common is not installed + + Is it the case that the X Windows package group or xorg-x11-server-common has not be removed? + + + + + + To check that the avahi-daemon service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled avahi-daemon + Output should indicate the avahi-daemon service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled avahi-daemondisabled + + Run the following command to verify avahi-daemon is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active avahi-daemon + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the cups service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled cups + Output should indicate the cups service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled cupsdisabled + + Run the following command to verify cups is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active cups + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + To check that the dhcpd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled dhcpd + Output should indicate the dhcpd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled dhcpddisabled + + Run the following command to verify dhcpd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active dhcpd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the dhcp package is installed: + $ rpm -q dhcp + + Is it the case that the package is installed? + + + + +To verify that DHCP is not being used, examine the following file for each interface: +# /etc/sysconfig/network-scripts/ifcfg-interface +Look for the following: +BOOTPROTO=none +and the following, substituting the appropriate values based on your site's addressing scheme: +NETMASK=255.255.255.0 +IPADDR=192.168.1.2 +GATEWAY=192.168.1.1 + + Is it the case that it does not? + + + + + + Run the following command to determine the current status of the +chronyd service: + $ systemctl is-active chronyd + If the service is running, it should return the following: active + + Run the following command to determine the current status of the +ntpd service: + $ systemctl is-active ntpd + If the service is running, it should return the following: active + + Is it the case that ? + + + + +To verify that a remote NTP service is configured for time synchronization, +open the following file: +/etc/chrony.conf in the case the system in question is +configured to use the chronyd as the NTP daemon (default setting)/etc/ntp.conf in the case the system in question is configured +to use the ntpd as the NTP daemon +In the file, there should be a section similar to the following: +server ntpserver + + Is it the case that this is not the case? + + + + + + Run the following command to determine the current status of the +postfix service: + $ systemctl is-active postfix + If the service is running, it should return the following: active + + Is it the case that the system is not a cross domain solution and the service is not enabled? + + + + + + Run the following command to determine if the sendmail package is installed: + $ rpm -q sendmail + + Is it the case that the package is installed? + + + + +Run the following command to ensure postfix accepts mail messages from only the local system: +$ grep inet_interfaces /etc/postfix/main.cf +If properly configured, the output should show only localhost. + + Is it the case that it does not? + + + + +To ensure LDAP is configured to use TLS for all transactions, run the following command: +$ grep start_tls /etc/nslcd.conf + + Is it the case that no lines are returned? + + + + +To ensure TLS is configured with trust certificates, run the following command: +$ grep cert /etc/nslcd.conf + + Is it the case that there is no output, or the lines are commented out? + + + + +To verify the openldap-servers package is not installed, +run the following command: +$ rpm -q openldap-servers +The output should show the following: +package openldap-servers is not installed + + Is it the case that it does not? + + + + +Inspect the mounts configured in /etc/exports. Each mount should specify a value +greater than UID_MAX and GID_MAX as defined in /etc/login.defs. + + Is it the case that anonuid or anongid are not set to a value greater than UID_MAX (for anonuid) and GID_MAX (for anongid)? + + + + +It is prudent to ensure the nfs service is disabled in system boot, as well as +not currently running. First, run the following to verify the service is stopped: +$ service nfs status +If the service is stopped or disabled, it will return the following: +rpc.svcgssd is stopped +rpc.mountd is stopped +nfsd is stopped +rpc.rquotad is stopped +To verify that the nfs service is disabled, run the following command: +$ chkconfig --list nfs +If properly configured, the output should look like: +nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off + + Is it the case that it does not? + + + + + + To check that the rpcsvcgssd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled rpcsvcgssd + Output should indicate the rpcsvcgssd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled rpcsvcgssddisabled + + Run the following command to verify rpcsvcgssd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active rpcsvcgssd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + +To verify the nodev option is configured for all NFS mounts, run the following command: +$ mount | grep nfs +All NFS mounts should show the nodev setting in parentheses. This is not applicable if NFS is +not implemented. + + Is it the case that the setting does not show? + + + + +To verify the nosuid option is configured for all NFS mounts, run the following command: +$ mount | grep nfs +All NFS mounts should show the nosuid setting in parentheses. This is not applicable if NFS is +not implemented. + + Is it the case that the setting does not show? + + + + +To verify the sec option is configured for all NFS mounts, run the following command: +$ mount | grep "sec=" +All NFS mounts should show the sec=krb5:krb5i:krb5p setting in parentheses. +This is not applicable if NFS is not implemented. + + Is it the case that the setting is not configured, has the 'sys' option added, or does not have all Kerberos options added? + + + + +To verify insecure file locking has been disabled, run the following command: +$ grep insecure_locks /etc/exports + + Is it the case that there is output? + + + + +To verify the sec option is configured for all NFS mounts, run the following command: +$ grep "sec=" /etc/exports +All configured NFS exports should show the sec=krb5:krb5i:krb5p setting in parentheses. +This is not applicable if NFS is not implemented. + + Is it the case that the setting is not configured, has the 'sys' option added, or does not have all Kerberos options added? + + + + + + To check that the named service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled named + Output should indicate the named service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled nameddisabled + + Run the following command to verify named is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active named + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the bind package is installed: + $ rpm -q bind + + Is it the case that the package is installed? + + + + + + To check that the vsftpd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled vsftpd + Output should indicate the vsftpd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled vsftpddisabled + + Run the following command to verify vsftpd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active vsftpd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the vsftpd package is installed: + $ rpm -q vsftpd + + Is it the case that the package is installed? + + + + +Find if logging is applied to the FTP daemon. + +Procedures: + +If vsftpd is started by xinetd the following command will indicate the xinetd.d startup file: +$ grep vsftpd /etc/xinetd.d/* +$ grep server_args vsftpd xinetd.d startup file +This will indicate the vsftpd config file used when starting through xinetd. +If the server_args line is missing or does not include the vsftpd configuration file, then the default config file (/etc/vsftpd/vsftpd.conf) is used. +$ sudo grep xferlog_enable vsftpd config file + + Is it the case that xferlog_enable is missing, or is not set to yes? + + + + +If FTP services are not installed, this is not applicable. + +To verify this configuration, run the following command: +grep "banner_file" /etc/vsftpd/vsftpd.conf + +The output should show the value of banner_file is set to /etc/issue, an example of which is shown below: +$ sudo grep "banner_file" /etc/vsftpd/vsftpd.conf +banner_file=/etc/issue + + Is it the case that it does not? + + + + + + To check that the httpd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled httpd + Output should indicate the httpd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled httpddisabled + + Run the following command to verify httpd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active httpd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the httpd package is installed: + $ rpm -q httpd + + Is it the case that the package is installed? + + + + + + To check that the dovecot service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled dovecot + Output should indicate the dovecot service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled dovecotdisabled + + Run the following command to verify dovecot is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active dovecot + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the dovecot package is installed: + $ rpm -q dovecot + + Is it the case that the package is installed? + + + + + + To check that the zebra service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled zebra + Output should indicate the zebra service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled zebradisabled + + Run the following command to verify zebra is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active zebra + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the quagga package is installed: + $ rpm -q quagga + + Is it the case that the package is installed? + + + + + + To check that the smb service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled smb + Output should indicate the smb service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled smbdisabled + + Run the following command to verify smb is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active smb + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the samba package is installed: + $ rpm -q samba + + Is it the case that the package is installed? + + + + +To verify that Samba clients running smbclient must use packet signing, run the following command: +$ grep signing /etc/samba/smb.conf +The output should show: +client signing = mandatory + + Is it the case that it is not? + + + + +To verify that Samba clients using mount.cifs must use packet signing, run the following command: +$ grep sec /etc/fstab +The output should show either krb5i or ntlmv2i in use. + + Is it the case that it does not? + + + + + + To check that the squid service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled squid + Output should indicate the squid service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled squiddisabled + + Run the following command to verify squid is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active squid + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the squid package is installed: + $ rpm -q squid + + Is it the case that the package is installed? + + + + + + To check that the snmpd service is disabled in system boot configuration, run the following command: + $ systemctl is-enabled snmpd + Output should indicate the snmpd service has either not been installed, + or has been disabled at all runlevels, as shown in the example below: + $ systemctl is-enabled snmpddisabled + + Run the following command to verify snmpd is not active (i.e. not running) through current runtime configuration: + $ systemctl is-active snmpd + + If the service is not running the command will return the following output: + inactive + + Is it the case that ? + + + + + + Run the following command to determine if the net-snmp package is installed: + $ rpm -q net-snmp + + Is it the case that the package is installed? + + + + +To ensure only SNMPv3 or newer is used, run the following command: +$ sudo grep 'rocommunity\|rwcommunity\|com2sec' /etc/snmp/snmpd.conf | grep -v "^#" +There should be no output. + + Is it the case that there is output? + + + + +To ensure the default password is not set, run the following command: +$ sudo grep -v "^#" /etc/snmp/snmpd.conf| grep -E 'public|private' +There should be no output. + + Is it the case that the default SNMP passwords public and private have not been changed or removed? + + + + RHEL7 supports this requirement and cannot be configured to be out of +compliance. This is a permanent not a finding. + + Is it the case that ? + + + + The RHEL7 auditing system supports this requirement and cannot be configured to be out of +compliance. Every audit record in RHEL includes a timestamp, the operation attempted, +success or failure of the operation, the subject involved (executable/process), +the object involved (file/path), and security labels for the subject and object. +It also includes the ability to label events with custom key labels. The auditing system +centralizes the recording of audit events for the entire system and includes +reduction (ausearch), reporting (aureport), and real-time +response (audispd) facilities. +This is a permanent not a finding. + + Is it the case that ? + + + + RHEL7 supports this requirement and cannot be configured to be out of +compliance. This is a permanent not a finding. + + Is it the case that ? + + + + +RHEL7 cannot support this requirement without assistance from an external +application, policy, or service. This requirement is NA. + + Is it the case that ? + + + + +This is a permanent finding. + + Is it the case that ? + + + + +RHEL7 cannot support this requirement without assistance from an external +application, policy, or service. This requirement is NA. + + Is it the case that ? + + + + +Ask an administrator if a process exists to promptly and automatically apply OS +software updates. If such a process does not exist, this is a finding. + +If the OS update process limits automatic updates of software packages, where +such updates would impede normal system operation, to scheduled maintenance +windows, but still within IAVM-dictated timeframes, this is not a finding. + + Is it the case that ? + + + + TBD + Is it the case that ? + + + + RHEL7 supports this requirement and cannot be configured to be out of +compliance. This is a permanent not a finding. + + Is it the case that ? + + + + + + + + draft + Guide to the Secure Configuration of CentOS Linux 7 + This guide presents a catalog of security-relevant +configuration settings for CentOS Linux 7 formatted in the +eXtensible Configuration Checklist Description Format (XCCDF). + + +Providing system administrators with such guidance informs them how to securely +configure systems under their control in a variety of network roles. Policy +makers and baseline creators can use this catalog of settings, with its +associated references to higher-level security control catalogs, in order to +assist them in security baseline creation. This guide is a catalog, not a +checklist, and satisfaction of every item is not likely to be possible or +sensible in many operational scenarios. However, the XCCDF format enables +granular selection and adjustment of settings, and their association with OVAL +and OCIL content provides an automated checking capability. Transformations of +this document, and its associated automated checking content, are capable of +providing baselines that meet a diverse set of policy objectives. Some example +XCCDF Profiles, which are selections of items that form checklists and +can be used as baselines, are available with this guide. They can be +processed, in an automated fashion, with tools that support the Security +Content Automation Protocol (SCAP). The DISA STIG for CentOS Linux 7 is one example of +a baseline created from this guidance. + + +This benchmark is a direct port of a SCAP Security Guide benchmark developed for Red Hat Enterprise Linux. It has been modified through an automated process to remove specific dependencies on Red Hat Enterprise Linux and to function with CentOS. The result is a generally useful SCAP Security Guide benchmark with the following caveats: + +CentOS is not an exact copy of Red Hat Enterprise Linux. There may be configuration differences that produce false positives and/or false negatives. If this occurs please file a bug report. + +CentOS has its own build system, compiler options, patchsets, and is a community supported, non-commercial operating system. CentOS does not inherit certifications or evaluations from Red Hat Enterprise Linux. As such, some configuration rules (such as those requiring FIPS 140-2 encryption) will continue to fail on CentOS. + + +Members of the CentOS community are invited to participate in OpenSCAP and SCAP Security Guide development. Bug reports and patches can be sent to GitHub: https://github.com/OpenSCAP/scap-security-guide. The mailing list is at https://fedorahosted.org/mailman/listinfo/scap-security-guide. + Do not attempt to implement any of the settings in +this guide without first testing them in a non-operational environment. The +creators of this guidance assume no responsibility whatsoever for its use by +other parties, and makes no guarantees, expressed or implied, about its +quality, reliability, or any other characteristic. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Red Hat and Red Hat Enterprise Linux are either registered +trademarks or trademarks of Red Hat, Inc. in the United States and other +countries. All other names are registered trademarks or trademarks of their +respective companies. + + + + + 0.1.30 + + SCAP Security Guide Project + SCAP Security Guide Project + Gabe Alford + Christopher Anderson + Jeff Blank + Blake Burkhart + Frank Caviggia + Eric Christensen + Caleb Cooper + Nick Crawford + Maura Dailey + Greg Elin + Andrew Gilmore + Jeremiah Jahn + Luke Kordell + Ján Lieskovský + Šimon Lukašík + Michael McConachie + Rodney Mercer + Brian Millett + Michael Moseley + Joe Nall + Michele Newman + Michael Palmiotto + Kenneth Peeples + Martin Preisler + Rick Renshaw + Willy Santos + Satoru Satoh + Ray Shaw + Spencer Shimko + Francisco Slavin + Dave Smith + Kevin Spargur + Kenneth Stailey + Leland Steinke + Paul Tittle + Jeb Trayer + Shawn Wells + Jan Černý + Zbyněk Moravec + Michal Šrubař + Jean-Baptiste Donnette + Philippe Thierry + https://github.com/OpenSCAP/scap-security-guide/releases/latest + + + + Standard System Security Profile + This profile contains rules to ensure standard security baseline of CentOS Linux 7 system. +Regardless of your system's workload all of these checks should pass. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PCI-DSS v3 Control Baseline for CentOS Linux 7 + This is a *draft* profile for PCI-DSS v3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C2S for CentOS Linux 7 + This profile demonstrates compliance against the +U.S. Government Commercial Cloud Services (C2S) baseline. + +This baseline was inspired by the Center for Internet Security +(CIS) CentOS Linux 7 Benchmark, v1.1.0 - 04-02-2015. +For the SCAP Security Guide project to remain in compliance with +CIS' terms and conditions, specifically Restrictions(8), note +there is no representation or claim that the C2S profile will +ensure a system is in compliance or consistency with the CIS +baseline. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Common Profile for General-Purpose Systems + This profile contains items common to general-purpose desktop and server installations. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + STIG for CentOS Linux 7 Workstation + This is a *draft* profile for STIG. This profile is being developed under the DoD consensus model to become a STIG in coordination with DISA FSO. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + STIG for CentOS Linux 7 Server Running GUIs + This is a *draft* profile for STIG. This profile is being developed under the DoD consensus model to become a STIG in coordination with DISA FSO. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + STIG for CentOS Linux 7 Server + This is a *draft* profile for STIG. This profile is being developed under the DoD consensus model to become a STIG in coordination with DISA FSO. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + United States Government Configuration Baseline (USGCB / STIG) + This is a *draft* profile for NIAP OSPP v4.0. This profile is being developed under the National Information Assurance Partnership. The scope of this profile is to configure CentOS Linux 7 against the NIAP Protection Profile for General Purpose Operating Systems v4.0. The NIAP OSPP profile also serves as a working draft for USGCB submission against CentOS7 Server. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CNSSI 1253 Low/Low/Low Control Baseline for CentOS Linux 7 + This profile follows the Committee on National Security Systems Instruction +(CNSSI) No. 1253, "Security Categorization and Control Selection for National Security +Systems" on security controls to meet low confidentiality, low integrity, and low +assurance." + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Criminal Justice Information Services (CJIS) Security Policy + This is a *draft* profile for CJIS v5.4. The scope of this profile is to configure CentOS Linux 7 against the U. S. Department of Justice, FBI CJIS Security Policy. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remediation functions used by the SCAP Security Guide Project + XCCDF form of the various remediation functions as used by +remediation scripts from the SCAP Security Guide Project + + + + + + + + + + + + + + Introduction + +The purpose of this guidance is to provide security configuration +recommendations and baselines for the CentOS Linux 7 operating +system. The guidance provided here should be applicable to all variants +(Desktop, Server, Advanced Platform) of the product. Recommended +settings for the basic operating system are provided, as well as for many +network services that the system can provide to other systems. +The guide is intended for system administrators. Readers are assumed to +possess basic system administration skills for Unix-like systems, as well +as some familiarity with Red Hat's documentation and administration +conventions. Some instructions within this guide are complex. +All directions should be followed completely and with understanding of +their effects in order to avoid serious adverse effects on the system +and its security. + + + General Principles + +The following general principles motivate much of the advice in this +guide and should also influence any configuration decisions that are +not explicitly covered. + + + Encrypt Transmitted Data Whenever Possible + +Data transmitted over a network, whether wired or wireless, is susceptible +to passive monitoring. Whenever practical solutions for encrypting +such data exist, they should be applied. Even if data is expected to +be transmitted only over a local network, it should still be encrypted. +Encrypting authentication data, such as passwords, is particularly +important. Networks of CentOS Linux 7 machines can and should be configured +so that no unencrypted authentication data is ever transmitted between +machines. + + + + Minimize Software to Minimize Vulnerability + +The simplest way to avoid vulnerabilities in software is to avoid +installing that software. On CentOS, the RPM Package Manager (originally +Red Hat Package Manager, abbreviated RPM) allows for careful management of +the set of software packages installed on a system. Installed software +contributes to system vulnerability in several ways. Packages that +include setuid programs may provide local attackers a potential path to +privilege escalation. Packages that include network services may give +this opportunity to network-based attackers. Packages that include +programs which are predictably executed by local users (e.g. after +graphical login) may provide opportunities for trojan horses or other +attack code to be run undetected. The number of software packages +installed on a system can almost always be significantly pruned to include +only the software for which there is an environmental or operational need. + + + + Run Different Network Services on Separate Systems + +Whenever possible, a server should be dedicated to serving exactly one +network service. This limits the number of other services that can +be compromised in the event that an attacker is able to successfully +exploit a software flaw in one network service. + + + + Configure Security Tools to Improve System Robustness + +Several tools exist which can be effectively used to improve a system's +resistance to and detection of unknown attacks. These tools can improve +robustness against attack at the cost of relatively little configuration +effort. In particular, this guide recommends and discusses the use of +FirewallD for host-based firewalling, SELinux for protection against +vulnerable services, and a logging and auditing infrastructure for +detection of problems. + + + + Least Privilege + +Grant the least privilege necessary for user accounts and software to perform tasks. +For example, sudo can be implemented to limit authorization to super user +accounts on the system only to designated personnel. Another example is to limit +logins on server systems to only those administrators who need to log into them in +order to perform administration tasks. Using SELinux also follows the principle of +least privilege: SELinux policy can confine software to perform only actions on the +system that are specifically allowed. This can be far more restrictive than the +actions permissible by the traditional Unix permissions model. + + + + + How to Use This Guide + +Readers should heed the following points when using the guide. + + + Read Sections Completely and in Order + +Each section may build on information and recommendations discussed in +prior sections. Each section should be read and understood completely; +instructions should never be blindly applied. Relevant discussion may +occur after instructions for an action. + + + + Test in Non-Production Environment + +This guidance should always be tested in a non-production environment +before deployment. This test environment should simulate the setup in +which the system will be deployed as closely as possible. + + + + Root Shell Environment Assumed + +Most of the actions listed in this document are written with the +assumption that they will be executed by the root user running the +/bin/bash shell. Commands preceded with a hash mark (#) +assume that the administrator will execute the commands as root, i.e. +apply the command via sudo whenever possible, or use +su to gain root privileges if sudo cannot be +used. Commands which can be executed as a non-root user are are preceded +by a dollar sign ($) prompt. + + + + Formatting Conventions + +Commands intended for shell execution, as well as configuration file text, +are featured in a monospace font. Italics are used +to indicate instances where the system administrator must substitute +the appropriate information into a command or configuration file. + + + + Reboot Required + +A system reboot is implicitly required after some actions in order to +complete the reconfiguration of the system. In many cases, the changes +will not take effect until a reboot is performed. In order to ensure +that changes are applied properly and to test functionality, always +reboot the system after applying a set of recommendations from this guide. + + + + + + System Settings + Contains rules that check correct system settings. + + Installing and Maintaining Software + The following sections contain information on +security-relevant choices during the initial operating system +installation process and the setup of software +updates. + + Disk Partitioning + To ensure separation and protection of data, there +are top-level system directories which should be placed on their +own physical partition or logical volume. The installer's default +partitioning scheme creates separate logical volumes for +/, /boot, and swap. +If starting with any of the default layouts, check the box to +"Review and modify partitioning." This allows for the easy creation +of additional logical volumes inside the volume group already +created, though it may require making /'s logical volume smaller to +create space. In general, using logical volumes is preferable to +using partitions because they can be more easily adjusted +later.If creating a custom layout, create the partitions mentioned in +the previous paragraph (which the installer will require anyway), +as well as separate ones described in the following sections. +If a system has already been installed, and the default +partitioning scheme was used, it is possible but nontrivial to +modify it to create separate logical volumes for the directories +listed above. The Logical Volume Manager (LVM) makes this possible. +See the LVM HOWTO at http://tldp.org/HOWTO/LVM-HOWTO/ for more +detailed information on LVM. + + Ensure /tmp Located On Separate Partition + +The /tmp directory is a world-writable directory used +for temporary file storage. Ensure it has its own partition or +logical volume at installation time, or migrate it using LVM. + + SC-32(1) + 366 + SRG-OS-000480-GPOS-00227 + 1.1.1 + RHEL-07-021270 + Test attestation on 20120928 by MM + +The /tmp partition is used as temporary storage by many programs. +Placing /tmp in its own partition enables the setting of more +restrictive mount options, which can help protect programs which use it. + + + + + + + + + + + Ensure /var Located On Separate Partition + The /var directory is used by daemons and other system +services to store frequently-changing data. Ensure that /var has its own partition +or logical volume at installation time, or migrate it using LVM. + + SC-32(1) + 1.1.5 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-021250 + Test attestation on 20120928 by MM + +Ensuring that /var is mounted on its own partition enables the +setting of more restrictive mount options. This helps protect +system services such as daemons or other programs which use it. +It is not uncommon for the /var directory to contain +world-writable directories installed by other software packages. + + + + + + + + + + + Ensure /var/log Located On Separate Partition + +System logs are stored in the /var/log directory. +Ensure that it has its own partition or logical +volume at installation time, or migrate it using LVM. + + AU-9 + SC-32 + + 1.1.7 + Test attestation on 20120928 by MM + +Placing /var/log in its own partition +enables better separation between log files +and other files in /var/. + + + + + + + + + + + Ensure /var/log/audit Located On Separate Partition + +Audit logs are stored in the /var/log/audit directory. Ensure that it +has its own partition or logical volume at installation time, or migrate it +later using LVM. Make absolutely certain that it is large enough to store all +audit logs that will be created by the auditing daemon. + + AU-4 + AU-9 + SC-32(1) + 366 + 1.1.8 + SRG-OS-000480-GPOS-00227 + RHEL-07-021260 + Test attestation on 20120928 by MM + +Placing /var/log/audit in its own partition +enables better separation between audit files +and other files, and helps ensure that +auditing cannot be halted due to the partition running out +of space. + + + + + + + + + + + Ensure /home Located On Separate Partition + +If user home directories will be stored locally, create a separate partition +for /home at installation time (or migrate it later using LVM). If +/home will be mounted from another system such as an NFS server, then +creating a separate partition is not necessary at installation time, and the +mountpoint can instead be configured later. + + SC-32(1) + 366 + 1208 + 1.1.9 + SRG-OS-000480-GPOS-00227 + RHEL-07-021240 + Test attestation on 20120928 by MM + +Ensuring that /home is mounted on its own partition enables the +setting of more restrictive mount options, and also helps ensure that +users cannot trivially fill partitions used for log or audit data storage. + + + + + + + + + + + Encrypt Partitions + +Red Hat Enterprise Linux 7 natively supports partition encryption through the +Linux Unified Key Setup-on-disk-format (LUKS) technology. The easiest way to +encrypt a partition is during installation time. + +For manual installations, select the Encrypt checkbox during +partition creation to encrypt the partition. When this +option is selected the system will prompt for a passphrase to use in +decrypting the partition. The passphrase will subsequently need to be entered manually +every time the system boots. + +For automated/unattended installations, it is possible to use Kickstart by adding +the --encrypted and --passphrase= options to the definition of each partition to be +encrypted. For example, the following line would encrypt the root partition: +part / --fstype=ext4 --size=100 --onpart=hda1 --encrypted --passphrase=PASSPHRASE +Any PASSPHRASE is stored in the Kickstart in plaintext, and the Kickstart must then be protected accordingly. +Omitting the --passphrase= option from the partition definition will cause the +installer to pause and interactively ask for the passphrase during installation. + +Detailed information on encrypting partitions using LUKS can be found on +the Red Hat Documentation web site: +https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Encryption.html + + SC-13 + SC-28(1) + 1199 + 2476 + SRG-OS-000405-GPOS-00184 + SRG-OS-000185-GPOS-00079 + RHEL-07-020170 + +The risk of a system's physical compromise, particularly mobile systems such as +laptops, places its data at risk of compromise. Encrypting this data mitigates +the risk of its loss if the system is lost. + + + + + + + + + Updating Software + The yum command line tool is used to install and +update software packages. The system also provides a graphical +software update tool in the System menu, in the Administration submenu, +called Software Update. + +Red Hat Enterprise Linux systems contain an installed software catalog called +the RPM database, which records metadata of installed packages. Consistently using +yum or the graphical Software Update for all software installation +allows for insight into the current inventory of installed software on the system. + + + Ensure Red Hat GPG Key Installed + +To ensure the system can cryptographically verify base software +packages come from Red Hat (and to connect to the Red Hat Network to +receive them), the Red Hat GPG key must properly be installed. +To install the Red Hat GPG key, run: +$ sudo rhn_register +If the system is not connected to the Internet or an RHN Satellite, +then install the Red Hat GPG key from trusted media such as +the Red Hat installation CD-ROM or DVD. Assuming the disc is mounted +in /media/cdrom, use the following command as the root user to import +it into the keyring: +$ sudo rpm --import /media/cdrom/RPM-GPG-KEY + + CM-5(3) + SI-7 + MA-1(b) + 1749 + 366 + Req-6.2 + 1.2.2 + Test attestation on 20150407 by sdw + +Changes to 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. The Red Hat GPG key is necessary to +cryptographically verify packages are from Red Hat. + + + # The two fingerprints below are retrieved from https://access.redhat.com/security/team/key +readonly REDHAT_RELEASE_2_FINGERPRINT="567E 347A D004 4ADE 55BA 8A5F 199E 2F91 FD43 1D51" +readonly REDHAT_AUXILIARY_FINGERPRINT="43A6 E49C 4A38 F4BE 9ABF 2A53 4568 9C88 2FA6 58E0" +# Location of the key we would like to import (once it's integrity verified) +readonly REDHAT_RELEASE_KEY="/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release" + +RPM_GPG_DIR_PERMS=$(stat -c %a "$(dirname "$REDHAT_RELEASE_KEY")") + +# Verify /etc/pki/rpm-gpg directory permissions are safe +if [ "${RPM_GPG_DIR_PERMS}" -le "755" ] +then + # If they are safe, try to obtain fingerprints from the key file + # (to ensure there won't be e.g. CRC error) + IFS=$'\n' GPG_OUT=($(gpg --with-fingerprint "${REDHAT_RELEASE_KEY}")) + GPG_RESULT=$? + # No CRC error, safe to proceed + if [ "${GPG_RESULT}" -eq "0" ] + then + for ITEM in "${GPG_OUT[@]}" + do + # Filter just hexadecimal fingerprints from gpg's output from + # processing of a key file + RESULT=$(echo ${ITEM} | sed -n "s/[[:space:]]*Key fingerprint = \(.*\)/\1/p" | tr -s '[:space:]') + # If fingerprint matches Red Hat's release 2 or auxiliary key import the key + if [[ ${RESULT} ]] && ([[ ${RESULT} = "${REDHAT_RELEASE_2_FINGERPRINT}" ]] || \ + [[ ${RESULT} = "${REDHAT_AUXILIARY_FINGERPRINT}" ]]) + then + rpm --import "${REDHAT_RELEASE_KEY}" + fi + done + fi +fi + + + + + + + + + + Ensure gpgcheck Enabled In Main Yum Configuration + The gpgcheck option controls whether +RPM packages' signatures are always checked prior to installation. +To configure yum to check package signatures before installing +them, ensure the following line appears in /etc/yum.conf in +the [main] section: +gpgcheck=1 + + CM-5(3) + SI-7 + MA-1(b) + 1749 + SRG-OS-000366-GPOS-00153 + RHEL-07-020150 + Req-6.2 + 1.2.3 + Test attestation on 20150407 by sdw + +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 ensures 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. Certificates +used to verify the software must be from an approved Certificate +Authority (CA). + + + sed -i 's/gpgcheck=.*/gpgcheck=1/g' /etc/yum.conf + + + + + + + + + + Ensure gpgcheck Enabled For All Yum Package Repositories + To ensure signature checking is not disabled for +any repos, remove any lines from files in /etc/yum.repos.d of the form: +gpgcheck=0 + + CM-5(3) + SI-7 + MA-1(b) + 1749 + 366 + Req-6.2 + Test attestation on 20150407 by sdw + +Verifying the authenticity of the software prior to installation +validates the integrity of the patch or upgrade received from +a vendor. This ensures 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. Certificates +used to verify the software must be from an approved Certificate +Authority (CA). + + + sed -i 's/gpgcheck=.*/gpgcheck=1/g' /etc/yum.repos.d/* + + + + + + + + + + Ensure Software Patches Installed + If the system is joined to the Red Hat Network, a Red Hat Satellite Server, +or a yum server, run the following command to install updates: +$ sudo yum update +If the system is not configured to use one of these sources, updates (in the form of RPM packages) +can be manually downloaded from the Red Hat Network and installed using rpm. + + SI-2 + MA-1(b) + + Req-6.2 + 1.7 + Test attestation on 20120928 by MM + +Installing software updates is a fundamental mitigation against +the exploitation of publicly-known vulnerabilities. + + + yum -y update + + + + + + + + + + Ensure YUM Removes Previous Package Versions + Yum should be configured to remove previous software components after +previous versions have been installed. To configure yum to remove the +previous software components after updating, set the clean_requirements_on_remove +to 1 in /etc/yum.conf. + + SI-2(6) + 2617 + SRG-OS-000437-GPOS-00194 + RHEL-07-020200 + +Previous versions of software components that are not removed from the information +system after updates have been installed may be exploited by some adversaries. + + + + + + + + + + + Ensure gpgcheck Enabled for Local Packages + Yum should be configured to verify the signature(s) of local packages +prior to installation. To configure yum to verify signatures of local +packages, set the localpkg_gpgcheck to 1 in /etc/yum.conf. + + CM-5(3) + 1749 + SRG-OS-000366-GPOS-00153 + RHEL-07-020151 + +Changes to any software components can have significant effects to the overall security +of the operating system. This requirement ensures the software has not been tampered and +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. + + + + + + + + + + + Ensure gpgcheck Enabled for Repository Metadata + Yum should be configured to verify repository metadata. This should be configured +by setting repo_gpgcheck to 1 in /etc/yum.conf. + + CM-5(3) + 1749 + SRG-OS-000366-GPOS-00153 + RHEL-07-020152 + +Changes to any software components can have significant effects to the overall security +of the operating system. This requirement ensures the software has not been tampered and +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. + + + + + + + + + + + + Software Integrity Checking + +Both the AIDE (Advanced Intrusion Detection Environment) +software and the RPM package management system provide +mechanisms for verifying the integrity of installed software. +AIDE uses snapshots of file metadata (such as hashes) and compares these +to current system files in order to detect changes. +The RPM package management system can conduct integrity +checks by comparing information in its metadata database with +files installed on the system. + +Integrity checking cannot prevent intrusions, +but can detect that they have occurred. Requirements +for software integrity checking may be highly dependent on +the environment in which the system will be used. Snapshot-based +approaches such as AIDE may induce considerable overhead +in the presence of frequent software updates. + + + Disable Prelinking + +The prelinking feature changes binaries in an attempt to decrease their startup +time. In order to disable it, change or add the following line inside the file +/etc/sysconfig/prelink: +PRELINKING=no +Next, run the following command to return binaries to a normal, non-prelinked state: +$ sudo /usr/sbin/prelink -ua + + CM-6(d) + CM-6(3) + SC-28 + SI-7 + Req-11.5 + +Because the prelinking feature changes binaries, it can interfere with the +operation of certain software and/or modes such as AIDE, FIPS, etc. + + + # +# Disable prelinking altogether +# +if grep -q ^PRELINKING /etc/sysconfig/prelink +then + sed -i 's/PRELINKING.*/PRELINKING=no/g' /etc/sysconfig/prelink +else + echo -e "\n# Set PRELINKING=no per security requirements" >> /etc/sysconfig/prelink + echo "PRELINKING=no" >> /etc/sysconfig/prelink +fi + +# +# Undo previous prelink changes to binaries +# +/usr/sbin/prelink -ua + + + + + + + Verify Integrity with AIDE + AIDE conducts integrity checks by comparing information about +files with previously-gathered information. Ideally, the AIDE database is +created immediately after initial system configuration, and then again after any +software update. AIDE is highly configurable, with further configuration +information located in /usr/share/doc/aide-VERSION. + + + Install AIDE + +Install the AIDE package with the command: +$ sudo yum install aide + + CM-3(d) + CM-3(e) + CM-6(d) + CM-6(3) + SC-28 + SI-7 + + Req-11.5 + 1.3.1 + Test attestation on 20121024 by DS + +The AIDE package must be installed if it is to be available for integrity checking. + + + +package_command install aide + + + + + + + + + + Build and Test AIDE Database + Run the following command to generate a new database: +$ sudo /usr/sbin/aide --init +By default, the database will be written to the file /var/lib/aide/aide.db.new.gz. +Storing the database, the configuration file /etc/aide.conf, and the binary +/usr/sbin/aide (or hashes of these files), in a secure location (such as on read-only media) provides additional assurance about their integrity. +The newly-generated database can be installed as follows: +$ sudo cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz +To initiate a manual check, run the following command: +$ sudo /usr/sbin/aide --check +If this check produces any unexpected output, investigate. + + CM-3(d) + CM-3(e) + CM-6(d) + CM-6(3) + SC-28 + SI-7 + Req-11.5 + +For AIDE to be effective, an initial database of "known-good" information about files +must be captured and it should be able to be verified against the installed files. + + + /usr/sbin/aide --init + + + + + + + + + + Configure Periodic Execution of AIDE + +To implement a daily execution of AIDE at 4:05am using cron, add the following line to /etc/crontab: +05 4 * * * root /usr/sbin/aide --check +AIDE can be executed periodically through other means; this is merely one example. + + CM-3(d) + CM-3(e) + CM-6(d) + CM-6(3) + SC-28 + SI-7 + 374 + 416 + 1069 + 1263 + 1297 + 1589 + Req-11.5 + 1.3.1 + +By default, AIDE does not install itself for periodic execution. Periodically +running AIDE is necessary to reveal unexpected changes in installed files. + + + echo "05 4 * * * root /usr/sbin/aide --check" >> /etc/crontab + + + + + + + + + + + Verify Integrity with RPM + The RPM package management system includes the ability +to verify the integrity of installed packages by comparing the +installed files with information about the files taken from the +package metadata stored in the RPM database. Although an attacker +could corrupt the RPM database (analogous to attacking the AIDE +database as described above), this check can still reveal +modification of important files. To list which files on the system differ from what is expected by the RPM database: +$ rpm -qVa +See the man page for rpm to see a complete explanation of each column. + + + Verify and Correct File Permissions with RPM + +Discretionary access control is weakened if a user or group has access +permissions to system files and directories greater than the default. + +The RPM package management system can check file access permissions +of installed software packages, including many that are important +to system security. + +Verify that the file permissions, ownership, and gruop membership of system files +and commands match vendor values. Check the file permissions, ownership, and group +membership with the following command: +$ sudo rpm -Va | grep '^.M' + +Output indicates files that do not match vendor defaults. After locating a file with incorrect permissions, run the following command to determine which package owns it: +$ rpm -qf FILENAME + +Next, run the following command to reset its permissions to +the correct values: +$ sudo rpm --setperms PACKAGENAME + + Note: Due to a bug in the gdm package, the +RPM verify command may continue to fail even after file permissions have been +correctly set on /var/log/gdm. This is being tracked in Red Hat +Bugzilla #1275532. + + AC-6 + CM-6(d) + CM-6(3) + 1493 + 1494 + 1495 + Req-11.5 + 1.2.6 + 6.1.3 + 6.1.4 + 6.1.5 + 6.1.6 + 6.1.7 + 6.1.8 + 6.1.9 + 6.2.3 + RHEL-07-010010 + +Permissions on system binaries and configuration files that are too generous +could allow an unauthorized user to gain privileges that they should not have. +The permissions set by the vendor should be maintained. Any deviations from +this baseline should be investigated. + + + +# Declare array to hold list of RPM packages we need to correct permissions for +declare -a SETPERMS_RPM_LIST + +# Create a list of files on the system having permissions different from what +# is expected by the RPM database +FILES_WITH_INCORRECT_PERMS=($(rpm -Va --nofiledigest | grep '^.M')) + +# For each file path from that list: +# * Determine the RPM package the file path is shipped by, +# * Include it into SETPERMS_RPM_LIST array + +for FILE_PATH in "${FILES_WITH_INCORRECT_PERMS[@]}" +do + RPM_PACKAGE=$(rpm -qf "$FILE_PATH") + SETPERMS_RPM_LIST=("${SETPERMS_RPM_LIST[@]}" "$RPM_PACKAGE") +done + +# Remove duplicate mention of same RPM in $SETPERMS_RPM_LIST (if any) +SETPERMS_RPM_LIST=( $(echo "${SETPERMS_RPM_LIST[@]}" | sort -n | uniq) ) + +# For each of the RPM packages left in the list -- reset its permissions to the +# correct values +for RPM_PACKAGE in "${SETPERMS_RPM_LIST[@]}" +do + rpm --setperms "${RPM_PACKAGE}" +done + + + + + + + + + + Verify File Hashes with RPM + Without cryptographic integrity protections, system +executables and files can be altered by unauthorized users without +detection. + +The RPM package management system can check the hashes of +installed software packages, including many that are important to system +security. + +To verify that the cryptographic hash of system files and commands match vendor +values, run the following command to list which files on the system +have hashes that differ from what is expected by the RPM database: +$ rpm -Va | grep '^..5' + +A "c" in the second column indicates that a file is a configuration file, which +may appropriately be expected to change. If the file was not expected to +change, investigate the cause of the change using audit logs or other means. +The package can then be reinstalled to restore the file. + +Run the following command to determine which package owns the file: +$ rpm -qf FILENAME + +The package can be reinstalled from a yum repository using the command: +$ sudo yum reinstall PACKAGENAME + +Alternatively, the package can be reinstalled from trusted media using the command: +$ sudo rpm -Uvh PACKAGENAME + + CM-6(d) + CM-6(3) + SI-7 + 1496 + Req-11.5 + 1.2.6 + RHEL-07-010020 + +The hashes of important files like system executables should match the +information given by the RPM database. Executables with erroneous hashes could +be a sign of nefarious activity on the system. + + + + + + + + + + + Additional Security Software + +Additional security software that is not provided or supported +by Red Hat can be installed to provide complementary or duplicative +security capabilities to those provided by the base platform. Add-on +software may not be appropriate for some specialized systems. + + + Install Intrusion Detection Software + +The base Red Hat platform already includes a sophisticated auditing system that +can detect intruder activity, as well as SELinux, which provides host-based +intrusion prevention capabilities by confining privileged programs and user +sessions which may become compromised. + + Note in DoD environments, supplemental intrusion +detection tools, such as the McAfee Host-based Security System, are available +to integrate with existing infrastructure. When these supplemental tools +interfere with proper functioning of SELinux, SELinux takes precedence. + SC-7 + 1263 + Req-11.4 + +Host-based intrusion detection tools provide a system-level defense when an +intruder gains access to a system or network. + + + + + + + + Install Virus Scanning Software + +Install virus scanning software, which uses signatures to search for the +presence of viruses on the filesystem. +Ensure virus definition files are no older than 7 days, or their last release. + +Configure the virus scanning software to perform scans dynamically on all +accessed files. If this is not possible, configure the +system to scan all altered files on the system on a daily +basis. If the system processes inbound SMTP mail, configure the virus scanner +to scan all received mail. + + + SC-28 + SI-3 + 1239 + 1668 + +Virus scanning software can be used to detect if a system has been compromised by +computer viruses, as well as to limit their spread to other systems. + + + + + + + + + + + + McAfee Security Software + +In DoD environments, McAfee Host-based Security System (HBSS) and +VirusScan Enterprise for Linux is required to be installed on all systems. + + + Install McAfee Host-Based Intrusion Detection Software (HBSS) + +Install the McAfee Host-based Security System (HBSS) application. + + SC-7 + SI-4(1).1 + 366 + 1263 + Req-11.4 + STG-OS-000480-GPOS-00227 + 030790 + +Without a host-based intrusion detection tool, there is no system-level defense +when an intruder gains access to a system or network. Additionally, a host-based +intrusion prevention tool can provide methods to immediately lock out detected +intrusion attempts. + + + + + + + + + + + Install McAfee Virus Scanning Software + +Install McAfee VirusScan Enterprise for Linux antivirus software +which is provided for DoD systems and uses signatures to search for the +presence of viruses on the filesystem. + + SC-28 + SI-3 + SI-3(1)(ii) + 366 + 1239 + 1668 + SRG-OS-000480-GPOS-00227 + RHEL-07-030810 + +Virus scanning software can be used to detect if a system has been compromised by +computer viruses, as well as to limit their spread to other systems. + + + + + + + + + + + Enable nails Service + The nails service is used to run McAfee VirusScan Enterprise +for Linux and McAfee Host-based Security System (HBSS) services. + + The nails service can be enabled with the following command: + $ sudo systemctl enable nails.service + + SC-28 + SI-3 + SI-3(1)(ii) + 366 + 1239 + 1668 + SRG-OS-000480-GPOS-00227 + RHEL-07-TBD + +Virus scanning software can be used to detect if a system has been compromised by +computer viruses, as well as to limit their spread to other systems. + + + + + + + + + + + Virus Scanning Software Definitions Are Updated + +Ensure virus definition files are no older than 7 days or their last release. + + SC-28 + SI-3 + SI-3(1)(ii) + 366 + 1239 + 1668 + SRG-OS-000480-GPOS-00227 + RHEL-07-030820 + +Virus scanning software can be used to detect if a system has been compromised by +computer viruses, as well as to limit their spread to other systems. + + + + + + + + + Federal Information Processing Standard (FIPS) + +The Federal Information Processing Standard (FIPS) is a computer security standard which +is developed by the U.S. Government and industry working groups to validate the quality +of cryptographic modules. The FIPS standard provides four security levels to ensure +adequate coverage of different industries, implementation of cryptographic modules, and +organizational sizes and requirements. + +FIPS 140-2 is the current standard for validating that mechanisms used to access cryptographic modules +utilize authentication that meets industry and government requirements. For government systems, this allows +Security Levels 1, 2, 3, or 4 for use on Red Hat Enterprise Linux. + +See http://csrc.nist.gov/publications/PubsFIPS.html for more information. + + + Install the dracut-fips Package + +To enable FIPS, the system requires that the dracut-fips +package be installed. + + The dracut-fips package can be installed with the following command: + $ sudo yum install dracut-fips + + AC-17(2) + 68 + 2450 + RHEL-07-TBD + SRG-OS-000033-GPOS-00014 + SRG-OS-000396-GPOS-00176 + SRG-OS-000478-GPOS-00223 + +Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to +protect data. The operating system must implement cryptographic modules adhering to the higher +standards approved by the federal government since this provides assurance they have been tested +and validated. + + + + + + + + + + + Enable FIPS Mode in GRUB2 + +To ensure FIPS mode is enabled, rebuild initramfs by running the following command: +dracut -f +After the dracut command has been run, add the argument fips=1 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 fips=1" +Finally, rebuild the grub.cfg file by using the +grub2-mkconfig -o command as follows: +On BIOS-based machines, issue the following command as root: +~]# grub2-mkconfig -o /boot/grub2/grub.cfgOn UEFI-based machines, issue the following command as root: +~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg + + Running dracut -f will overwrite the existing initramfs file. + The system needs to be rebooted for these changes to take effect. + The ability to enable FIPS does not denote FIPS compliancy or certification. +Red Hat, Inc. and Red Hat Enterprise Linux are respectively FIPS certified and compliant. Community +projects such as CentOS, Scientific Linux, etc. do not necessarily meet FIPS certification and compliancy. +Therefore, non-certified vendors and/or projects do not meet this requirement even if technically feasible. + +See http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/1401vend.htm for a list of FIPS certified +vendors. + AC-17(2) + 68 + 2450 + RHEL-07-021280 + SRG-OS-000033-GPOS-00014 + SRG-OS-000396-GPOS-00176 + SRG-OS-000478-GPOS-00223 + +Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to +protect data. The operating system must implement cryptographic modules adhering to the higher +standards approved by the federal government since this provides assurance they have been tested +and validated. + + + + + + + + + + + + + GNOME Desktop Environment + +GNOME is a graphical desktop environment bundled with many Linux distributions that +allow users to easily interact with the operating system graphically rather than +textually. The GNOME Graphical Display Manager (GDM) provides login, logout, and user +switching contexts as well as display server management. + +GNOME is developed by the GNOME Project and is considered the default +Red Hat Graphical environment. + +For more information on GNOME and the GNOME Project, see https://www.gnome.org + + + Configure GNOME3 DConf User Profile + +By default, DConf provides a standard user profile. This profile contains a list +of DConf configuration databases. The user profile and database always take the +highest priority. As such the DConf User profile should always exist and be +configured correctly. + +To make sure that the user profile is configured correctly, the /etc/dconf/profile/user should be set as follows: +user-db:user +system-db:local +system-db:site +system-db:distro + + + +Failure to have a functional DConf profile prevents GNOME3 configuration settings +from being enforced for all users and allows various security risks. + + + + + + + + + + + Configure GNOME Login Screen + In the default GNOME3 desktop, the login is displayed after system boot +and can display user accounts, allow users to reboot the system, and allow users to +login automatically and/or with a guest account. The login screen should be configured +to prevent such behavior. + +For more information about enforcing preferences in the GNOME3 environment using the DConf +configuration system, see 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). + + + Disable GDM Automatic Login + The GNOME Display Manager (GDM) can allow users to automatically login without +user interaction or credentials. User should always be required to authenticate themselves +to the system that they are authorized to use. To disable user ability to automatically +login to the system, set the AutomaticLoginEnable to false in the +[daemon] section in /etc/gdm/custom.conf. For example: +[daemon] +AutomaticLoginEnable=false + + CM-6(b) + 366 + SRG-OS-000480-GPOS-00229 + RHEL-07-010430 + +Failure to restrict system access to authenticated users negatively impacts operating +system security. + + + + + + + + + + + Disable GDM Guest Login + The GNOME Display Manager (GDM) can allow users to login without credentials +which can be useful for public kiosk scenarios. Allowing users to login without credentials +or "guest" account access has inherent security risks and should be disabled. To do disable +timed logins or guest account access, set the TimedLoginEnable to false in +the [daemon] section in /etc/gdm/custom.conf. For example: +[daemon] +TimedLoginEnable=false + + CM-6(b) + 366 + SRG-OS-000480-GPOS-00229 + RHEL-07-010431 + +Failure to restrict system access to authenticated users negatively impacts operating +system security. + + + + + + + + + + + Disable the GNOME3 Login User List + In the default graphical environment, users logging +directly into the system are greeted with a login screen that displays +all known users. This functionality should be disabled by setting +disable-user-list to true. + +To disable, add or edit disable-user-list to +/etc/dconf/db/gdm.d/00-security-settings. For example: +[org/gnome/login-screen] +disable-user-list=true +Once the setting has been added, add a lock to +/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/login-screen/disable-user-list +After the settings have been set, run dconf update. + + AC-23 + Leaving the user list enabled is a security risk since it allows anyone +with physical access to the system to quickly enumerate known user accounts +without logging in. + + + + + + + + + + Disable the GNOME3 Login Restart and Shutdown Buttons + In the default graphical environment, users logging +directly into the system are greeted with a login screen that allows +any user, known or unknown, the ability the ability to shutdown or restart +the system. This functionality should be disabled by setting +disable-restart-buttons to true. + +To disable, add or edit disable-restart-buttons to +/etc/dconf/db/gdm.d/00-security-settings. For example: +[org/gnome/login-screen] +disable-restart-buttons=true +Once the setting has been added, add a lock to +/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/login-screen/disable-restart-buttons +After the settings have been set, run dconf update. + + AC-6 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-TBD + +A user who is at the console can reboot the system at the login screen. If restart or shutdown buttons +are pressed at the login screen, this can create the risk of short-term loss of availability of systems +due to reboot. + + + + + + + + + + + Enable the GNOME3 Login Smartcard Authentication + In the default graphical environment, smart card authentication +can be enabled on the login screen by setting enable-smartcard-authentication +to true. + +To enable, add or edit enable-smartcard-authentication to +/etc/dconf/db/gdm.d/00-security-settings. For example: +[org/gnome/login-screen] +enable-smartcard-authentication=true +Once the setting has been added, add a lock to +/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/login-screen/enable-smartcard-authentication +After the settings have been set, run dconf update. + + 765 + 766 + 767 + 768 + 771 + 772 + 884 + Req-8.3 + +Smart card login provides two-factor authentication stronger than +that provided by a username and password combination. Smart cards leverage PKI +(public key infrastructure) in order to provide and verify credentials. + + + + + + + + + + + Set the GNOME3 Login Number of Failures + In the default graphical environment, the GNOME3 login +screen and be configured to restart the authentication process after +a configured number of attempts. This can be configured by setting +allowed-failures to 3 or less. + +To enable, add or edit allowed-failures to +/etc/dconf/db/gdm.d/00-security-settings. For example: +[org/gnome/login-screen] +allowed-failures=3 +Once the setting has been added, add a lock to +/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/login-screen/allowed-failures +After the settings have been set, run dconf update. + + +Setting the password retry prompts that are permitted on a per-session basis to a low value +requires some software, such as SSH, to re-connect. This can slow down and +draw additional attention to some types of password-guessing attacks. + + + + + + + + + + + + Configure GNOME Screen Locking + In the default GNOME3 desktop, the screen can be locked +by selecting the user name in the far right corner of the main panel and +selecting Lock. + +The following sections detail commands to enforce idle activation of the screensaver, +screen locking, a blank-screen screensaver, and an idle activation time. + +Because users should be trained to lock the screen when they +step away from the computer, the automatic locking feature is only +meant as a backup. + +The root account can be screen-locked; however, the root account should +never be used to log into an X Windows environment and should only +be used to for direct login via console in emergency circumstances. + +For more information about enforcing preferences in the GNOME3 environment using the DConf +configuration system, see http://wiki.gnome.org/dconf and +the man page dconf(1). For Red Hat specific information on configuring DConf +settings, see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Desktop_Migration_and_Administration_Guide/part-Configuration_and_Administration.html + + + Inactivity timeout + Choose allowed duration of inactive SSH connections, shells, and X sessions + 900 + 300 + 600 + 900 + + + Set GNOME3 Screensaver Inactivity Timeout + +The idle time-out value for inactivity in the GNOME3 desktop is configured via the idle-delay +setting must be set under an appropriate configuration file(s) in the /etc/dconf/db/local.d directory +and locked in /etc/dconf/db/local.d/locks directory to prevent user modification. + +For example, to configure the system for a 15 minute delay, add the following to +/etc/dconf/db/local.d/00-security-settings: +[org/gnome/desktop/session] +idle-delay=900 +Once the setting has been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/desktop/session/idle-delay +After the settings have been set, run dconf update. + + AC-11(a) + 57 + Req-8.1.8 + SRG-OS-000029-GPOS-00010 + RHEL-07-010070 + +A session time-out 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 logout because of the +temporary nature of the absence. Rather than relying on the user to manually lock their operating +system session prior to vacating the vicinity, GNOME3 can be configured to identify when +a user's session has idled and take action to initiate a session lock. + + + +inactivity_timeout_value="" + +# Define constants to be reused below +ORG_GNOME_DESKTOP_SESSION="org/gnome/desktop/session" +SSG_DCONF_IDLE_DELAY_FILE="/etc/dconf/db/local.d/10-scap-security-guide" +SESSION_LOCKS_FILE="/etc/dconf/db/local.d/locks/session" +IDLE_DELAY_DEFINED="FALSE" + +# First update '[org/gnome/desktop/session] idle-delay' settings in +# /etc/dconf/db/local.d/* if already defined +for FILE in /etc/dconf/db/local.d/* +do + if grep -q -d skip "$ORG_GNOME_DESKTOP_SESSION" "$FILE" + then + if grep 'idle-delay' "$FILE" + then + sed -i "s/idle-delay=.*/idle-delay=uint32 ${inactivity_timeout_value}/g" "$FILE" + IDLE_DELAY_DEFINED="TRUE" + fi + fi +done + +# Then define '[org/gnome/desktop/session] idle-delay' setting +# if still not defined yet +if [ "$IDLE_DELAY_DEFINED" != "TRUE" ] +then + echo "" >> $SSG_DCONF_IDLE_DELAY_FILE + echo "[org/gnome/desktop/session]" >> $SSG_DCONF_IDLE_DELAY_FILE + echo "idle-delay=uint32 ${inactivity_timeout_value}" >> $SSG_DCONF_IDLE_DELAY_FILE +fi + +# Verify if 'idle-delay' modification is locked. If not, lock it +if ! grep -q "^/${ORG_GNOME_DESKTOP_SESSION}/idle-delay$" /etc/dconf/db/local.d/locks/* +then + # Check if "$SESSION_LOCK_FILE" exists. If not, create it. + if [ ! -f "$SESSION_LOCKS_FILE" ] + then + touch "$SESSION_LOCKS_FILE" + fi + echo "/${ORG_GNOME_DESKTOP_SESSION}/idle-delay" >> "$SESSION_LOCKS_FILE" +fi + + + + + + + + + + + + Enable GNOME3 Screensaver Idle Activation + +To activate the screensaver in the GNOME3 desktop after a period of inactivity, +add or set idle-activation-enabled to true in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/desktop/screensaver] +idle_activation_enabled=true +Once the setting has been added, add a lock to +/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/desktop/screensaver/idle-activation-enabled +After the settings have been set, run dconf update. + + AC-11(a) + 57 + SRG-OS-000029-GPOS-00010 + RHEL-07-010073 + Req-8.1.8 + +A session time-out 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 logout because of the temporary nature of the absence. +Rather than relying on the user to manually lock their operating system session prior to vacating the vicinity, +GNOME desktops can be configured to identify when a user's session has idled and take action to initiate the +session lock. + +Enabling idle activation of the screensaver ensures the screensaver will +be activated after the idle delay. Applications requiring continuous, +real-time screen display (such as network management products) require the +login session does not have administrator rights and the display station is located in a +controlled-access area. + + + +# Define constants to be reused below +ORG_GNOME_DESKTOP_SCREENSAVER="org/gnome/desktop/screensaver" +SSG_DCONF_IDLE_ACTIVATION_FILE="/etc/dconf/db/local.d/10-scap-security-guide" +SCREENSAVER_LOCKS_FILE="/etc/dconf/db/local.d/locks/screensaver" +IDLE_ACTIVATION_DEFINED="FALSE" + +# First update '[org/gnome/desktop/screensaver] idle-activation-enabled' settings in +# /etc/dconf/db/local.d/* if already defined +for FILE in /etc/dconf/db/local.d/* +do + if grep -q -d skip "$ORG_GNOME_DESKTOP_SCREENSAVER" "$FILE" + then + if grep 'idle-activation-enabled' "$FILE" + then + sed -i "s/idle-activation-enabled=.*/idle-activation-enabled=true/g" "$FILE" + IDLE_ACTIVATION_DEFINED="TRUE" + fi + fi +done + +# Then define '[org/gnome/desktop/screensaver] idle-activation-enabled' setting +# if still not defined yet +if [ "$IDLE_ACTIVATION_DEFINED" != "TRUE" ] +then + echo "" >> $SSG_DCONF_IDLE_ACTIVATION_FILE + echo "[org/gnome/desktop/screensaver]" >> $SSG_DCONF_IDLE_ACTIVATION_FILE + echo "idle-activation-enabled=true" >> $SSG_DCONF_IDLE_ACTIVATION_FILE +fi + +# Verify if 'idle-activation-enabled' modification is locked. If not, lock it +if ! grep -q "^/${ORG_GNOME_DESKTOP_SCREENSAVER}/idle-activation-enabled$" /etc/dconf/db/local.d/locks/* +then + # Check if "$SCREENSAVER_LOCK_FILE" exists. If not, create it. + if [ ! -f "$SCREENSAVER_LOCKS_FILE" ] + then + touch "$SCREENSAVER_LOCKS_FILE" + fi + echo "/${ORG_GNOME_DESKTOP_SCREENSAVER}/idle-activation-enabled" >> "$SCREENSAVER_LOCKS_FILE" +fi + + + + + + + + + + + Enable GNOME3 Screensaver Lock After Idle Period + +To activate locking of the screensaver in the GNOME3 desktop when it is activated, +add or set lock-enabled to true and lock-delay to 0 in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/desktop/screensaver] +lock-enabled=true +lock-delay=0 + +Once the settings have been added, add a lock to +/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/desktop/screensaver/lock-enabled +/org/gnome/desktop/screensaver/lock-delay +After the settings have been set, run dconf update. + + AC-11(b) + 56 + Req-8.1.8 + SRG-OS-000028-GPOS-00009 + OS-SRG-000030-GPOS-00011 + RHEL-07-010060 + +A session lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity +of the information system but does not want to logout because of the temporary nature of the absense. + + + +# Define constants to be reused below +ORG_GNOME_DESKTOP_SCREENSAVER="org/gnome/desktop/screensaver" +SSG_DCONF_LOCK_ENABLED_FILE="/etc/dconf/db/local.d/10-scap-security-guide" +SCREENSAVER_LOCKS_FILE="/etc/dconf/db/local.d/locks/screensaver" +LOCK_ENABLED_DEFINED="FALSE" +LOCK_DELAY_DEFINED="FALSE" + +# First update '[org/gnome/desktop/screensaver] lock-enabled' and +# '[org/gnome/desktop/screensaver] lock-delay' settings in +# /etc/dconf/db/local.d/* if already defined +for FILE in /etc/dconf/db/local.d/* +do + if grep -q -d skip "$ORG_GNOME_DESKTOP_SCREENSAVER" "$FILE" + then + if grep 'lock-enabled' "$FILE" + then + sed -i "s/lock-enabled=.*/lock-enabled=true/g" "$FILE" + LOCK_ENABLED_DEFINED="TRUE" + fi + if grep 'lock-delay' "$FILE" + then + sed -i "s/lock-delay=.*/lock-delay=uint32 0/g" "$FILE" + LOCK_DELAY_DEFINED="TRUE" + fi + fi +done + +# Then define '[org/gnome/desktop/screensaver] lock-enabled' setting +# if still not defined yet +if [ "$LOCK_ENABLED_DEFINED" != "TRUE" ] || [ "$LOCK_DELAY_DEFINED" != "TRUE" ] +then + echo "" >> $SSG_DCONF_LOCK_ENABLED_FILE + echo "[org/gnome/desktop/screensaver]" >> $SSG_DCONF_LOCK_ENABLED_FILE + echo "lock-enabled=true" >> $SSG_DCONF_LOCK_ENABLED_FILE + echo "lock-delay=uint32 0" >> $SSG_DCONF_LOCK_ENABLED_FILE +fi + +# Verify if 'lock-enabled' modification is locked. If not, lock it +if ! grep -q "^/${ORG_GNOME_DESKTOP_SCREENSAVER}/lock-enabled$" /etc/dconf/db/local.d/locks/* +then + # Check if "$SCREENSAVER_LOCK_FILE" exists. If not, create it. + if [ ! -f "$SCREENSAVER_LOCKS_FILE" ] + then + touch "$SCREENSAVER_LOCKS_FILE" + fi + echo "/${ORG_GNOME_DESKTOP_SCREENSAVER}/lock-enabled" >> "$SCREENSAVER_LOCKS_FILE" +fi + + +# Verify if 'lock-delay' modification is locked. If not, lock it +if ! grep -q "^/${ORG_GNOME_DESKTOP_SCREENSAVER}/lock-delay$" /etc/dconf/db/local.d/locks/* +then + # Check if "$SCREENSAVER_LOCK_FILE" exists. If not, create it. + if [ ! -f "$SCREENSAVER_LOCKS_FILE" ] + then + touch "$SCREENSAVER_LOCKS_FILE" + fi + echo "/${ORG_GNOME_DESKTOP_SCREENSAVER}/lock-delay" >> "$SCREENSAVER_LOCKS_FILE" +fi + + + + + + + + + + Implement Blank Screensaver + +To set the screensaver mode in the GNOME3 desktop to a blank screen, +add or set picture-uri to '' in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/desktop/screensaver] +picture-uri='' + +Once the settings have been added, add a lock to +/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/desktop/screensaver/picture-uri +After the settings have been set, run dconf update. + + AC-11(b) + 60 + Req-8.1.8 + +Setting the screensaver mode to blank-only conceals the +contents of the display from passersby. + + + +# Define constants to be reused below +ORG_GNOME_DESKTOP_SCREENSAVER="org/gnome/desktop/screensaver" +SSG_DCONF_MODE_BLANK_FILE="/etc/dconf/db/local.d/10-scap-security-guide" +SCREENSAVER_LOCKS_FILE="/etc/dconf/db/local.d/locks/screensaver" +MODE_BLANK_DEFINED="FALSE" + +# First update '[org/gnome/desktop/screensaver] picture-uri' settings in +# /etc/dconf/db/local.d/* if already defined +for FILE in /etc/dconf/db/local.d/* +do + if grep -q -d skip "$ORG_GNOME_DESKTOP_SCREENSAVER" "$FILE" + then + if grep 'picture-uri' "$FILE" + then + sed -i "s/picture-uri=.*/picture-uri=string ''/g" "$FILE" + MODE_BLANK_DEFINED="TRUE" + fi + fi +done + +# Then define '[org/gnome/desktop/screensaver] picture-uri' setting +# if still not defined yet +if [ "$MODE_BLANK_DEFINED" != "TRUE" ] +then + echo "" >> $SSG_DCONF_MODE_BLANK_FILE + echo "[org/gnome/desktop/screensaver]" >> $SSG_DCONF_MODE_BLANK_FILE + echo "picture-uri=string ''" >> $SSG_DCONF_MODE_BLANK_FILE +fi + +# Verify if 'picture-uri' modification is locked. If not, lock it +if ! grep -q "^/${ORG_GNOME_DESKTOP_SCREENSAVER}/picture-uri$" /etc/dconf/db/local.d/locks/* +then + # Check if "$SCREENSAVER_LOCK_FILE" exists. If not, create it. + if [ ! -f "$SCREENSAVER_LOCKS_FILE" ] + then + touch "$SCREENSAVER_LOCKS_FILE" + fi + echo "/${ORG_GNOME_DESKTOP_SCREENSAVER}/picture-uri" >> "$SCREENSAVER_LOCKS_FILE" +fi + + + + + + + + + + Disable Full User Name on Splash Shield + +By default when the screen is locked, the splash shield will show the user's +full name. This should be disabled to prevent casual observers from seeing +who has access to the system. This can be disabled by adding or setting +show-full-name-in-top-bar to false in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/desktop/screensaver] +show-full-name-in-top-bar=false + +Once the settings have been added, add a lock to +/etc/dconf/db/gdm.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/desktop/screensaver/show-full-name-in-top-bar +After the settings have been set, run dconf update. + + +Setting the splash screen to not reveal the logged in user's name +conceals who has access to the system from passersby. + + + + + + + + + + + + GNOME System Settings + +GNOME provides configuration and functionality to a graphical desktop environment +that changes grahical configurations or allow a user to perform +actions that users normally would not be able to do in non-graphical mode such as +remote access configuration, power policies, Geo-location, etc. +Configuring such settings in GNOME will prevent accidential graphical configuration +changes by users from taking place. + + + Disable Ctrl-Alt-Del Reboot Key Sequence in GNOME3 + +By default, GNOME will reboot the system if the Ctrl-Alt-Del +key sequence is pressed. + +To configure the system to ignore the Ctrl-Alt-Del key sequence from the +Graphical User Interface (GUI) instead of rebooting the system, add or set +logout to '' in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/settings-daemon/plugins/media-keys] +logout='' + +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/settings-daemon/plugins/media-keys/logout +After the settings have been set, run dconf update. + + AC-6 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-TBD + +A locally logged-in user who presses Ctrl-Alt-Del, when at the console, +can reboot the system. If accidentally pressed, as could happen in +the case of mixed OS environment, this can create the risk of short-term +loss of availability of systems due to unintentional reboot. + + + + + + + + + + + Disable User Administration in GNOME3 + +By default, GNOME will allow all users to have some administratrion +capability. This should be disabled so that non-administrative users are not making +configuration changes. To configure the system to disable user administration +capability in the Graphical User Interface (GUI), add or set +user-administration-disabled to true in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/desktop/lockdown] +user-administration-disabled=true + +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/desktop/lockdown/user-administration-disabled +After the settings have been set, run dconf update. + + +Allowing all users to have some administratrive capabilities to the system through +the Graphical User Interface (GUI) when they would not have them otherwise could allow +unintended configuration changes as well as a nefarious user the capability to make system +changes such as adding new accounts, etc. + + + + + + + + + + + Disable Power Settings in GNOME3 + +By default, GNOME enables a power profile designed for mobile devices +with battery usage. While useful for mobile devices, this setting should be disabled +for all other systems. To configure the system to disable the power setting, add or set +active to false in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/settings-daemon/plugins/power] +active=false + +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/settings-daemon/plugins/power +After the settings have been set, run dconf update. + + +Power settings should not be enabled on systems that are not mobile devices. +Enabling power settings on non-mobile devices could have unintended processing +consequences on standard systems. + + + + + + + + + + + Disable Geolocation in GNOME3 + GNOME allows the clock and applications to track and access location +information. This setting should be disabled as applications should not track +system location. To configure the system to disable location tracking, add or set +enabled to false in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/system/location] +enabled=false + +To configure the clock to disable location tracking, add or set +geolocation to false in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/clocks] +geolocation=false + +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/system/location/enabled +/org/gnome/clocks/geolocation +After the settings have been set, run dconf update. + + +Power settings should not be enabled on systems that are not mobile devices. +Enabling power settings on non-mobile devices could have unintended processing +consequences on standard systems. + + + + + + + + + + + + GNOME Network Settings + +GNOME network settings that apply to the graphical interface. + + + Disable WIFI Network Connection Creation in GNOME3 + GNOME allows users to create ad-hoc wireless connections through the +NetworkManager applet. Wireless connections should be disabled by +adding or setting disable-wifi-create to true in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/nm-applet] +disable-wifi-create=true + +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/nm-applet/disable-wifi-create +After the settings have been set, run dconf update. + + +Wireless network connections should not be allowed to be configured by general +users on a given system as it could open the system to backdoor attacks. + + + + + + + + + + + Disable WIFI Network Notification in GNOME3 + +By default, GNOME disables WIFI notification. This should be permanently set +so that users do not connect to a wireless network when the system finds one. +While useful for mobile devices, this setting should be disabled for all other systems. +To configure the system to disable the WIFI notication, add or set +suppress-wireless-networks-available to true in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/nm-applet] +suppress-wireless-networks-available=true + +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/nm-applet/suppress-wireless-networks-available +After the settings have been set, run dconf update. + + +Wireless network connections should not be allowed to be configured by general +users on a given system as it could open the system to backdoor attacks. + + + + + + + + + + + + GNOME Remote Access Settings + +GNOME remote access settings that apply to the graphical interface. + + + Require Credential Prompting for Remote Access in GNOME3 + +By default, GNOME does not require credentials when using Vino for +remote access. To configure the system to require remote credentials, add or set +authentication-methods to ['vnc'] in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/Vino] +authentication-methods=['vnc'] + +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/Vino/authentication-methods +After the settings have been set, run dconf update. + + +Username and password prompting is required for remote access. Otherwise, non-authorized +and nefarious users can access the system freely. + + + + + + + + + + + Require Encryption for Remote Access in GNOME3 + +By default, GNOME requires encryption when using Vino for remote access. +To prevent remote access encryption from being disabled, add or set +require-encryption to true in +/etc/dconf/db/local.d/00-security-settings. For example: +[org/gnome/Vino] +require-encryption=true + +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/Vino/require-encryption +After the settings have been set, run dconf update. + + CM-2(1)(b) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-TBD + +Open X displays allow an attacker to capture keystrokes and to execute commands +remotely. + + + + + + + + + + + + GNOME Media Settings + +GNOME media settings that apply to the graphical interface. + + + Disable GNOME3 Automounting + The system's default desktop environment, GNOME3, will mount +devices and removable media (such as DVDs, CDs and USB flash drives) whenever +they are inserted into the system. To disable automount and autorun within GNOME3, add or set +automount to false, automount-open to false, and +autorun-never to true in /etc/dconf/db/local.d/00-security-settings. +For example: +[org/gnome/desktop/media-handling] +automount=false +automount-open=false +autorun-never=true +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/desktop/media-handling/automount +/org/gnome/desktop/media-handling/auto-open +/org/gnome/desktop/media-handling/autorun-never +After the settings have been set, run dconf update. + + AC-19(a) + AC-19(d) + AC-19(e) + Disabling automatic mounting in GNOME3 can prevent +the introduction of malware via removable media. +It will, however, also prevent desktop users from legitimate use +of removable media. + + + + + + + + + + + Disable All GNOME3 Thumbnailers + The system's default desktop environment, GNOME3, uses +a number of different thumbnailer programs to generate thumbnails +for any new or modified content in an opened folder. To disable the +execution of these thumbnail applications, add or set disable-all +to true in /etc/dconf/db/local.d/00-security-settings. +For example: +[org/gnome/desktop/thumbnailers] +disable-all=true +Once the settings have been added, add a lock to +/etc/dconf/db/local.d/locks/00-security-settings-lock to prevent user modification. +For example: +/org/gnome/desktop/thumbnailers/disable-all +After the settings have been set, run dconf update. +This effectively prevents an attacker from gaining access to a +system through a flaw in GNOME3's Nautilus thumbnail creators. + + CM-7 + An attacker with knowledge of a flaw in a GNOME3 thumbnailer application could craft a malicious +file to exploit this flaw. Assuming the attacker could place the malicious file on the local filesystem +(via a web upload for example) and assuming a user browses the same location using Nautilus, the +malicious file would exploit the thumbnailer with the potential for malicious code execution. It +is best to disable these thumbnailer applications unless they are explicitly required. + + + + + + + + + + + + Sudo + Sudo, which stands for "su 'do'", provides the ability to delegate authority +to certain users, groups of users, or system administrators. When configured for system +users and/or groups, Sudo can allow a user or group to execute privileged commands +that normally only root is allowed to execute. + +For more information on Sudo and addition Sudo configuration options, see +https://www.sudo.ws + + + Ensure NOPASSWD Is Not Used in Sudo + +The sudo NOPASSWD tag, when specified, allows a user to execute commands using +sudo without having to authenticate. This should be disabled by making sure that the +NOPASSWD tag does not exist in /etc/sudoers configuration file or +any sudo configuration snippets in /etc/sudoers.d. + + IA-11 + 2038 + RHEL-07-01038 + SRG-OS-000373-GPOS-00156 + SRG-OS-000373-GPOS-00157 + SRG-OS-000373-GPOS-00158 + +Without re-authentication, users may access resources or perform tasks for which they +do not have authorization. + +When operating systems provide the capability to escalate a functional capability, it +is critical that the user re-authenticate. + + + + + + + + + + + Ensure !authenticate Is Not Used in Sudo + +The sudo !authenticate option, when specified, allows a user to execute commands using +sudo without having to authenticate. This should be disabled by making sure that the +!authenticate option does not exist in /etc/sudoers configuration file or +any sudo configuration snippets in /etc/sudoers.d. + + IA-11 + 2038 + RHEL-07- + SRG-OS-000373-GPOS-00156 + SRG-OS-000373-GPOS-00157 + SRG-OS-000373-GPOS-00158 + +Without re-authentication, users may access resources or perform tasks for which they +do not have authorization. + +When operating systems provide the capability to escalate a functional capability, it +is critical that the user re-authenticate. + + + + + + + + + + + + + File Permissions and Masks + Traditional Unix security relies heavily on file and +directory permissions to prevent unauthorized users from reading or +modifying files to which they should not have access. + +Several of the commands in this section search filesystems +for files or directories with certain characteristics, and are +intended to be run on every local partition on a given system. +When the variable PART appears in one of the commands below, +it means that the command is intended to be run repeatedly, with the +name of each local partition substituted for PART in turn. + +The following command prints a list of all xfs partitions on the local +system, which is the default filesystem for Red Hat Enterprise Linux +7 installations: +$ mount -t xfs | awk '{print $3}' +For any systems that use a different +local filesystem type, modify this command as appropriate. + + + Restrict Partition Mount Options + System partitions can be mounted with certain options +that limit what files on those partitions can do. These options +are set in the /etc/fstab configuration file, and can be +used to make certain types of malicious behavior more difficult. + + Removable Partition + This value is used by the checks mount_option_nodev_removable_partitions, mount_option_nodev_removable_partitions, +and mount_option_nodev_removable_partitions to ensure that the correct mount options are set on partitions mounted from +removable media such as CD-ROMs, USB keys, and floppy drives. This value should be modified to reflect any removable +partitions that are required on the local system. + /dev/cdrom + + + Add nodev Option to Non-Root Local Partitions + The nodev mount option prevents files from being +interpreted as character or block devices. +Legitimate character and block devices should exist only in +the /dev directory on the root partition or within chroot +jails built for system services. + + Add the nodev option to the fourth column of + /etc/fstab for the line which controls mounting of + any non-root local partitions. + + + CM-7 + 1.1.11 + The nodev mount option prevents files from being +interpreted as character or block devices. The only legitimate location +for device files is the /dev directory located on the root partition. +The only exception to this is chroot jails, for which it is not advised +to set nodev on these filesystems. + + + + + + + Add nodev Option to Removable Media Partitions + The nodev mount option prevents files from being +interpreted as character or block devices. +Legitimate character and block devices should exist only in +the /dev directory on the root partition or within chroot +jails built for system services. + + Add the nodev option to the fourth column of + /etc/fstab for the line which controls mounting of + any removable media partitions. + + + AC-19(a) + AC-19(d) + AC-19(e) + CM-7 + MP-2 + The only legitimate location for device files is the /dev directory +located on the root partition. An exception to this is chroot jails, and it is +not advised to set nodev on partitions which contain their root +filesystems. + + + + + + + + Add noexec Option to Removable Media Partitions + The noexec mount option prevents the direct +execution of binaries on the mounted filesystem. +Preventing the direct execution of binaries from removable media (such as a USB +key) provides a defense against malicious software that may be present on such +untrusted media. + + Add the noexec option to the fourth column of + /etc/fstab for the line which controls mounting of + any removable media partitions. + + + AC-19(a) + AC-19(d) + AC-19(e) + CM-7 + MP-2 + 87 + 1.1.12 + Allowing users to execute binaries from removable media such as USB keys exposes +the system to potential compromise. + + + + + + + + + + + Add nosuid Option to Removable Media Partitions + The nosuid mount option prevents set-user-identifier (SUID) +and set-group-identifier (SGID) permissions from taking effect. These permissions +allow users to execute binaries with the same permissions as the owner and group +of the file respectively. Users should not be allowed to introduce SUID and SGID +files into the system via partitions mounted from removeable media. + + Add the nosuid option to the fourth column of + /etc/fstab for the line which controls mounting of + any removable media partitions. + + + AC-19(a) + AC-19(d) + AC-19(e) + CM-7 + MP-2 + 1.1.13 + The presence of SUID and SGID executables should be tightly controlled. Allowing +users to introduce SUID or SGID binaries from partitions mounted off of +removable media would allow them to introduce their own highly-privileged programs. + + + + + + + + Add nodev Option to /tmp + +The nodev mount option can be used to prevent device files from +being created in /tmp. +Legitimate character and block devices should not exist +within temporary directories like /tmp. + + Add the nodev option to the fourth column of + /etc/fstab for the line which controls mounting of + /tmp. + + + CM-7 + MP-2 + 1.1.2 + The only legitimate location for device files is the /dev directory +located on the root partition. The only exception to this is chroot jails. + + + + + + + Add noexec Option to /tmp + The noexec mount option can be used to prevent binaries +from being executed out of /tmp. + + Add the noexec option to the fourth column of + /etc/fstab for the line which controls mounting of + /tmp. + + + CM-7 + MP-2 + 1.1.4 + Allowing users to execute binaries from world-writable directories +such as /tmp should never be necessary in normal operation and +can expose the system to potential compromise. + + + + + + + Add nosuid Option to /tmp + The nosuid mount option can be used to prevent +execution of setuid programs in /tmp. The SUID and SGID permissions +should not be required in these world-writable directories. + + Add the nosuid option to the fourth column of + /etc/fstab for the line which controls mounting of + /tmp. + + + CM-7 + MP-2 + 1.1.3 + The presence of SUID and SGID executables should be tightly controlled. Users +should not be able to execute SUID or SGID binaries from temporary storage partitions. + + + + + + + Add nodev Option to /dev/shm + The nodev mount option can be used to prevent creation +of device files in /dev/shm. +Legitimate character and block devices should not exist +within temporary directories like /dev/shm. + + Add the nodev option to the fourth column of + /etc/fstab for the line which controls mounting of + /dev/shm. + + + CM-7 + MP-2 + 1.1.14 + The only legitimate location for device files is the /dev directory +located on the root partition. The only exception to this is chroot jails. + + + + + + + Add noexec Option to /dev/shm + The noexec mount option can be used to prevent binaries +from being executed out of /dev/shm. +It can be dangerous to allow the execution of binaries +from world-writable temporary storage directories such as /dev/shm. + + Add the noexec option to the fourth column of + /etc/fstab for the line which controls mounting of + /dev/shm. + + + CM-7 + MP-2 + 1.1.16 + Allowing users to execute binaries from world-writable directories +such as /dev/shm can expose the system to potential compromise. + + + + + + + Add nosuid Option to /dev/shm + The nosuid mount option can be used to prevent execution +of setuid programs in /dev/shm. The SUID and SGID permissions should not +be required in these world-writable directories. + + Add the nosuid option to the fourth column of + /etc/fstab for the line which controls mounting of + /dev/shm. + + + CM-7 + MP-2 + 1.1.14 + The presence of SUID and SGID executables should be tightly controlled. Users +should not be able to execute SUID or SGID binaries from temporary storage partitions. + + + + + + + Bind Mount /var/tmp To /tmp + The /var/tmp directory is a world-writable directory. +Bind-mount it to /tmp in order to consolidate temporary storage into +one location protected by the same techniques as /tmp. To do so, edit +/etc/fstab and add the following line: +/tmp /var/tmp none rw,nodev,noexec,nosuid,bind 0 0 +See the mount(8) man page for further explanation of bind mounting. + + CM-7 + 1.1.6 + Having multiple locations for temporary storage is not required. Unless absolutely +necessary to meet requirements, the storage location /var/tmp should be bind mounted to +/tmp and thus share the same protections. + + + + + + + + Restrict Dynamic Mounting and Unmounting of +Filesystems + Linux includes a number of facilities for the automated addition +and removal of filesystems on a running system. These facilities may be +necessary in many environments, but this capability also carries some risk -- whether direct +risk from allowing users to introduce arbitrary filesystems, +or risk that software flaws in the automated mount facility itself could +allow an attacker to compromise the system. + +This command can be used to list the types of filesystems that are +available to the currently executing kernel: +$ find /lib/modules/`uname -r`/kernel/fs -type f -name '*.ko' +If these filesystems are not required then they can be explicitly disabled +in a configuratio file in /etc/modprobe.d. + + + Disable Modprobe Loading of USB Storage Driver + +To prevent USB storage devices from being used, configure the kernel module loading system +to prevent automatic loading of the USB storage driver. + +To configure the system to prevent the usb-storage +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install usb-storage /bin/true +This will prevent the modprobe program from loading the usb-storage +module, but will not prevent an administrator (or another program) from using the +insmod program to load the module manually. + AC-19(a) + AC-19(d) + AC-19(e) + IA-3 + 366 + 778 + 1958 + SRG-OS-000114-GPOS-00059 + SRG-OS-000378-GPOS-0016 + SRG-OS-000480-GPOS-00227 + RHEL-07-020160 + USB storage devices such as thumb drives can be used to introduce +malicious software. + + echo "install usb-storage /bin/true" > /etc/modprobe.d/usb-storage.conf + + + + + + + + + + Disable Kernel Support for USB via Bootloader Configuration + +All USB support can be disabled by adding the nousb +argument to the kernel's boot loader configuration. To do so, +append "nousb" to the kernel line in /etc/default/grub as shown: +kernel /vmlinuz-VERSION ro vga=ext root=/dev/VolGroup00/LogVol00 rhgb quiet nousb +WARNING: Disabling all kernel support for USB will cause problems for +systems with USB-based keyboards, mice, or printers. This configuration is +infeasible for systems which require USB devices, which is common. + AC-19(a) + AC-19(d) + AC-19(e) + 1250 + Disabling the USB subsystem within the Linux kernel at system boot will +protect against potentially malicious USB devices, although it is only practical +in specialized systems. + + + +# Correct the form of default kernel command line in /etc/default/grub +if ! grep -q ^GRUB_CMDLINE_LINUX=\".*nousb.*\" /etc/default/grub; +then + # Edit configuration setting + # Append 'nousb' argument to /etc/default/grub (if not present yet) + sed -i "s/\(GRUB_CMDLINE_LINUX=\)\"\(.*\)\"/\1\"\2 nousb\"/" /etc/default/grub + # Edit runtime setting + # Correct the form of kernel command line for each installed kernel in the bootloader + /sbin/grubby --update-kernel=ALL --args="nousb" +fi + + + + + + + Disable Booting from USB Devices in Boot Firmware + Configure the system boot firmware (historically called BIOS on PC +systems) to disallow booting from USB drives. + + AC-19(a) + AC-19(d) + AC-19(e) + 1250 + Booting a system from a USB device would allow an attacker to +circumvent any security measures provided by the operating system. Attackers +could mount partitions and modify the configuration of the OS. + + + + Assign Password to Prevent Changes to Boot Firmware Configuration + Assign a password to the system boot firmware (historically called BIOS on PC +systems) to require a password for any configuration changes. + + Assigning a password to the system boot firmware prevents anyone +with physical access from configuring the system to boot +from local media and circumvent the operating system's access controls. +For systems in physically secure locations, such as +a data center or Sensitive Compartmented Information Facility (SCIF), this risk must be weighed +against the risk of administrative personnel being unable to conduct recovery operations in +a timely fashion. + + + + + Disable the Automounter + The autofs daemon mounts and unmounts filesystems, such as user +home directories shared via NFS, on demand. In addition, autofs can be used to handle +removable media, and the default configuration provides the cdrom device as /misc/cd. +However, this method of providing access to removable media is not common, so autofs +can almost always be disabled if NFS is not in use. Even if NFS is required, it may be +possible to configure filesystem mounts statically by editing /etc/fstab +rather than relying on the automounter. + + + The autofs service can be disabled with the following command: + $ sudo systemctl disable autofs.service + + AC-19(a) + AC-19(d) + AC-19(e) + IA-3 + 366 + 778 + 1958 + SRG-OS-000114-GPOS-00059 + SRG-OS-000378-GPOS-00163 + SRG-OS-000480-GPOS-00227 + RHEL-07-020160 + Disabling the automounter permits the administrator to +statically control filesystem mounting through /etc/fstab. + + + # +# Disable autofs.service for all systemd targets +# +systemctl disable autofs.service + +# +# Stop autofs.service if currently running +# +systemctl stop autofs.service + + + + + + + + + + Disable Mounting of cramfs + +To configure the system to prevent the cramfs +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install cramfs /bin/true +This effectively prevents usage of this uncommon filesystem. + + CM-7 + 1.1.18 + Linux kernel modules which implement filesystems that are not needed by the +local system should be disabled. + + echo "install cramfs /bin/true" > /etc/modprobe.d/cramfs.conf + + + + + + + Disable Mounting of freevxfs + +To configure the system to prevent the freevxfs +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install freevxfs /bin/true +This effectively prevents usage of this uncommon filesystem. + + CM-7 + 1.1.19 + Linux kernel modules which implement filesystems that are not needed by the +local system should be disabled. + + echo "install freevxfs /bin/true" > /etc/modprobe.d/freevxfs.conf + + + + + + + Disable Mounting of jffs2 + +To configure the system to prevent the jffs2 +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install jffs2 /bin/true +This effectively prevents usage of this uncommon filesystem. + + CM-7 + 1.1.20 + Linux kernel modules which implement filesystems that are not needed by the +local system should be disabled. + + echo "install jffs2 /bin/true" > /etc/modprobe.d/jffs2.conf + + + + + + + Disable Mounting of hfs + +To configure the system to prevent the hfs +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install hfs /bin/true +This effectively prevents usage of this uncommon filesystem. + + CM-7 + 1.1.21 + Linux kernel modules which implement filesystems that are not needed by the +local system should be disabled. + + echo "install hfs /bin/true" > /etc/modprobe.d/hfs.conf + + + + + + + Disable Mounting of hfsplus + +To configure the system to prevent the hfsplus +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install hfsplus /bin/true +This effectively prevents usage of this uncommon filesystem. + + CM-7 + 1.1.22 + Linux kernel modules which implement filesystems that are not needed by the +local system should be disabled. + + echo "install hfsplus /bin/true" > /etc/modprobe.d/hfsplus.conf + + + + + + + Disable Mounting of squashfs + +To configure the system to prevent the squashfs +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install squashfs /bin/true +This effectively prevents usage of this uncommon filesystem. + + CM-7 + 1.1.23 + Linux kernel modules which implement filesystems that are not needed by the +local system should be disabled. + + echo "install squashfs /bin/true" > /etc/modprobe.d/squashfs.conf + + + + + + + Disable Mounting of udf + +To configure the system to prevent the udf +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install udf /bin/true +This effectively prevents usage of this uncommon filesystem. + + CM-7 + 1.1.24 + Linux kernel modules which implement filesystems that are not needed by the +local system should be disabled. + + echo "install udf /bin/true" > /etc/modprobe.d/udf.conf + + + + + + + + Verify Permissions on Important Files and +Directories + Permissions for many files on a system must be set +restrictively to ensure sensitive information is properly protected. +This section discusses important +permission restrictions which can be verified +to ensure that no harmful discrepancies have +arisen. + + Verify Permissions on Files with Local Account Information and Credentials + The default restrictive permissions for files which act as +important security databases such as passwd, shadow, +group, and gshadow files must be maintained. Many utilities +need read access to the passwd file in order to function properly, but +read access to the shadow file allows malicious attacks against system +passwords, and should never be enabled. + + Verify User Who Owns shadow File + + + To properly set the owner of /etc/shadow, run the command: + $ sudo chown root /etc/shadow + + AC-6 + + Req-8.7.c + Test attestation on 20121026 by DS + The /etc/shadow file contains the list of local +system accounts and stores password hashes. Protection of this file is +critical for system security. Failure to give ownership of this file +to root provides the designated owner with access to sensitive information +which could weaken the system security posture. + + chown root /etc/shadow + + + + + + + + + + Verify Group Who Owns shadow File + + + To properly set the group owner of /etc/shadow, run the command: + $ sudo chgrp root /etc/shadow + + AC-6 + + Req-8.7.c + Test attestation on 20121026 by DS + The /etc/shadow file stores password hashes. Protection of this file is +critical for system security. + + chgrp root /etc/shadow + + + + + + + + + + Verify Permissions on shadow File + + + To properly set the permissions of /etc/shadow, run the command: + $ sudo chmod 0000 /etc/shadow + + AC-6 + + Req-8.7.c + Test attestation on 20121026 by DS + The /etc/shadow file contains the list of local +system accounts and stores password hashes. Protection of this file is +critical for system security. Failure to give ownership of this file +to root provides the designated owner with access to sensitive information +which could weaken the system security posture. + + chmod 0000 /etc/shadow + + + + + + + + + + Verify User Who Owns group File + + + To properly set the owner of /etc/group, run the command: + $ sudo chown root /etc/group + + AC-6 + Req-8.7.c + Test attestation on 20121026 by DS + The /etc/group file contains information regarding groups that are configured +on the system. Protection of this file is important for system security. + + chown root /etc/group + + + + + + + + + + Verify Group Who Owns group File + + + To properly set the group owner of /etc/group, run the command: + $ sudo chgrp root /etc/group + + AC-6 + + Req-8.7.c + Test attestation on 20121026 by DS + The /etc/group file contains information regarding groups that are configured +on the system. Protection of this file is important for system security. + + chgrp root /etc/group + + + + + + + + + + Verify Permissions on group File + + + To properly set the permissions of /etc/group, run the command: + $ sudo chmod 644 /etc/group + + AC-6 + + Req-8.7.c + Test attestation on 20121026 by DS + The /etc/group file contains information regarding groups that are configured +on the system. Protection of this file is important for system security. + + chmod 644 /etc/group + + + + + + + + + + Verify User Who Owns gshadow File + + + To properly set the owner of /etc/gshadow, run the command: + $ sudo chown root /etc/gshadow + + AC-6 + + Test attestation on 20121026 by DS + The /etc/gshadow file contains group password hashes. Protection of this file +is critical for system security. + + chown root /etc/gshadow + + + + + + + + + + Verify Group Who Owns gshadow File + + + To properly set the group owner of /etc/gshadow, run the command: + $ sudo chgrp root /etc/gshadow + + AC-6 + + Test attestation on 20121026 by DS + The /etc/gshadow file contains group password hashes. Protection of this file +is critical for system security. + + chgrp root /etc/gshadow + + + + + + + + + + Verify Permissions on gshadow File + + + To properly set the permissions of /etc/gshadow, run the command: + $ sudo chmod 0000 /etc/gshadow + + AC-6 + + Test attestation on 20121026 by DS + The /etc/gshadow file contains group password hashes. Protection of this file +is critical for system security. + + chmod 0000 /etc/gshadow + + + + + + + + + + Verify User Who Owns passwd File + + + To properly set the owner of /etc/passwd, run the command: + $ sudo chown root /etc/passwd + + AC-6 + + Req-8.7.c + Test attestation on 20121026 by DS + The /etc/passwd file contains information about the users that are configured on +the system. Protection of this file is critical for system security. + + chown root /etc/passwd + + + + + + + + + + Verify Group Who Owns passwd File + + + To properly set the group owner of /etc/passwd, run the command: + $ sudo chgrp root /etc/passwd + + AC-6 + + Req-8.7.c + Test attestation on 20121026 by DS + The /etc/passwd file contains information about the users that are configured on +the system. Protection of this file is critical for system security. + + chgrp root /etc/passwd + + + + + + + + + + Verify Permissions on passwd File + + + To properly set the permissions of /etc/passwd, run the command: + $ sudo chmod 0644 /etc/passwd + + AC-6 + + Req-8.7.c + Test attestation on 20121026 by DS + If the /etc/passwd file is writable by a group-owner or the +world the risk of its compromise is increased. The file contains the list of +accounts on the system and associated information, and protection of this file +is critical for system security. + + chmod 0644 /etc/passwd + + + + + + + + + + + Verify File Permissions Within Some Important Directories + Some directories contain files whose confidentiality or integrity +is notably important and may also be susceptible to misconfiguration over time, particularly if +unpackaged software is installed. As such, +an argument exists to verify that files' permissions within these directories remain +configured correctly and restrictively. + + + Verify that Shared Library Files Have Restrictive Permissions + System-wide shared library files, which are linked to executables +during process load time or run time, are stored in the following directories +by default: +/lib +/lib64 +/usr/lib +/usr/lib64 + +Kernel modules, which can be added to the kernel during runtime, are +stored in /lib/modules. All files in these directories +should not be group-writable or world-writable. If any file in these +directories is found to be group-writable or world-writable, correct +its permission with the following command: +$ sudo chmod go-w FILE + + AC-6 + + Test attestation on 20121026 by DS + Files from shared library directories are loaded into the address +space of processes (including privileged ones) or of the kernel itself at +runtime. Restrictive permissions are necessary to protect the integrity of the system. + + + DIRS="/lib /lib64 /usr/lib /usr/lib64" +for dirPath in $DIRS; do + find "$dirPath" -perm /022 -type f -exec chmod go-w '{}' \; +done + + + + + + + + + + Verify that Shared Library Files Have Root Ownership + System-wide shared library files, which are linked to executables +during process load time or run time, are stored in the following directories +by default: +/lib +/lib64 +/usr/lib +/usr/lib64 + +Kernel modules, which can be added to the kernel during runtime, are also +stored in /lib/modules. All files in these directories should be +owned by the root user. If the directory, or any file in these +directories, is found to be owned by a user other than root correct its +ownership with the following command: +$ sudo chown root FILE + + AC-6 + + Test attestation on 20130914 by swells + Files from shared library directories are loaded into the address +space of processes (including privileged ones) or of the kernel itself at +runtime. Proper ownership is necessary to protect the integrity of the system. + + + for LIBDIR in /usr/lib /usr/lib64 /lib /lib64 +do + if [ -d $LIBDIR ] + then + find -L $LIBDIR \! -user root -exec chown root {} \; + fi +done + + + + + + + + + + Verify that System Executables Have Restrictive Permissions + +System executables are stored in the following directories by default: +/bin +/sbin +/usr/bin +/usr/libexec +/usr/local/bin +/usr/local/sbin +/usr/sbin +All files in these directories should not be group-writable or world-writable. +If any file FILE in these directories is found +to be group-writable or world-writable, correct its permission with the +following command: +$ sudo chmod go-w FILE + + AC-6 + + 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. + + + 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 '{}' \; +done + + + + + + + + + + Verify that System Executables Have Root Ownership + +System executables are stored in the following directories by default: +/bin +/sbin +/usr/bin +/usr/libexec +/usr/local/bin +/usr/local/sbin +/usr/sbin +All files in these directories should be owned by the root user. +If any file FILE in these directories is found +to be owned by a user other than root, correct its ownership with the +following command: +$ sudo chown root FILE + + AC-6 + + 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. + + + find /bin/ \ +/usr/bin/ \ +/usr/local/bin/ \ +/sbin/ \ +/usr/sbin/ \ +/usr/local/sbin/ \ +/usr/libexec \ +\! -user root -execdir chown root {} \; + + + + + + + + + + + Verify that All World-Writable Directories Have Sticky Bits Set + When the so-called 'sticky bit' is set on a directory, +only the owner of a given file may remove that file from the +directory. Without the sticky bit, any user with write access to a +directory may remove any file in the directory. Setting the sticky +bit prevents users from removing each other's files. In cases where +there is no reason for a directory to be world-writable, a better +solution is to remove that permission rather than to set the sticky +bit. However, if a directory is used by a particular application, +consult that application's documentation instead of blindly +changing modes. + +To set the sticky bit on a world-writable directory DIR, run the +following command: +$ sudo chmod +t DIR + + AC-6 + 1.1.17 + Test attestation on 20120929 by swells + +Failing to set the sticky bit on public directories allows unauthorized users to delete files in the directory structure. + +The only authorized public directories are those temporary directories supplied with the system, +or those designed to be temporary file repositories. The setting is normally reserved for directories +used by the system, by users for temporary file storage (such as /tmp), and for directories +requiring global read/write access. + + + + + + + + + + + Ensure No World-Writable Files Exist + It is generally a good idea to remove global (other) write +access to a file when it is discovered. However, check with +documentation for specific applications before making changes. +Also, monitor for recurring world-writable files, as these may be +symptoms of a misconfigured application or user +account. + AC-6 + +Data in world-writable files can be modified by any +user on the system. In almost all circumstances, files can be +configured using a combination of user and group permissions to +support whatever legitimate access is needed without the risk +caused by world-writable files. + + + + + + + + + + Ensure All SGID Executables Are Authorized + The SGID (set group id) bit should be set only on files that were +installed via authorized means. A straightforward means of identifying +unauthorized SGID files is determine if any were not installed as part of an +RPM package, which is cryptographically verified. Investigate the origin +of any unpackaged SGID files. + + AC-6(1) + Executable files with the SGID permission run with the privileges of +the owner of the file. SGID files of uncertain provenance could allow for +unprivileged users to elevate privileges. The presence of these files should be +strictly controlled on the system. + + + + + + + + + + Ensure All SUID Executables Are Authorized + The SUID (set user id) bit should be set only on files that were +installed via authorized means. A straightforward means of identifying +unauthorized SGID files is determine if any were not installed as part of an +RPM package, which is cryptographically verified. Investigate the origin +of any unpackaged SUID files. + + AC-6(1) + Executable files with the SUID permission run with the privileges of +the owner of the file. SUID files of uncertain provenance could allow for +unprivileged users to elevate privileges. The presence of these files should be +strictly controlled on the system. + + + + + + + + + + Ensure All Files Are Owned by a User + If any files are not owned by a user, then the +cause of their lack of ownership should be investigated. +Following this, the files should be deleted or assigned to an +appropriate user. + + AC-6 + CM-6(b) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-020360 + +Unowned files do not directly imply a security problem, but they are generally +a sign that something is amiss. They may +be caused by an intruder, by incorrect software installation or +draft software removal, or by failure to remove all files belonging +to a deleted account. The files should be repaired so they +will not cause problems when accounts are created in the future, +and the cause should be discovered and addressed. + + + + + + + + + + + Ensure All Files Are Owned by a Group + If any files are not owned by a group, then the +cause of their lack of group-ownership should be investigated. +Following this, the files should be deleted or assigned to an +appropriate group. + + AC-6 + IA-2 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-020370 + +Unowned files do not directly imply a security problem, but they are generally +a sign that something is amiss. They may +be caused by an intruder, by incorrect software installation or +draft software removal, or by failure to remove all files belonging +to a deleted account. The files should be repaired so they +will not cause problems when accounts are created in the future, +and the cause should be discovered and addressed. + + + + + + + + + + + Ensure All World-Writable Directories Are Owned by a System Account + All directories in local partitions which are +world-writable should be owned by root or another +system account. If any world-writable directories are not +owned by a system account, this should be investigated. +Following this, the files should be deleted or assigned to an +appropriate group. + + AC-6 + Test attestation on 20120929 by swells + +Allowing a user account to own a world-writable directory is +undesirable because it allows the owner of that directory to remove +or replace any files that may be placed in the directory by other +users. + + + + + + + + + + + + Restrict Programs from Dangerous Execution Patterns + The recommendations in this section are designed to +ensure that the system's features to protect against potentially +dangerous program execution are activated. +These protections are applied at the system initialization or +kernel level, and defend against certain types of badly-configured +or compromised programs. + + Daemon Umask + The umask is a per-process setting which limits +the default permissions for creation of new files and directories. +The system includes initialization scripts which set the default umask +for system daemons. + + + daemon umask + Enter umask for daemons + 022 + 022 + 027 + + + Set Daemon Umask + The file /etc/init.d/functions includes initialization +parameters for most or all daemons started at boot time. The default umask of +022 prevents creation of group- or world-writable files. To set the default +umask for daemons, edit the following line, inserting 022 or 027 for +UMASK appropriately: +umask +Setting the umask to too restrictive a setting can cause serious errors at +runtime. Many daemons on the system already individually restrict themselves to +a umask of 077 in their own init scripts. + + AC-6 + 3.1 + Test attestation on 20140912 by JL + The umask influences the permissions assigned to files created by a +process at run time. An unnecessarily permissive umask could result in files +being created with insecure permissions. + + +var_umask_for_daemons="" + +grep -q ^umask /etc/init.d/functions && \ + sed -i "s/umask.*/umask $var_umask_for_daemons/g" /etc/init.d/functions +if ! [ $? -eq 0 ]; then + echo "umask $var_umask_for_daemons" >> /etc/init.d/functions +fi + + + + + + + + + + + + Disable Core Dumps + A core dump file is the memory image of an executable +program when it was terminated by the operating system due to +errant behavior. In most cases, only software developers +legitimately need to access these files. The core dump files may +also contain sensitive information, or unnecessarily occupy large +amounts of disk space. + +Once a hard limit is set in /etc/security/limits.conf, a +user cannot increase that limit within his or her own session. If access +to core dumps is required, consider restricting them to only +certain users or groups. See the limits.conf man page for more +information. + +The core dumps of setuid programs are further protected. The +sysctl variable fs.suid_dumpable controls whether +the kernel allows core dumps from these programs at all. The default +value of 0 is recommended. + + Disable Core Dumps for All Users + To disable core dumps for all users, add the following line to +/etc/security/limits.conf: +* hard core 0 + + SC-5 + 1.6.1 + 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. + + echo "* hard core 0" >> /etc/security/limits.conf + + + + + + + + + + Disable Core Dumps for SUID programs + + + To set the runtime status of the fs.suid_dumpable kernel parameter, + run the following command: + $ sudo sysctl -w fs.suid_dumpable=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + fs.suid_dumpable = 0 + + SI-11 + 1.6.1 + The core dump of a setuid program is more likely to contain +sensitive data, as the program itself runs with greater privileges than the +user who initiated execution of the program. Disabling the ability for any +setuid program to write a core file decreases the risk of unauthorized access +of such data. + + # +# Set runtime for fs.suid_dumpable +# +sysctl -q -n -w fs.suid_dumpable=0 + +# +# If fs.suid_dumpable present in /etc/sysctl.conf, change value to "0" +# else, add "fs.suid_dumpable = 0" to /etc/sysctl.conf +# +if grep --silent ^fs.suid_dumpable /etc/sysctl.conf ; then + sed -i 's/^fs.suid_dumpable.*/fs.suid_dumpable = 0/g' /etc/sysctl.conf +else + echo -e "\n# Set fs.suid_dumpable to 0 per security requirements" >> /etc/sysctl.conf + echo "fs.suid_dumpable = 0" >> /etc/sysctl.conf +fi + + + + + + + + + + + Enable ExecShield + ExecShield describes kernel features that provide +protection against exploitation of memory corruption errors such as buffer +overflows. These features include random placement of the stack and other +memory regions, prevention of execution in memory that should only hold data, +and special handling of text buffers. These protections are enabled by default +on 32-bit systems and controlled through sysctl variables +kernel.exec-shield and kernel.randomize_va_space. On the latest +64-bit systems, kernel.exec-shield cannot be enabled or disabled with +sysctl. + + + Enable ExecShield + By default on Red Hat Enterprise Linux 7 64-bit systems, ExecShield +is enabled and can only be disabled if the hardware does not support ExecShield +or is disabled in /etc/default/grub. For Red Hat Enterprise Linux 7 +32-bit systems, sysctl can be used to enable ExecShield. + SC-39 + 2530 + Test attestation on 20121024 by DS + ExecShield uses the segmentation feature on all x86 systems +to prevent execution in memory higher than a certain address. It +writes an address as a limit in the code segment descriptor, to +control where code can be executed, on a per-process basis. When +the kernel places a process's memory regions such as the stack and +heap higher than this address, the hardware prevents execution in that +address range. This is enabled by default on the latest Red Hat and Fedora +systems if supported by the hardware. + + if [ $(getconf LONG_BIT) = "32" ] ; then + # + # Set runtime for kernel.exec-shield + # + sysctl -q -n -w kernel.exec-shield=1 + + # + # If kernel.exec-shield present in /etc/sysctl.conf, change value to "1" + # else, add "kernel.exec-shield = 1" to /etc/sysctl.conf + # + if grep --silent ^kernel.exec-shield /etc/sysctl.conf ; then + sed -i 's/^kernel.exec-shield.*/kernel.exec-shield = 1/g' /etc/sysctl.conf + else + echo -e "\n# Set kernel.exec-shield to 1 per security requirements" >> /etc/sysctl.conf + echo "kernel.exec-shield = 1" >> /etc/sysctl.d/sysctl.conf + fi +fi + +if [ $(getconf LONG_BIT) = "64" ] ; then + if grep --silent noexec /boot/grub2/grub*.cfg ; then + sed -i "s/noexec.*//g" /etc/default/grub + sed -i "s/noexec.*//g" /etc/grub.d/* + GRUBCFG=`ls | grep '.cfg$'` + grub2-mkconfig -o /boot/grub2/$GRUBCFG + fi +fi + + + + + + + + + + Enable Randomized Layout of Virtual Address Space + + + To set the runtime status of the kernel.randomize_va_space kernel parameter, + run the following command: + $ sudo sysctl -w kernel.randomize_va_space=2 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + kernel.randomize_va_space = 2 + + SC-30(2) + 1.6.1 + Test attestation on 20121024 by DS + Address space layout randomization (ASLR) makes it more difficult +for an attacker to predict the location of attack code they have introduced +into a process's address space during an attempt at exploitation. Additionally, ASLR +makes it more difficult for an attacker to know the location of existing code +in order to re-purpose it using return oriented programming (ROP) techniques. + + + +replace_or_append '/etc/sysctl.conf' '^kernel.randomize_va_space' '2' 'CCENUM' + + + + + + + + + + + Enable Execute Disable (XD) or No Execute (NX) Support on +x86 Systems + Recent processors in the x86 family support the +ability to prevent code execution on a per memory page basis. +Generically and on AMD processors, this ability is called No +Execute (NX), while on Intel processors it is called Execute +Disable (XD). This ability can help prevent exploitation of buffer +overflow vulnerabilities and should be activated whenever possible. +Extra steps must be taken to ensure that this protection is +enabled, particularly on 32-bit x86 systems. Other processors, such +as Itanium and POWER, have included such support since inception +and the standard kernel for those platforms supports the +feature. This is enabled by default on the latest Red Hat and +Fedora systems if supported by the hardware. + + Install PAE Kernel on Supported 32-bit x86 Systems + Systems that are using the 64-bit x86 kernel package +do not need to install the kernel-PAE package because the 64-bit +x86 kernel already includes this support. However, if the system is +32-bit and also supports the PAE and NX features as +determined in the previous section, the kernel-PAE package should +be installed to enable XD or NX support: +$ sudo yum install kernel-PAE +The installation process should also have configured the +bootloader to load the new kernel at boot. Verify this at reboot +and modify /etc/default/grub if necessary. + The kernel-PAE package should not be +installed on older systems that do not support the XD or NX bit, as +this may prevent them from booting. + CM-6(b) + On 32-bit systems that support the XD or NX bit, the vendor-supplied +PAE kernel is required to enable either Execute Disable (XD) or No Execute (NX) support. + + + + + + + Enable NX or XD Support in the BIOS + Reboot the system and enter the BIOS or Setup configuration menu. +Navigate the BIOS configuration menu and make sure that the option is enabled. The setting may be located +under a Security section. Look for Execute Disable (XD) on Intel-based systems and No Execute (NX) +on AMD-based systems. + CM-6(b) + Computers with the ability to prevent this type of code execution frequently put an option in the BIOS that will +allow users to turn the feature on or off at will. + + + + + Restrict Access to Kernel Message Buffer + + + To set the runtime status of the kernel.dmesg_restrict kernel parameter, + run the following command: + $ sudo sysctl -w kernel.dmesg_restrict=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + kernel.dmesg_restrict = 1 + + SI-11 + 1314 + Unprivileged access to the kernel syslog can expose sensitive kernel +address information. + + # +# Set runtime for kernel.dmesg_restrict +# +sysctl -q -n -w kernel.dmesg_restrict=1 + +# +# If kernel.dmesg_restrict present in /etc/sysctl.conf, change value to "1" +# else, add "kernel.dmesg_restrict = 1" to /etc/sysctl.conf +# +if grep --silent ^kernel.dmesg_restrict /etc/sysctl.conf ; then + sed -i 's/^kernel.dmesg_restrict.*/kernel.dmesg_restrict = 1/g' /etc/sysctl.conf +else + echo -e "\n# Set kernel.dmesg_restrict to 1 per security requirements" >> /etc/sysctl.conf + echo "kernel.dmesg_restrict = 1" >> /etc/sysctl.conf +fi + + + + + + + + + + + + SELinux + SELinux is a feature of the Linux kernel which can be +used to guard against misconfigured or compromised programs. +SELinux enforces the idea that programs should be limited in what +files they can access and what actions they can take. + +The default SELinux policy, as configured on Red Hat Enterprise Linux 7, has been +sufficiently developed and debugged that it should be usable on +almost any Red Hat machine with minimal configuration and a small +amount of system administrator training. This policy prevents +system services - including most of the common network-visible +services such as mail servers, FTP servers, and DNS servers - from +accessing files which those services have no valid reason to +access. This action alone prevents a huge amount of possible damage +from network attacks against services, from trojaned software, and +so forth. + +This guide recommends that SELinux be enabled using the +default (targeted) policy on every Red Hat system, unless that +system has unusual requirements which make a stronger policy +appropriate. + + + SELinux state + enforcing - SELinux security policy is enforced. +permissive - SELinux prints warnings instead of enforcing. +disabled - SELinux is fully disabled. + enforcing + enforcing + permissive + disabled + + + SELinux policy + Type of policy in use. Possible values are: +targeted - Only targeted network daemons are protected. +strict - Full SELinux protection. +mls - Multiple levels of security + targeted + targeted + mls + + + Ensure SELinux Not Disabled in /etc/default/grub + SELinux can be disabled at boot time by an argument in +/etc/default/grub. +Remove any instances of selinux=0 from the kernel arguments in that +file to prevent SELinux from being disabled at boot. + + AC-3 + AC-3(3) + AC-6 + AU-9 + 22 + 32 + 1.4.1 + Test attestation on 20121024 by DS + +Disabling a major host protection feature, such as SELinux, at boot time prevents +it from confining system services at boot time. Further, it increases +the chances that it will remain off during system operation. + + + sed -i --follow-symlinks "s/selinux=0//gI" /etc/default/grub /etc/grub2.cfg /etc/grub.d/* +sed -i --follow-symlinks "s/enforcing=0//gI" /etc/default/grub /etc/grub2.cfg /etc/grub.d/* + + + + + + + + + + Ensure SELinux State is Enforcing + The SELinux state should be set to at +system boot time. In the file /etc/selinux/config, add or correct the +following line to configure the system to boot into enforcing mode: +SELINUX= + + AC-3 + AC-3(3) + AC-4 + AC-6 + AU-9 + + 1.4.2 + Test attestation on 20121024 by DS + +Setting the SELinux state to enforcing ensures SELinux is able to confine +potentially compromised processes to the security policy, which is designed to +prevent them from causing damage to the system or further elevating their +privileges. + + + +var_selinux_state="" + +replace_or_append '/etc/sysconfig/selinux' '^SELINUX=' $var_selinux_state 'CCENUM' '%s=%s' + + + + + + + + + + + Configure SELinux Policy + The SELinux targeted policy is appropriate for +general-purpose desktops and servers, as well as systems in many other roles. +To configure the system to use this policy, add or correct the following line +in /etc/selinux/config: +SELINUXTYPE= +Other policies, such as mls, provide additional security labeling +and greater confinement but are not compatible with many general-purpose +use cases. + + AC-3 + AC-3(3) + AC-4 + AC-6 + AU-9 + + 1.4.3 + Test attestation on 20121024 by DS + +Setting the SELinux policy to targeted or a more specialized policy +ensures the system will confine processes that are likely to be +targeted for exploitation, such as network or system services. + +Note: During the development or debugging of SELinux modules, it is common to +temporarily place non-production systems in permissive mode. In such +temporary cases, SELinux policies should be developed, and once work +is completed, the system should be reconfigured to +. + + + +var_selinux_policy_name="" + +replace_or_append '/etc/sysconfig/selinux' '^SELINUXTYPE=' $var_selinux_policy_name 'CCENUM' '%s=%s' + + + + + + + + + + + Uninstall setroubleshoot Package + The SETroubleshoot service notifies desktop users of SELinux +denials. The service provides information around configuration errors, +unauthorized intrusions, and other potential errors. + + The setroubleshoot package can be removed with the following command: + $ sudo yum erase setroubleshoot + + 1.4.4 + The SETroubleshoot service is an unnecessary daemon to +have running on a server + + + + + + + Uninstall mcstrans Package + The mcstransd daemon provides category label information +to client processes requesting information. The label translations are defined +in /etc/selinux/targeted/setrans.conf. + + The mcstrans package can be removed with the following command: + $ sudo yum erase mcstrans + + Since this service is not used very often, disable it to reduce the +amount of potentially vulnerable code running on the system. + +NOTE: This rule was added in support of the CIS RHEL6 v1.2.0 benchmark. Please +note that Red Hat does not feel this rule is security relevant. + + + + + + + + Ensure No Daemons are Unconfined by SELinux + +Daemons for which the SELinux policy does not contain rules will inherit the +context of the parent process. Because daemons are launched during +startup and descend from the init process, they inherit the initrc_t context. + + +To check for unconfined daemons, run the following command: +$ sudo ps -eZ | egrep "initrc" | egrep -vw "tr|ps|egrep|bash|awk" | tr ':' ' ' | awk '{ print $NF }' +It should produce no output in a well-configured system. + + AC-6 + AU-9 + CM-7 + 1.4.6 + +Daemons which run with the initrc_t context may cause AVC denials, +or allow privileges that the daemon does not require. + + + + + + + + Ensure No Device Files are Unlabeled by SELinux + Device files, which are used for communication with important +system resources, should be labeled with proper SELinux types. If any device +files carry the SELinux type device_t, report the bug so that policy can be corrected. Supply information about what the device is and what programs use it. + + AC-6 + AU-9 + CM-7 + 22 + 32 + Test attestation on 20121024 by DS + +If a device file carries the SELinux type device_t, then SELinux +cannot properly restrict access to the device file. + + + + + + + + + + + + Account and Access Control + In traditional Unix security, if an attacker gains +shell access to a certain login account, they can perform any action +or access any file to which that account has access. Therefore, +making it more difficult for unauthorized people to gain shell +access to accounts, particularly to privileged accounts, is a +necessary part of securing a system. This section introduces +mechanisms for restricting access to accounts under +Red Hat Enterprise Linux 7. + + Protect Accounts by Restricting Password-Based Login + Conventionally, Unix shell accounts are accessed by +providing a username and password to a login program, which tests +these values for correctness using the /etc/passwd and +/etc/shadow files. Password-based login is vulnerable to +guessing of weak passwords, and to sniffing and man-in-the-middle +attacks against passwords entered over a network or at an insecure +console. Therefore, mechanisms for accessing accounts by entering +usernames and passwords should be restricted to those which are +operationally necessary. + + Restrict Root Logins + +Direct root logins should be allowed only for emergency use. +In normal situations, the administrator should access the system +via a unique unprivileged account, and then use su or sudo to execute +privileged commands. Discouraging administrators from accessing the +root account directly ensures an audit trail in organizations with +multiple administrators. Locking down the channels through which +root can connect directly also reduces opportunities for +password-guessing against the root account. The login program +uses the file /etc/securetty to determine which interfaces +should allow root logins. + +The virtual devices /dev/console +and /dev/tty* represent the system consoles (accessible via +the Ctrl-Alt-F1 through Ctrl-Alt-F6 keyboard sequences on a default +installation). The default securetty file also contains /dev/vc/*. +These are likely to be deprecated in most environments, but may be retained +for compatibility. Root should also be prohibited from connecting +via network protocols. Other sections of this document +include guidance describing how to prevent root from logging in via SSH. + + + Direct root Logins Not Allowed + To further limit access to the root account, administrators +can disable root logins at the console by editing the /etc/securetty file. +This file lists all devices the root user is allowed to login to. If the file does +not exist at all, the root user can login through any communication device on the +system, whether via the console or via a raw network interface. This is dangerous +as user can login to his machine as root via Telnet, which sends the password in +plain text over the network. By default, Red Hat Enteprise Linux's +/etc/securetty file only allows the root user to login at the console +physically attached to the machine. To prevent root from logging in, remove the +contents of this file. To prevent direct root logins, remove the contents of this +file by typing the following command: + +$ sudo echo > /etc/securetty + + + IA-2(1) + 6.4 + Test attestation on 20121024 by DS + +Disabling direct root logins ensures proper accountability and multifactor +authentication to privileged accounts. Users will first login, then escalate +to privileged (root) access via su / sudo. This is required for FISMA Low +and FISMA Moderate systems. + + + echo > /etc/securetty + + + + + + + + + + Restrict Virtual Console Root Logins + +To restrict root logins through the (deprecated) virtual console devices, +ensure lines of this form do not appear in /etc/securetty: +vc/1 +vc/2 +vc/3 +vc/4 + + AC-6(2) + 770 + Test attestation on 20121024 by DS + +Preventing direct root login to virtual console devices +helps ensure accountability for actions taken on the system +using the root account. + + + sed -i '/^vc\//d' /etc/securetty + + + + + + + + + + Restrict Serial Port Root Logins + To restrict root logins on serial ports, +ensure lines of this form do not appear in /etc/securetty: +ttyS0 +ttyS1 + + + AC-6(2) + 770 + Test attestation on 20121024 by DS + +Preventing direct root login to serial port interfaces +helps ensure accountability for actions taken on the systems +using the root account. + + + sed -i '/ttyS/d' /etc/securetty + + + + + + + + + + Restrict Web Browser Use for Administrative Accounts + +Enforce policy requiring administrative accounts use web browsers only for +local service administration. + + +If a browser vulnerability is exploited while running with administrative privileges, +the entire system could be compromised. Specific exceptions for local service +administration should be documented in site-defined policy. + + + + + + + + Ensure that System Accounts Do Not Run a Shell Upon Login + +Some accounts are not associated with a human user of the system, and exist to +perform some administrative function. Should an attacker be able to log into +these accounts, they should not be granted access to a shell. + +The login shell for each local account is stored in the last field of each line +in /etc/passwd. System accounts are those user accounts with a user ID +less than UID_MIN, where value of UID_MIN directive is set in +/etc/login.defs configuration file. In the default configuration UID_MIN is set +to 1000, thus system accounts are those user accounts with a user ID less than +1000. The user ID is stored in the third field. If any system account +SYSACCT (other than root) has a login shell, disable it with the +command: $ sudo usermod -s /sbin/nologin SYSACCT + + +Do not perform the steps in this section on the root account. Doing so might +cause the system to become inaccessible. + + AC-2 + + Test attestation on 20121024 by DS + +Ensuring shells are not given to system accounts upon login makes it more +difficult for attackers to make use of system accounts. + + + + + + + + + + + Verify Only Root Has UID 0 + +If any account other than root has a UID of 0, this misconfiguration should +be investigated and the accounts other than root should be removed or +have their UID changed. + +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 greater than "1000" that +has not already been assigned. + + AC-6 + IA-2(1) + IA-4 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-020310 + Test attestation on 20121024 by DS + +An account has root authority if it has a UID of 0. Multiple accounts +with a UID of 0 afford more opportunity for potential intruders to +guess a password for a privileged account. Proper configuration of +sudo is recommended to afford multiple system administrators +access to root privileges in an accountable manner. + + + awk -F: '$3 == 0 && $1 != "root" { print $1 }' /etc/passwd | xargs passwd -l + + + + + + + + + + Root Path Must Be Vendor Default + +Assuming root shell is bash, edit the following files: +~/.profile +~/.bashrc +Change any PATH variables to the vendor default for root and remove any +empty PATH entries or references to relative paths. + + SA-8 + Test attestation on 20121024 by DS + +The root account's executable search path must be the vendor default, and must +contain only absolute paths. + + + + + + + + + Verify Proper Storage and Existence of Password +Hashes + +By default, password hashes for local accounts are stored +in the second field (colon-separated) in +/etc/shadow. This file should be readable only by +processes running with root credentials, preventing users from +casually accessing others' password hashes and attempting +to crack them. +However, it remains possible to misconfigure the system +and store password hashes +in world-readable files such as /etc/passwd, or +to even store passwords themselves in plaintext on the system. +Using system-provided tools for password change/creation +should allow administrators to avoid such misconfiguration. + + + Prevent Log In to Accounts With Empty Password + If an account is configured for password authentication +but does not have an assigned password, it may be possible to log +into the account without authentication. Remove any instances of the nullok +option in /etc/pam.d/system-auth to +prevent logins with empty passwords. + + AC-6 + IA-5(b) + IA-5(c) + IA-5(1)(a) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-010260 + Req-8.2.3 + Test attestation on 20121024 by DS + +If an account has an empty password, anyone could log in and +run commands with the privileges of that account. Accounts with +empty passwords should never be used in operational environments. + + + sed -i 's/\<nullok\>//g' /etc/pam.d/system-auth + + + + + + + + + + Verify All Account Password Hashes are Shadowed + +If any password hashes are stored in /etc/passwd (in the second field, +instead of an x), the cause of this misconfiguration should be +investigated. The account should have its password reset and the hash should be +properly stored, or the account should be deleted entirely. + + IA-5(h) + + Req-8.2.1 + Test attestation on 20121024 by DS + +The hashes for all user account passwords should be stored in +the file /etc/shadow and never in /etc/passwd, +which is readable by all users. + + + + + + + + + + + All GIDs referenced in /etc/passwd must be defined in /etc/group + +Add a group to the system for each GID referenced without a corresponding group. + + IA-2 + 764 + SRG-OS-000104-GPOS-00051 + RHEL-07-020300 + Req-8.5.a + Test attestation on 20121024 by DS + +If a user is assigned the Group Identifier (GID) of a group not existing on the system, and a group +with the Gruop Identifier (GID) is subsequently created, the user may have unintended rights to +any files associated with the group. + + + + + + + + + + + Verify No netrc Files Exist + The .netrc files contain login information +used to auto-login into FTP servers and reside in the user's home +directory. These files may contain unencrypted passwords to +remote FTP servers making them susceptible to access by unauthorized +users and should not be used. Any .netrc files should be removed. + + IA-5(h) + AC-3 + 196 + +Unencrypted passwords for remote FTP servers may be stored in .netrc +files. DoD policy requires passwords be encrypted in storage and not used +in access scripts. + + + + + + + + + + + + Set Password Expiration Parameters + The file /etc/login.defs controls several +password-related settings. Programs such as passwd, +su, and +login consult /etc/login.defs to determine +behavior with regard to password aging, expiration warnings, +and length. See the man page login.defs(5) for more information. + +Users should be forced to change their passwords, in order to +decrease the utility of compromised passwords. However, the need to +change passwords often should be balanced against the risk that +users will reuse or write down passwords if forced to change them +too often. Forcing password changes every 90-360 days, depending on +the environment, is recommended. Set the appropriate value as +PASS_MAX_DAYS and apply it to existing accounts with the +-M flag. + +The PASS_MIN_DAYS (-m) setting prevents password +changes for 7 days after the first change, to discourage password +cycling. If you use this setting, train users to contact an administrator +for an emergency password change in case a new password becomes +compromised. The PASS_WARN_AGE (-W) setting gives +users 7 days of warnings at login time that their passwords are about to expire. + +For example, for each existing human user USER, expiration parameters +could be adjusted to a 180 day maximum password age, 7 day minimum password +age, and 7 day warning period with the following command: +$ sudo chage -M 180 -m 7 -W 7 USER + + + minimum password length + Minimum number of characters in password + This will only check new passwords + 14 + 6 + 8 + 10 + 12 + 14 + + + maximum password age + Maximum age of password in days + This will only apply to newly created accounts + 60 + 60 + 90 + 120 + 180 + + + minimum password age + Minimum age of password in days + This will only apply to newly created accounts + 7 + 7 + 5 + 2 + 1 + 0 + + + warning days before password expires + The number of days' warning given before a password expires. + This will only apply to newly created accounts + 7 + 0 + 7 + 14 + + + Set Password Minimum Length in login.defs + To specify password length requirements for new accounts, +edit the file /etc/login.defs and add or correct the following +lines: +PASS_MIN_LEN 14 + +The DoD requirement is 14. +The FISMA requirement is 12. +If a program consults /etc/login.defs and also another PAM module +(such as pam_pwquality) during a password change operation, +then the most restrictive must be satisfied. See PAM section +for more information about enforcing password quality requirements. + + IA-5(f) + IA-5(1)(a) + + Test attestation on 20121026 by DS + +Requiring a minimum password length makes password +cracking attacks more difficult by ensuring a larger +search space. However, any security benefit from an onerous requirement +must be carefully weighed against usability problems, support costs, or counterproductive +behavior that may result. + + + +var_accounts_password_minlen_login_defs="" + +grep -q ^PASS_MIN_LEN /etc/login.defs && \ + sed -i "s/PASS_MIN_LEN.*/PASS_MIN_LEN $var_accounts_password_minlen_login_defs/g" /etc/login.defs +if ! [ $? -eq 0 ]; then + echo "PASS_MIN_LEN $var_accounts_password_minlen_login_defs" >> /etc/login.defs +fi + + + + + + + + + + + Set Password Minimum Age + To specify password minimum age for new accounts, +edit the file /etc/login.defs +and add or correct the following line, replacing DAYS appropriately: +PASS_MIN_DAYS DAYS +A value of 1 day is considered for sufficient for many +environments. The DoD requirement is 1. + + IA-5(f) + IA-5(1)(d) + 198 + SRG-OS-000075-GPOS-00043 + RHEL-07-010200 + Test attestation on 20121026 by DS + +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, then the password could be repeatedly changed in a +short period of time to defeat the organization's policy regarding password reuse. + +Setting the minimum password age protects against users cycling back to a favorite password +after satisfying the password reuse requirement. + + + +var_accounts_minimum_age_login_defs="" + +grep -q ^PASS_MIN_DAYS /etc/login.defs && \ + sed -i "s/PASS_MIN_DAYS.*/PASS_MIN_DAYS $var_accounts_minimum_age_login_defs/g" /etc/login.defs +if ! [ $? -eq 0 ]; then + echo "PASS_MIN_DAYS $var_accounts_minimum_age_login_defs" >> /etc/login.defs +fi + + + + + + + + + + + Set Password Maximum Age + To specify password maximum age for new accounts, +edit the file /etc/login.defs +and add or correct the following line, replacing DAYS appropriately: +PASS_MAX_DAYS DAYS +A value of 180 days is sufficient for many environments. +The DoD requirement is 60. + + IA-5(f) + IA-5(g) + IA-5(1)(d) + 199 + SRG-OS-000076-GPOS-00044 + Req-8.2.4 + 7.1.1 + RHEL-07-010220 + Test attestation on 20121026 by DS + +Any password, no matter how complex, can eventually be cracked. Therefore, passwords +need to be changed periodically. If the operating system does not limit the lifetime +of passwords and force users to change their passwords, there is the risk that the +operating system passwords could be compromised. + +Setting the password maximum age ensures users are required to +periodically change their passwords. Requiring shorter password lifetimes +increases the risk of users writing down the password in a convenient +location subject to physical compromise. + + +var_accounts_maximum_age_login_defs="" + +grep -q ^PASS_MAX_DAYS /etc/login.defs && \ + sed -i "s/PASS_MAX_DAYS.*/PASS_MAX_DAYS $var_accounts_maximum_age_login_defs/g" /etc/login.defs +if ! [ $? -eq 0 ]; then + echo "PASS_MAX_DAYS $var_accounts_maximum_age_login_defs" >> /etc/login.defs +fi + + + + + + + + + + + Set Password Warning Age + To specify how many days prior to password +expiration that a warning will be issued to users, +edit the file /etc/login.defs and add or correct + the following line, replacing DAYS appropriately: +PASS_WARN_AGE DAYS +The DoD requirement is 7. + + + AC-2(2) + IA-5(f) + Test attestation on 20121026 by DS + +Setting the password warning age enables users to +make the change at a practical time. + + + +var_accounts_password_warn_age_login_defs="" + +grep -q ^PASS_WARN_AGE /etc/login.defs && \ + sed -i "s/PASS_WARN_AGE.*/PASS_WARN_AGE $var_accounts_password_warn_age_login_defs/g" /etc/login.defs +if ! [ $? -eq 0 ]; then + echo "PASS_WARN_AGE $var_accounts_password_warn_age_login_defs" >> /etc/login.defs +fi + + + + + + + + + + + + Set Account Expiration Parameters + Accounts can be configured to be automatically disabled +after a certain time period, +meaning that they will require administrator interaction to become usable again. +Expiration of accounts after inactivity can be set for all accounts by default +and also on a per-account basis, such as for accounts that are known to be temporary. +To configure automatic expiration of an account following +the expiration of its password (that is, after the password has expired and not been changed), +run the following command, substituting NUM_DAYS and USER appropriately: +$ sudo chage -I NUM_DAYS USER +Accounts, such as temporary accounts, can also be configured to expire on an explicitly-set date with the +-E option. +The file /etc/default/useradd controls +default settings for all newly-created accounts created with the system's +normal command line utilities. + + + number of days after a password expires until the account is permanently disabled + The number of days to wait after a password expires, until the account will be permanently disabled. + This will only apply to newly created accounts + 35 + 0 + 30 + 35 + 40 + 60 + 90 + 180 + + + Set Account Expiration Following Inactivity + To specify the number of days after a password expires (which +signifies inactivity) until an account is permanently disabled, add or correct +the following lines in /etc/default/useradd, substituting +NUM_DAYS appropriately: +INACTIVE=UNDEFINED_SUB +A value of 35 is recommended. +If a password is currently on the +verge of expiration, then 35 days remain until the account is automatically +disabled. However, if the password will not expire for another 60 days, then 95 +days could elapse until the account would be automatically disabled. See the +useradd man page for more information. Determining the inactivity +timeout must be done with careful consideration of the length of a "normal" +period of inactivity for users in the particular environment. Setting +the timeout too low incurs support costs and also has the potential to impact +availability of the system to legitimate users. + + AC-2(2) + AC-2(3) + IA-4(e) + 795 + SRG-OS-000118-GPOS-00060 + RHEL-07-010280 + Req-8.1.4 + +Disabling inactive accounts ensures that accounts which may not +have been responsibly removed are not available to attackers +who may have compromised their credentials. + + + +var_account_disable_post_pw_expiration="" + +grep -q ^INACTIVE /etc/default/useradd && \ + sed -i "s/INACTIVE.*/INACTIVE=$var_account_disable_post_pw_expiration/g" /etc/default/useradd +if ! [ $? -eq 0 ]; then + echo "INACTIVE=$var_account_disable_post_pw_expiration" >> /etc/default/useradd +fi + + + + + + + + + + + Ensure All Accounts on the System Have Unique Names + +Change usernames, or delete accounts, so each has a unique name. + + 770 + 804 + Req-8.1.1 + +Unique usernames allow for accountability on the system. + + + + + + + + + + + Assign Expiration Date to Temporary Accounts + +Temporary accounts are established as part of normal account activation procedures +when there is a need for short-term accounts. In the event temporary +or emergency accounts are required, configure the system to terminate +them after a documented time period. For every temporary and +emergency account, run the following command to set an expiration date on it, +substituting USER and YYYY-MM-DD appropriately: +$ sudo chage -E YYYY-MM-DD USER +YYYY-MM-DD indicates the documented expiration date for the account. +For U.S. Government systems, the operating system must be configured to automatically terminate +these typoes of accounts after a period of 72 hours. + + AC-2(2) + AC-2(3) + 16 + 1682 + 2 + +If temporary user accounts remain active when no longer needed or for +an excessive period, these accounts may be used to gain unauthorized access. +To mitigate this risk, automated termination of all temporary accounts +must be set upon account creation. + + + + + + + + + + + Protect Accounts by Configuring PAM + PAM, or Pluggable Authentication Modules, is a system +which implements modular authentication for Linux programs. PAM provides +a flexible and configurable architecture for authentication, and it should be configured +to minimize exposure to unnecessary risk. This section contains +guidance on how to accomplish that. + +PAM is implemented as a set of shared objects which are +loaded and invoked whenever an application wishes to authenticate a +user. Typically, the application must be running as root in order +to take advantage of PAM, because PAM's modules often need to be able +to access sensitive stores of account information, such as /etc/shadow. +Traditional privileged network listeners +(e.g. sshd) or SUID programs (e.g. sudo) already meet this +requirement. An SUID root application, userhelper, is provided so +that programs which are not SUID or privileged themselves can still +take advantage of PAM. + +PAM looks in the directory /etc/pam.d for +application-specific configuration information. For instance, if +the program login attempts to authenticate a user, then PAM's +libraries follow the instructions in the file /etc/pam.d/login +to determine what actions should be taken. + +One very important file in /etc/pam.d is +/etc/pam.d/system-auth. This file, which is included by +many other PAM configuration files, defines 'default' system authentication +measures. Modifying this file is a good way to make far-reaching +authentication changes, for instance when implementing a +centralized authentication service. + Be careful when making changes to PAM's +configuration files. The syntax for these files is complex, and +modifications can have unexpected consequences. The default +configurations shipped with applications should be sufficient for +most users. + Running authconfig or +system-config-authentication will re-write the PAM configuration +files, destroying any manually made changes and replacing them with +a series of system defaults. One reference to the configuration +file syntax can be found at +http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-configuration-file.html. + + remember + The last n passwords for each user are saved in +/etc/security/opasswd in order to force password change history and +keep the user from alternating between the same password too +frequently. + 5 + 0 + 4 + 5 + 10 + 24 + + + Set Last Logon/Access Notification + To configure the system to notify users of last logon/access +using pam_lastlog, add or correct the pam_lastlog settings in +/etc/pam.d/postlogin to read as follows: +session [success=1 default=ignore] pam_succeed_if.so service !~ gdm* service !~ su* quiet +session [default=1] pam_lastlog.so nowtmp showfailed +session optional pam_lastlog.so silent noupdate showfailed + + 53 + Req-10.2.4 + +Users need to be aware of activity that occurs regarding +their account. Providing users with information regarding the number +of unsuccessful attempts that were made to login to their account +allows the user to determine if any unauthorized activity has occurred +and gives them an opportunity to notify administrators. + + + +if ! `grep -q ^[^#].*pam_succeed_if.*showfailed /etc/pam.d/postlogin` ; then + if ! grep `^session.*pam_succeed_if.so /etc/pam.d/postlogin` ; then + echo "session [default=1] pam_lastlog.so nowtmp showfailed" >> /etc/pam.d/postlogin + echo "session optional pam_lastlog.so silent noupdate showfailed" >> /etc/pam.d/postlogin + else + sed -i '/^session.*pam_succeed_if.so/a session\t optional\t pam_lastlog.so silent noupdate showfailed' /etc/pam.d/postlogin + sed -i '/^session.*pam_succeed_if.so/a session\t [default=1]\t pam_lastlog.so nowtmp showfailed' /etc/pam.d/postlogin + fi +else + sed -i "s/session[ ]*\[default=1][ ]*pam_lastlog.so.*/session [default=1] pam_lastlog.so nowtmp showfailed/g" /etc/pam.d/postlogin + sed -i "s/session[ ]*optional[ ]*pam_lastlog.so.*/session optional pam_lastlog.so silent noupdate showfailed/g" /etc/pam.d/postlogin +fi + + + + + + + + + + Set Password Quality Requirements + The default pam_pwquality PAM module provides strength +checking for passwords. It performs a number of checks, such as +making sure passwords are not similar to dictionary words, are of +at least a certain length, are not the previous password reversed, +and are not simply a change of case from the previous password. It +can also require passwords to be in certain character classes. The +pam_pwquality module is the preferred way of configuring +password requirements. + +The pam_cracklib PAM module can also provide strength +checking for passwords as the pam_pwquality module. +It performs a number of checks, such as making sure passwords are +not similar to dictionary words, are of at least a certain length, +are not the previous password reversed, and are not simply a change +of case from the previous password. It can also require passwords to +be in certain character classes. + +The man pages pam_pwquality(8) and pam_cracklib(8) +provide information on the capabilities and configuration of +each. + + Set Password Quality Requirements with pam_pwquality + The pam_pwquality PAM module can be configured to meet +requirements for a variety of policies. + +For example, to configure pam_pwquality to require at least one uppercase +character, lowercase character, digit, and other (special) +character, make sure that pam_pwquality exists in /etc/pam.d/system-auth: +password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type= +If no such line exists, add one as the first line of the password section in /etc/pam.d/system-auth. +Next, modify the settings in /etc/security/pwquality.conf to match the following: +difok = 4 +minlen = 14 +dcredit = -1 +ucredit = -1 +lcredit = -1 +ocredit = -1 +maxrepeat = 3 +The arguments can be modified to ensure compliance with +your organization's security policy. Discussion of each parameter follows. + + Note that the password quality +requirements are not enforced for the root account for some +reason. + + retry + Number of retry attempts before erroring out + 3 + 1 + 2 + 3 + 4 + 5 + + + maxrepeat + Maximum Number of Consecutive Repeating Characters in a Password + 3 + 1 + 2 + 3 + + + maxclassrepeat + Maximum Number of Consecutive Repeating Characters in a Password From the Same Character Class + 4 + 1 + 2 + 3 + 4 + + + minlen + Minimum number of characters in password + 15 + 6 + 7 + 8 + 10 + 12 + 14 + 15 + + + dcredit + Minimum number of digits in password + -1 + -2 + -1 + 0 + + + ocredit + Minimum number of other (special characters) in +password + -1 + -2 + -1 + 0 + + + lcredit + Minimum number of lower case in password + -1 + -2 + -1 + 0 + + + ucredit + Minimum number of upper case in password + -1 + -2 + -1 + 0 + + + difok + Minimum number of characters not present in old +password + Keep this high for short passwords + 15 + 2 + 3 + 4 + 5 + 5 + 5 + 5 + 15 + + + minclass + Minimum number of categories of characters that must exist in a password + 3 + 1 + 2 + 3 + 4 + + + fail_deny + Number of failed login attempts before account lockout + 3 + 3 + 5 + 6 + 10 + + + fail_unlock_time + Seconds before automatic unlocking after excessive failed logins + 604800 + 600 + 900 + 1800 + 3600 + 86400 + 604800 + + + fail_interval + Interval for counting failed login attempts before account lockout + 900 + 900 + 1800 + 3600 + 86400 + 100000000 + + + Set Password Retry Prompts Permitted Per-Session + To configure the number of retry prompts that are permitted per-session: + +Edit the pam_pwquality.so statement in /etc/pam.d/system-auth to +show retry=, or a lower value if site policy is more restrictive. + +The DoD requirement is a maximum of 3 prompts per session. + + CM-6(b) + IA-5(c) + 366 + 6.3.2 + SRG-OS-000480-GPOS-00225 + RHEL-07-010410 + Test attestation on 20140925 by swells + +Setting the password retry prompts that are permitted on a per-session basis to a low value +requires some software, such as SSH, to re-connect. This can slow down and +draw additional attention to some types of password-guessing attacks. Note that this +is different from account lockout, which is provided by the pam_faillock module. + + + +var_password_pam_retry="" + +if grep -q "retry=" /etc/pam.d/system-auth; then + sed -i --follow-symlinks "s/\(retry *= *\).*/\1$var_password_pam_retry/" /etc/pam.d/system-auth +else + sed -i --follow-symlinks "/pam_pwquality.so/ s/$/ retry=$var_password_pam_retry/" /etc/pam.d/system-auth +fi + + + + + + + + + + + Set Password to Maximum of Three Consecutive Repeating Characters + The pam_pwquality module's maxrepeat parameter controls requirements for +consecutive repeating characters. When set to a positive number, it will reject passwords +which contain more than that number of consecutive characters. Modify the maxrepeat setting +in /etc/security/pwquality.conf to equal to prevent a +run of ( + 1) or more identical characters. + + IA-5 + IA-5(c) + 195 + SRG-OS-000072-GPOS-00040 + RHEL-07-010150 + +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. + +Passwords with excessive repeating characters may be more vulnerable to password-guessing attacks. + + + +var_password_pam_maxrepeat="" + +replace_or_append '/etc/security/pwquality.conf' '^maxrepeat' $var_password_pam_maxrepeat 'CCE-27333-4' '%s = %s' + + + + + + + + + + + Set Password to Maximum of Consecutive Repeating Characters from Same Character Class + The pam_pwquality module's maxclassrepeat parameter controls requirements for +consecutive repeating characters from the same character class. When set to a positive number, it will reject passwords +which contain more than that number of consecutive characters from the same character class. Modify the +maxclassrepeat setting in /etc/security/pwquality.conf to equal +to prevent a run of ( + 1) or more identical characters. + + IA-5 + IA-5(c) + 195 + SRG-OS-000072-GPOS-00040 + RHEL-07-010160 + +Use of a complex password helps to increase the time and resources required to comrpomise 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 a password, the greater the number of possible combinations that need to be tested before the +password is compromised. + + + + + + + + + + + + Set Password Strength Minimum Digit Characters + The pam_pwquality module's dcredit parameter controls requirements for +usage of digits in a password. When set to a negative number, any password will be required to +contain that many digits. When set to a positive number, pam_pwquality will grant +1 additional +length credit for each digit. Modify the dcredit setting in +/etc/security/pwquality.conf to require the use of a digit in passwords. + + IA-5(1)(a) + IA-5(b) + IA-5(c) + 194 + 194 + SRG-OS-000071-GPOS-00039 + Req-8.2.3 + 6.3.2 + RHEL-07-010110 + Test attestation on 20121024 by DS + +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 +possble combinations that need to be tested before the password is compromised. +Requiring digits makes password guessing attacks more difficult by ensuring a larger +search space. + + + +var_password_pam_dcredit="" + +replace_or_append '/etc/security/pwquality.conf' '^dcredit' $var_password_pam_dcredit 'CCE-27214-6' '%s = %s' + + + + + + + + + + + Set Password Minimum Length + The pam_pwquality module's minlen parameter controls requirements for +minimum characters required in a password. Add minlen= +after pam_pwquality to set minimum password length requirements. + + IA-5(1)(a) + 205 + SRG-OS-000078-GPOS-00046 + Req-8.2.3 + 6.3.2 + RHEL-07-010250 + Test attestation on 20140928 by swells + +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 exponentially increase the time and/or resources required to +compromose the password. + + + +var_password_pam_minlen="" + +replace_or_append '/etc/security/pwquality.conf' '^minlen' $var_password_pam_minlen 'CCE-27293-0' '%s = %s' + + + + + + + + + + + Set Password Strength Minimum Uppercase Characters + The pam_pwquality module's ucredit= parameter controls requirements for +usage of uppercase letters in a password. When set to a negative number, any password will be required to +contain that many uppercase characters. When set to a positive number, pam_pwquality will grant +1 additional +length credit for each uppercase character. Modify the ucredit setting in +/etc/security/pwquality.conf to require the use of an uppercase character in passwords. + + IA-5(b) + IA-5(c) + IA-5(1)(a) + 192 + SRG-OS-000069-GPOS-00037 + RHEL-07-010090 + Req-8.2.3 + 6.3.2 + Test attestation on 20121024 by DS + +Use of a complex password helps to increase the time and resources reuiqred 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. + + + +var_password_pam_ucredit="" + +replace_or_append '/etc/security/pwquality.conf' '^ucredit' $var_password_pam_ucredit 'CCE-27200-5' '%s = %s' + + + + + + + + + + + Set Password Strength Minimum Special Characters + The pam_pwquality module's ocredit= parameter controls requirements for +usage of special (or "other") characters in a password. When set to a negative number, any password will be +required to contain that many special characters. When set to a positive number, pam_pwquality will grant +1 +additional length credit for each special character. Modify the ocredit setting in +/etc/security/pwquality.conf to equal to require use of a special character in passwords. + + IA-5(b) + IA-5(c) + IA-5(1)(a) + 1619 + SRG-OS-000266-GPOS-00101 + RHEL-07-010120 + Test attestation on 20121024 by DS + +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 +possble combinations that need to be tested before the password is compromised. +Requiring a minimum number of special characters makes password guessing attacks +more difficult by ensuring a larger search space. + + + +var_password_pam_ocredit="" + +replace_or_append '/etc/security/pwquality.conf' '^ocredit' $var_password_pam_ocredit 'CCE-27360-7' '%s = %s' + + + + + + + + + + + Set Password Strength Minimum Lowercase Characters + The pam_pwquality module's lcredit parameter controls requirements for +usage of lowercase letters in a password. When set to a negative number, any password will be required to +contain that many lowercase characters. When set to a positive number, pam_pwquality will grant +1 additional +length credit for each lowercase character. Modify the lcredit setting in +/etc/security/pwquality.conf to require the use of a lowercase character in passwords. + + IA-5(b) + IA-5(c) + IA-5(1)(a) + 193 + SRG-OS-000070-GPOS-00038 + Req-8.2.3 + RHEL-07-010100 + Test attestation on 20121024 by DS + +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 +possble combinations that need to be tested before the password is compromised. +Requiring a minimum number of lowercase characters makes password guessing attacks +more difficult by ensuring a larger search space. + + + +var_password_pam_lcredit="" + +replace_or_append '/etc/security/pwquality.conf' '^lcredit' $var_password_pam_lcredit 'CCE-27345-8' '%s = %s' + + + + + + + + + + + Set Password Strength Minimum Different Characters + The pam_pwquality module's difok parameter sets the number of characters +in a password that must not be present in and old password during a password change. + +Modify the difok setting in /etc/security/pwquality.conf +to equal to require differing characters +when changing passwords. + + IA-5(b) + IA-5(c) + IA-5(1)(b) + 195 + SRG-OS-000072-GPOS-00040 + RHEL-07-010130 + Test attestation on 20121024 by DS + +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. + +Requiring a minimum number of different characters during password changes ensures that +newly changed passwords should not resemble previously compromised ones. +Note that passwords which are changed on compromised systems will still be compromised, however. + + + +var_password_pam_difok="" + +replace_or_append '/etc/security/pwquality.conf' '^difok' $var_password_pam_difok 'CCE-26631-2' '%s = %s' + + + + + + + + + + + Set Password Strength Minimum Different Categories + The pam_pwquality module's minclass parameter controls +requirements for usage of different character classes, or types, of character +that must exist in a password before it is considered valid. For example, +setting this value to three (3) requires that any password must have characters +from at least three different categories in order to be approved. The default +value is zero (0), meaning there are no required classes. There are four +categories available: + +* Upper-case characters +* Lower-case characters +* Digits +* Special characters (for example, punctuation) + +Modify the minclass setting in /etc/security/pwquality.conf entry to require +differing categories of characters when changing passwords. + + IA-5 + 195 + SRG-OS-000072-GPOS-00040 + RHEL-07-010140 + Test attestation on 20140626 by JL + +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. + +Requiring a minimum number of character categories makes password guessing attacks more difficult +by ensuring a larger search space. + + + +var_password_pam_minclass="" + +replace_or_append '/etc/security/pwquality.conf' '^minclass' $var_password_pam_minclass 'CCE-27115-5' '%s = %s' + + + + + + + + + + + + + Set Lockouts for Failed Password Attempts + The pam_faillock PAM module provides the capability to +lock out user accounts after a number of failed login attempts. Its +documentation is available in +/usr/share/doc/pam-VERSION/txts/README.pam_faillock. + + + Locking out user accounts presents the +risk of a denial-of-service attack. The lockout policy +must weigh whether the risk of such a +denial-of-service attack outweighs the benefits of thwarting +password guessing attacks. + + Set Deny For Failed Password Attempts + +To configure the system to lock out accounts after a number of incorrect login +attempts using pam_faillock.so, modify the content of both +/etc/pam.d/system-auth and /etc/pam.d/password-auth as follows: + + add the following line immediately before the pam_unix.so statement in the AUTH section: +auth required pam_faillock.so preauth silent deny= unlock_time= fail_interval= add the following line immediately after the pam_unix.so statement in the AUTH section: +auth [default=die] pam_faillock.so authfail deny= unlock_time= fail_interval= add the following line immediately before the pam_unix.so statement in the ACCOUNT section: +account required pam_faillock.so + + AC-7(b) + 2238 + SRG-OS-000329-GPOS-00128 + SRG-OS-000021-GPOS-00005 + RHEL-07-010370 + Req-8.1.6 + 6.3.3 + +Locking out user accounts after a number of incorrect attempts +prevents direct password guessing attacks. + + + +var_accounts_passwords_pam_faillock_deny="" + +AUTH_FILES[0]="/etc/pam.d/system-auth" +AUTH_FILES[1]="/etc/pam.d/password-auth" + +for pamFile in "${AUTH_FILES[@]}" +do + + # pam_faillock.so already present? + if grep -q "^auth.*pam_faillock.so.*" $pamFile; then + + # pam_faillock.so present, deny directive present? + if grep -q "^auth.*[default=die].*pam_faillock.so.*authfail.*deny=" $pamFile; then + + # both pam_faillock.so & deny present, just correct deny directive value + sed -i --follow-symlinks "s/\(^auth.*required.*pam_faillock.so.*preauth.*silent.*\)\(deny *= *\).*/\1\2$var_accounts_passwords_pam_faillock_deny/" $pamFile + sed -i --follow-symlinks "s/\(^auth.*[default=die].*pam_faillock.so.*authfail.*\)\(deny *= *\).*/\1\2$var_accounts_passwords_pam_faillock_deny/" $pamFile + + # pam_faillock.so present, but deny directive not yet + else + + # append correct deny value to appropriate places + sed -i --follow-symlinks "/^auth.*required.*pam_faillock.so.*preauth.*silent.*/ s/$/ deny=$var_accounts_passwords_pam_faillock_deny/" $pamFile + sed -i --follow-symlinks "/^auth.*[default=die].*pam_faillock.so.*authfail.*/ s/$/ deny=$var_accounts_passwords_pam_faillock_deny/" $pamFile + fi + + # pam_faillock.so not present yet + else + + # insert pam_faillock.so preauth & authfail rows with proper value of the 'deny' option + sed -i --follow-symlinks "/^auth.*sufficient.*pam_unix.so.*/i auth required pam_faillock.so preauth silent deny=$var_accounts_passwords_pam_faillock_deny" $pamFile + sed -i --follow-symlinks "/^auth.*sufficient.*pam_unix.so.*/a auth [default=die] pam_faillock.so authfail deny=$var_accounts_passwords_pam_faillock_deny" $pamFile + sed -i --follow-symlinks "/^account.*required.*pam_unix.so/i account required pam_faillock.so" $pamFile + fi +done + + + + + + + + + + + Set Lockout Time For Failed Password Attempts + +To configure the system to lock out accounts after a number of incorrect login +attempts and require an administrator to unlock the account using pam_faillock.so, +modify the content of both /etc/pam.d/system-auth and /etc/pam.d/password-auth as follows: + + add the following line immediately before the pam_unix.so statement in the AUTH section: +auth required pam_faillock.so preauth silent deny= unlock_time= fail_interval= add the following line immediately after the pam_unix.so statement in the AUTH section: +auth [default=die] pam_faillock.so authfail deny= unlock_time= fail_interval= add the following line immediately before the pam_unix.so statement in the ACCOUNT section: +account required pam_faillock.so + + AC-7(b) + 002238 + SRG-OS-000329-GPOS-00128 + SRG-OS-000021-GPOS-00005 + RHEL-07-010371 + Req-8.1.7 + 6.3.3 + +Locking out user accounts after a number of incorrect attempts +prevents direct password guessing attacks. Ensuring that an administrator is +involved in unlocking locked accounts draws appropriate attention to such +situations. + + + +var_accounts_passwords_pam_faillock_unlock_time="" + +AUTH_FILES[0]="/etc/pam.d/system-auth" +AUTH_FILES[1]="/etc/pam.d/password-auth" + +for pamFile in "${AUTH_FILES[@]}" +do + + # pam_faillock.so already present? + if grep -q "^auth.*pam_faillock.so.*" $pamFile; then + + # pam_faillock.so present, unlock_time directive present? + if grep -q "^auth.*[default=die].*pam_faillock.so.*authfail.*unlock_time=" $pamFile; then + + # both pam_faillock.so & unlock_time present, just correct unlock_time directive value + sed -i --follow-symlinks "s/\(^auth.*required.*pam_faillock.so.*preauth.*silent.*\)\(unlock_time *= *\).*/\1\2$var_accounts_passwords_pam_faillock_unlock_time/" $pamFile + sed -i --follow-symlinks "s/\(^auth.*[default=die].*pam_faillock.so.*authfail.*\)\(unlock_time *= *\).*/\1\2$var_accounts_passwords_pam_faillock_unlock_time/" $pamFile + + # pam_faillock.so present, but unlock_time directive not yet + else + + # append correct unlock_time value to appropriate places + sed -i --follow-symlinks "/^auth.*required.*pam_faillock.so.*preauth.*silent.*/ s/$/ unlock_time=$var_accounts_passwords_pam_faillock_unlock_time/" $pamFile + sed -i --follow-symlinks "/^auth.*[default=die].*pam_faillock.so.*authfail.*/ s/$/ unlock_time=$var_accounts_passwords_pam_faillock_unlock_time/" $pamFile + fi + + # pam_faillock.so not present yet + else + + # insert pam_faillock.so preauth & authfail rows with proper value of the 'unlock_time' option + sed -i --follow-symlinks "/^auth.*sufficient.*pam_unix.so.*/i auth required pam_faillock.so preauth silent unlock_time=$var_accounts_passwords_pam_faillock_unlock_time" $pamFile + sed -i --follow-symlinks "/^auth.*sufficient.*pam_unix.so.*/a auth [default=die] pam_faillock.so authfail unlock_time=$var_accounts_passwords_pam_faillock_unlock_time" $pamFile + sed -i --follow-symlinks "/^account.*required.*pam_unix.so/i account required pam_faillock.so" $pamFile + fi +done + + + + + + + + + + + Configure the root Account for Failed Password Attempts + +To configure the system to lock out the root account after a number of incorrect login +attempts using pam_faillock.so, modify the content of both +/etc/pam.d/system-auth and /etc/pam.d/password-auth as follows: + + modify the following line in the AUTH section to add even_deny_root: +auth required pam_faillock.so preauth silent even_deny_root deny= unlock_time= fail_interval= modify the following line in the AUTH section to add even_deny_root: +auth [default=die] pam_faillock.so authfail even_deny_root deny= unlock_time= fail_interval= + + AC-7(b) + 2238 + SRG-OS-000329-GPOS-00128 + SRG-OS-000021-GPOS-00005 + RHEL-07-010372 + +By limiting the number of failed logon attempts, the risk of unauthorized system access via user password +guessing, otherwise known as brute-forcing, is reduced. Limits are imposed by locking the account. + + + + + + + + + + + Set Interval For Counting Failed Password Attempts + +Utilizing pam_faillock.so, the fail_interval directive configures the system to lock out accounts after a number of incorrect login +attempts. Modify the content of both /etc/pam.d/system-auth and /etc/pam.d/password-auth as follows: + + add the following line immediately before the pam_unix.so statement in the AUTH section: +auth required pam_faillock.so preauth silent deny= unlock_time= fail_interval= add the following line immediately after the pam_unix.so statement in the AUTH section: +auth [default=die] pam_faillock.so authfail deny= unlock_time= fail_interval= add the following line immediately before the pam_unix.so statement in the ACCOUNT section: +account required pam_faillock.so + + AC-7(a) + 44 + 21 + +Locking out user accounts after a number of incorrect attempts within a +specific period of time prevents direct password guessing attacks. + + + +var_accounts_passwords_pam_faillock_fail_interval="" + +AUTH_FILES[0]="/etc/pam.d/system-auth" +AUTH_FILES[1]="/etc/pam.d/password-auth" + +for pamFile in "${AUTH_FILES[@]}" +do + + # pam_faillock.so already present? + if grep -q "^auth.*pam_faillock.so.*" $pamFile; then + + # pam_faillock.so present, 'fail_interval' directive present? + if grep -q "^auth.*[default=die].*pam_faillock.so.*authfail.*fail_interval=" $pamFile; then + + # both pam_faillock.so & 'fail_interval' present, just correct 'fail_interval' directive value + sed -i --follow-symlinks "s/\(^auth.*required.*pam_faillock.so.*preauth.*silent.*\)\(fail_interval *= *\).*/\1\2$var_accounts_passwords_pam_faillock_fail_interval/" $pamFile + sed -i --follow-symlinks "s/\(^auth.*[default=die].*pam_faillock.so.*authfail.*\)\(fail_interval *= *\).*/\1\2$var_accounts_passwords_pam_faillock_fail_interval/" $pamFile + + # pam_faillock.so present, but 'fail_interval' directive not yet + else + + # append correct 'fail_interval' value to appropriate places + sed -i --follow-symlinks "/^auth.*required.*pam_faillock.so.*preauth.*silent.*/ s/$/ fail_interval=$var_accounts_passwords_pam_faillock_fail_interval/" $pamFile + sed -i --follow-symlinks "/^auth.*[default=die].*pam_faillock.so.*authfail.*/ s/$/ fail_interval=$var_accounts_passwords_pam_faillock_fail_interval/" $pamFile + fi + + # pam_faillock.so not present yet + else + + # insert pam_faillock.so preauth & authfail rows with proper value of the 'fail_interval' option + sed -i --follow-symlinks "/^auth.*sufficient.*pam_unix.so.*/i auth required pam_faillock.so preauth silent fail_interval=$var_accounts_passwords_pam_faillock_fail_interval" $pamFile + sed -i --follow-symlinks "/^auth.*sufficient.*pam_unix.so.*/a auth [default=die] pam_faillock.so authfail fail_interval=$var_accounts_passwords_pam_faillock_fail_interval" $pamFile + sed -i --follow-symlinks "/^account.*required.*pam_unix.so/i account required pam_faillock.so" $pamFile + fi +done + + + + + + + + + + + Limit Password Reuse + Do not allow users to reuse recent passwords. This can be +accomplished by using the remember option for the pam_unix +or pam_pwhistory PAM modules. In the file +/etc/pam.d/system-auth, append remember= +to the line which refers to the pam_unix.so or +pam_pwhistory.somodule, as shown below: +for the pam_unix.so case: +password sufficient pam_unix.so existing_options remember= +for the pam_pwhistory.so case: +password requisite pam_pwhistory.so existing_options remember= + +The DoD STIG requirement is 5 passwords. + IA-5(f) + IA-5(1)(e) + 200 + SRG-OS-000077-GPOS-00045 + RHEL-07-010240 + Req-8.2.5 + 6.3.4 + Test attestation on 20121024 by DS + +Preventing re-use of previous passwords helps ensure that a compromised password is not re-used by a user. + + + +var_password_pam_unix_remember="" + +if grep -q "remember=" /etc/pam.d/system-auth; then + sed -i --follow-symlinks "s/\(^password.*sufficient.*pam_unix.so.*\)\(\(remember *= *\)[^ $]*\)/\1remember=$var_password_pam_unix_remember/" /etc/pam.d/system-auth +else + sed -i --follow-symlinks "/^password[[:space:]]\+sufficient[[:space:]]\+pam_unix.so/ s/$/ remember=$var_password_pam_unix_remember/" /etc/pam.d/system-auth +fi + + + + + + + + + + + + Set Password Hashing Algorithm + The system's default algorithm for storing password hashes in +/etc/shadow is SHA-512. This can be configured in several +locations. + + Set PAM's Password Hashing Algorithm + +The PAM system service can be configured to only store encrypted representations of passwords. +In /etc/pam.d/system-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. + + IA-5(b) + IA-5(c) + IA-5(1)(c) + IA-7 + 196 + SRG-OS-000073-GPOS-00041 + RHEL-07-010170 + Req-8.2.1 + 6.3.1 + Test attestation on 20121024 by DS + +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. + + + if ! grep -q "^password.*sufficient.*pam_unix.so.*sha512" /etc/pam.d/system-auth; then + sed -i --follow-symlinks "/^password.*sufficient.*pam_unix.so/ s/$/ sha512/" /etc/pam.d/system-auth +fi + + + + + + + + + + Set Password Hashing Algorithm in /etc/login.defs + +In /etc/login.defs, add or correct the following line to ensure +the system will use SHA-512 as the hashing algorithm: +ENCRYPT_METHOD SHA512 + + IA-5(b) + IA-5(c) + IA-5(1)(c) + IA-7 + 196 + SRG-OS-000073-GPOS-00041 + RHEL-07-010180 + Req-8.2.1 + 6.3.1 + Test attestation on 20121024 by DS + +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 kept in plain text. + +Using a stronger hashing algorithm makes password cracking attacks more difficult. + + + if grep --silent ^ENCRYPT_METHOD /etc/login.defs ; then + sed -i 's/^ENCRYPT_METHOD.*/ENCRYPT_METHOD SHA512/g' /etc/login.defs +else + echo "" >> /etc/login.defs + echo "ENCRYPT_METHOD SHA512" >> /etc/login.defs +fi + + + + + + + + + + Set Password Hashing Algorithm in /etc/libuser.conf + +In /etc/libuser.conf, add or correct the following line in its +[defaults] section to ensure the system will use the SHA-512 +algorithm for password hashing: +crypt_style = sha512 + + IA-5(b) + IA-5(c) + IA-5(1)(c) + IA-7 + 196 + SRG-OS-000073-GPOS-00041 + RHEL-07-010190 + Req-8.2.1 + Test attestation on 20121026 by DS + +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. + + + + + + + + + + + + + Secure Session Configuration Files for Login Accounts + When a user logs into a Unix account, the system +configures the user's session by reading a number of files. Many of +these files are located in the user's home directory, and may have +weak permissions as a result of user error or misconfiguration. If +an attacker can modify or even read certain types of account +configuration information, they can often gain full access to the +affected user's account. Therefore, it is important to test and +correct configuration file permissions for interactive accounts, +particularly those of privileged users such as root or system +administrators. + + Maximum concurrent login sessions + Maximum number of concurrent sessions by a user + 1 + 1 + 3 + 5 + 10 + 15 + 20 + + + Maximum login attempts delay + Maximum time between fail login attempts before re-prompting. + 4 + 4 + + + Account Inactivity Timeout (minutes) + In an interactive shell, the value is interpreted as the +number of seconds to wait for input after issueing the primary prompt. +Bash terminates after waiting for that number of seconds if input does +not arrive. + 600 + 300 + 600 + 900 + + + Set Interactive Session Timeout + +Terminating an idle 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. + + AC-12 + SC-10 + 1133 + 0361 + SRG-OS-000163-GPOS-00072 + RHEL-07-040160 + + + + + + + + + + + + + Limit the Number of Concurrent Login Sessions Allowed Per User + +Limiting the number of allowed users and sessions per user can limit risks related to Denial of +Service attacks. This addresses concurrent sessions for a single account and does not address +concurrent sessions by a single user via multiple accounts. To set the number of concurrent +sessions per user add the following line in /etc/security/limits.conf: +* hard maxlogins + + AC-10 + 54 + SRG-OS-000027-GPOS-00008 + RHEL-07-040010 + Limiting simultaneous user logins can insulate the system from denial of service +problems caused by excessive logins. Automated login processes operating improperly or +maliciously may result in an exceptional number of simultaneous login sessions. + + + +var_accounts_max_concurrent_login_sessions="" + +echo "* hard maxlogins $var_accounts_max_concurrent_login_sessions" >> /etc/security/limits.conf + + + + + + + + + + + Ensure the Logon Failure Delay is Set Correctly in login.defs + +To ensure the logon failure delay controlled by /etc/login.defs is set properly, +add or correct the FAIL_DELAY setting in /etc/login.defs to read as follows: +FAIL_DELAY + + CM-6(b) + 366 + SRG-OS-000480-GPOS-00226 + RHEL-07-010420 + +Increasing the time between a failed authentication attempt and re-prompting to +enter credentials helps to slow a single-threaded brute force attack. + + + + + + + + + + + + Ensure that No Dangerous Directories Exist in Root's Path + The active path of the root account can be obtained by +starting a new root shell and running: +# echo $PATH +This will produce a colon-separated list of +directories in the path. + +Certain path elements could be considered dangerous, as they could lead +to root executing unknown or +untrusted programs, which could contain malicious +code. +Since root may sometimes work inside +untrusted directories, the . character, which represents the +current directory, should never be in the root path, nor should any +directory which can be written to by an unprivileged or +semi-privileged (system) user. + +It is a good practice for administrators to always execute +privileged commands by typing the full path to the +command. + + Ensure that Root's Path Does Not Include Relative Paths or Null Directories + +Ensure that none of the directories in root's path is equal to a single +. character, or +that it contains any instances that lead to relative path traversal, such as +.. or beginning a path without the slash (/) character. +Also ensure that there are no "empty" elements in the path, such as in these examples: +PATH=:/bin +PATH=/bin: +PATH=/bin::/sbin +These empty elements have the same effect as a single . character. + + CM-6(b) + 366 + +Including these entries increases the risk that root could +execute code from an untrusted location. + + + + + + + + Ensure that Root's Path Does Not Include World or Group-Writable Directories + +For each element in root's path, run: +# ls -ld DIR +and ensure that write permissions are disabled for group and +other. + + CM-6(b) + 366 + +Such entries increase the risk that root could +execute code provided by unprivileged users, +and potentially malicious code. + + + + + + + + + + + + Ensure that User Home Directories are not Group-Writable or World-Readable + For each human user of the system, view the +permissions of the user's home directory: +# ls -ld /home/USER +Ensure that the directory is not group-writable and that it +is not world-readable. If necessary, repair the permissions: +# chmod g-w /home/USER +# chmod o-rwx /home/USER + + This action may involve +modifying user home directories. Notify your user community, and +solicit input if appropriate, before making this type of +change. + AC-6(7) + 225 + +User home directories contain many configuration files which +affect the behavior of a user's account. No user should ever have +write permission to another user's home directory. Group shared +directories can be configured in sub-directories or elsewhere in the +filesystem if they are needed. Typically, user home directories +should not be world-readable, as it would disclose file names +to other users. If a subset of users need read access +to one another's home directories, this can be provided using +groups or ACLs. + + + + + + + + + + + Ensure that Users Have Sensible Umask Values + +The umask setting controls the default permissions +for the creation of new files. +With a default umask setting of 077, files and directories +created by users will not be readable by any other user on the +system. Users who wish to make specific files group- or +world-readable can accomplish this by using the chmod command. +Additionally, users can make all their files readable to their +group by default by setting a umask of 027 in their shell +configuration files. If default per-user groups exist (that is, if +every user has a default group whose name is the same as that +user's username and whose only member is the user), then it may +even be safe for users to select a umask of 007, making it very +easy to intentionally share files with groups of which the user is +a member. + + + + + Sensible umask + Enter default user umask + 027 + 007 + 022 + 027 + 077 + + + Ensure the Default Bash Umask is Set Correctly + +To ensure the default umask for users of the Bash shell is set properly, +add or correct the umask setting in /etc/bashrc to read +as follows: +umask + + SA-8 + 366 + Test attestation on 20140912 by JL + The umask value influences the permissions assigned to files when they are created. +A misconfigured umask value could result in files with excessive permissions that can be read or +written to by unauthorized users. + + +var_accounts_user_umask="" + +grep -q umask /etc/bashrc && \ + sed -i "s/umask.*/umask $var_accounts_user_umask/g" /etc/bashrc +if ! [ $? -eq 0 ]; then + echo "umask $var_accounts_user_umask" >> /etc/bashrc +fi + + + + + + + + + + + Ensure the Default C Shell Umask is Set Correctly + +To ensure the default umask for users of the C shell is set properly, +add or correct the umask setting in /etc/csh.cshrc to read as follows: +umask + + SA-8 + 366 + Test attestation on 20140912 by JL + The umask value influences the permissions assigned to files when they are created. +A misconfigured umask value could result in files with excessive permissions that can be read or +written to by unauthorized users. + + +var_accounts_user_umask="" + +grep -q umask /etc/csh.cshrc && \ + sed -i "s/umask.*/umask $var_accounts_user_umask/g" /etc/csh.cshrc +if ! [ $? -eq 0 ]; then + echo "umask $var_accounts_user_umask" >> /etc/csh.cshrc +fi + + + + + + + + + + + Ensure the Default Umask is Set Correctly in /etc/profile + +To ensure the default umask controlled by /etc/profile is set properly, +add or correct the umask setting in /etc/profile to read as follows: +umask + + SA-8 + 366 + Test attestation on 20120929 by swells + The umask value influences the permissions assigned to files when they are created. +A misconfigured umask value could result in files with excessive permissions that can be read or +written to by unauthorized users. + + +var_accounts_user_umask="" + +grep -q umask /etc/profile && \ + sed -i "s/umask.*/umask $var_accounts_user_umask/g" /etc/profile +if ! [ $? -eq 0 ]; then + echo "umask $var_accounts_user_umask" >> /etc/profile +fi + + + + + + + + + + + Ensure the Default Umask is Set Correctly in login.defs + +To ensure the default umask controlled by /etc/login.defs is set properly, +add or correct the UMASK setting in /etc/login.defs to read as follows: +UMASK + + SA-8 + 366 + Test attestation on 20140912 by JL + The umask value influences the permissions assigned to files when they are created. +A misconfigured umask value could result in files with excessive permissions that can be read and +written to by unauthorized users. + + +var_accounts_user_umask="" + +grep -q UMASK /etc/login.defs && \ + sed -i "s/UMASK.*/UMASK $var_accounts_user_umask/g" /etc/login.defs +if ! [ $? -eq 0 ]; then + echo "UMASK $var_accounts_user_umask" >> /etc/login.defs +fi + + + + + + + + + + + + + Protect Physical Console Access + It is impossible to fully protect a system from an +attacker with physical access, so securing the space in which the +system is located should be considered a necessary step. However, +there are some steps which, if taken, make it more difficult for an +attacker to quickly or undetectably modify a system from its +console. + + Set Boot Loader Password + During the boot process, the boot loader is +responsible for starting the execution of the kernel and passing +options to it. The boot loader allows for the selection of +different kernels - possibly on different partitions or media. +The default Red Hat Enterprise Linux boot loader for x86 systems is called GRUB2. +Options it can pass to the kernel include single-user mode, which +provides root access without any authentication, and the ability to +disable SELinux. To prevent local users from modifying the boot +parameters and endangering security, protect the boot loader configuration +with a password and ensure its configuration file's permissions +are set properly. + + + Verify /boot/grub2/grub.cfg User Ownership + The file /boot/grub2/grub.cfg should +be owned by the root user to prevent destruction +or modification of the file. + + To properly set the owner of /boot/grub2/grub.cfg, run the command: + $ sudo chown root /boot/grub2/grub.cfg + + AC-6(7) + 225 + Req-7.1 + 1.5.1 + Test attestation on 20121026 by DS + +Only root should be able to modify important boot parameters. + + + chown root /boot/grub2/grub.cfg + + + + + + + + + + Verify /boot/grub2/grub.cfg Group Ownership + The file /boot/grub2/grub.cfg should +be group-owned by the root group to prevent +destruction or modification of the file. + + To properly set the group owner of /boot/grub2/grub.cfg, run the command: + $ sudo chgrp root /boot/grub2/grub.cfg + + AC-6(7) + 225 + Req-7.1 + 1.5.1 + Test attestation on 20121026 by DS + +The root group is a highly-privileged group. Furthermore, the group-owner of this +file should not have any access privileges anyway. + + + chgrp root /boot/grub2/grub.cfg + + + + + + + + + + Verify /boot/grub2/grub.cfg Permissions + File permissions for /boot/grub2/grub.cfg should be set to 600. + + To properly set the permissions of /boot/grub2/grub.cfg, run the command: + $ sudo chmod 600 /boot/grub2/grub.cfg + + AC-6(7) + 225 + 1.5.2 + Test attestation on 20121026 by DS + +Proper permissions ensure that only the root user can modify important boot +parameters. + + + chmod 600 /boot/grub2/grub.cfg + + + + + + + + + + Set Boot Loader Password + The grub2 boot loader should have a superuser account and password +protection enabled to protect boot-time settings. + +To do so, select a superuser account and password and add them into the +appropriate grub2 configuration file(s) under /etc/grub.d. +Since plaintext passwords are a security risk, generate a hash for the pasword +by running the following command: +$ grub2-mkpasswd-pbkdf2 +When prompted, enter the password that was selected and insert the returned +password hash into the appropriate grub2 configuration file(s) under +/etc/grub.d immediately after the superuser account. +(Use the output from grub2-mkpasswd-pbkdf2 as the value of +password-hash): +password_pbkdf2 superusers-account password-hash +NOTE: It is recommended not to use common administrator account names like root, +admin, or administrator for the grub2 superuser account. + +To meet FISMA Moderate, the bootloader superuser account and password MUST +differ from the root account and password. +Once the superuser account and password have been added, update the +grub.cfg file by running: +grub2-mkconfig -o /boot/grub2/grub.cfg +NOTE: Do NOT manually add the superuser account and password to the +grub.cfg file as the grub2-mkconfig command overwrites this file. + + IA-2(1) + IA-5(e) + AC-3 + 213 + SRG-OS-000080-GPOS-00048 + RHEL-07-010460 + 1.5.3 + Test attestation on 20121026 by DS + +Password protection on the boot loader configuration ensures +users with physical access cannot trivially alter +important bootloader settings. These include which kernel to use, +and whether to enter single-user mode. For more information on how to configure +the grub2 superuser account and password, please refer to +https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-GRUB_2_Password_Protection.html. + + + + + + + + + + + + Set the UEFI Boot Loader Password + The UEFI grub2 boot loader should have a superuser account and password +protection enabled to protect boot-time settings. + +To do so, select a superuser account and password and add them into the +appropriate grub2 configuration file(s) under /etc/grub.d. +Since plaintext passwords are a security risk, generate a hash for the pasword +by running the following command: +$ grub2-mkpasswd-pbkdf2 +When prompted, enter the password that was selected and insert the returned +password hash into the appropriate grub2 configuration file(s) under +/etc/grub.d immediately after the superuser account. +(Use the output from grub2-mkpasswd-pbkdf2 as the value of +password-hash): +password_pbkdf2 superusers-account password-hash +NOTE: It is recommended not to use common administrator account names like root, +admin, or administrator for the grub2 superuser account. + +To meet FISMA Moderate, the bootloader superuser account and password MUST +differ from the root account and password. +Once the superuser account and password have been added, update the +grub.cfg file by running: +grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg +NOTE: Do NOT manually add the superuser account and password to the +grub.cfg file as the grub2-mkconfig command overwrites this file. + + AC-3 + 213 + SRG-OS-000080-GPOS-00048 + RHEL-07-010470 + +Password protection on the boot loader configuration ensures +users with physical access cannot trivially alter +important bootloader settings. These include which kernel to use, +and whether to enter single-user mode. For more information on how to configure +the grub2 superuser account and password, please refer to +https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-GRUB_2_Password_Protection.html. + + + + + + + + + + + + + Require Authentication for Single User Mode + Single-user mode is intended as a system recovery +method, providing a single user root access to the system by +providing a boot option at startup. By default, no authentication +is performed if single-user mode is selected. + +By default, single-user mode is protected by requiring a password and is set +in /usr/lib/systemd/system/rescue.service. + + IA-2(1) + AC-3 + 213 + Test attestation on 20121024 by DS + +This prevents attackers with physical access from trivially bypassing security +on the machine and gaining root access. Such accesses are further prevented +by configuring the bootloader password. + + + grep -q sulogin /usr/lib/systemd/system/rescue.service +if ! [ $? -eq 0 ]; then + sed -i "s/-c \"/-c \"\/sbin\/sulogin; /g" /usr/lib/systemd/system/rescue.service +fi + + + + + + + + + + Disable debug-shell SystemD Service + SystemD's debug-shell service is intended to +diagnose SystemD related boot issues with various systemctl +commands. Once enabled and following a system reboot, the root shell +will be available on tty9 which is access by pressing +CTRL-ALT-F9. The debug-shell service should only be used +for SystemD related issues and should otherwise be disabled. + +By default, the debug-shell SystemD service is disabled. + + The debug-shell service can be disabled with the following command: + $ sudo systemctl disable debug-shell.service + + +This prevents attackers with physical access from trivially bypassing security +on the machine through valid troubleshooting configurations and gaining root +access when the system is rebooted. + + + +service_command disable debug-shell.service + + + + + + + + + + Disable Ctrl-Alt-Del Reboot Activation + +By default, SystemD will reboot the system if the Ctrl-Alt-Del +key sequence is pressed. + +To configure the system to ignore the Ctrl-Alt-Del key sequence from the +command line instead of rebooting the system, do either of the following: +ln -sf /dev/null /etc/systemd/system/ctrl-alt-del.target +or +systemctl mask ctrl-alt-del.target + +Do not simply delete the /usr/lib/systemd/system/ctrl-alt-del.service file, +as this file may be restored during future system updates. + + Disabling the Ctrl-Alt-Del key sequence +with SystemD DOES NOT disable the Ctrl-Alt-Del key sequence +if running in graphical.target mode (e.g. in GNOME, KDE, etc.)! The +Ctrl-Alt-Del key sequence will only be disabled if running in +the non-graphical multi-user.target mode. + + AC-6 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-020220 + +A locally logged-in user who presses Ctrl-Alt-Del, when at the console, +can reboot the system. If accidentally pressed, as could happen in +the case of mixed OS environment, this can create the risk of short-term +loss of availability of systems due to unintentional reboot. + + + # The process to disable ctrl+alt+del has changed in RHEL7. +# Reference: https://access.redhat.com/solutions/1123873 +ln -sf /dev/null /etc/systemd/system/ctrl-alt-del.target + + + + + + + + + + Verify that Interactive Boot is Disabled + +Red Hat Enterprise Linux systems support an "interactive boot" option that can +be used to prevent services from being started. On a Red Hat Enterprise Linux 7 +system, interactive boot can be enabled by providing a 1, +yes, true, or on value to the +systemd.confirm_spawn kernel argument in /etc/default/grub. +Remove any instance of systemd.confirm_spawn=(1|yes|true|on) from +the kernel arguments in that file to disable interactive boot. + + 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 /boot/grub2/grub.cfgOn UEFI-based machines, issue the following command as root: +~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg + + SC-2 + AC-3 + 213 + Test attestation on 20121024 by DS + +Using interactive boot, the console user could disable auditing, firewalls, +or other services, weakening system security. + + + +# Systemd confirm_spawn regex to search for and delete if found +CONFIRM_SPAWN_REGEX="systemd.confirm_spawn=\(1\|yes\|true\|on\)" + +# Modify both the GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT directives +for grubcmdline in "GRUB_CMDLINE_LINUX" "GRUB_CMDLINE_LINUX_DEFAULT" +do + # Remove 'systemd.confirm_spawn' argument from /etc/default/grub if found + if grep -q "^${grubcmdline}=\".*${CONFIRM_SPAWN_REGEX}.*\"" /etc/default/grub + then + # Remove all three possible occurrences of CONFIRM_SPAWN_REGEX: + # At the start + sed -i "s/\"${CONFIRM_SPAWN_REGEX} /\"/" /etc/default/grub + # At the end + sed -i "s/ ${CONFIRM_SPAWN_REGEX}\"$/\"/" /etc/default/grub + # In the middle + sed -i "s/ ${CONFIRM_SPAWN_REGEX}//" /etc/default/grub + fi +done +# Remove 'systemd.confirm_spawn' kernel argument also from runtime settings +/sbin/grubby --update-kernel=ALL --remove-args="systemd.confirm_spawn" + + + + + + + + + + Configure Screen Locking + When a user must temporarily leave an account +logged-in, screen locking should be employed to prevent passersby +from abusing the account. User education and training is +particularly important for screen locking to be effective, and policies +can be implemented to reinforce this. + +Automatic screen locking is only meant as a safeguard for +those cases where a user forgot to lock the screen. + + Configure Console Screen Locking + +A console screen locking mechanism is provided in the +screen package, which is not installed by default. + + + Install the screen Package + +To enable console screen locking, install the screen package: +$ sudo yum install screen +Instruct users to begin new terminal sessions with the following command: +$ screen +The console can now be locked with the following key combination: +ctrl+a x + + AC-11(a) + 57 + SRG-OS-000029-GPOS-00010 + RHEL-07-010072 + Test attestation on 20121026 by DS + +A session time-out lock is a temporary action taken when a user stops work and moves away from the immediate +physical vicinity of the information system but des not logout because of the temporary nature of the absence. +Rather than relying on the user to manually lock their operation system session prior to vacating the vicinity, +operating systems need to be able to identify when a user's session has idled and take action to initiate the +session lock. + +The screen package allows for a session lock to be implemented and configured. + + + yum -y install screen + + + + + + + + + + + Hardware Tokens for Authentication + +The use of hardware tokens such as smart cards for system login +provides stronger, two-factor authentication than using a username and password. +In Red Hat Enterprise Linux servers and workstations, hardware token login +is not enabled by default and must be enabled in the system settings. + + + Enable Smart Card Login + +To enable smart card authentication, consult the documentation at: +https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System-Level_Authentication_Guide/smartcards.html#authconfig-smartcards +For guidance on enabling SSH to authenticate against a Common Access Card (CAC), consult documentation at: +https://access.redhat.com/solutions/82273 + + 765 + 766 + 767 + 768 + 771 + 772 + 884 + Req-8.3 + Smart card login provides two-factor authentication stronger than +that provided by a username and password combination. Smart cards leverage PKI +(public key infrastructure) in order to provide and verify credentials. + + + + +# Install required packages + +package_command install esc +package_command install pam_pkcs11 + +# Enable pcscd.socket systemd activation socket + +service_command enable pcscd.socket + +# Configure the expected /etc/pam.d/system-auth{,-ac} settings directly +# +# The code below will configure system authentication in the way smart card +# logins will be enabled, but also user login(s) via other method to be allowed +# +# NOTE: It is not possible to use the 'authconfig' command to perform the +# remediation for us, because call of 'authconfig' would discard changes +# for other remediations (see RH BZ#1357019 for details) +# +# Therefore we need to configure the necessary settings directly. +# + +# Define system-auth config location +SYSTEM_AUTH_CONF="/etc/pam.d/system-auth" +# Define expected 'pam_env.so' row in $SYSTEM_AUTH_CONF +PAM_ENV_SO="auth.*required.*pam_env.so" + +# Define 'pam_succeed_if.so' row to be appended past $PAM_ENV_SO row into $SYSTEM_AUTH_CONF +SYSTEM_AUTH_PAM_SUCCEED="\ +auth \[success=1 default=ignore\] pam_succeed_if.so service notin \ +login:gdm:xdm:kdm:xscreensaver:gnome-screensaver:kscreensaver quiet use_uid" +# Define 'pam_pkcs11.so' row to be appended past $SYSTEM_AUTH_PAM_SUCCEED +# row into SYSTEM_AUTH_CONF file +SYSTEM_AUTH_PAM_PKCS11="\ +auth \[success=done authinfo_unavail=ignore ignore=ignore default=die\] \ +pam_pkcs11.so nodebug" + +# Define smartcard-auth config location +SMARTCARD_AUTH_CONF="/etc/pam.d/smartcard-auth" +# Define 'pam_pkcs11.so' auth section to be appended past $PAM_ENV_SO into $SMARTCARD_AUTH_CONF +SMARTCARD_AUTH_SECTION="\ +auth [success=done ignore=ignore default=die] pam_pkcs11.so wait_for_card card_only" +# Define expected 'pam_permit.so' row in $SMARTCARD_AUTH_CONF +PAM_PERMIT_SO="account.*required.*pam_permit.so" +# Define 'pam_pkcs11.so' password section +SMARTCARD_PASSWORD_SECTION="\ +password required pam_pkcs11.so" + +# First Correct the SYSTEM_AUTH_CONF configuration +if ! grep -q 'pam_pkcs11.so' "$SYSTEM_AUTH_CONF" +then + # Append (expected) pam_succeed_if.so row past the pam_env.so into SYSTEM_AUTH_CONF file + sed -i --follow-symlinks -e '/^'"$PAM_ENV_SO"'/a '"$SYSTEM_AUTH_PAM_SUCCEED" "$SYSTEM_AUTH_CONF" + # Append (expected) pam_pkcs11.so row past the pam_succeed_if.so into SYSTEM_AUTH_CONF file + sed -i --follow-symlinks -e '/^'"$SYSTEM_AUTH_PAM_SUCCEED"'/a '"$SYSTEM_AUTH_PAM_PKCS11" "$SYSTEM_AUTH_CONF" +fi + +# Then also correct the SMARTCARD_AUTH_CONF +if ! grep -q 'pam_pkcs11.so' "$SMARTCARD_AUTH_CONF" +then + # Append (expected) SMARTCARD_AUTH_SECTION row past the pam_env.so into SMARTCARD_AUTH_CONF file + sed -i --follow-symlinks -e '/^'"$PAM_ENV_SO"'/a '"$SMARTCARD_AUTH_SECTION" "$SMARTCARD_AUTH_CONF" + # Append (expected) SMARTCARD_PASSWORD_SECTION row past the pam_permit.so into SMARTCARD_AUTH_CONF file + sed -i --follow-symlinks -e '/^'"$PAM_PERMIT_SO"'/a '"$SMARTCARD_PASSWORD_SECTION" "$SMARTCARD_AUTH_CONF" +fi + +# Perform /etc/pam_pkcs11/pam_pkcs11.conf settings below +# Define selected constants for later reuse +SP="[:space:]" +PAM_PKCS11_CONF="/etc/pam_pkcs11/pam_pkcs11.conf" + +# Ensure OCSP is turned on in $PAM_PKCS11_CONF +# 1) First replace any occurrence of 'none' value of 'cert_policy' key setting with the correct configuration +sed -i "s/^[$SP]*cert_policy[$SP]\+=[$SP]\+none;/\t\tcert_policy = ca, ocsp_on, signature;/g" "$PAM_PKCS11_CONF" +# 2) Then append 'ocsp_on' value setting to each 'cert_policy' key in $PAM_PKCS11_CONF configuration line, +# which does not contain it yet +sed -i "/ocsp_on/! s/^[$SP]*cert_policy[$SP]\+=[$SP]\+\(.*\);/\t\tcert_policy = \1, ocsp_on;/" "$PAM_PKCS11_CONF" + + + + + + + + + + + + + Warning Banners for System Accesses + Each system should expose as little information about +itself as possible. + +System banners, which are typically displayed just before a +login prompt, give out information about the service or the host's +operating system. This might include the distribution name and the +system kernel version, and the particular version of a network +service. This information can assist intruders in gaining access to +the system as it can reveal whether the system is running +vulnerable software. Most network services can be configured to +limit what information is displayed. + +Many organizations implement security policies that require a +system banner provide notice of the system's ownership, provide +warning to unauthorized users, and remind authorized users of their +consent to monitoring. + + Login Banner Verbiage + Enter an appropriate login banner for your organization. Please note that new lines must +be expressed by the '\n' character and special characters like parentheses and quotation marks must be escaped with '\'. + --[\s\n]+WARNING[\s\n]+--[\s\n]*This[\s\n]+system[\s\n]+is[\s\n]+for[\s\n]+the[\s\n]+use[\s\n]+of[\s\n]+authorized[\s\n]+users[\s\n]+only.[\s\n]+Individuals[\s\n]*using[\s\n]+this[\s\n]+computer[\s\n]+system[\s\n]+without[\s\n]+authority[\s\n]+or[\s\n]+in[\s\n]+excess[\s\n]+of[\s\n]+their[\s\n]*authority[\s\n]+are[\s\n]+subject[\s\n]+to[\s\n]+having[\s\n]+all[\s\n]+their[\s\n]+activities[\s\n]+on[\s\n]+this[\s\n]+system[\s\n]*monitored[\s\n]+and[\s\n]+recorded[\s\n]+by[\s\n]+system[\s\n]+personnel.[\s\n]+Anyone[\s\n]+using[\s\n]+this[\s\n]*system[\s\n]+expressly[\s\n]+consents[\s\n]+to[\s\n]+such[\s\n]+monitoring[\s\n]+and[\s\n]+is[\s\n]+advised[\s\n]+that[\s\n]*if[\s\n]+such[\s\n]+monitoring[\s\n]+reveals[\s\n]+possible[\s\n]+evidence[\s\n]+of[\s\n]+criminal[\s\n]+activity[\s\n]*system[\s\n]+personal[\s\n]+may[\s\n]+provide[\s\n]+the[\s\n]+evidence[\s\n]+of[\s\n]+such[\s\n]+monitoring[\s\n]+to[\s\n]+law[\s\n]*enforcement[\s\n]+officials. + You[\s\n]+are[\s\n]+accessing[\s\n]+a[\s\n]+U.S.[\s\n]+Government[\s\n]+\(USG\)[\s\n]+Information[\s\n]+System[\s\n]+\(IS\)[\s\n]+that[\s\n]+is[\s\n]+provided[\s\n]+for[\s\n]+USG-authorized[\s\n]+use[\s\n]+only.[\s\n]*By[\s\n]+using[\s\n]+this[\s\n]+IS[\s\n]+\(which[\s\n]+includes[\s\n]+any[\s\n]+device[\s\n]+attached[\s\n]+to[\s\n]+this[\s\n]+IS\),[\s\n]+you[\s\n]+consent[\s\n]+to[\s\n]+the[\s\n]+following[\s\n]+conditions\:[\s\n]*-[\s\n]*The[\s\n]+USG[\s\n]+routinely[\s\n]+intercepts[\s\n]+and[\s\n]+monitors[\s\n]+communications[\s\n]+on[\s\n]+this[\s\n]+IS[\s\n]+for[\s\n]+purposes[\s\n]+including,[\s\n]+but[\s\n]+not[\s\n]+limited[\s\n]+to,[\s\n]+penetration[\s\n]+testing,[\s\n]+COMSEC[\s\n]+monitoring,[\s\n]+network[\s\n]+operations[\s\n]+and[\s\n]+defense,[\s\n]+personnel[\s\n]+misconduct[\s\n]+\(PM\),[\s\n]+law[\s\n]+enforcement[\s\n]+\(LE\),[\s\n]+and[\s\n]+counterintelligence[\s\n]+\(CI\)[\s\n]+investigations.[\s\n]*-[\s\n]*At[\s\n]+any[\s\n]+time,[\s\n]+the[\s\n]+USG[\s\n]+may[\s\n]+inspect[\s\n]+and[\s\n]+seize[\s\n]+data[\s\n]+stored[\s\n]+on[\s\n]+this[\s\n]+IS.[\s\n]*-[\s\n]*Communications[\s\n]+using,[\s\n]+or[\s\n]+data[\s\n]+stored[\s\n]+on,[\s\n]+this[\s\n]+IS[\s\n]+are[\s\n]+not[\s\n]+private,[\s\n]+are[\s\n]+subject[\s\n]+to[\s\n]+routine[\s\n]+monitoring,[\s\n]+interception,[\s\n]+and[\s\n]+search,[\s\n]+and[\s\n]+may[\s\n]+be[\s\n]+disclosed[\s\n]+or[\s\n]+used[\s\n]+for[\s\n]+any[\s\n]+USG-authorized[\s\n]+purpose.[\s\n]*-[\s\n]*This[\s\n]+IS[\s\n]+includes[\s\n]+security[\s\n]+measures[\s\n]+\(e.g.,[\s\n]+authentication[\s\n]+and[\s\n]+access[\s\n]+controls\)[\s\n]+to[\s\n]+protect[\s\n]+USG[\s\n]+interests[\s\n]+--[\s\n]+not[\s\n]+for[\s\n]+your[\s\n]+personal[\s\n]+benefit[\s\n]+or[\s\n]+privacy.[\s\n]*-[\s\n]*Notwithstanding[\s\n]+the[\s\n]+above,[\s\n]+using[\s\n]+this[\s\n]+IS[\s\n]+does[\s\n]+not[\s\n]+constitute[\s\n]+consent[\s\n]+to[\s\n]+PM,[\s\n]+LE[\s\n]+or[\s\n]+CI[\s\n]+investigative[\s\n]+searching[\s\n]+or[\s\n]+monitoring[\s\n]+of[\s\n]+the[\s\n]+content[\s\n]+of[\s\n]+privileged[\s\n]+communications,[\s\n]+or[\s\n]+work[\s\n]+product,[\s\n]+related[\s\n]+to[\s\n]+personal[\s\n]+representation[\s\n]+or[\s\n]+services[\s\n]+by[\s\n]+attorneys,[\s\n]+psychotherapists,[\s\n]+or[\s\n]+clergy,[\s\n]+and[\s\n]+their[\s\n]+assistants.[\s\n]+Such[\s\n]+communications[\s\n]+and[\s\n]+work[\s\n]+product[\s\n]+are[\s\n]+private[\s\n]+and[\s\n]+confidential.[\s\n]+See[\s\n]+User[\s\n]+Agreement[\s\n]+for[\s\n]+details. + I\'ve[\s\n]+read[\s\n]+\&[\s\n]+consent[\s\n]+to[\s\n]+terms[\s\n]+in[\s\n]+IS[\s\n]+user[\s\n]+agreem\'t. + [\s\n]+Use[\s\n]+of[\s\n]+this[\s\n]+or[\s\n]+any[\s\n]+other[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+system[\s\n]+constitutes[\s\n]+consent[\s\n]+to[\s\n]+monitoring[\s\n]+at[\s\n]+all[\s\n]+times.[\s\n]+This[\s\n]+is[\s\n]+a[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+system.[\s\n]+All[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+systems[\s\n]+and[\s\n]+related[\s\n]+equipment[\s\n]+are[\s\n]+intended[\s\n]+for[\s\n]+the[\s\n]+communication,[\s\n]+transmission,[\s\n]+processing,[\s\n]+and[\s\n]+storage[\s\n]+of[\s\n]+official[\s\n]+U.S.[\s\n]+Government[\s\n]+or[\s\n]+other[\s\n]+authorized[\s\n]+information[\s\n]+only.[\s\n]+All[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+systems[\s\n]+are[\s\n]+subject[\s\n]+to[\s\n]+monitoring[\s\n]+at[\s\n]+all[\s\n]+times[\s\n]+to[\s\n]+ensure[\s\n]+proper[\s\n]+functioning[\s\n]+of[\s\n]+equipment[\s\n]+and[\s\n]+systems[\s\n]+including[\s\n]+security[\s\n]+devices[\s\n]+and[\s\n]+systems,[\s\n]+to[\s\n]+prevent[\s\n]+unauthorized[\s\n]+use[\s\n]+and[\s\n]+violations[\s\n]+of[\s\n]+statutes[\s\n]+and[\s\n]+security[\s\n]+regulations,[\s\n]+to[\s\n]+deter[\s\n]+criminal[\s\n]+activity,[\s\n]+and[\s\n]+for[\s\n]+other[\s\n]+similar[\s\n]+purposes.[\s\n]+Any[\s\n]+user[\s\n]+of[\s\n]+a[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+system[\s\n]+should[\s\n]+be[\s\n]+aware[\s\n]+that[\s\n]+any[\s\n]+information[\s\n]+placed[\s\n]+in[\s\n]+the[\s\n]+system[\s\n]+is[\s\n]+subject[\s\n]+to[\s\n]+monitoring[\s\n]+and[\s\n]+is[\s\n]+not[\s\n]+subject[\s\n]+to[\s\n]+any[\s\n]+expectation[\s\n]+of[\s\n]+privacy.[\s\n]+If[\s\n]+monitoring[\s\n]+of[\s\n]+this[\s\n]+or[\s\n]+any[\s\n]+other[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+system[\s\n]+reveals[\s\n]+possible[\s\n]+evidence[\s\n]+of[\s\n]+violation[\s\n]+of[\s\n]+criminal[\s\n]+statutes,[\s\n]+this[\s\n]+evidence[\s\n]+and[\s\n]+any[\s\n]+other[\s\n]+related[\s\n]+information,[\s\n]+including[\s\n]+identification[\s\n]+information[\s\n]+about[\s\n]+the[\s\n]+user,[\s\n]+may[\s\n]+be[\s\n]+provided[\s\n]+to[\s\n]+law[\s\n]+enforcement[\s\n]+officials.[\s\n]+If[\s\n]+monitoring[\s\n]+of[\s\n]+this[\s\n]+or[\s\n]+any[\s\n]+other[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+systems[\s\n]+reveals[\s\n]+violations[\s\n]+of[\s\n]+security[\s\n]+regulations[\s\n]+or[\s\n]+unauthorized[\s\n]+use,[\s\n]+employees[\s\n]+who[\s\n]+violate[\s\n]+security[\s\n]+regulations[\s\n]+or[\s\n]+make[\s\n]+unauthorized[\s\n]+use[\s\n]+of[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+systems[\s\n]+are[\s\n]+subject[\s\n]+to[\s\n]+appropriate[\s\n]+disciplinary[\s\n]+action.[\s\n]+Use[\s\n]+of[\s\n]+this[\s\n]+or[\s\n]+any[\s\n]+other[\s\n]+DoD[\s\n]+interest[\s\n]+computer[\s\n]+system[\s\n]+constitutes[\s\n]+consent[\s\n]+to[\s\n]+monitoring[\s\n]+at[\s\n]+all[\s\n]+times. + + + Modify the System Login Banner + +To configure the system login banner edit /etc/issue. Replace +the default text with a message compliant with the local site policy +or a legal disclaimer. + +The DoD required text is either: + +You are accessing a U.S. Government (USG) Information System (IS) that is +provided for USG-authorized use only. By using this IS (which includes any +device attached to this IS), you consent to the following conditions: +-The USG routinely intercepts and monitors communications on this IS for purposes +including, but not limited to, penetration testing, COMSEC monitoring, network +operations and defense, personnel misconduct (PM), law enforcement (LE), and +counterintelligence (CI) investigations. +-At any time, the USG may inspect and seize data stored on this IS. +-Communications using, or data stored on, this IS are not private, are subject +to routine monitoring, interception, and search, and may be disclosed or used +for any USG-authorized purpose. +-This IS includes security measures (e.g., authentication and access controls) +to protect USG interests -- not for your personal benefit or privacy. +-Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative +searching or monitoring of the content of privileged communications, or work +product, related to personal representation or services by attorneys, +psychotherapists, or clergy, and their assistants. Such communications and work +product are private and confidential. See User Agreement for details. + +OR: + +I've read & consent to terms in IS user agreem't. + + AC-8(a) + AC-8(b) + AC-8(c)(1) + AC-8(c)(2) + AC-8(c)(3) + 48 + SRG-OS-000023-GPOS-00006 + SRG-OS-000024-GPOS-00007 + RHEL-07-010040 + Test attestation on 20121026 by DS + +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 login interfaces with human users and +are not required when such human interfaces do not exist. + + + + + + + + + + + + + Implement a GUI Warning Banner + In the default graphical environment, users logging +directly into the system are greeted with a login screen provided +by the GNOME3 Display Manager (GDM). The warning banner should be +displayed in this graphical environment for these users. +The following sections describe how to configure the GDM login +banner. + + + Enable GNOME3 Login Warning Banner + +To enable displaying a login warning banner in the GNOME +Display Manager's login screen, the banner-message-enable setting must be +set under an appropriate configuration file(s) in the /etc/dconf/db/gdm.d directory +and locked in /etc/dconf/db/gdm.d/locks directory to prevent user modification. +After the settings have been set, run dconf update. +To display a banner, this setting must be enabled, and the user must be prevented +from making changes. The banner text must also be set. + + AC-8(a) + AC-8(b) + AC-8(c)(1) + AC-8(c)(2) + AC-8(c)(3) + 48 + OS-SRG-000023-GPOS-00006 + SRG-OS-000024-GPOS-00007 + SRG-OS-000228-GPOS-00088 + RHEL-07-010031 + +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. + +For U.S. Government systems, system use notifications are required only for access via login interfaces +with human users and are not required when such human interfaces do not exist. + + + + + + + + + + + Set the GNOME3 Login Warning Banner Text + +To set the text shown by the GNOME3 Display Manager +in the login screen, the banner-message-text setting must be set under an +appropriate configuration file(s) in the /etc/dconf/db/gdm.d directory and locked +in /etc/dconf/db/gdm.d/locks directory to prevent user modification. +After the settings have been set, run dconf update. +When entering a warning banner that spans several lines, remember +to begin and end the string with ' and use \n for new lines. + + AC-8(a) + AC-8(b) + AC-8(c) + 48 + 50 + 1384 + 1385 + 1386 + 1387 + 1388 + 23 + +An appropriate warning message reinforces policy awareness during the logon +process and facilitates possible legal action against attackers. + + + + + + + + + + + + + + + Network Configuration and Firewalls + Most machines must be connected to a network of some +sort, and this brings with it the substantial risk of network +attack. This section discusses the security impact of decisions +about networking which must be made when configuring a system. + +This section also discusses firewalls, network access +controls, and other network security frameworks, which allow +system-level rules to be written that can limit an attackers' ability +to connect to your system. These rules can specify that network +traffic should be allowed or denied from certain IP addresses, +hosts, and networks. The rules can also specify which of the +system's network services are available to particular hosts or +networks. + + Disable Unused Interfaces + Network interfaces expand the attack surface of the +system. Unused interfaces are not monitored or controlled, and +should be disabled. + +If the system does not require network communications but still +needs to use the loopback interface, remove all files of the form +ifcfg-interface except for ifcfg-lo from +/etc/sysconfig/network-scripts: +$ sudo rm /etc/sysconfig/network-scripts/ifcfg-interface +If the system is a standalone machine with no need for network access or even +communication over the loopback device, then disable this service. + + The network service can be disabled with the following command: + $ sudo systemctl disable network.service + + + + Disable Client Dynamic DNS Updates + +Dynamic DNS allows clients to dynamically update their own DNS records. +The updates are transmitted by unencrypted means which can reveal information +to a potential malicious user. If the system does not require Dynamic DNS, +remove all DHCP_HOSTNAME references from the +/etc/sysconfig/network-scripts/ifcfg-interface scripts. If +dhclient is used, remove all send host-name hostname +references from the /etc/dhclient.conf configuration file and/or any +reference from the /etc/dhcp directory. + + CM-6(b) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040840 + +Dynamic DNS updates transmit unencrypted information about a system +including its name and address and should not be used unless needed. + + + + + + + + + + + Disable Zeroconf Networking + Zeroconf networking allows the system to assign itself an IP +address and engage in IP communication without a statically-assigned address or +even a DHCP server. Automatic address assignment via Zeroconf (or DHCP) is not +recommended. To disable Zeroconf automatic route assignment in the 169.254.0.0 +subnet, add or correct the following line in /etc/sysconfig/network: +NOZEROCONF=yes + + CM-7 + Zeroconf addresses are in the network 169.254.0.0. The networking +scripts add entries to the system's routing table for these addresses. Zeroconf +address assignment commonly occurs when the system is configured to use DHCP +but fails to receive an address assignment from the DHCP server. + + + echo "NOZEROCONF=yes" >> /etc/sysconfig/network + + + + + + + Ensure System is Not Acting as a Network Sniffer + The system should not be acting as a network sniffer, which can +capture all traffic on the network to which it is connected. Run the following +to determine if any interface is running in promiscuous mode: +$ ip link | grep PROMISC + + CM-7 + MA-3 + If any results are returned, then a sniffing process (such as tcpdump +or Wireshark) is likely to be using the interface and this should be +investigated. + + + + + + + + Kernel Parameters Which Affect Networking + The sysctl utility is used to set +parameters which affect the operation of the Linux kernel. Kernel parameters +which affect networking and have security implications are described here. + + + Network Parameters for Hosts Only + If the system is not going to be used as a router, then setting certain +kernel parameters ensure that the host will not perform routing +of network traffic. + + Disable Kernel Parameter for Sending ICMP Redirects by Default + + + To set the runtime status of the net.ipv4.conf.default.send_redirects kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.default.send_redirects=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.default.send_redirects = 0 + + AC-4 + CM-7 + SC-5 + SC-7 + 1551 + 4.1.2 + Test attestation on 20121024 by DS + 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 ability to send ICMP redirects is only appropriate for systems acting as routers. + + + # +# Set runtime for net.ipv4.conf.default.send_redirects +# +/sbin/sysctl -q -n -w net.ipv4.conf.default.send_redirects=0 + +# +# If net.ipv4.conf.default.send_redirects present in /etc/sysctl.conf, change value to "0" +# else, add "net.ipv4.conf.default.send_redirects = 0" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.default.send_redirects /etc/sysctl.conf ; then + sed -i 's/^net.ipv4.conf.default.send_redirects.*/net.ipv4.conf.default.send_redirects = 0/g' /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.default.send_redirects to 0 per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.default.send_redirects = 0" >> /etc/sysctl.conf +fi + + + + + + + + + + Disable Kernel Parameter for Sending ICMP Redirects for All Interfaces + + + To set the runtime status of the net.ipv4.conf.all.send_redirects kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.all.send_redirects=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.all.send_redirects = 0 + + CM-7 + SC-5(1) + 1551 + 4.1.2 + Test attestation on 20121024 by DS + 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 ability to send ICMP redirects is only appropriate for systems acting as routers. + + + # +# Set runtime for net.ipv4.conf.all.send_redirects +# +/sbin/sysctl -q -n -w net.ipv4.conf.all.send_redirects=0 + +# +# If net.ipv4.conf.all.send_redirects present in /etc/sysctl.conf, change value to "0" +# else, add "net.ipv4.conf.all.send_redirects = 0" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.all.send_redirects /etc/sysctl.conf ; then + sed -i 's/^net.ipv4.conf.all.send_redirects.*/net.ipv4.conf.all.send_redirects = 0/g' /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.all.send_redirects to 0 per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.all.send_redirects = 0" >> /etc/sysctl.conf +fi + + + + + + + + + + Disable Kernel Parameter for IP Forwarding + + + To set the runtime status of the net.ipv4.ip_forward kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.ip_forward=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.ip_forward = 0 + + CM-7 + SC-5 + 366 + 4.1.1 + Test attestation on 20121024 by DS + IP forwarding permits the kernel to forward packets from one network +interface to another. The ability to forward packets between two networks is +only appropriate for systems acting as routers. + + # +# Set runtime for net.ipv4.ip_forward +# +/sbin/sysctl -q -n -w net.ipv4.ip_forward=0 + +# +# If net.ipv4.ip_forward present in /etc/sysctl.conf, change value to "0" +# else, add "net.ipv4.ip_forward = 0" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.ip_forward /etc/sysctl.conf ; then + sed -i 's/^net.ipv4.ip_forward.*/net.ipv4.ip_forward = 0/g' /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.ip_forward to 0 per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.ip_forward = 0" >> /etc/sysctl.conf +fi + + + + + + + + + + + Network Related Kernel Runtime Parameters for Hosts and Routers + Certain kernel parameters should be set for systems which are +acting as either hosts or routers to improve the system's ability defend +against certain types of IPv4 protocol attacks. + + net.ipv4.conf.all.accept_source_route + Trackers could be using source-routed packets to +generate traffic that seems to be intra-net, but actually was +created outside and has been redirected. + 0 + 1 + 0 + + + net.ipv4.conf.all.accept_redirects + Disable ICMP Redirect Acceptance + 0 + 1 + 0 + + + net.ipv4.conf.all.secure_redirects + Enable to prevent hijacking of routing path by only +allowing redirects from gateways known in routing +table. + 1 + 1 + 0 + + + net.ipv4.conf.default.log_martians + Disable so you don't Log Spoofed Packets, Source +Routed Packets, Redirect Packets + 1 + 1 + 0 + + + net.ipv4.conf.all.log_martians + Disable so you don't Log Spoofed Packets, Source +Routed Packets, Redirect Packets + 1 + 1 + 0 + + + net.ipv4.conf.default.accept_source_route + Disable IP source routing? + 0 + 1 + 0 + + + net.ipv4.conf.default.accept_redirects + Disable ICMP Redirect Acceptance? + 0 + 1 + 0 + + + net.ipv4.conf.default.secure_redirects + Log packets with impossible addresses to kernel +log? + 1 + 1 + 0 + + + net.ipv4.icmp_echo_ignore_broadcasts + Ignore all ICMP ECHO and TIMESTAMP requests sent to it +via broadcast/multicast + 1 + 1 + 0 + + + net.ipv4.icmp_ignore_bogus_error_responses + Enable to prevent unnecessary logging + 1 + 1 + 0 + + + net.ipv4.tcp_syncookies + Enable to turn on TCP SYN Cookie +Protection + 1 + 1 + 0 + + + net.ipv4.conf.all.rp_filter + Enable to enforce sanity checking, also called ingress +filtering or egress filtering. The point is to drop a packet if the +source and destination IP addresses in the IP header do not make +sense when considered in light of the physical interface on which +it arrived. + 1 + 1 + 0 + + + net.ipv4.conf.default.rp_filter + Enables source route verification + 1 + 1 + 0 + + + Configure Kernel Parameter for Accepting Source-Routed Packets for All Interfaces + + + To set the runtime status of the net.ipv4.conf.all.accept_source_route kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.all.accept_source_route=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.all.accept_source_route = 0 + + AC-4 + CM-7 + SC-5 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040350 + 4.2.1 + Test attestation on 20121024 by DS + Source-routed packets allow the source of the packet to suggest 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-routerd traffic, such as when IPv4 forwarding is enabled and +the system is functioning as a router. + +Accepting source-routed packets in the IPv4 protocol has few legitimate +uses. It should be disabled unless it is absolutely required. + + +sysctl_net_ipv4_conf_all_accept_source_route_value="" + +# +# Set runtime for net.ipv4.conf.all.accept_source_route +# +/sbin/sysctl -q -n -w net.ipv4.conf.all.accept_source_route=$sysctl_net_ipv4_conf_all_accept_source_route_value + +# +# If net.ipv4.conf.all.accept_source_route present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.all.accept_source_route = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.all.accept_source_route /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.all.accept_source_route.*/net.ipv4.conf.all.accept_source_route = $sysctl_net_ipv4_conf_all_accept_source_route_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.all.accept_source_route to $sysctl_net_ipv4_conf_all_accept_source_route_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.all.accept_source_route = $sysctl_net_ipv4_conf_all_accept_source_route_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter for Accepting ICMP Redirects for All Interfaces + + + To set the runtime status of the net.ipv4.conf.all.accept_redirects kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.all.accept_redirects=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.all.accept_redirects = 0 + + CM-7 + SC-5 + 1503 + 1551 + 4.2.2 + Test attestation on 20121024 by DS + 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. + +This feature of the IPv4 protocol has few legitimate uses. It should be disabled unless +absolutely required. + + +sysctl_net_ipv4_conf_all_accept_redirects_value="" + +# +# Set runtime for net.ipv4.conf.all.accept_redirects +# +/sbin/sysctl -q -n -w net.ipv4.conf.all.accept_redirects=$sysctl_net_ipv4_conf_all_accept_redirects_value + +# +# If net.ipv4.conf.all.accept_redirects present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.all.accept_redirects = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.all.accept_redirects /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.all.accept_redirects.*/net.ipv4.conf.all.accept_redirects = $sysctl_net_ipv4_conf_all_accept_redirects_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.all.accept_redirects to $sysctl_net_ipv4_conf_all_accept_redirects_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.all.accept_redirects = $sysctl_net_ipv4_conf_all_accept_redirects_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter for Accepting Secure Redirects for All Interfaces + + + To set the runtime status of the net.ipv4.conf.all.secure_redirects kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.all.secure_redirects=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.all.secure_redirects = 0 + + AC-4 + CM-7 + SC-5 + 1503 + 1551 + 4.2.3 + Test attestation on 20121024 by DS + Accepting "secure" ICMP redirects (from those gateways listed as +default gateways) has few legitimate uses. It should be disabled unless it is +absolutely required. + + +sysctl_net_ipv4_conf_all_secure_redirects_value="" + +# +# Set runtime for net.ipv4.conf.all.secure_redirects +# +/sbin/sysctl -q -n -w net.ipv4.conf.all.secure_redirects=$sysctl_net_ipv4_conf_all_secure_redirects_value + +# +# If net.ipv4.conf.all.secure_redirects present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.all.secure_redirects = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.all.secure_redirects /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.all.secure_redirects.*/net.ipv4.conf.all.secure_redirects = $sysctl_net_ipv4_conf_all_secure_redirects_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.all.secure_redirects to $sysctl_net_ipv4_conf_all_secure_redirects_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.all.secure_redirects = $sysctl_net_ipv4_conf_all_secure_redirects_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter to Log Martian Packets + + + To set the runtime status of the net.ipv4.conf.all.log_martians kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.all.log_martians=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.all.log_martians = 1 + + AC-17(7) + CM-7 + SC-5(3) + 126 + 4.2.4 + Test attestation on 20121024 by DS + The presence of "martian" packets (which have impossible addresses) +as well as spoofed packets, source-routed packets, and redirects could be a +sign of nefarious network activity. Logging these packets enables this activity +to be detected. + + +sysctl_net_ipv4_conf_all_log_martians_value="" + +# +# Set runtime for net.ipv4.conf.all.log_martians +# +/sbin/sysctl -q -n -w net.ipv4.conf.all.log_martians=$sysctl_net_ipv4_conf_all_log_martians_value + +# +# If net.ipv4.conf.all.log_martians present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.all.log_martians = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.all.log_martians /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.all.log_martians.*/net.ipv4.conf.all.log_martians = $sysctl_net_ipv4_conf_all_log_martians_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.all.log_martians to $sysctl_net_ipv4_conf_all_log_martians_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.all.log_martians = $sysctl_net_ipv4_conf_all_log_martians_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter to Log Martian Packets By Default + + + To set the runtime status of the net.ipv4.conf.default.log_martians kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.default.log_martians=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.default.log_martians = 1 + + AC-17(7) + CM-7 + SC-5(3) + 126 + 4.2.4 + The presence of "martian" packets (which have impossible addresses) +as well as spoofed packets, source-routed packets, and redirects could be a +sign of nefarious network activity. Logging these packets enables this activity +to be detected. + + +sysctl_net_ipv4_conf_default_log_martians_value="" + +# +# Set runtime for net.ipv4.conf.default.log_martians +# +/sbin/sysctl -q -n -w net.ipv4.conf.default.log_martians=$sysctl_net_ipv4_conf_default_log_martians_value + +# +# If net.ipv4.conf.default.log_martians present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.default.log_martians = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.default.log_martians /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.default.log_martians.*/net.ipv4.conf.default.log_martians = $sysctl_net_ipv4_conf_default_log_martians_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.default.log_martians to $sysctl_net_ipv4_conf_default_log_martians_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.default.log_martians = $sysctl_net_ipv4_conf_default_log_martians_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter for Accepting Source-Routed Packets By Default + + + To set the runtime status of the net.ipv4.conf.default.accept_source_route kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.default.accept_source_route=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.default.accept_source_route = 0 + + AC-4 + CM-7 + SC-5 + SC-7 + 1551 + SRG-OS-000480-GPOS-00227 + RHEL-07-040350 + 4.2.1 + Test attestation on 20121024 by DS + Source-routed packates allow the source of the packet to suggest routers +forward the packet along a different path than configured on the router, which can +be used to bypass network security measures. + +Accepting source-routed packets in the IPv4 protocol has few legitimate +uses. It should be disabled unless it is absolutely required, such as when +IPv4 forwarding is enabled and the system is legitimately functioning as +a router. + + +sysctl_net_ipv4_conf_default_accept_source_route_value="" + +# +# Set runtime for net.ipv4.conf.default.accept_source_route +# +/sbin/sysctl -q -n -w net.ipv4.conf.default.accept_source_route=$sysctl_net_ipv4_conf_default_accept_source_route_value + +# +# If net.ipv4.conf.default.accept_source_route present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.default.accept_source_route = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.default.accept_source_route /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.default.accept_source_route.*/net.ipv4.conf.default.accept_source_route = $sysctl_net_ipv4_conf_default_accept_source_route_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.default.accept_source_route to $sysctl_net_ipv4_conf_default_accept_source_route_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.default.accept_source_route = $sysctl_net_ipv4_conf_default_accept_source_route_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter for Accepting ICMP Redirects By Default + + + To set the runtime status of the net.ipv4.conf.default.accept_redirects kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.default.accept_redirects=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.default.accept_redirects = 0 + + AC-4 + CM-7 + SC-5 + SC-7 + 1551 + 4.2.2 + Test attestation on 20121024 by DS + 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. + +This feature of the IPv4 protocol has few legitimate uses. It should be disabled unless +absolutely required. + + +sysctl_net_ipv4_conf_default_accept_redirects_value="" + +# +# Set runtime for net.ipv4.conf.default.accept_redirects +# +/sbin/sysctl -q -n -w net.ipv4.conf.default.accept_redirects=$sysctl_net_ipv4_conf_default_accept_redirects_value + +# +# If net.ipv4.conf.default.accept_redirects present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.default.accept_redirects = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.default.accept_redirects /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.default.accept_redirects.*/net.ipv4.conf.default.accept_redirects = $sysctl_net_ipv4_conf_default_accept_redirects_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.default.accept_redirects to $sysctl_net_ipv4_conf_default_accept_redirects_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.default.accept_redirects = $sysctl_net_ipv4_conf_default_accept_redirects_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter for Accepting Secure Redirects By Default + + + To set the runtime status of the net.ipv4.conf.default.secure_redirects kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.default.secure_redirects=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.default.secure_redirects = 0 + + AC-4 + CM-7 + SC-5 + SC-7 + 1551 + 4.2.3 + Test attestation on 20121024 by DS + Accepting "secure" ICMP redirects (from those gateways listed as +default gateways) has few legitimate uses. It should be disabled unless it is +absolutely required. + + +sysctl_net_ipv4_conf_default_secure_redirects_value="" + +# +# Set runtime for net.ipv4.conf.default.secure_redirects +# +/sbin/sysctl -q -n -w net.ipv4.conf.default.secure_redirects=$sysctl_net_ipv4_conf_default_secure_redirects_value + +# +# If net.ipv4.conf.default.secure_redirects present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.default.secure_redirects = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.default.secure_redirects /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.default.secure_redirects.*/net.ipv4.conf.default.secure_redirects = $sysctl_net_ipv4_conf_default_secure_redirects_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.default.secure_redirects to $sysctl_net_ipv4_conf_default_secure_redirects_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.default.secure_redirects = $sysctl_net_ipv4_conf_default_secure_redirects_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter to Ignore ICMP Broadcast Echo Requests + + + To set the runtime status of the net.ipv4.icmp_echo_ignore_broadcasts kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.icmp_echo_ignore_broadcasts = 1 + + AC-4 + CM-7 + SC-5 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040380 + 4.2.5 + Test attestation on 20121024 by DS + Responding to broadcast (ICMP) echoes facilitates network mapping +and provides a vector for amplification attacks. + +Ignoring ICMP echo requests (pings) sent to broadcast or multicast +addresses makes the system slightly more difficult to enumerate on the network. + + + +sysctl_net_ipv4_icmp_echo_ignore_broadcasts_value="" + +# +# Set runtime for net.ipv4.icmp_echo_ignore_broadcasts +# +/sbin/sysctl -q -n -w net.ipv4.icmp_echo_ignore_broadcasts=$sysctl_net_ipv4_icmp_echo_ignore_broadcasts_value + +# +# If net.ipv4.icmp_echo_ignore_broadcasts present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.icmp_echo_ignore_broadcasts = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.icmp_echo_ignore_broadcasts /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.icmp_echo_ignore_broadcasts.*/net.ipv4.icmp_echo_ignore_broadcasts = $sysctl_net_ipv4_icmp_echo_ignore_broadcasts_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.icmp_echo_ignore_broadcasts to $sysctl_net_ipv4_icmp_echo_ignore_broadcasts_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.icmp_echo_ignore_broadcasts = $sysctl_net_ipv4_icmp_echo_ignore_broadcasts_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter to Ignore Bogus ICMP Error Responses + + + To set the runtime status of the net.ipv4.icmp_ignore_bogus_error_responses kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.icmp_ignore_bogus_error_responses = 1 + + CM-7 + SC-5 + 4.2.6 + Test attestation on 20121024 by DS + Ignoring bogus ICMP error responses reduces +log size, although some activity would not be logged. + + +sysctl_net_ipv4_icmp_ignore_bogus_error_responses_value="" + +# +# Set runtime for net.ipv4.icmp_ignore_bogus_error_responses +# +/sbin/sysctl -q -n -w net.ipv4.icmp_ignore_bogus_error_responses=$sysctl_net_ipv4_icmp_ignore_bogus_error_responses_value + +# +# If net.ipv4.icmp_ignore_bogus_error_responses present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.icmp_ignore_bogus_error_responses = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.icmp_ignore_bogus_error_responses /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.icmp_ignore_bogus_error_responses.*/net.ipv4.icmp_ignore_bogus_error_responses = $sysctl_net_ipv4_icmp_ignore_bogus_error_responses_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.icmp_ignore_bogus_error_responses to $sysctl_net_ipv4_icmp_ignore_bogus_error_responses_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.icmp_ignore_bogus_error_responses = $sysctl_net_ipv4_icmp_ignore_bogus_error_responses_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter to Use TCP Syncookies + + + To set the runtime status of the net.ipv4.tcp_syncookies kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.tcp_syncookies=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.tcp_syncookies = 1 + + AC-4 + SC-5(1)(2) + SC-5(2) + SC-5(3) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040430 + 4.2.8 + Test attestation on 20121024 by DS + A TCP SYN flood attack can cause a denial of service by filling a +system's TCP connection table with connections in the SYN_RCVD state. +Syncookies can be used to track a connection when a subsequent ACK is received, +verifying the initiator is attempting a valid connection and is not a flood +source. This feature is activated when a flood condition is detected, and +enables the system to continue servicing valid connection requests. + + + +sysctl_net_ipv4_tcp_syncookies_value="" + +# +# Set runtime for net.ipv4.tcp_syncookies +# +/sbin/sysctl -q -n -w net.ipv4.tcp_syncookies=$sysctl_net_ipv4_tcp_syncookies_value + +# +# If net.ipv4.tcp_syncookies present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.tcp_syncookies = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.tcp_syncookies /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.tcp_syncookies.*/net.ipv4.tcp_syncookies = $sysctl_net_ipv4_tcp_syncookies_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.tcp_syncookies to $sysctl_net_ipv4_tcp_syncookies_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.tcp_syncookies = $sysctl_net_ipv4_tcp_syncookies_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter to Use Reverse Path Filtering for All Interfaces + + + To set the runtime status of the net.ipv4.conf.all.rp_filter kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.all.rp_filter=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.all.rp_filter = 1 + + AC-4 + SC-5 + SC-7 + 1551 + 4.2.7 + Test attestation on 20121024 by DS + Enabling reverse path filtering drops packets with source addresses +that should not have been able to be received on the interface they were +received on. It should not be used on systems which are routers for +complicated networks, but is helpful for end hosts and routers serving small +networks. + + +sysctl_net_ipv4_conf_all_rp_filter_value="" + +# +# Set runtime for net.ipv4.conf.all.rp_filter +# +/sbin/sysctl -q -n -w net.ipv4.conf.all.rp_filter=$sysctl_net_ipv4_conf_all_rp_filter_value + +# +# If net.ipv4.conf.all.rp_filter present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.all.rp_filter = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.all.rp_filter /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.all.rp_filter.*/net.ipv4.conf.all.rp_filter = $sysctl_net_ipv4_conf_all_rp_filter_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.all.rp_filter to $sysctl_net_ipv4_conf_all_rp_filter_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.all.rp_filter = $sysctl_net_ipv4_conf_all_rp_filter_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter to Use Reverse Path Filtering by Default + + + To set the runtime status of the net.ipv4.conf.default.rp_filter kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv4.conf.default.rp_filter=1 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv4.conf.default.rp_filter = 1 + + AC-4 + SC-5 + SC-7 + 4.2.7 + Test attestation on 20121024 by DS + Enabling reverse path filtering drops packets with source addresses +that should not have been able to be received on the interface they were +received on. It should not be used on systems which are routers for +complicated networks, but is helpful for end hosts and routers serving small +networks. + + +sysctl_net_ipv4_conf_default_rp_filter_value="" + +# +# Set runtime for net.ipv4.conf.default.rp_filter +# +/sbin/sysctl -q -n -w net.ipv4.conf.default.rp_filter=$sysctl_net_ipv4_conf_default_rp_filter_value + +# +# If net.ipv4.conf.default.rp_filter present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv4.conf.default.rp_filter = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv4.conf.default.rp_filter /etc/sysctl.conf ; then + sed -i "s/^net.ipv4.conf.default.rp_filter.*/net.ipv4.conf.default.rp_filter = $sysctl_net_ipv4_conf_default_rp_filter_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv4.conf.default.rp_filter to $sysctl_net_ipv4_conf_default_rp_filter_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv4.conf.default.rp_filter = $sysctl_net_ipv4_conf_default_rp_filter_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + + + Wireless Networking + Wireless networking, such as 802.11 +(WiFi) and Bluetooth, can present a security risk to sensitive or +classified systems and networks. Wireless networking hardware is +much more likely to be included in laptop or portable systems than +in desktops or servers. + +Removal of hardware provides the greatest assurance that the wireless +capability remains disabled. Acquisition policies often include provisions to +prevent the purchase of equipment that will be used in sensitive spaces and +includes wireless capabilities. If it is impractical to remove the wireless +hardware, and policy permits the device to enter sensitive spaces as long +as wireless is disabled, efforts should instead focus on disabling wireless capability +via software. + + Disable Wireless Through Software Configuration + If it is impossible to remove the wireless hardware +from the device in question, disable as much of it as possible +through software. The following methods can disable software +support for wireless networking, but note that these methods do not +prevent malicious software or careless users from re-activating the +devices. + + Disable WiFi or Bluetooth in BIOS + Some systems that include built-in wireless support offer the +ability to disable the device through the BIOS. This is system-specific; +consult your hardware manual or explore the BIOS setup during +boot. + AC-17(8) + AC-18(a) + AC-18(d) + AC-18(3) + CM-7 + 85 + Disabling wireless support in the BIOS prevents easy +activation of the wireless interface, generally requiring administrators +to reboot the system first. + + + + + Deactivate Wireless Network Interfaces + Deactivating wireless network interfaces should prevent +normal usage of the wireless capability. + +First, identify the interfaces available with the command: +$ ifconfig -a +Additionally, the following command may be used to +determine whether wireless support is included for a +particular interface, though this may not always be a clear +indicator: +$ iwconfig +After identifying any wireless interfaces (which may have +names like wlan0, ath0, wifi0, em1 or +eth0), deactivate the interface with the command: +$ sudo ifdown interface +These changes will only last until the next reboot. To +disable the interface for future boots, remove the appropriate +interface file from /etc/sysconfig/network-scripts: +$ sudo rm /etc/sysconfig/network-scripts/ifcfg-interface + + AC-17(8) + AC-18(a) + AC-18(d) + AC-18(3) + CM-7 + 85 + 4.3.1 + Test attestation on 20121025 by DS + Wireless networking allows attackers within physical proximity to +launch network-based attacks against systems, including those against local LAN +protocols which were not designed with security in mind. + + + + + + + + Disable Bluetooth Service + + + The bluetooth service can be disabled with the following command: + $ sudo systemctl disable bluetooth.service + $ sudo service bluetooth stop + + AC-17(8) + AC-18(a) + AC-18(d) + AC-18(3) + CM-7 + 85 + 1551 + Test attestation on 20121025 by DS + Disabling the bluetooth service prevents the system from attempting +connections to Bluetooth devices, which entails some security risk. +Nevertheless, variation in this risk decision may be expected due to the +utility of Bluetooth connectivity and its limited range. + + grep -qi disable /etc/xinetd.d/bluetooth && \ + sed -i 's/disable.*/disable = yes/gI' /etc/xinetd.d/bluetooth +# +# Disable bluetooth.service for all systemd targets +# +systemctl disable bluetooth.service + +# +# Stop bluetooth.service if currently running +# +systemctl stop bluetooth.service + + + + + + + + + + Disable Bluetooth Kernel Modules + The kernel's module loading system can be configured to prevent +loading of the Bluetooth module. Add the following to +the appropriate /etc/modprobe.d configuration file +to prevent the loading of the Bluetooth module: +install bluetooth /bin/true + + AC-17(8) + AC-18(a) + AC-18(d) + AC-18(3) + CM-7 + 85 + 1551 + Test attestation on 20141031 by JL + If Bluetooth functionality must be disabled, preventing the kernel +from loading the kernel module provides an additional safeguard against its +activation. + + echo "install bluetooth /bin/true" > /etc/modprobe.d/bluetooth.conf + + + + + + + + + + + + IPv6 + The system includes support for Internet Protocol +version 6. A major and often-mentioned improvement over IPv4 is its +enormous increase in the number of available addresses. Another +important feature is its support for automatic configuration of +many network settings. + + Disable Support for IPv6 Unless Needed + +Despite configuration that suggests support for IPv6 has +been disabled, link-local IPv6 address auto-configuration occurs +even when only an IPv4 address is assigned. The only way to +effectively prevent execution of the IPv6 networking stack is to +instruct the system not to activate the IPv6 kernel module. + + + Disable IPv6 Networking Support Automatic Loading + To disable support for (ipv6) add the following line to +/etc/sysctl.d/ipv6.conf (or another file in +/etc/sysctl.d): +net.ipv6.conf.all.disable_ipv6 = 1 +This disables IPv6 on all network interfaces as other services and system +functionality require the IPv6 stack loaded to work. + + CM-7 + 1551 + 4.4.2 + Test attestation on 20121024 by DS + +Any unnecessary network stacks - including IPv6 - should be disabled, to reduce +the vulnerability to exploitation. + + + + + + + + + + + Disable Interface Usage of IPv6 + To disable interface usage of IPv6, add or correct the following lines in /etc/sysconfig/network: +NETWORKING_IPV6=no +IPV6INIT=no + + + + + Disable Support for RPC IPv6 + RPC services for NFSv4 try to load transport modules for +udp6 and tcp6 by default, even if IPv6 has been disabled in +/etc/modprobe.d. To prevent RPC services such as rpc.mountd +from attempting to start IPv6 network listeners, remove or comment out the +following two lines in /etc/netconfig: +udp6 tpi_clts v inet6 udp - - +tcp6 tpi_cots_ord v inet6 tcp - - + + CM-7 + + + + + + + + Configure IPv6 Settings if Necessary + A major feature of IPv6 is the extent to which systems +implementing it can automatically configure their networking +devices using information from the network. From a security +perspective, manually configuring important configuration +information is preferable to accepting it from the network +in an unauthenticated fashion. + + Disable Automatic Configuration + Disable the system's acceptance of router +advertisements and redirects by adding or correcting the following +line in /etc/sysconfig/network (note that this does not disable +sending router solicitations): +IPV6_AUTOCONF=no + + + IPV6_AUTOCONF + Toggle global IPv6 auto-configuration (only, if global +forwarding is disabled) + no + yes + no + + + net.ipv6.conf.all.accept_source_route + Trackers could be using source-routed packets to +generate traffic that seems to be intra-net, but actually was +created outside and has been redirected. + 0 + 1 + 0 + + + net.ipv6.conf.default.accept_ra + Accept default router advertisements by default? + 0 + 1 + 0 + + + net.ipv6.conf.all.accept_ra + Accept all router advertisements? + 0 + 1 + 0 + + + net.ipv6.conf.default.accept_redirects + Toggle ICMP Redirect Acceptance By Default + 0 + 1 + 0 + + + net.ipv6.conf.all.accept_redirects + Toggle ICMP Redirect Acceptance + 0 + 1 + 0 + + + net.ipv6.conf.default.accept_source_route + Trackers could be using source-routed packets to +generate traffic that seems to be intra-net, but actually was +created outside and has been redirected. + 0 + 1 + 0 + + + net.ipv6.conf.all.forwarding + Toggle IPv6 Forwarding + 0 + 1 + 0 + + + Configure Kernel Parameter for Accepting Source-Routed Packets for All Interfaces + + + To set the runtime status of the net.ipv6.conf.all.accept_source_route kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv6.conf.all.accept_source_route=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv6.conf.all.accept_source_route = 0 + + AC-4 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040860 + Source-routed packets allow the source of the packet to suggest 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-routerd traffic, such as when IPv6 forwarding is enabled and +the system is functioning as a router. + +Accepting source-routed packets in the IPv6 protocol has few legitimate +uses. It should be disabled unless it is absolutely required. + + + + + + + + + + + Configure Accepting IPv6 Router Advertisements + + + To set the runtime status of the net.ipv6.conf.all.accept_ra kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv6.conf.all.accept_ra=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv6.conf.all.accept_ra = 0 + + CM-7 + 4.4.1.1 + +An illicit router advertisement message could result in a man-in-the-middle attack. + + + +sysctl_net_ipv6_conf_all_accept_ra_value="" + +# +# Set runtime for net.ipv6.conf.all.accept_ra +# +/sbin/sysctl -q -n -w net.ipv6.conf.all.accept_ra=$sysctl_net_ipv6_conf_all_accept_ra_value + +# +# If net.ipv6.conf.all.accept_ra present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv6.conf.all.accept_ra = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv6.conf.all.accept_ra /etc/sysctl.conf ; then + sed -i "s/^net.ipv6.conf.all.accept_ra.*/net.ipv6.conf.all.accept_ra = $sysctl_net_ipv6_conf_all_accept_ra_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv6.conf.all.accept_ra to $sysctl_net_ipv6_conf_all_accept_ra_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv6.conf.all.accept_ra = $sysctl_net_ipv6_conf_all_accept_ra_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Accepting IPv6 Router Advertisements + + + To set the runtime status of the net.ipv6.conf.default.accept_ra kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv6.conf.default.accept_ra=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv6.conf.default.accept_ra = 0 + + CM-7 + 4.4.1.1 + +An illicit router advertisement message could result in a man-in-the-middle attack. + + + +sysctl_net_ipv6_conf_default_accept_ra_value="" + +# +# Set runtime for net.ipv6.conf.default.accept_ra +# +/sbin/sysctl -q -n -w net.ipv6.conf.default.accept_ra=$sysctl_net_ipv6_conf_default_accept_ra_value + +# +# If net.ipv6.conf.default.accept_ra present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv6.conf.default.accept_ra = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv6.conf.default.accept_ra /etc/sysctl.conf ; then + sed -i "s/^net.ipv6.conf.default.accept_ra.*/net.ipv6.conf.default.accept_ra = $sysctl_net_ipv6_conf_default_accept_ra_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv6.conf.default.accept_ra to $sysctl_net_ipv6_conf_default_accept_ra_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv6.conf.default.accept_ra = $sysctl_net_ipv6_conf_default_accept_ra_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Accepting IPv6 Redirects By Default + + + To set the runtime status of the net.ipv6.conf.all.accept_redirects kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv6.conf.all.accept_redirects=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv6.conf.all.accept_redirects = 0 + + CM-7 + 1551 + 4.4.1.2 + +An illicit ICMP redirect message could result in a man-in-the-middle attack. + + + +sysctl_net_ipv6_conf_all_accept_redirects_value="" + +# +# Set runtime for net.ipv6.conf.all.accept_redirects +# +/sbin/sysctl -q -n -w net.ipv6.conf.all.accept_redirects=$sysctl_net_ipv6_conf_all_accept_redirects_value + +# +# If net.ipv6.conf.all.accept_redirects present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv6.conf.all.accept_redirects = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv6.conf.all.accept_redirects /etc/sysctl.conf ; then + sed -i "s/^net.ipv6.conf.all.accept_redirects.*/net.ipv6.conf.all.accept_redirects = $sysctl_net_ipv6_conf_all_accept_redirects_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv6.conf.all.accept_redirects to $sysctl_net_ipv6_conf_all_accept_redirects_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv6.conf.all.accept_redirects = $sysctl_net_ipv6_conf_all_accept_redirects_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Accepting IPv6 Redirects By Default + + + To set the runtime status of the net.ipv6.conf.default.accept_redirects kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv6.conf.default.accept_redirects=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv6.conf.default.accept_redirects = 0 + + CM-7 + 1551 + 4.4.1.2 + +An illicit ICMP redirect message could result in a man-in-the-middle attack. + + + +sysctl_net_ipv6_conf_default_accept_redirects_value="" + +# +# Set runtime for net.ipv6.conf.default.accept_redirects +# +/sbin/sysctl -q -n -w net.ipv6.conf.default.accept_redirects=$sysctl_net_ipv6_conf_default_accept_redirects_value + +# +# If net.ipv6.conf.default.accept_redirects present in /etc/sysctl.conf, change value to appropriate value +# else, add "net.ipv6.conf.default.accept_redirects = value" to /etc/sysctl.conf +# +if grep --silent ^net.ipv6.conf.default.accept_redirects /etc/sysctl.conf ; then + sed -i "s/^net.ipv6.conf.default.accept_redirects.*/net.ipv6.conf.default.accept_redirects = $sysctl_net_ipv6_conf_default_accept_redirects_value/g" /etc/sysctl.conf +else + echo -e "\n# Set net.ipv6.conf.default.accept_redirects to $sysctl_net_ipv6_conf_default_accept_redirects_value per security requirements" >> /etc/sysctl.conf + echo "net.ipv6.conf.default.accept_redirects = $sysctl_net_ipv6_conf_default_accept_redirects_value" >> /etc/sysctl.conf +fi + + + + + + + + + + + Configure Kernel Parameter for Accepting Source-Routed Packets for Interfaces By Default + + + To set the runtime status of the net.ipv6.conf.default.accept_source_route kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv6.conf.default.accept_source_route=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv6.conf.default.accept_source_route = 0 + + AC-4 + 366 + Source-routed packets allow the source of the packet to suggest 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-routerd traffic, such as when IPv6 forwarding is enabled and +the system is functioning as a router. + +Accepting source-routed packets in the IPv6 protocol has few legitimate +uses. It should be disabled unless it is absolutely required. + + + + + + + + + + + Disable Kernel Parameter for IPv6 Forwarding + + + To set the runtime status of the net.ipv6.conf.all.forwarding kernel parameter, + run the following command: + $ sudo sysctl -w net.ipv6.conf.all.forwarding=0 + If this is not the system's default value, add the following line to /etc/sysctl.conf: + net.ipv6.conf.all.forwarding = 0 + + CM-7 + SC-5 + 366 + 4.1.1 + IP forwarding permits the kernel to forward packets from one network +interface to another. The ability to forward packets between two networks is +only appropriate for systems acting as routers. + + + + + + + + + + + + Manually Assign Global IPv6 Address + To manually assign an IP address for an interface, edit the +file /etc/sysconfig/network-scripts/ifcfg-interface. Add or correct the +following line (substituting the correct IPv6 address): +IPV6ADDR=2001:0DB8::ABCD/64 +Manually assigning an IP address is preferable to accepting one from routers or +from the network otherwise. The example address here is an IPv6 address +reserved for documentation purposes, as defined by RFC3849. + + 366 + + + + + + + Use Privacy Extensions for Address + To introduce randomness into the automatic generation of IPv6 +addresses, add or correct the following line in +/etc/sysconfig/network-scripts/ifcfg-interface: +IPV6_PRIVACY=rfc3041 +Automatically-generated IPv6 addresses are based on the underlying hardware +(e.g. Ethernet) address, and so it becomes possible to track a piece of +hardware over its lifetime using its traffic. If it is important for a system's +IP address to not trivially reveal its hardware address, this setting should be +applied. + + 366 + + + + + + + Manually Assign IPv6 Router Address + Edit the file +/etc/sysconfig/network-scripts/ifcfg-interface, and add or correct +the following line (substituting your gateway IP as appropriate): +IPV6_DEFAULTGW=2001:0DB8::0001 +Router addresses should be manually set and not accepted via any +auto-configuration or router advertisement. + + 366 + + + + + + + Limit Network-Transmitted Configuration if Using Static IPv6 Addresses + To limit the configuration information requested from other +systems and accepted from the network on a system that uses +statically-configured IPv6 addresses, add the following lines to +/etc/sysctl.conf: +net.ipv6.conf.default.router_solicitations = 0 +net.ipv6.conf.default.accept_ra_rtr_pref = 0 +net.ipv6.conf.default.accept_ra_pinfo = 0 +net.ipv6.conf.default.accept_ra_defrtr = 0 +net.ipv6.conf.default.autoconf = 0 +net.ipv6.conf.default.dad_transmits = 0 +net.ipv6.conf.default.max_addresses = 1 +The router_solicitations setting determines how many router +solicitations are sent when bringing up the interface. If addresses are +statically assigned, there is no need to send any solicitations. + +The accept_ra_pinfo setting controls whether the system will accept +prefix info from the router. + +The accept_ra_defrtr setting controls whether the system will accept +Hop Limit settings from a router advertisement. Setting it to 0 prevents a +router from changing your default IPv6 Hop Limit for outgoing packets. + +The autoconf setting controls whether router advertisements can cause +the system to assign a global unicast address to an interface. + +The dad_transmits setting determines how many neighbor solicitations +to send out per address (global and link-local) when bringing up an interface +to ensure the desired address is unique on the network. + +The max_addresses setting determines how many global unicast IPv6 +addresses can be assigned to each interface. The default is 16, but it should +be set to exactly the number of statically configured global addresses +required. + + + + + + firewalld + The dynamic firewall daemon firewalld provides a +dynamically managed firewall with support for network “zones” to assign +a level of trust to a network and its associated connections and interfaces. +It has support for IPv4 and IPv6 firewall settings. It supports Ethernet +bridges and has a separation of runtime and permanent configuration options. +It also has an interface for services or applications to add firewall rules +directly. + +A graphical configuration tool, firewall-config, is used to configure +firewalld, which in turn uses iptables tool to communicate +with Netfilter in the kernel which implements packet filtering. + +The firewall service provided by firewalld is dynamic rather than +static because changes to the configuration can be made at anytime and are +immediately implemented. There is no need to save or apply the changes. No +unintended disruption of existing network connections occurs as no part of +the firewall has to be reloaded. + + + Inspect and Activate Default firewalld Rules + Firewalls can be used to separate networks into different zones +based on the level of trust the user has decided to place on the devices and +traffic within that network. NetworkManager informs firewalld to which +zone an interface belongs. An interface's assigned zone can be changed by +NetworkManager or via the firewall-config tool. + +The zone settings in /etc/firewalld/ are a range of preset settings +which can be quickly applied to a network interface. These are the zones +provided by firewalld sorted according to the default trust level of the +zones from untrusted to trusted: +dropAny incoming network packets are dropped, there is no +reply. Only outgoing network connections are possible.blockAny incoming network connections are rejected with an +icmp-host-prohibited message for IPv4 and icmp6-adm-prohibited +for IPv6. Only network connections initiated from within the system are +possible.publicFor use in public areas. You do not trust the other +computers on the network to not harm your computer. Only selected incoming +connections are accepted.externalFor use on external networks with masquerading enabled +especially for routers. You do not trust the other computers on the network to +not harm your computer. Only selected incoming connections are accepted.dmzFor computers in your demilitarized zone that are +publicly-accessible with limited access to your internal network. Only selected +incoming connections are accepted.workFor use in work areas. You mostly trust the other computers +on networks to not harm your computer. Only selected incoming connections are +accepted.homeFor use in home areas. You mostly trust the other computers +on networks to not harm your computer. Only selected incoming connections are +accepted.internalFor use on internal networks. You mostly trust the +other computers on the networks to not harm your computer. Only selected +incoming connections are accepted.trustedAll network connections are accepted. + +It is possible to designate one of these zones to be the default zone. When +interface connections are added to NetworkManager, they are assigned +to the default zone. On installation, the default zone in firewalld is set to +be the public zone. + +To find out all the settings of a zone, for example the public zone, +enter the following command as root: +# firewall-cmd --zone=public --list-all +Example output of this command might look like the following: + +# firewall-cmd --zone=public --list-all +public + interfaces: + services: mdns dhcpv6-client ssh + ports: + forward-ports: + icmp-blocks: source-quench + +To view the network zones currently active, enter the following command as root: +# firewall-cmd --get-service +The following listing displays the result of this command on common Red Hat +Enterprise Linux 7 Server system: + +# firewall-cmd --get-service +amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp +high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd +ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn +pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind +samba samba-client smtp ssh telnet tftp tftp-client transmission-client +vnc-server wbem-https + +Finally to view the network zones that will be active after the next firewalld +service reload, enter the following command as root: +# firewall-cmd --get-service --permanent + + + Verify firewalld Enabled + + + The firewalld service can be enabled with the following command: + $ sudo systemctl enable firewalld.service + + CM-6(b) + 366 + 4.7 + SRG-OS-000480-GPOS-00227 + RHEL-07-040810 + +Access control methods provide the ability to enhance system security posture +by restricting services and known good IP addresses and address ranges. This +prevents connections from unknown hosts and protocols. + + + # +# Enable firewalld.service for all systemd targets +# +systemctl enable firewalld.service + +# +# Start firewalld.service if not currently running +# +systemctl start firewalld.service + + + + + + + + + + + Strengthen the Default Ruleset + The default rules can be strengthened. The system +scripts that activate the firewall rules expect them to be defined +in configuration files under the /etc/firewalld/services +and /etc/firewalld/zones directories. + +The following recommendations describe how to strengthen the +default ruleset configuration file. An alternative to editing this +configuration file is to create a shell script that makes calls to +the firewall-cmd program to load in rules under the /etc/firewalld/services +and /etc/firewalld/zones directories. + +Instructions apply to both unless otherwise noted. Language and address +conventions for regular firewalld rules are used throughout this section. + + The program firewall-config +allows additional services to penetrate the default firewall rules +and automatically adjusts the firewalld ruleset(s). + + Set Default firewalld Zone for Incoming Packets + To set the default zone to drop for +the built-in default zone which processes incoming IPv4 and IPv6 packets, +modify the following line in +/etc/firewalld/firewalld.conf to be: +DefaultZone=drop + + CM-7 + 66 + 1109 + 1154 + 1414 + In firewalld the default zone is applied only after all +the applicable rules in the table are examined for a match. Setting the +default zone to drop implements proper design for a firewall, i.e. +any packets which are not explicitly permitted should not be +accepted. + + grep -q ^DefaultZone= /etc/firewalld/firewalld.conf && \ + sed -i "s/DefaultZone=.*/DefaultZone=drop/g" /etc/firewalld/firewalld.conf +if ! [ $? -eq 0 ]; then + echo "DefaultZone=drop" >> /etc/firewalld/firewalld.conf +fi + + + + + + + + + + + + Transport Layer Security Support + +Support for Transport Layer Security (TLS), and its predecessor, the Secure +Sockets Layer (SSL), is included in Red Hat Enterprise Linux in the OpenSSL software (RPM package +openssl). TLS provides encrypted and authenticated network +communications, and many network services include support for it. TLS or SSL +can be leveraged to avoid any plaintext transmission of sensitive data. + +For information on how to use OpenSSL, see +http://www.openssl.org/docs/HOWTO/. Information on FIPS validation +of OpenSSL is available at http://www.openssl.org/docs/fips/fipsvalidation.html +and http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140val-all.htm. +For information on how to use and implement OpenSSL on Red Hat Enterprise Linux, see +https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_OpenSSL.html + + + + Uncommon Network Protocols + The system includes support for several network +protocols which are not commonly used. Although security vulnerabilities +in kernel networking code are not frequently +discovered, the consequences can be dramatic. Ensuring uncommon +network protocols are disabled reduces the system's risk to attacks +targeted at its implementation of those protocols. + +Although these protocols are not commonly used, avoid disruption +in your network environment by ensuring they are not needed +prior to disabling them. + + + Disable DCCP Support + +The Datagram Congestion Control Protocol (DCCP) is a +relatively new transport layer protocol, designed to support +streaming media and telephony. + +To configure the system to prevent the dccp +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install dccp /bin/true + + CM-7 + + 4.6.1 + Test attestation on 20121024 by DS + +Disabling DCCP protects +the system against exploitation of any flaws in its implementation. + + + echo "install dccp /bin/true" > /etc/modprobe.d/dccp.conf + + + + + + + + + + Disable SCTP Support + +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. + +To configure the system to prevent the sctp +kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d: +install sctp /bin/true + + CM-7 + + 4.6.2 + Test attestation on 20121024 by DS + +Disabling SCTP protects +the system against exploitation of any flaws in its implementation. + + + echo "install sctp /bin/true" > /etc/modprobe.d/sctp.conf + + + + + + + + + + + IPSec Support + Support for Internet Protocol Security (IPsec) +is provided in Red Hat Enterprise Linux 7 with Libreswan. + + + Install libreswan Package + The Libreswan package provides an implementation of IPsec +and IKE, which permits the creation of secure tunnels over +untrusted networks. + The libreswan package can be installed with the following command: + $ sudo yum install libreswan + + AC-17 + MA-4 + SC-9 + 1130 + 1131 + Req-4.1 + Providing the ability for remote users or systems +to initiate a secure VPN connection protects information when it is +transmitted over a wide area network. + + + yum -y install libreswan + + + + + + + + + + Verify Any Configured IPSec Tunnel Connections + Libreswan provides an implementation of IPsec +and IKE, which permits the creation of secure tunnels over +untrusted networks. As such, IPsec can be used to circumvent certain +network requirements such as filtering. Verify that if any IPsec connection +(conn) configured in /etc/ipsec.conf and /etc/ipsec.d +exists is an approved organizational connection. + + AC-4 + 336 + SRG-OS-000480-GPOS-00227 + RHEL-07-040830 + +IP tunneling mechanisms can be used to bypass network filtering. + + + + + + + + + + Configure Syslog + The syslog service has been the default Unix logging mechanism for +many years. It has a number of downsides, including inconsistent log format, +lack of authentication for received messages, and lack of authentication, +encryption, or reliable transport for messages sent over a network. However, +due to its long history, syslog is a de facto standard which is supported by +almost all Unix applications. + + +In Red Hat Enterprise Linux 7, rsyslog has replaced ksyslogd as the +syslog daemon of choice, and it includes some additional security features +such as reliable, connection-oriented (i.e. TCP) transmission of logs, the +option to log to database formats, and the encryption of log data en route to +a central logging server. +This section discusses how to configure rsyslog for +best effect, and how to use tools provided with the system to maintain and +monitor logs. + + Ensure rsyslog is Installed + +Rsyslog is installed by default. + + The rsyslog package can be installed with the following command: + $ sudo yum install rsyslog + + AU-9(2) + 1311 + 1312 + 5.1.1 + Test attestation on 20121024 by DS + +The rsyslog package provides the rsyslog daemon, which provides +system logging services. + + + yum -y install rsyslog + + + + + + + + + + Enable rsyslog Service + The rsyslog service provides syslog-style logging by default on Red Hat Enterprise Linux 7. + + The rsyslog service can be enabled with the following command: + $ sudo systemctl enable rsyslog.service + + AU-4(1) + AU-12 + 1311 + 1312 + 1557 + 1851 + 5.1.2 + Test attestation on 20121024 by DS + The rsyslog service must be running in order to provide +logging services, which are essential to system administration. + + + # +# Enable rsyslog.service for all systemd targets +# +systemctl enable rsyslog.service + +# +# Start rsyslog.service if not currently running +# +systemctl start rsyslog.service + + + + + + + + + + Ensure Proper Configuration of Log Files + +The file /etc/rsyslog.conf controls where log message are written. +These are controlled by lines called rules, which consist of a +selector and an action. +These rules are often customized depending on the role of the system, the +requirements of the environment, and whatever may enable +the administrator to most effectively make use of log data. +The default rules in Red Hat Enterprise Linux 7 are: +*.info;mail.none;authpriv.none;cron.none /var/log/messages +authpriv.* /var/log/secure +mail.* -/var/log/maillog +cron.* /var/log/cron +*.emerg * +uucp,news.crit /var/log/spooler +local7.* /var/log/boot.log +See the man page rsyslog.conf(5) for more information. +Note that the rsyslog daemon can be configured to use a timestamp format that +some log processing programs may not understand. If this occurs, +edit the file /etc/rsyslog.conf and add or edit the following line: +$ ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat + + + User who owns log files + Specify user owner of all logfiles specified in +/etc/rsyslog.conf. + root + + + group who owns log files + Specify group owner of all logfiles specified in +/etc/rsyslog.conf. + root + + + Ensure Log Files Are Owned By Appropriate User + The owner of all log files written by +rsyslog should be root. +These log files are determined by the second part of each Rule line in +/etc/rsyslog.conf and typically all appear in /var/log. +For each log file LOGFILE referenced in /etc/rsyslog.conf, +run the following command to inspect the file's owner: +$ ls -l LOGFILE +If the owner is not root, run the following command to +correct this: +$ sudo chown root LOGFILE + + AC-6 + SI-11 + 1314 + Req-10.5.1 + Req-10.5.2 + Test attestation on 20121024 by DS + The log files generated by rsyslog contain valuable information regarding system +configuration, user authentication, and other such information. Log files should be +protected from unauthorized access. + + + + + + + + + + Ensure Log Files Are Owned By Appropriate Group + The group-owner of all log files written by +rsyslog should be root. +These log files are determined by the second part of each Rule line in +/etc/rsyslog.conf and typically all appear in /var/log. +For each log file LOGFILE referenced in /etc/rsyslog.conf, +run the following command to inspect the file's group owner: +$ ls -l LOGFILE +If the owner is not root, run the following command to +correct this: +$ sudo chgrp root LOGFILE + + AC-6 + SI-11 + 1314 + Req-10.5.1 + Req-10.5.2 + Test attestation on 20121024 by DS + The log files generated by rsyslog contain valuable information regarding system +configuration, user authentication, and other such information. Log files should be +protected from unauthorized access. + + + + + + + + + + Ensure System Log Files Have Correct Permissions + The file permissions for all log files written by +rsyslog should be set to 600, or more restrictive. +These log files are determined by the second part of each Rule line in +/etc/rsyslog.conf and typically all appear in /var/log. +For each log file LOGFILE referenced in /etc/rsyslog.conf, +run the following command to inspect the file's permissions: +$ ls -l LOGFILE +If the permissions are not 600 or more restrictive, +run the following command to correct this: +$ sudo chmod 0600 LOGFILE + + SI-11 + 1314 + Req-10.5.1 + Req-10.5.2 + 5.1.4 + Test attestation on 20121024 by DS + Log files can contain valuable information regarding system +configuration. If the system log files are not protected unauthorized +users could change the logged data, eliminating their forensic value. + + + +# List of log file paths to be inspected for correct permissions +# * Primarily inspect log file paths listed in /etc/rsyslog.conf +RSYSLOG_ETC_CONFIG="/etc/rsyslog.conf" +# * And also the log file paths listed after rsyslog's $IncludeConfig directive +# (store the result into array for the case there's shell glob used as value of IncludeConfig) +RSYSLOG_INCLUDE_CONFIG=($(grep -e "\$IncludeConfig[[:space:]]\+[^[:space:];]\+" /etc/rsyslog.conf | cut -d ' ' -f 2)) +# Declare an array to hold the final list of different log file paths +declare -a LOG_FILE_PATHS + +# Browse each file selected above as containing paths of log files +# ('/etc/rsyslog.conf' and '/etc/rsyslog.d/*.conf' in the default configuration) +for LOG_FILE in "${RSYSLOG_ETC_CONFIG}" "${RSYSLOG_INCLUDE_CONFIG[@]}" +do + # From each of these files extract just particular log file path(s), thus: + # * Ignore lines starting with space (' '), comment ('#"), or variable syntax ('$') characters, + # * Ignore empty lines, + # * From the remaining valid rows select only fields constituting a log file path + # Text file column is understood to represent a log file path if and only if all of the following are met: + # * it contains at least one slash '/' character, + # * it doesn't contain space (' '), colon (':'), and semicolon (';') characters + # Search log file for path(s) only in case it exists! + if [[ -f "${LOG_FILE}" ]] + then + MATCHED_ITEMS=$(sed -e "/^[[:space:]|#|$]/d ; s/[^\/]*[[:space:]]*\([^:;[:space:]]*\)/\1/g ; /^$/d" "${LOG_FILE}") + # Since above sed command might return more than one item (delimited by newline), split the particular + # matches entries into new array specific for this log file + readarray -t ARRAY_FOR_LOG_FILE <<< "$MATCHED_ITEMS" + # Concatenate the two arrays - previous content of $LOG_FILE_PATHS array with + # items from newly created array for this log file + LOG_FILE_PATHS=("${LOG_FILE_PATHS[@]}" "${ARRAY_FOR_LOG_FILE[@]}") + # Delete the temporary array + unset ARRAY_FOR_LOG_FILE + fi +done + +for PATH in "${LOG_FILE_PATHS[@]}" +do + # Sanity check - if particular $PATH is empty string, skip it from further processing + if [ -z "$PATH" ] + then + continue + fi + # Per https://access.redhat.com/solutions/66805 '/var/log/boot.log' log file needs special care => perform it + if [ "$PATH" == "/var/log/boot.log" ] + then + # Ensure permissions of /var/log/boot.log are configured to be updated in /etc/rc.local + if ! /bin/grep -q "boot.log" "/etc/rc.local" + then + echo "/bin/chmod 600 /var/log/boot.log" >> /etc/rc.local + fi + # Ensure /etc/rc.d/rc.local has user-executable permission + # (in order to be actually executed during boot) + if [ "$(/usr/bin/stat -c %a /etc/rc.d/rc.local)" -ne 744 ] + then + /bin/chmod u+x /etc/rc.d/rc.local + fi + fi + # Also for each log file check if its permissions differ from 600. If so, correct them + if [ "$(/usr/bin/stat -c %a "$PATH")" -ne 600 ] + then + /bin/chmod 600 "$PATH" + fi +done + + + + + + + + + + + Rsyslog Logs Sent To Remote Host + +If system logs are to be useful in detecting malicious +activities, it is necessary to send logs to a remote server. An +intruder who has compromised the root account on a machine may +delete the log entries which indicate that the system was attacked +before they are seen by an administrator. + +However, it is recommended that logs be stored on the local +host in addition to being sent to the loghost, especially if +rsyslog has been configured to use the UDP protocol to send +messages over a network. UDP does not guarantee reliable delivery, +and moderately busy sites will lose log messages occasionally, +especially in periods of high traffic which may be the result of an +attack. In addition, remote rsyslog messages are not +authenticated in any way by default, so it is easy for an attacker to +introduce spurious messages to the central log server. Also, some +problems cause loss of network connectivity, which will prevent the +sending of messages to the central server. For all of these reasons, it is +better to store log messages both centrally and on each host, so +that they can be correlated if necessary. + + Ensure Logs Sent To Remote Host + +To configure rsyslog to send logs to a remote log server, +open /etc/rsyslog.conf and read and understand the last section of the file, +which describes the multiple directives necessary to activate remote +logging. +Along with these other directives, the system can be configured +to forward its logs to a particular log server by +adding or correcting one of the following lines, +substituting loghost.example.com appropriately. +The choice of protocol depends on the environment of the system; +although TCP and RELP provide more reliable message delivery, +they may not be supported in all environments. + +To use UDP for log message delivery: +*.* @loghost.example.com + +To use TCP for log message delivery: +*.* @@loghost.example.com + +To use RELP for log message delivery: +*.* :omrelp:loghost.example.com + + AU-3(2) + AU-4(1) + AU-9 + 1348 + 136 + 1851 + 5.1.5 + A log server (loghost) receives syslog messages from one or more +systems. This data can be used as an additional log source in the event a +system is compromised and its local logs are suspect. Forwarding log messages +to a remote loghost also provides system administrators with a centralized +place to view the status of multiple hosts within the enterprise. + + + + + + + + + + + + Configure rsyslogd to Accept Remote Messages If Acting as a Log Server + +By default, rsyslog does not listen over the network +for log messages. If needed, modules can be enabled to allow +the rsyslog daemon to receive messages from other systems and for the system +thus to act as a log server. +If the machine is not a log server, then lines concerning these modules +should remain commented out. + + + + Ensure rsyslog Does Not Accept Remote Messages Unless Acting As Log Server + The rsyslog daemon should not accept remote messages +unless the system acts as a log server. +To ensure that it is not listening on the network, ensure the following lines are +not found in /etc/rsyslog.conf: +$ModLoad imtcp +$InputTCPServerRun port +$ModLoad imudp +$UDPServerRun port +$ModLoad imrelp +$InputRELPServerRun port + + AU-9(2) + AC-4 + +Any process which receives messages from the network incurs some risk +of receiving malicious messages. This risk can be eliminated for +rsyslog by configuring it not to listen on the network. + + + + + + + + Enable rsyslog to Accept Messages via TCP, if Acting As Log Server + The rsyslog daemon should not accept remote messages +unless the system acts as a log server. +If the system needs to act as a central log server, add the following lines to +/etc/rsyslog.conf to enable reception of messages over TCP: +$ModLoad imtcp +$InputTCPServerRun 514 + + AU-9 + 5.1.6 + +If the system needs to act as a log server, this ensures that it can receive +messages over a reliable TCP connection. + + + + + Enable rsyslog to Accept Messages via UDP, if Acting As Log Server + The rsyslog daemon should not accept remote messages +unless the system acts as a log server. +If the system needs to act as a central log server, add the following lines to +/etc/rsyslog.conf to enable reception of messages over UDP: +$ModLoad imudp +$UDPServerRun 514 + + AU-9 + 5.1.6 + +Many devices, such as switches, routers, and other Unix-like systems, may only support +the traditional syslog transmission over UDP. If the system must act as a log server, +this enables it to receive their messages as well. + + + + + + Ensure All Logs are Rotated by logrotate + Edit the file /etc/logrotate.d/syslog. Find the first +line, which should look like this (wrapped for clarity): +/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler \ + /var/log/boot.log /var/log/cron { +Edit this line so that it contains a one-space-separated +listing of each log file referenced in /etc/rsyslog.conf. + +All logs in use on a system must be rotated regularly, or the +log files will consume disk space over time, eventually interfering +with system operation. The file /etc/logrotate.d/syslog is the +configuration file used by the logrotate program to maintain all +log files written by syslog. By default, it rotates logs weekly and +stores four archival copies of each log. These settings can be +modified by editing /etc/logrotate.conf, but the defaults are +sufficient for purposes of this guide. + +Note that logrotate is run nightly by the cron job +/etc/cron.daily/logrotate. If particularly active logs need to be +rotated more often than once a day, some other mechanism must be +used. + + Ensure Logrotate Runs Periodically + The logrotate utility allows for the automatic rotation of +log files. The frequency of rotation is specified in /etc/logrotate.conf, +which triggers a cron task. To configure logrotate to run daily, add or correct +the following line in /etc/logrotate.conf: +# rotate log files frequency +daily + + AU-9 + 366 + Req-10.7 + Log files that are not properly rotated run the risk of growing so large +that they fill up the /var/log partition. Valuable logging information could be lost +if the /var/log partition becomes full. + + + + + + + + + + + Configure Logwatch on the Central Log Server + +Is this machine the central log server? If so, edit the file /etc/logwatch/conf/logwatch.conf as shown below. + + + Configure Logwatch HostLimit Line + On a central logserver, you want Logwatch to summarize all syslog entries, including those which did not originate +on the logserver itself. The HostLimit setting tells Logwatch to report on all hosts, not just the one on which it +is running. + HostLimit = no + + + + + + + Configure Logwatch SplitHosts Line + +If SplitHosts is set, Logwatch will separate entries by hostname. This makes the report longer but significantly +more usable. If it is not set, then Logwatch will not report which host generated a given log entry, and that +information is almost always necessary + SplitHosts = yes + + + + + + + + Disable Logwatch on Clients if a Logserver Exists + +Does your site have a central logserver which has been configured to report on logs received from all systems? +If so: + +$ sudo rm /etc/cron.daily/0logwatch + +If no logserver exists, it will be necessary for each machine to run Logwatch individually. Using a central +logserver provides the security and reliability benefits discussed earlier, and also makes monitoring logs easier +and less time-intensive for administrators. + + + + + System Accounting with auditd + The audit service provides substantial capabilities +for recording system activities. By default, the service audits about +SELinux AVC denials and certain types of security-relevant events +such as system logins, account modifications, and authentication +events performed by programs such as sudo. +Under its default configuration, auditd has modest disk space +requirements, and should not noticeably impact system performance. + +NOTE: The Linux Audit daemon auditd can be configured to use +the augenrules program to read audit rules files (*.rules) +located in /etc/audit/rules.d location and compile them to create +the resulting form of the /etc/audit/audit.rules configuration file +during the daemon startup (default configuration). Alternatively, the auditd +daemon can use the auditctl utility to read audit rules from the +/etc/audit/audit.rules configuration file during daemon startup, +and load them into the kernel. The expected behavior is configured via the +appropriate ExecStartPost directive setting in the +/usr/lib/systemd/system/auditd.service configuration file. +To instruct the auditd daemon to use the augenrules program +to read audit rules (default configuration), use the following setting: + ExecStartPost=-/sbin/augenrules --load +in the /usr/lib/systemd/system/auditd.service configuration file. +In order to instruct the auditd daemon to use the auditctl +utility to read audit rules, use the following setting: + ExecStartPost=-/sbin/auditctl -R /etc/audit/audit.rules +in the /usr/lib/systemd/system/auditd.service configuration file. +Refer to [Service] section of the /usr/lib/systemd/system/auditd.service +configuration file for further details. + +Government networks often have substantial auditing +requirements and auditd can be configured to meet these +requirements. +Examining some example audit records demonstrates how the Linux audit system +satisfies common requirements. +The following example from Fedora Documentation available at +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 +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 +denial (and the associated system call) that occurred when the Apache HTTP +Server attempted to access the /var/www/html/file1 file (labeled with +the samba_share_t type): +type=AVC msg=audit(1226874073.147:96): avc: denied { getattr } for pid=2465 comm="httpd" +path="/var/www/html/file1" dev=dm-0 ino=284133 scontext=unconfined_u:system_r:httpd_t:s0 +tcontext=unconfined_u:object_r:samba_share_t:s0 tclass=file + +type=SYSCALL msg=audit(1226874073.147:96): arch=40000003 syscall=196 success=no exit=-13 +a0=b98df198 a1=bfec85dc a2=54dff4 a3=2008171 items=0 ppid=2463 pid=2465 auid=502 uid=48 +gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=6 comm="httpd" +exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null) + +msg=audit(1226874073.147:96)The number in parentheses is the unformatted time stamp (Epoch time) +for the event, which can be converted to standard time by using the +date command. +{ getattr }The item in braces indicates the permission that was denied. getattr +indicates the source process was trying to read the target file's status information. +This occurs before reading files. This action is denied due to the file being +accessed having the wrong label. Commonly seen permissions include getattr, +read, and write.comm="httpd"The executable that launched the process. The full path of the executable is +found in the exe= section of the system call (SYSCALL) message, +which in this case, is exe="/usr/sbin/httpd". +path="/var/www/html/file1"The path to the object (target) the process attempted to access. +scontext="unconfined_u:system_r:httpd_t:s0"The SELinux context of the process that attempted the denied action. In +this case, it is the SELinux context of the Apache HTTP Server, which is running +in the httpd_t domain. +tcontext="unconfined_u:object_r:samba_share_t:s0"The SELinux context of the object (target) the process attempted to access. +In this case, it is the SELinux context of file1. Note: the samba_share_t +type is not accessible to processes running in the httpd_t domain. From the system call (SYSCALL) message, two items are of interest: +success=no: indicates whether the denial (AVC) was enforced or not. +success=no indicates the system call was not successful (SELinux denied +access). success=yes indicates the system call was successful - this can +be seen for permissive domains or unconfined domains, such as initrc_t +and kernel_t. +exe="/usr/sbin/httpd": the full path to the executable that launched +the process, which in this case, is exe="/usr/sbin/httpd". + + + + + Enable auditd Service + The auditd service is an essential userspace component of +the Linux Auditing System, as it is responsible for writing audit records to +disk. + + The auditd service can be enabled with the following command: + $ sudo systemctl enable auditd.service + + AU-3 + AC-17(1) + AU-1(b) + AU-10 + AU-12(a) + AU-12(c) + AU-14(1) + IR-5 + 126 + 131 + SRG-OS-000038-GPOS-00016 + SRG-OS-000039-GPOS-00017 + SRG-OS-000042-GPOS-00021 + SRG-OS-000254-GPOS-00095 + SRG-OS-000255-GPOS-00096 + RHEL-07-030010 + Req-10 + 5.2.2 + Test attestation on 20121024 by DS + Without establishing what type of events occurred, it would be difficult +to establish, correlate, and investigate the events leading up to an outage or attack. + +Ensuring the auditd service is active ensures audit records +generated by the kernel are appropriately recorded. + + + +service_command enable auditd.service + + + + + + + + + + Enable Auditing for Processes Which Start Prior to the Audit Daemon + 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 +/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" + + 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 /boot/grub2/grub.cfgOn UEFI-based machines, issue the following command as root: +~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg + + AC-17(1) + AU-14(1) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-10 + IR-5 + 1464 + 130 + Req-10.3 + 5.2.3 + +Each process on the system carries an "auditable" flag which indicates whether +its activities can be audited. Although auditd takes care of enabling +this for all processes which launch after it does, adding the kernel argument +ensures it is set for every process during boot. + + + +# Correct the form of default kernel command line in /etc/default/grub +grep -q ^GRUB_CMDLINE_LINUX=\".*audit=0.*\" /etc/default/grub && \ + sed -i "s/audit=[^[:space:]\+]/audit=1/g" /etc/default/grub +if ! [ $? -eq 0 ]; then + sed -i "s/\(GRUB_CMDLINE_LINUX=\)\"\(.*\)\"/\1\"\2 audit=1\"/" /etc/default/grub +fi + +# Correct the form of kernel command line for each installed kernel +# in the bootloader +/sbin/grubby --update-kernel=ALL --args="audit=1" + + + + + + + + + + Configure auditd Data Retention + +The audit system writes data to /var/log/audit/audit.log. By default, +auditd rotates 5 logs by size (6MB), retaining a maximum of 30MB of +data in total, and refuses to write entries when the disk is too +full. This minimizes the risk of audit data filling its partition +and impacting other services. This also minimizes the risk of the audit +daemon temporarily disabling the system if it cannot write audit log (which +it can be configured to do). + +For a busy +system or a system which is thoroughly auditing system activity, the default settings +for data retention may be + insufficient. The log file size needed will depend heavily on what types +of events are being audited. First configure auditing to log all the events of +interest. Then monitor the log size manually for awhile to determine what file +size will allow you to keep the required data for the correct time period. + +Using a dedicated partition for /var/log/audit prevents the +auditd logs from disrupting system functionality if they fill, and, +more importantly, prevents other activity in /var from filling the +partition and stopping the audit trail. (The audit logs are size-limited and +therefore unlikely to grow without bound unless configured to do so.) Some +machines may have requirements that no actions occur which cannot be audited. +If this is the case, then auditd can be configured to halt the machine +if it runs out of space. Note: Since older logs are rotated, +configuring auditd this way does not prevent older logs from being +rotated away before they can be viewed. + +If your system is configured to halt when logging cannot be performed, make +sure this can never happen under normal circumstances! Ensure that +/var/log/audit is on its own partition, and that this partition is +larger than the maximum amount of data auditd will retain +normally. + + AU-11 + 138 + + Number of log files for auditd to retain + The setting for num_logs in /etc/audit/auditd.conf + 5 + 5 + 4 + 3 + 2 + 1 + 0 + + + Maximum audit log file size for auditd + The setting for max_log_size in /etc/audit/auditd.conf + 6 + 20 + 10 + 6 + 5 + 1 + + + Action for auditd to take when log files reach their maximum size + The setting for max_log_file_action in /etc/audit/auditd.conf + rotate + ignore + syslog + suspend + rotate + keep_logs + + + Action for auditd to take when disk space just starts to run low + The setting for space_left_action in /etc/audit/auditd.conf + email + ignore + syslog + email + exec + suspend + single + halt + + + Action for auditd to take when disk space just starts to run low + The setting for space_left_action in /etc/audit/auditd.conf + single + ignore + syslog + email + exec + suspend + single + halt + + + Account for auditd to send email when actions occurs + The setting for action_mail_acct in /etc/audit/auditd.conf + root + root + admin + + + Auditd priority for flushing data to disk + The setting for flush in /etc/audit/auditd.conf + data + none + incremental + data + sync + + + Configure auditd Number of Logs Retained + Determine how many log files +auditd should retain when it rotates logs. +Edit the file /etc/audit/auditd.conf. Add or modify the following +line, substituting NUMLOGS with the correct value of : +num_logs = NUMLOGS +Set the value to 5 for general-purpose systems. +Note that values less than 2 result in no log rotation. + AU-1(b) + AU-11 + IR-5 + Req-10.7 + Test attestation on 20121024 by DS + The total storage for audit log files must be large enough to retain +log information over the period required. This is a function of the maximum log +file size and the number of logs retained. + + +var_auditd_num_logs="" + +AUDITCONFIG=/etc/audit/auditd.conf + +grep -q ^num_logs $AUDITCONFIG && \ + sed -i 's/^num_logs.*/num_logs = '"$var_auditd_num_logs"'/g' $AUDITCONFIG +if ! [ $? -eq 0 ]; then + echo "num_logs = $var_auditd_num_logs" >> $AUDITCONFIG +fi + + + + + + + + + + + Configure auditd Max Log File Size + Determine the amount of audit data (in megabytes) +which should be retained in each log file. Edit the file +/etc/audit/auditd.conf. Add or modify the following line, substituting +the correct value of for STOREMB: +max_log_file = STOREMB +Set the value to 6 (MB) or higher for general-purpose systems. +Larger values, of course, +support retention of even more audit data. + AU-1(b) + AU-11 + IR-5 + Req-10.7 + 5.2.1.1 + Test attestation on 20121024 by DS + The total storage for audit log files must be large enough to retain +log information over the period required. This is a function of the maximum +log file size and the number of logs retained. + + +var_auditd_max_log_file="" + +AUDITCONFIG=/etc/audit/auditd.conf + +grep -q ^max_log_file $AUDITCONFIG && \ + sed -i 's/^max_log_file.*/max_log_file = '"$var_auditd_max_log_file"'/g' $AUDITCONFIG +if ! [ $? -eq 0 ]; then + echo "max_log_file = $var_auditd_max_log_file" >> $AUDITCONFIG +fi + + + + + + + + + + + Configure auditd max_log_file_action Upon Reaching Maximum Log Size + The default action to take when the logs reach their maximum size +is to rotate the log files, discarding the oldest one. To configure the action taken +by auditd, add or correct the line in /etc/audit/auditd.conf: +max_log_file_action = ACTION +Possible values for ACTION are described in the auditd.conf man +page. These include: +ignoresyslogsuspendrotatekeep_logs +Set the ACTION to rotate to ensure log rotation +occurs. This is the default. The setting is case-insensitive. + + AU-1(b) + AU-4 + AU-11 + IR-5 + Req-10.7 + 5.2.1.3 + Test attestation on 20121024 by DS + Automatically rotating logs (by setting this to rotate) +minimizes the chances of the system unexpectedly running out of disk space by +being overwhelmed with log data. However, for systems that must never discard +log data, or which use external processes to transfer it and reclaim space, +keep_logs can be employed. + + +var_auditd_max_log_file_action="" + +AUDITCONFIG=/etc/audit/auditd.conf + +grep -q ^max_log_file_action $AUDITCONFIG && \ + sed -i 's/^max_log_file_action.*/max_log_file_action = '"$var_auditd_max_log_file_action"'/g' $AUDITCONFIG +if ! [ $? -eq 0 ]; then + echo "max_log_file_action = $var_auditd_max_log_file_action" >> $AUDITCONFIG +fi + + + + + + + + + + + Configure auditd space_left Action on Low Disk Space + The auditd service can be configured to take an action +when disk space starts to run low. +Edit the file /etc/audit/auditd.conf. Modify the following line, +substituting ACTION appropriately: +space_left_action = ACTION +Possible values for ACTION are described in the auditd.conf man page. +These include: +ignoresyslogemailexecsuspendsinglehalt +Set this to email (instead of the default, +which is suspend) as it is more likely to get prompt attention. Acceptable values +also include suspend, single, and halt. + + AU-1(b) + AU-4 + AU-5(b) + IR-5 + 140 + 143 + Req-10.7 + 5.2.1.2 + Test attestation on 20121024 by DS + Notifying administrators of an impending disk space problem may +allow them to take corrective action prior to any disruption. + + +var_auditd_space_left_action="" + +grep -q ^space_left_action /etc/audit/auditd.conf && \ + sed -i "s/space_left_action.*/space_left_action = $var_auditd_space_left_action/g" /etc/audit/auditd.conf +if ! [ $? -eq 0 ]; then + echo "space_left_action = $var_auditd_space_left_action" >> /etc/audit/auditd.conf +fi + + + + + + + + + + + Configure auditd admin_space_left Action on Low Disk Space + The auditd service can be configured to take an action +when disk space is running low but prior to running out of space completely. +Edit the file /etc/audit/auditd.conf. Add or modify the following line, +substituting ACTION appropriately: +admin_space_left_action = ACTION +Set this value to single to cause the system to switch to single user +mode for corrective action. Acceptable values also include suspend and +halt. For certain systems, the need for availability +outweighs the need to log all actions, and a different setting should be +determined. Details regarding all possible values for ACTION are described in the +auditd.conf man page. + + AU-1(b) + AU-4 + AU-5(b) + IR-5 + 140 + 1343 + Req-10.7 + 5.2.1.2 + Test attestation on 20121024 by DS + Administrators should be made aware of an inability to record +audit records. If a separate partition or logical volume of adequate size +is used, running low on space for audit records should never occur. + + + +var_auditd_admin_space_left_action="" + +grep -q ^admin_space_left_action /etc/audit/auditd.conf && \ + sed -i "s/admin_space_left_action.*/admin_space_left_action = $var_auditd_admin_space_left_action/g" /etc/audit/auditd.conf +if ! [ $? -eq 0 ]; then + echo "admin_space_left_action = $var_auditd_admin_space_left_action" >> /etc/audit/auditd.conf +fi + + + + + + + + + + + Configure auditd mail_acct Action on Low Disk Space + The auditd service can be configured to send email to +a designated account in certain situations. Add or correct the following line +in /etc/audit/auditd.conf to ensure that administrators are notified +via email for those situations: +action_mail_acct = + + AU-1(b) + AU-4 + AU-5(a) + IR-5 + 139 + 144 + Req-10.7.a + 5.2.1.2 + Email sent to the root account is typically aliased to the +administrators of the system, who can take appropriate action. + + +var_auditd_action_mail_acct="" + +AUDITCONFIG=/etc/audit/auditd.conf + +grep -q ^action_mail_acct $AUDITCONFIG && \ + sed -i 's/^action_mail_acct.*/action_mail_acct = '"$var_auditd_action_mail_acct"'/g' $AUDITCONFIG +if ! [ $? -eq 0 ]; then + echo "action_mail_acct = $var_auditd_action_mail_acct" >> $AUDITCONFIG +fi + + + + + + + + + + + Configure auditd flush priority + The auditd service can be configured to +synchronously write audit event data to disk. Add or correct the following +line in /etc/audit/auditd.conf to ensure that audit event data is +fully synchronized with the log files on the disk: +flush = + + AU-9 + AU-12(1) + 1576 + Audit data should be synchronously written to disk to ensure +log integrity. These parameters assure that all audit event data is fully +synchronized with the log files on the disk. + + +var_auditd_flush="" + +AUDITCONFIG=/etc/audit/auditd.conf + +# if flush is present, flush param edited to var_auditd_flush +# else flush param is defined by var_auditd_flush +# +# the freq param is only used value 'incremental' and will be +# commented out if flush != incremental +# +# if flush == incremental && freq param is not defined, it +# will be defined as the package-default value of 20 + +grep -q ^flush $AUDITCONFIG && \ + sed -i 's/^flush.*/flush = '"$var_auditd_flush"'/g' $AUDITCONFIG +if ! [ $? -eq 0 ]; then + echo "flush = $var_auditd_flush" >> $AUDITCONFIG +fi + +if ! [ "$var_auditd_flush" == "incremental" ]; then + sed -i 's/^freq/##freq/g' $AUDITCONFIG +elif [ "$var_auditd_flush" == "incremental" ]; then + grep -q freq $AUDITCONFIG && \ + sed -i 's/^#\+freq/freq/g' $AUDITCONFIG + if ! [ $? -eq 0 ]; then + echo "freq = 20" >> $AUDITCONFIG + fi +fi + + + + + + + + + + + Configure auditd to use audispd's syslog plugin + To configure the auditd service to use the +syslog plug-in of the audispd audit event multiplexor, set +the active line in /etc/audisp/plugins.d/syslog.conf to +yes. Restart the auditd service: +$ sudo service auditd restart + + AU-1(b) + AU-3(2) + IR-5 + 136 + Req-10.5.3 + The auditd service does not include the ability to send audit +records to a centralized server for management directly. It does, however, +include a plug-in for audit event multiplexor (audispd) to pass audit records +to the local syslog server + + +grep -q ^active /etc/audisp/plugins.d/syslog.conf && \ + sed -i "s/active.*/active = yes/g" /etc/audisp/plugins.d/syslog.conf +if ! [ $? -eq 0 ]; then + echo "active = yes" >> /etc/audisp/plugins.d/syslog.conf +fi + + + + + + + + + + + Configure auditd Rules for Comprehensive Auditing + The auditd program can perform comprehensive +monitoring of system activity. This section describes recommended +configuration settings for comprehensive auditing, but a full +description of the auditing system's capabilities is beyond the +scope of this guide. The mailing list linux-audit@redhat.com exists +to facilitate community discussion of the auditing system. + +The audit subsystem supports extensive collection of events, including: + +Tracing of arbitrary system calls (identified by name or number) +on entry or exit.Filtering by PID, UID, call success, system call argument (with +some limitations), etc.Monitoring of specific files for modifications to the file's +contents or metadata. + +Auditing rules at startup are controlled by the file /etc/audit/audit.rules. +Add rules to it to meet the auditing requirements for your organization. +Each line in /etc/audit/audit.rules represents a series of arguments +that can be passed to auditctl and can be individually tested +during runtime. See documentation in /usr/share/doc/audit-VERSION and +in the related man pages for more details. + +If copying any example audit rulesets from /usr/share/doc/audit-VERSION, +be sure to comment out the +lines containing arch= which are not appropriate for your system's +architecture. Then review and understand the following rules, +ensuring rules are activated as needed for the appropriate +architecture. + +After reviewing all the rules, reading the following sections, and +editing as needed, the new rules can be activated as follows: +$ sudo service auditd restart + + + Records Events that Modify Date and Time Information + Arbitrary changes to the system time can be used to obfuscate +nefarious activities in log files, as well as to confuse network services that +are highly dependent upon an accurate system time. All changes to the system +time should be audited. + + Record attempts to alter time through adjtimex + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following line to a file with suffix .rules in the +directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S adjtimex -k audit_time_rules +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S adjtimex -k audit_time_rules +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S adjtimex -k audit_time_rules +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S adjtimex -k audit_time_rules +The -k option allows for the specification of a key in string form that can be +used for better reporting capability through ausearch and aureport. Multiple +system calls can be defined on the same line to save space if desired, but is +not required. See an example of multiple combined syscalls: +-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k audit_time_rules + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 5.2.4 + Req-10.4.2.b + 1487 + 169 + Arbitrary changes to the system time can be used to obfuscate +nefarious activities in log files, as well as to confuse network services that +are highly dependent upon an accurate system time (such as sshd). All changes +to the system time should be audited. + + +rhel7_fedora_perform_audit_adjtimex_settimeofday_stime_remediation + + + + + + + + + + Record attempts to alter time through settimeofday + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following line to a file with suffix .rules in the +directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S settimeofday -k audit_time_rules +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S settimeofday -k audit_time_rules +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S settimeofday -k audit_time_rules +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S settimeofday -k audit_time_rules +The -k option allows for the specification of a key in string form that can be +used for better reporting capability through ausearch and aureport. Multiple +system calls can be defined on the same line to save space if desired, but is +not required. See an example of multiple combined syscalls: +-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k audit_time_rules + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 5.2.4 + Req-10.4.2.b + 1487 + 169 + Arbitrary changes to the system time can be used to obfuscate +nefarious activities in log files, as well as to confuse network services that +are highly dependent upon an accurate system time (such as sshd). All changes +to the system time should be audited. + + +rhel7_fedora_perform_audit_adjtimex_settimeofday_stime_remediation + + + + + + + + + + Record Attempts to Alter Time Through stime + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following line to a file with suffix .rules in the +directory /etc/audit/rules.d for both 32 bit and 64 bit systems: +-a always,exit -F arch=b32 -S stime -k audit_time_rules +Since the 64 bit version of the "stime" system call is not defined in the audit +lookup table, the corresponding "-F arch=b64" form of this rule is not expected +to be defined on 64 bit systems (the aforementioned "-F arch=b32" stime rule +form itself is sufficient for both 32 bit and 64 bit systems). If the +auditd daemon is configured to use the auditctl utility to +read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file for both 32 bit and 64 bit systems: +-a always,exit -F arch=b32 -S stime -k audit_time_rules +Since the 64 bit version of the "stime" system call is not defined in the audit +lookup table, the corresponding "-F arch=b64" form of this rule is not expected +to be defined on 64 bit systems (the aforementioned "-F arch=b32" stime rule +form itself is sufficient for both 32 bit and 64 bit systems). The -k option +allows for the specification of a key in string form that can be used for +better reporting capability through ausearch and aureport. Multiple system +calls can be defined on the same line to save space if desired, but is not +required. See an example of multiple combined system calls: +-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k audit_time_rules + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + Req-10.4.2.b + 1487 + 169 + Arbitrary changes to the system time can be used to obfuscate +nefarious activities in log files, as well as to confuse network services that +are highly dependent upon an accurate system time (such as sshd). All changes +to the system time should be audited. + + +rhel7_fedora_perform_audit_adjtimex_settimeofday_stime_remediation + + + + + + + + + + Record Attempts to Alter Time Through clock_settime + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following line to a file with suffix .rules in the +directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S clock_settime -F a0=0x0 -F key=time-change +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S clock_settime -F a0=0x0 -F key=time-change +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S clock_settime -F a0=0x0 -F key=time-change +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S clock_settime -F a0=0x0 -F key=time-change +The -k option allows for the specification of a key in string form that can +be used for better reporting capability through ausearch and aureport. +Multiple system calls can be defined on the same line to save space if +desired, but is not required. See an example of multiple combined syscalls: +-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k audit_time_rules + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 5.2.4 + Req-10.4.2.b + 1487 + 169 + Arbitrary changes to the system time can be used to obfuscate +nefarious activities in log files, as well as to confuse network services that +are highly dependent upon an accurate system time (such as sshd). All changes +to the system time should be audited. + + + +# First perform the remediation of the syscall rule +# Retrieve hardware architecture of the underlying system +[ "$(getconf LONG_BIT)" = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=$ARCH -S clock_settime -F a0=.* \(-F key=\|-k \).*" + GROUP="clock_settime" + FULL_RULE="-a always,exit -F arch=$ARCH -S clock_settime -F a0=0x0 -k time-change" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Attempts to Alter the localtime File + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the default), +add the following line to a file with suffix .rules in the directory +/etc/audit/rules.d: +-w /etc/localtime -p wa -k audit_time_rules +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-w /etc/localtime -p wa -k audit_time_rules +The -k option allows for the specification of a key in string form that can +be used for better reporting capability through ausearch and aureport and +should always be used. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(b) + IR-5 + 5.2.4 + Req-10.4.2.b + 1487 + 169 + Arbitrary changes to the system time can be used to obfuscate +nefarious activities in log files, as well as to confuse network services that +are highly dependent upon an accurate system time (such as sshd). All changes +to the system time should be audited. + + + +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +fix_audit_watch_rule "auditctl" "/etc/localtime" "wa" "audit_time_rules" +fix_audit_watch_rule "augenrules" "/etc/localtime" "wa" "audit_time_rules" + + + + + + + + + + + Record Events that Modify User/Group Information + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following lines to a file with suffix .rules in the +directory /etc/audit/rules.d, in order to capture events that modify +account changes: +-w /etc/group -p wa -k audit_rules_usergroup_modification +-w /etc/passwd -p wa -k audit_rules_usergroup_modification +-w /etc/gshadow -p wa -k audit_rules_usergroup_modification +-w /etc/shadow -p wa -k audit_rules_usergroup_modification +-w /etc/security/opasswd -p wa -k audit_rules_usergroup_modification + +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following lines to +/etc/audit/audit.rules file, in order to capture events that modify +account changes: +-w /etc/group -p wa -k audit_rules_usergroup_modification +-w /etc/passwd -p wa -k audit_rules_usergroup_modification +-w /etc/gshadow -p wa -k audit_rules_usergroup_modification +-w /etc/shadow -p wa -k audit_rules_usergroup_modification +-w /etc/security/opasswd -p wa -k audit_rules_usergroup_modification + + AC-2(4) + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 18 + 172 + 1403 + 2130 + RHEL-07-030710 + Req-10.2.5 + 5.2.5 + SRG–OS–000004–GPOS–00004 + SRG–OS–000239–GPOS–00089 + SRG–OS–000241–GPOS–00090 + SRG–OS–000241–GPOS–00091 + SRG–OS–000303–GPOS–00120 + SRG–OS–000476–GPOS–00221 + In addition to auditing new user and group accounts, these watches +will alert the system administrator(s) to any modifications. Any unexpected +users, groups, or modifications should be investigated for legitimacy. + + + +# Perform the remediation +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +fix_audit_watch_rule "auditctl" "/etc/group" "wa" "audit_rules_usergroup_modification" +fix_audit_watch_rule "augenrules" "/etc/group" "wa" "audit_rules_usergroup_modification" + +fix_audit_watch_rule "auditctl" "/etc/passwd" "wa" "audit_rules_usergroup_modification" +fix_audit_watch_rule "augenrules" "/etc/passwd" "wa" "audit_rules_usergroup_modification" + +fix_audit_watch_rule "auditctl" "/etc/gshadow" "wa" "audit_rules_usergroup_modification" +fix_audit_watch_rule "augenrules" "/etc/gshadow" "wa" "audit_rules_usergroup_modification" + +fix_audit_watch_rule "auditctl" "/etc/shadow" "wa" "audit_rules_usergroup_modification" +fix_audit_watch_rule "augenrules" "/etc/shadow" "wa" "audit_rules_usergroup_modification" + +fix_audit_watch_rule "auditctl" "/etc/security/opasswd" "wa" "audit_rules_usergroup_modification" +fix_audit_watch_rule "augenrules" "/etc/security/opasswd" "wa" "audit_rules_usergroup_modification" + + + + + + + + + + Record Events that Modify the System's Network Environment + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following lines to a file with suffix .rules in the +directory /etc/audit/rules.d, setting ARCH to either b32 or b64 as +appropriate for your system: +-a always,exit -F arch=ARCH -S sethostname -S setdomainname -k audit_rules_networkconfig_modification +-w /etc/issue -p wa -k audit_rules_networkconfig_modification +-w /etc/issue.net -p wa -k audit_rules_networkconfig_modification +-w /etc/hosts -p wa -k audit_rules_networkconfig_modification +-w /etc/sysconfig/network -p wa -k audit_rules_networkconfig_modification +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following lines to +/etc/audit/audit.rules file, setting ARCH to either b32 or b64 as +appropriate for your system: +-a always,exit -F arch=ARCH -S sethostname -S setdomainname -k audit_rules_networkconfig_modification +-w /etc/issue -p wa -k audit_rules_networkconfig_modification +-w /etc/issue.net -p wa -k audit_rules_networkconfig_modification +-w /etc/hosts -p wa -k audit_rules_networkconfig_modification +-w /etc/sysconfig/network -p wa -k audit_rules_networkconfig_modification + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + Req-10.5.5 + 5.2.6 + The network environment should not be modified by anything other +than administrator action. Any change to network parameters should be +audited. + + + +# First perform the remediation of the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=$ARCH -S .* -k *" + # Use escaped BRE regex to specify rule group + GROUP="set\(host\|domain\)name" + FULL_RULE="-a always,exit -F arch=$ARCH -S sethostname -S setdomainname -k audit_rules_networkconfig_modification" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + +# Then perform the remediations for the watch rules +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +fix_audit_watch_rule "auditctl" "/etc/issue" "wa" "audit_rules_networkconfig_modification" +fix_audit_watch_rule "augenrules" "/etc/issue" "wa" "audit_rules_networkconfig_modification" + +fix_audit_watch_rule "auditctl" "/etc/issue.net" "wa" "audit_rules_networkconfig_modification" +fix_audit_watch_rule "augenrules" "/etc/issue.net" "wa" "audit_rules_networkconfig_modification" + +fix_audit_watch_rule "auditctl" "/etc/hosts" "wa" "audit_rules_networkconfig_modification" +fix_audit_watch_rule "augenrules" "/etc/hosts" "wa" "audit_rules_networkconfig_modification" + +fix_audit_watch_rule "auditctl" "/etc/sysconfig/network" "wa" "audit_rules_networkconfig_modification" +fix_audit_watch_rule "augenrules" "/etc/sysconfig/network" "wa" "audit_rules_networkconfig_modification" + + + + + + + + + + System Audit Logs Must Have Mode 0640 or Less Permissive + +If log_group in /etc/audit/auditd.conf is set to a group other than the root +group account, change the mode of the audit log files with the following command: +$ sudo chmod 0640 audit_file + +Otherwise, change the mode of the audit log files with the following command: +$ sudo chmod 0600 audit_file + + AC-6 + AU-1(b) + AU-9 + IR-5 + + Req-10.5 + Test attestation on 20121024 by DS + +If users can write to audit logs, audit trails can be modified or destroyed. + + + +if `grep -q ^log_group /etc/audit/auditd.conf` ; then + GROUP=$(awk -F "=" '/log_group/ {print $2}' /etc/audit/auditd.conf | tr -d ' ') + if ! [ "${GROUP}" == 'root' ] ; then + chmod 0640 /var/log/audit/audit.log + chmod 0440 /var/log/audit/audit.log.* + else + chmod 0600 /var/log/audit/audit.log + chmod 0400 /var/log/audit/audit.log.* + fi + + chmod 0640 /etc/audit/audit* + chmod 0640 /etc/audit/rules.d/* +else + chmod 0600 /var/log/audit/audit.log + chmod 0400 /var/log/audit/audit.log.* + chmod 0640 /etc/audit/audit* + chmod 0640 /etc/audit/rules.d/* +fi + + + + + + + + + + System Audit Logs Must Be Owned By Root + + + To properly set the owner of /var/log, run the command: + $ sudo chown root /var/log + + AC-6 + AU-1(b) + AU-9 + IR-5 + 163 + SRG-OS-000058-GPOS-00028 + RHEL-07-030120 + Req-10.5.1 + Test attestation on 20121024 by DS + Unauthorized disclosure of audit records can reveal system and configuration data to +attackers, thus compromising its confidentiality. + + +if `grep -q ^log_group /etc/audit/auditd.conf` ; then + GROUP=$(awk -F "=" '/log_group/ {print $2}' /etc/audit/auditd.conf | tr -d ' ') + if ! [ "${GROUP}" == 'root' ] ; then + chown root.${GROUP} /var/log/audit + chown root.${GROUP} /var/log/audit/audit.log* + else + chown root.root /var/log/audit + chown root.root /var/log/audit/audit.log* + fi +else + chown root.root /var/log/audit + chown root.root /var/log/audit/audit.log* +fi + + + + + + + + + + Record Events that Modify the System's Mandatory Access Controls + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following line to a file with suffix .rules in the +directory /etc/audit/rules.d: +-w /etc/selinux/ -p wa -k MAC-policy +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-w /etc/selinux/ -p wa -k MAC-policy + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + Req-10.5.5 + 5.2.7 + The system's mandatory access policy (SELinux) should not be +arbitrarily changed by anything other than administrator action. All changes to +MAC policy should be audited. + + + +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +fix_audit_watch_rule "auditctl" "/etc/selinux/" "wa" "MAC-policy" +fix_audit_watch_rule "augenrules" "/etc/selinux/" "wa" "MAC-policy" + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls + At a minimum the audit system should collect file permission +changes for all users and root. Note that the "-F arch=b32" lines should be +present even on a 64 bit system. These commands identify system calls for +auditing. Even if the system is 64 bit it can still execute 32 bit system +calls. Additionally, these rules can be configured in a number of ways while +still achieving the desired effect. An example of this is that the "-S" calls +could be split up and placed on separate lines, however, this is less efficient. +Add the following to /etc/audit/audit.rules: +-a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod + -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod + -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If your system is 64 bit then these lines should be duplicated and the +arch=b32 replaced with arch=b64 as follows: +-a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod + -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod + -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod + + The changing of file permissions could indicate that a user is +attempting to gain access to information that would otherwise be disallowed. +Auditing DAC modifications can facilitate the identification of patterns of +abuse among both authorized and unauthorized users. + + Record Events that Modify the System's Discretionary Access Controls - chmod + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured to +use the augenrules program to read audit rules during daemon startup +(the default), add the following line to a file with suffix .rules in +the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S chmod -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S chmod -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S chmod -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S chmod -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=$ARCH -S .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="chmod" + FULL_RULE="-a always,exit -F arch=$ARCH -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - chown + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured to +use the augenrules program to read audit rules during daemon startup +(the default), add the following line to a file with suffix .rules in +the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S chown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S chown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S chown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S chown -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=${ARCH} -S .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="chown" + FULL_RULE="-a always,exit -F arch=${ARCH} -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - fchmod + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured to +use the augenrules program to read audit rules during daemon startup +(the default), add the following line to a file with suffix .rules in +the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S fchmod -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fchmod -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S fchmod -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fchmod -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=$ARCH -S .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="chmod" + FULL_RULE="-a always,exit -F arch=$ARCH -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - fchmodat + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured to +use the augenrules program to read audit rules during daemon startup +(the default), add the following line to a file with suffix .rules in +the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=$ARCH -S .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="chmod" + FULL_RULE="-a always,exit -F arch=$ARCH -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - fchown + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S fchown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fchown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S fchown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fchown -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=${ARCH} -S .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="chown" + FULL_RULE="-a always,exit -F arch=${ARCH} -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - fchownat + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S fchownat -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fchownat -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S fchownat -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fchownat -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=${ARCH} -S .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="chown" + FULL_RULE="-a always,exit -F arch=${ARCH} -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - fremovexattr + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="xattr" + FULL_RULE="-a always,exit -F arch=${ARCH} -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - fsetxattr + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S fsetxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fsetxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S fsetxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S fsetxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="xattr" + FULL_RULE="-a always,exit -F arch=${ARCH} -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - lchown + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=${ARCH} -S .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="chown" + FULL_RULE="-a always,exit -F arch=${ARCH} -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - lremovexattr + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S lremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S lremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S lremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S lremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="xattr" + FULL_RULE="-a always,exit -F arch=${ARCH} -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - lsetxattr + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S lsetxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S lsetxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S lsetxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S lsetxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="xattr" + FULL_RULE="-a always,exit -F arch=${ARCH} -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - removexattr + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S removexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S removexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S removexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S removexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="xattr" + FULL_RULE="-a always,exit -F arch=${ARCH} -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Record Events that Modify the System's Discretionary Access Controls - setxattr + At a minimum the audit system should collect file permission +changes for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following line to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S setxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S setxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S setxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod +If the system is 64 bit then also add the following line: +-a always,exit -F arch=b64 -S setxattr -F auid>=1000 -F auid!=4294967295 -k perm_mod + + Note that these rules can be configured in a +number of ways while still achieving the desired effect. Here the system calls +have been placed independent of other system calls. Grouping these system +calls with others as identifying earlier in this guide is more efficient. + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.5.5 + 5.2.10 + The changing of file permissions could indicate that a user is attempting to +gain access to information that would otherwise be disallowed. Auditing DAC modifications +can facilitate the identification of patterns of abuse among both authorized and +unauthorized users. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="xattr" + FULL_RULE="-a always,exit -F arch=${ARCH} -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + + Record Attempts to Alter Logon and Logout Events + The audit system already collects login information for all users +and root. If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following lines to a file with suffix .rules in the +directory /etc/audit/rules.d in order to watch for attempted manual +edits of files involved in storing logon events: +-w /var/log/tallylog -p wa -k logins +-w /var/run/faillock/ -p wa -k logins +-w /var/log/lastlog -p wa -k logins +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following lines to +/etc/audit/audit.rules file in order to watch for unattempted manual +edits of files involved in storing logon events: +-w /var/log/tallylog -p wa -k logins +-w /var/run/faillock/ -p wa -k logins +-w /var/log/lastlog -p wa -k logins + + AC-17(7) + AU-1(b) + AU-12(a) + AU-12(c) + IR-5 + 172 + 2884 + SRG-OS-000392-GPOS-00172 + SRG-OS-000470-GPOS-00214 + SRG-OS-000473-GPOS-00218 + RHEL-07-030490 + Req-10.2.3 + 5.2.8 + Manual editing of these files may indicate nefarious activity, such +as an attacker attempting to remove evidence of an intrusion. + + + +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +fix_audit_watch_rule "auditctl" "/var/log/tallylog" "wa" "logins" +fix_audit_watch_rule "augenrules" "/var/log/tallylog" "wa" "logins" + +fix_audit_watch_rule "auditctl" "/var/run/faillock/" "wa" "logins" +fix_audit_watch_rule "augenrules" "/var/run/faillock/" "wa" "logins" + +fix_audit_watch_rule "auditctl" "/var/log/lastlog" "wa" "logins" +fix_audit_watch_rule "augenrules" "/var/log/lastlog" "wa" "logins" + + + + + + + Record Attempts to Alter Process and Session Initiation Information + The audit system already collects process information for all +users and root. If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following lines to a file with suffix .rules in the +directory /etc/audit/rules.d in order to watch for attempted manual +edits of files involved in storing such process information: +-w /var/run/utmp -p wa -k session +-w /var/log/btmp -p wa -k session +-w /var/log/wtmp -p wa -k session +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following lines to +/etc/audit/audit.rules file in order to watch for attempted manual +edits of files involved in storing such process information: +-w /var/run/utmp -p wa -k session +-w /var/log/btmp -p wa -k session +-w /var/log/wtmp -p wa -k session + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + Req-10.2.3 + 5.2.9 + Manual editing of these files may indicate nefarious activity, such +as an attacker attempting to remove evidence of an intrusion. + + + +# Perform the remediation +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +fix_audit_watch_rule "auditctl" "/var/run/utmp" "wa" "session" +fix_audit_watch_rule "augenrules" "/var/run/utmp" "wa" "session" + +fix_audit_watch_rule "auditctl" "/var/log/btmp" "wa" "session" +fix_audit_watch_rule "augenrules" "/var/log/btmp" "wa" "session" + +fix_audit_watch_rule "auditctl" "/var/log/wtmp" "wa" "session" +fix_audit_watch_rule "augenrules" "/var/log/wtmp" "wa" "session" + + + + + + + Ensure auditd Collects Unauthorized Access Attempts to Files (unsuccessful) + At a minimum the audit system should collect unauthorized file +accesses for all users and root. If the auditd daemon is configured +to use the augenrules program to read audit rules during daemon +startup (the default), add the following lines to a file with suffix +.rules in the directory /etc/audit/rules.d: +-a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access +-a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access +If the system is 64 bit then also add the following lines: + +-a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access +-a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following lines to +/etc/audit/audit.rules file: +-a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access +-a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access +If the system is 64 bit then also add the following lines: + +-a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access +-a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 172 + 2884 + SRG-OS-000064-GPOS-00033 + SRG-OS-000458-GPOS-00203 + SRG-OS-000461-GPOS-00205 + SRG-OS-000392-GPOS-00172 + RHEL-07-030420 + Req-10.2.4 + Req-10.2.1 + 5.2.10 + Unsuccessful attempts to access files could be an indicator of malicious activity on a system. Auditing +these events could serve as evidence of potential system compromise. + + + +# Perform the remediation of the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + + # First fix the -EACCES requirement + PATTERN="-a always,exit -F arch=$ARCH -S .* -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k *" + # Use escaped BRE regex to specify rule group + GROUP="\(creat\|open\|truncate\)" + FULL_RULE="-a always,exit -F arch=$ARCH -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + + # Then fix the -EPERM requirement + PATTERN="-a always,exit -F arch=$ARCH -S .* -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k *" + # No need to change content of $GROUP variable - it's the same as for -EACCES case above + FULL_RULE="-a always,exit -F arch=$ARCH -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + +done + + + + + + + + + + Ensure auditd Collects Information on the Use of Privileged Commands + At a minimum the audit system should collect the execution of +privileged commands for all users and root. To find the relevant setuid / +setgid programs, run the following command for each local partition +PART: +$ sudo find PART -xdev -type f -perm -4000 -o -type f -perm -2000 2>/dev/null +If the auditd daemon is configured to use the augenrules +program to read audit rules during daemon startup (the default), add a line of +the following form to a file with suffix .rules in the directory +/etc/audit/rules.d for each setuid / setgid program on the system, +replacing the SETUID_PROG_PATH part with the full path of that setuid / +setgid program in the list: +-a always,exit -F path=SETUID_PROG_PATH -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add a line of the following +form to /etc/audit/audit.rules for each setuid / setgid program on the +system, replacing the SETUID_PROG_PATH part with the full path of that +setuid / setgid program in the list: +-a always,exit -F path=SETUID_PROG_PATH -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-2(4) + AU-6(9) + AU-12(a) + AU-12(c) + IR-5 + 2234 + SRG-OS-000327-GPOS-00127 + RHEL-07-030310 + Req-10.2.2 + 5.2.10 + Test attestation on 20121024 by DS + Misuse of privileged functions, either intentionally or unintentionally by +authorized users, or by unauthorized external entities that have compromised 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 and advanced persistent threast. + +Privileged programs are subject to escalation-of-privilege attacks, +which attempt to subvert their normal role of providing some necessary but +limited capability. As such, motivation exists to monitor these programs for +unusual activity. + + + + +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +perform_audit_rules_privileged_commands_remediation "auditctl" "1000" +perform_audit_rules_privileged_commands_remediation "augenrules" "1000" + + + + + + + + + + Ensure auditd Collects Information on Exporting to Media (successful) + At a minimum the audit system should collect media exportation +events for all users and root. If the auditd daemon is configured to +use the augenrules program to read audit rules during daemon startup +(the default), add the following line to a file with suffix .rules in +the directory /etc/audit/rules.d, setting ARCH to either b32 or b64 as +appropriate for your system: +-a always,exit -F arch=ARCH -S mount -F auid>=1000 -F auid!=4294967295 -k export +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file, setting ARCH to either b32 or b64 as +appropriate for your system: +-a always,exit -F arch=ARCH -S mount -F auid>=1000 -F auid!=4294967295 -k export + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-3(1) + AU-12(a) + AU-12(c) + IR-5 + 135 + 2884 + SRG-OS-000042-GPOS-00020 + SRG-OS-000392-GPOS-00172 + RHEL-07-030530 + Req-10.2.7 + 5.2.13 + Test attestation on 20121024 by DS + The unauthorized exportation of data to external media could result in an information leak +where classified information, Privacy Act information, and intellectual property could be lost. An audit +trail should be created each time a filesystem is mounted to help identify and guard against information +loss. + + + +# Perform the remediation of the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=$ARCH -S .* -F auid>=1000 -F auid!=4294967295 -k *" + GROUP="mount" + FULL_RULE="-a always,exit -F arch=$ARCH -S mount -F auid>=1000 -F auid!=4294967295 -k export" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Ensure auditd Collects File Deletion Events by User + At a minimum the audit system should collect file deletion events +for all users and root. If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following line to a file with suffix .rules in the +directory /etc/audit/rules.d, setting ARCH to either b32 or b64 as +appropriate for your system: +-a always,exit -F arch=ARCH -S rmdir -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file, setting ARCH to either b32 or b64 as +appropriate for your system: +-a always,exit -F arch=ARCH -S rmdir -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-030750 + Req-10.2.7 + 5.2.14 + Auditing file deletions will create an audit trail for files that are removed +from the system. The audit trail could aid in system troubleshooting, as well as, detecting +malicious processes that attempt to delete log files to conceal their presence. + + + +# Perform the remediation for the syscall rule +# Retrieve hardware architecture of the underlying system +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b32" "b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=$ARCH -S .* -F auid>=1000 -F auid!=4294967295 -k *" + # Use escaped BRE regex to specify rule group + GROUP="\(rmdir\|unlink\|rename\)" + FULL_RULE="-a always,exit -F arch=$ARCH -S rmdir -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + + + + + + + + + + Ensure auditd Collects System Administrator Actions + At a minimum the audit system should collect administrator actions +for all users and root. If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the default), +add the following line to a file with suffix .rules in the directory +/etc/audit/rules.d: +-w /etc/sudoers -p wa -k actions +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file: +-w /etc/sudoers -p wa -k actions + + AC-2(7)(b) + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 126 + Req-10.2.2 + Req-10.2.5.b + Test attestation on 20121024 by DS + The actions taken by system administrators should be audited to keep a record +of what was executed on the system, as well as, for accountability purposes. + + + +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +fix_audit_watch_rule "auditctl" "/etc/sudoers" "wa" "actions" +fix_audit_watch_rule "augenrules" "/etc/sudoers" "wa" "actions" + + + + + + + + + + Ensure auditd Collects Information on Kernel Module Loading and Unloading + If the auditd daemon is configured to use the augenrules program +to read audit rules during daemon startup (the default), add the following lines to a file +with suffix .rules in the directory /etc/audit/rules.d to capture kernel module +loading and unloading events, setting ARCH to either b32 or b64 as appropriate for your system: +-w /usr/sbin/insmod -p x -k modules +-w /usr/sbin/rmmod -p x -k modules +-w /usr/sbin/modprobe -p x -k modules +-a always,exit -F arch=ARCH -S init_module -S delete_module -k modules +If the auditd daemon is configured to use the auditctl utility to read audit +rules during daemon startup, add the following lines to /etc/audit/audit.rules file +in order to capture kernel module loading and unloading events, setting ARCH to either b32 or +b64 as appropriate for your system: +-w /usr/sbin/insmod -p x -k modules +-w /usr/sbin/rmmod -p x -k modules +-w /usr/sbin/modprobe -p x -k modules +-a always,exit -F arch=ARCH -S init_module -S delete_module -k modules + + AC-17(7) + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + AU-12(a) + AU-12(c) + IR-5 + 172 + SRG-OS-000471-GPOS-00216 + SRG-OS-000477 + GPOS-00222 + RHEL-07-030670 + Req-10.2.7 + 5.2.17 + The addition/removal of kernel modules can be used to alter the behavior of +the kernel and potentially introduce malicious code into kernel space. It is important +to have an audit trail of modules that have been introduced into the kernel. + + + +# First perform the remediation of the syscall rule +# Retrieve hardware architecture of the underlying system +# Note: 32-bit kernel modules can't be loaded / unloaded on 64-bit kernel => +# it's not required on a 64-bit system to check also for the presence +# of 32-bit's equivalent of the corresponding rule. Therefore for +# each system it's enought to check presence of system's native rule form. +[ $(getconf LONG_BIT) = "32" ] && RULE_ARCHS=("b32") || RULE_ARCHS=("b64") + +for ARCH in "${RULE_ARCHS[@]}" +do + PATTERN="-a always,exit -F arch=$ARCH -S .* -k *" + # Use escaped BRE regex to specify rule group + GROUP="\(init\|delete\)_module" + FULL_RULE="-a always,exit -F arch=$ARCH -S init_module -S delete_module -k modules" + # Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + + fix_audit_syscall_rule "auditctl" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" + fix_audit_syscall_rule "augenrules" "$PATTERN" "$GROUP" "$ARCH" "$FULL_RULE" +done + +# Then perform the remediations for the watch rules +# Perform the remediation for both possible tools: 'auditctl' and 'augenrules' + +fix_audit_watch_rule "auditctl" "/usr/sbin/insmod" "x" "modules" +fix_audit_watch_rule "augenrules" "/usr/sbin/insmod" "x" "modules" + +fix_audit_watch_rule "auditctl" "/usr/sbin/rmmod" "x" "modules" +fix_audit_watch_rule "augenrules" "/usr/sbin/rmmod" "x" "modules" + +fix_audit_watch_rule "auditctl" "/usr/sbin/modprobe" "x" "modules" +fix_audit_watch_rule "augenrules" "/usr/sbin/modprobe" "x" "modules" + + + + + + + + + + Make the auditd Configuration Immutable + If the auditd daemon is configured to use the +augenrules program to read audit rules during daemon startup (the +default), add the following line to a file with suffix .rules in the +directory /etc/audit/rules.d in order to make the auditd configuration +immutable: +-e 2 +If the auditd daemon is configured to use the auditctl +utility to read audit rules during daemon startup, add the following line to +/etc/audit/audit.rules file in order to make the auditd configuration +immutable: +-e 2 +With this setting, a reboot will be required to change any audit rules. + + AC-6 + AU-1(b) + AU-2(a) + AU-2(c) + AU-2(d) + IR-5 + Req-10.5.2 + 5.2.18 + Making the audit configuration immutable prevents accidental as +well as malicious modification of the audit rules, although it may be +problematic if legitimate changes are needed during system +operation + + +# Traverse all of: +# +# /etc/audit/audit.rules, (for auditctl case) +# /etc/audit/rules.d/*.rules (for augenrules case) +# +# files to check if '-e .*' setting is present in that '*.rules' file already. +# If found, delete such occurrence since auditctl(8) manual page instructs the +# '-e 2' rule should be placed as the last rule in the configuration +find /etc/audit /etc/audit/rules.d -maxdepth 1 -type f -name *.rules -exec sed -i '/-e[[:space:]]\+.*/d' {} ';' + +# Append '-e 2' requirement at the end of both: +# * /etc/audit/audit.rules file (for auditctl case) +# * /etc/audit/rules.d/immutable.rules (for augenrules case) + +for AUDIT_FILE in "/etc/audit/audit.rules" "/etc/audit/rules.d/immutable.rules" +do + echo '' >> $AUDIT_FILE + echo '# Set the audit.rules configuration immutable per security requirements' >> $AUDIT_FILE + echo '# Reboot is required to change audit rules once this setting is applied' >> $AUDIT_FILE + echo '-e 2' >> $AUDIT_FILE +done + + + + + + + + + + Services + +The best protection against vulnerable software is running less software. This section describes how to review +the software which Red Hat Enterprise Linux 7 installs on a system and disable software which is not needed. It +then enumerates the software packages installed on a default Red Hat Enterprise Linux 7 system and provides guidance about which +ones can be safely disabled. + +Red Hat Enterprise Linux 7 provides a convenient minimal install option that essentially installs the bare necessities for a functional +system. When building Red Hat Enterprise Linux 7 servers, it is highly recommended to select the minimal packages and then build up +the system from there. + + + Obsolete Services + This section discusses a number of network-visible +services which have historically caused problems for system +security, and for which disabling or severely limiting the service +has been the best available guidance for some time. As a result of +this, many of these services are not installed as part of Red Hat Enterprise Linux 7 +by default. + +Organizations which are running these services should +switch to more secure equivalents as soon as possible. +If it remains absolutely necessary to run one of +these services for legacy reasons, care should be taken to restrict +the service as much as possible, for instance by configuring host +firewall software such as firewalld to restrict access to the +vulnerable service to only those remote hosts which have a known +need to use it. + + Xinetd + The xinetd service acts as a dedicated listener for some +network services (mostly, obsolete ones) and can be used to provide access +controls and perform some logging. It has been largely obsoleted by other +features, and it is not installed by default. The older Inetd service +is not even available as part of Red Hat Enterprise Linux 7. + + Disable xinetd Service + + + The xinetd service can be disabled with the following command: + $ sudo systemctl disable xinetd.service + + AC-17(8) + CM-7 + 305 + Test attestation on 20121026 by DS + +The xinetd service provides a dedicated listener service for some programs, +which is no longer necessary for commonly-used network services. Disabling +it ensures that these uncommon services are not running, and also prevents +attacks against xinetd itself. + + + # +# Disable xinetd.service for all systemd targets +# +systemctl disable xinetd.service + +# +# Stop xinetd.service if currently running +# +systemctl stop xinetd.service + + + + + + + + + + Uninstall xinetd Package + The xinetd package can be uninstalled with the following command: +$ sudo yum erase xinetd + + AC-17(8) + CM-7 + 305 + 2.1.11 + Test attestation on 20121026 by DS + +Removing the xinetd package decreases the risk of the +xinetd service's accidental (or intentional) activation. + + + +package_command remove xinetd + + + + + + + + + + Install tcp_wrappers Package + +When network services are using the xinetd service, the +tcp_wrappers package should be installed. + + The tcp_wrappers package can be installed with the following command: + $ sudo yum install tcp_wrappers + + CM-6(b) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-TBD + +Access control methods provide the ability to enhance system security posture +by restricting services and known good IP addresses and address ranges. This +prevents connections from unknown hosts and protocols. + + + +package_command install tcp_wrappers + + + + + + + + + + + Telnet + The telnet protocol does not provide confidentiality or integrity +for information transmitted on the network. This includes authentication +information such as passwords. Organizations which use telnet should be +actively working to migrate to a more secure protocol. + + Disable telnet Service + +The telnet service configuration file /etc/xinetd.d/telnet +is not created automatically. If it was created manually, check the +/etc/xinetd.d/telnet file and ensure that disable = no +is changed to read disable = yes as follows below: + +# description: The telnet server serves telnet sessions; it uses \\ +# unencrypted username/password pairs for authentication. +service telnet +{ + flags = REUSE + socket_type = stream + + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = yes +} + +If the /etc/xinetd.d/telnet file does not exist, make sure that +the activation of the telnet service on system boot is disabled +via the following command: + + The rexec socket can be disabled with the following command: + $ sudo systemctl disable rexec.socket + + AC-17(8) + CM-7 + IA-5(1)(c) + + Test attestation on 20140922 by JL + +The telnet protocol uses unencrypted network communication, which +means that data from the login session, including passwords and +all other information transmitted during the session, can be +stolen by eavesdroppers on the network. The telnet protocol is also +subject to man-in-the-middle attacks. + + + grep -qi disable /etc/xinetd.d/telnet && \ + sed -i "s/disable.*/disable = yes/gI" /etc/xinetd.d/telnet + +# +# Disable telnet.socket for all systemd targets +# +systemctl disable telnet.socket + +# +# Stop telnet.socket if currently running +# +systemctl stop telnet.socket + + + + + + + + + + Uninstall telnet-server Package + The telnet-server package can be uninstalled with +the following command: +$ sudo yum erase telnet-server + AC-17(8) + CM-7(a) + 381 + SRG-OS-000095-GPOS-00049 + RHEL-07-021910 + 2.1.1 + Test attestation on 20121026 by DS + +It is detrimental for operating systems to provide, or install by default, functionality exceeding +requirements or mission objectives. These unnecessary capabilities are often overlooked and therefore +may remain unsecure. They increase the risk to the platform by providing additional attack vectors. + +The telnet service provides an unencrypted remote access service which does not provide for the +confidentiality and integrity of user passwords or the remote session. If a privileged user were +to login using this service, the privileged user password could be compromised. + +Removing the telnet-server package decreases the risk of the telnet service's accidental +(or intentional) activation. + + + if rpm -qa | grep -q telnet-server; then + yum -y remove telnet-server +fi + + + + + + + + + + Remove telnet Clients + The telnet client allows users to start connections to other +systems via the telnet protocol. + 2.1.2 + The telnet protocol is insecure and unencrypted. The use +of an unencrypted transmission medium could allow an unauthorized user +to steal credentials. The ssh package provides an +encrypted session and stronger security and is included in Red Hat +Enterprise Linux. + + +package_command remove telnet + + + + + + + + + + + Rlogin, Rsh, and Rexec + The Berkeley r-commands are legacy services which +allow cleartext remote access and have an insecure trust +model. + + Uninstall rsh-server Package + The rsh-server package can be uninstalled with +the following command: +$ sudo yum erase rsh-server + + AC-17(8) + CM-7(a) + 381 + SRG-OS-000095-GPOS-00049 + RHEL-07-020000 + 2.1.3 + Test attestation on 20121026 by DS + The rsh-server service provides unencrypted remote access service which does not +provide for the confidentiality and integrity of user passwords or the remote session and has very weak +authentication. If a privileged user were to login using this service, the privileged user password +could be compromised. The rsh-server package provides several obsolete and insecure +network services. Removing it decreases the risk of those services' accidental (or intentional) +activation. + + + +package_command remove rsh-server + + + + + + + + + + Disable rexec Service + The rexec service, which is available with +the rsh-server package and runs as a service through xinetd or separately +as a systemd socket, should be disabled. +If using xinetd, set disable to yes in /etc/xinetd.d/rexec. +If using systemd, + The rexec socket can be disabled with the following command: + $ sudo systemctl disable rexec.socket + + AC-17(8) + CM-7 + 68 + 1436 + Test attestation on 20121026 by DS + The rexec service uses unencrypted network communications, which +means that data from the login session, including passwords and +all other information transmitted during the session, can be +stolen by eavesdroppers on the network. + + + grep -qi disable /etc/xinetd.d/rexec && \ + sed -i "s/disable.*/disable = yes/gI" /etc/xinetd.d/rexec + +# +# Disable rexec.socket for all systemd targets +# +systemctl disable rexec.socket + +# +# Stop rexec.socket if currently running +# +systemctl stop rexec.socket + + + + + + + + + + Disable rsh Service + The rsh service, which is available with +the rsh-server package and runs as a service through xinetd or separately +as a systemd socket, should be disabled. +If using xinetd, set disable to yes in /etc/xinetd.d/rsh. +If using systemd, + The rsh socket can be disabled with the following command: + $ sudo systemctl disable rsh.socket + + AC-17(8) + CM-7 + IA-5(1)(c) + 68 + 1436 + Test attestation on 20121026 by DS + The rsh service uses unencrypted network communications, which +means that data from the login session, including passwords and +all other information transmitted during the session, can be +stolen by eavesdroppers on the network. + + + grep -qi disable /etc/xinetd.d/rsh && \ + sed -i "s/disable.*/disable = yes/gI" /etc/xinetd.d/rsh + +# +# Disable rsh.socket for all systemd targets +# +systemctl disable rsh.socket + +# +# Stop rsh.socket if currently running +# +systemctl stop rsh.socket + + + + + + + + + + Uninstall rsh Package + The rsh package contains the client commands +for the rsh services + 2.1.4 + Test attestation on 20140530 by JL + These legacy clients contain numerous security exposures and have +been replaced with the more secure SSH package. Even if the server is removed, +it is best to ensure the clients are also removed to prevent users from +inadvertently attempting to use these commands and therefore exposing +their credentials. Note that removing the rsh package removes +the clients for rsh,rcp, and rlogin. + + + +package_command remove rsh + + + + + + + + + + Disable rlogin Service + The rlogin service, which is available with +the rsh-server package and runs as a service through xinetd or separately +as a systemd socket, should be disabled. +If using xinetd, set disable to yes in /etc/xinetd.d/rlogin. +If using systemd, + The rlogin socket can be disabled with the following command: + $ sudo systemctl disable rlogin.socket + + AC-17(8) + CM-7 + IA-5(1)(c) + 1436 + Test attestation on 20121026 by DS + The rlogin service uses unencrypted network communications, which +means that data from the login session, including passwords and +all other information transmitted during the session, can be +stolen by eavesdroppers on the network. + + + grep -qi disable /etc/xinetd.d/rlogin && \ + sed -i "s/disable.*/disable = yes/gI" /etc/xinetd.d/rlogin + +# +# Disable rlogin.socket for all systemd targets +# +systemctl disable rlogin.socket + +# +# Stop rlogin.socket if currently running +# +systemctl stop rlogin.socket + + + + + + + + + + Remove Rsh Trust Files + The files /etc/hosts.equiv and ~/.rhosts (in +each user's home directory) list remote hosts and users that are trusted by the +local system when using the rshd daemon. +To remove these files, run the following command to delete them from any +location: +$ sudo rm /etc/hosts.equiv +$ rm ~/.rhosts + + AC-17(8) + CM-7 + 1436 + Test attestation on 20121026 by DS + Trust files are convenient, but when +used in conjunction with the R-services, they can allow +unauthenticated access to a system. + + find -type f -name .rhosts -exec rm -f '{}' \; +rm /etc/hosts.equiv + + + + + + + + + + + NIS + The Network Information Service (NIS), also known as 'Yellow +Pages' (YP), and its successor NIS+ have been made obsolete by +Kerberos, LDAP, and other modern centralized authentication +services. NIS should not be used because it suffers from security +problems inherent in its design, such as inadequate protection of +important authentication information. + + Uninstall ypserv Package + The ypserv package can be uninstalled with +the following command: +$ sudo yum erase ypserv + + AC-17(8) + CM-7(a) + 381 + SRG-OS-000095-GPOS-00049 + RHEL-07-020010 + 2.1.6 + Test attestation on 20121026 by DS + The NIS service provides an unencrypted authentication service which does not +provide for the confidentiality and integrity of user passwords or the remote session. + +Removing the ypserv package decreases the risk of the accidental (or intentional) +activation of NIS or NIS+ services. + + + +package_command remove ypserv + + + + + + + + + + Disable ypbind Service + The ypbind service, which allows the system to act as a client in +a NIS or NIS+ domain, should be disabled. + + The ypbind service can be disabled with the following command: + $ sudo systemctl disable ypbind.service + + AC-17(8) + CM-7 + 305 + Test attestation on 20121026 by DS + +Disabling the ypbind service ensures the system is not acting +as a client in a NIS or NIS+ domain. + + + +service_command disable ypbind.service + + + + + + + + + + Remove NIS Client + The Network Information Service (NIS), formerly known as Yellow Pages, +is a client-server directory service protocol used to distribute system configuration +files. The NIS client (ypbind) was used to bind a machine to an NIS server +and receive the distributed configuration files. + 2.1.5 + The NIS service is inherently an insecure system that has been vulnerable +to DOS attacks, buffer overflows and has poor authentication for querying NIS maps. +NIS generally has been replaced by such protocols as Lightweight Directory Access +Protocol (LDAP). It is recommended that the service be removed. + + +package_command remove ypbind + + + + + + + + + + + TFTP Server + +TFTP is a lightweight version of the FTP protocol which has +traditionally been used to configure networking equipment. However, +TFTP provides little security, and modern versions of networking +operating systems frequently support configuration via SSH or other +more secure protocols. A TFTP server should be run only if no more +secure method of supporting existing equipment can be +found. + + Disable tftp Service + The tftp service should be disabled. + + The tftp service can be disabled with the following command: + $ sudo systemctl disable tftp.service + + AC-17(8) + CM-7 + 1436 + Test attestation on 20121026 by DS + +Disabling the tftp service ensures the system is not acting +as a TFTP server, which does not provide encryption or authentication. + + + + + + + + + + + Uninstall tftp-server Package + + + The tftp-server package can be removed with the following command: + $ sudo yum erase tftp-server + + AC-17(8) + CM-6(c) + CM-7 + 318 + 368 + 1812 + 1813 + 1814 + SRG-OS-000480-GPOS-00227 + RHEL-07-040500 + 2.1.8 + Test attestation on 20121026 by DS + +Removing the tftp-server package decreases the risk of the +accidental (or intentional) activation of tftp services. + +If TFTP is required for operational support (such as transmission of router configurations), +its use must be documented with the Information Systems Securty Manager (ISSM), restricted to +only authorized personnel, and have access control rules established. + + + +package_command remove tftp-server + + + + + + + + + + Remove tftp Daemon + Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol, +typically used to automatically transfer configuration or boot files between machines. +TFTP does not support authentication and can be easily hacked. The package +tftp is a client program that allows for connections to a tftp server. + + 2.1.7 + It is recommended that TFTP be removed, unless there is a specific need +for TFTP (such as a boot server). In that case, use extreme caution when configuring +the services. + + + + + + + + + + Ensure tftp Daemon Uses Secure Mode + If running the tftp service is necessary, it should be configured +to change its root directory at startup. To do so, ensure +/etc/xinetd.d/tftp includes -s as a command line argument, as shown in +the following example (which is also the default): +server_args = -s /var/lib/tftpboot + + AC-17(8) + CM-7 + 366 + Using the -s option causes the TFTP service to only serve files from the +given directory. Serving files from an intentionally-specified directory +reduces the risk of sharing files which should remain private. + + + + + + + + + + + + Chat/Messaging Services + +The talk software makes it possible for users to send and receive messages +across systems through a terminal session. + + + Uninstall talk-server Package + + + The talk-server package can be removed with the following command: + $ sudo yum erase talk-server + + 2.1.10 + Test attestation on 20140625 by JL + +The talk software presents a security risk as it uses unencrypted protocols +for communications. Removing the talk-server package decreases the +risk of the accidental (or intentional) activation of talk services. + + + +package_command remove talk-server + + + + + + + + + + Uninstall talk Package + The talk package contains the client program for the +Internet talk protocol, which allows the user to chat with other users on +different systems. Talk is a communication program which copies lines from one +terminal to the terminal of another user. + + The talk package can be removed with the following command: + $ sudo yum erase talk + + 2.1.9 + Test attestation on 20140625 by JL + +The talk software presents a security risk as it uses unencrypted protocols +for communications. Removing the talk package decreases the +risk of the accidental (or intentional) activation of talk client program. + + + +package_command remove talk + + + + + + + + + + + + Base Services + This section addresses the base services that are installed on a +Red Hat Enterprise Linux 7 default installation which are not covered in other +sections. Some of these services listen on the network and +should be treated with particular discretion. Other services are local +system utilities that may or may not be extraneous. In general, system services +should be disabled if not required. + + Disable Automatic Bug Reporting Tool (abrtd) + The Automatic Bug Reporting Tool (abrtd) daemon collects +and reports crash data when an application crash is detected. Using a variety +of plugins, abrtd can email crash reports to system administrators, log crash +reports to files, or forward crash reports to a centralized issue tracking +system such as RHTSupport. + + The abrtd service can be disabled with the following command: + $ sudo systemctl disable abrtd.service + + AC-17(8) + CM-7 + + Test attestation on 20140921 by JL + Mishandling crash data could expose sensitive information about +vulnerabilities in software executing on the local machine, as well as sensitive +information from within a process's address space or registers. + + # +# Disable abrtd.service for all systemd targets +# +systemctl disable abrtd.service + +# +# Stop abrtd.service if currently running +# +systemctl stop abrtd.service + + + + + + + + + + Disable Advanced Configuration and Power Interface (acpid) + The Advanced Configuration and Power Interface Daemon (acpid) +dispatches ACPI events (such as power/reset button depressed) to userspace +programs. + + The acpid service can be disabled with the following command: + $ sudo systemctl disable acpid.service + + CM-7 + ACPI support is highly desirable for systems in some network roles, +such as laptops or desktops. For other systems, such as servers, it may permit +accidental or trivially achievable denial of service situations and disabling +it is appropriate. + + # +# Disable acpid.service for all systemd targets +# +systemctl disable acpid.service + +# +# Stop acpid.service if currently running +# +systemctl stop acpid.service + + + + + + + + + + Disable Certmonger Service (certmonger) + Certmonger is a D-Bus based service that attempts to simplify interaction +with certifying authorities on networks which use public-key infrastructure. It is often +combined with Red Hat's IPA (Identity Policy Audit) security information management +solution to aid in the management of certificates. + + The certmonger service can be disabled with the following command: + $ sudo systemctl disable certmonger.service + + CM-7 + The services provided by certmonger may be essential for systems +fulfilling some roles a PKI infrastructure, but its functionality is not necessary +for many other use cases. + + # +# Disable certmonger.service for all systemd targets +# +systemctl disable certmonger.service + +# +# Stop certmonger.service if currently running +# +systemctl stop certmonger.service + + + + + + + + + + Disable Control Group Config (cgconfig) + Control groups allow an administrator to allocate system resources (such as CPU, +memory, network bandwidth, etc) among a defined group (or groups) of processes executing on +a system. The cgconfig daemon starts at boot and establishes the predefined control groups. + + The cgconfig service can be disabled with the following command: + $ sudo systemctl disable cgconfig.service + + CM-7 + Unless control groups are used to manage system resources, running the cgconfig +service is not necessary. + + + # +# Disable cgconfig.service for all systemd targets +# +systemctl disable cgconfig.service + +# +# Stop cgconfig.service if currently running +# +systemctl stop cgconfig.service + + + + + + + + + + Disable Control Group Rules Engine (cgred) + The cgred service moves tasks into control groups according to +parameters set in the /etc/cgrules.conf configuration file. + + The cgred service can be disabled with the following command: + $ sudo systemctl disable cgred.service + + CM-7 + Unless control groups are used to manage system resources, running the cgred service +service is not necessary. + + + # +# Disable cgred.service for all systemd targets +# +systemctl disable cgred.service + +# +# Stop cgred.service if currently running +# +systemctl stop cgred.service + + + + + + + + + + Disable CPU Speed (cpupower) + The cpupower service can adjust the clock speed of supported CPUs based upon +the current processing load thereby conserving power and reducing heat. + + The cpupower service can be disabled with the following command: + $ sudo systemctl disable cpupower.service + + CM-7 + The cpupower service is only necessary if adjusting the CPU clock speed +provides benefit. Traditionally this has included laptops (to enhance battery life), +but may also apply to server or desktop environments where conserving power is +highly desirable or necessary. + + + + + + + + + + + Enable IRQ Balance (irqbalance) + The irqbalance service optimizes the balance between +power savings and performance through distribution of hardware interrupts across +multiple processors. + + The irqbalance service can be enabled with the following command: + $ sudo systemctl enable irqbalance.service + + CM-7 + In an environment with multiple processors (now common), the irqbalance service +provides potential speedups for handling interrupt requests. + + # +# Enable irqbalance.service for all systemd targets +# +systemctl enable irqbalance.service + +# +# Start irqbalance.service if not currently running +# +systemctl start irqbalance.service + + + + + + + + + + Disable KDump Kernel Crash Analyzer (kdump) + The kdump service provides a kernel crash dump analyzer. It uses the kexec +system call to boot a secondary kernel ("capture" kernel) following a system +crash, which can load information from the crashed kernel for analysis. + + The kdump service can be disabled with the following command: + $ sudo systemctl disable kdump.service + + AC-17(8) + CM-7 + CM-6(b) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-021230 + +Kernel core dumps may contain the full contents of system memory at the time of the crash. +Kernel core dumps consume a considerable amount of disk space and may result in denial of +service by exhausting the available space on the target file system partition. +Unless the system is used for kernel development or testing, there +is little need to run the kdump service. + + # +# Disable kdump.service for all systemd targets +# +systemctl disable kdump.service + +# +# Stop kdump.service if currently running +# +systemctl stop kdump.service + + + + + + + + + + Disable Software RAID Monitor (mdmonitor) + The mdmonitor service is used for monitoring a software RAID array; hardware +RAID setups do not use this service. + + The mdmonitor service can be disabled with the following command: + $ sudo systemctl disable mdmonitor.service + + CM-7 + If software RAID monitoring is not required, +there is no need to run this service. + + # +# Disable mdmonitor.service for all systemd targets +# +systemctl disable mdmonitor.service + +# +# Stop mdmonitor.service if currently running +# +systemctl stop mdmonitor.service + + + + + + + + + + Disable D-Bus IPC Service (messagebus) + D-Bus provides an IPC mechanism used by +a growing list of programs, such as those used for Gnome, Bluetooth, and Avahi. +Due to these dependencies, disabling D-Bus may not be practical for +many systems. + + The messagebus service can be disabled with the following command: + $ sudo systemctl disable messagebus.service + + CM-7 + If no services which require D-Bus are needed, then it +can be disabled. As a broker for IPC between processes of different privilege levels, +it could be a target for attack. However, disabling D-Bus is likely to be +impractical for any system which needs to provide +a graphical login session. + + + # +# Disable messagebus.service for all systemd targets +# +systemctl disable messagebus.service + +# +# Stop messagebus.service if currently running +# +systemctl stop messagebus.service + + + + + + + + + + Disable Network Console (netconsole) + The netconsole service is responsible for loading the +netconsole kernel module, which logs kernel printk messages over UDP to a +syslog server. This allows debugging of problems where disk logging fails and +serial consoles are impractical. + + The netconsole service can be disabled with the following command: + $ sudo systemctl disable netconsole.service + + AC-17(8) + CM-7 + 381 + The netconsole service is not necessary unless there is a need to debug +kernel panics, which is not common. + + + # +# Disable netconsole for all run levels +# +chkconfig --level 0123456 netconsole off + +# +# Stop netconsole if currently running +# +service netconsole stop + + + + + + + + + + Disable ntpdate Service (ntpdate) + The ntpdate service sets the local hardware clock by polling NTP servers +when the system boots. It synchronizes to the NTP servers listed in +/etc/ntp/step-tickers or /etc/ntp.conf +and then sets the local hardware clock to the newly synchronized +system time. + + The ntpdate service can be disabled with the following command: + $ sudo systemctl disable ntpdate.service + + AC-17(8) + CM-7 + 382 + Test attestation on 20121024 by DS + The ntpdate service may only be suitable for systems which +are rebooted frequently enough that clock drift does not cause problems between +reboots. In any event, the functionality of the ntpdate service is now +available in the ntpd program and should be considered deprecated. + + + + + + + + + + Disable Odd Job Daemon (oddjobd) + The oddjobd service exists to provide an interface and +access control mechanism through which +specified privileged tasks can run tasks for unprivileged client +applications. Communication with oddjobd through the system message bus. + + The oddjobd service can be disabled with the following command: + $ sudo systemctl disable oddjobd.service + + CM-7 + 381 + Test attestation on 20121024 by DS + The oddjobd service may provide necessary functionality in +some environments, and can be disabled if it is not needed. Execution of +tasks by privileged programs, on behalf of unprivileged ones, has traditionally +been a source of privilege escalation security issues. + + # +# Disable oddjobd.service for all systemd targets +# +systemctl disable oddjobd.service + +# +# Stop oddjobd.service if currently running +# +systemctl stop oddjobd.service + + + + + + + + + + Disable Portreserve (portreserve) + The portreserve service is a TCP port reservation utility that can +be used to prevent portmap from binding to well known TCP ports that are +required for other services. + + The portreserve service can be disabled with the following command: + $ sudo systemctl disable portreserve.service + + AC-17(8) + CM-7 + Test attestation on 20121024 by DS + The portreserve service provides helpful functionality by +preventing conflicting usage of ports in the reserved port range, but it can be +disabled if not needed. + + # +# Disable portreserve.service for all systemd targets +# +systemctl disable portreserve.service + +# +# Stop portreserve.service if currently running +# +systemctl stop portreserve.service + + + + + + + + + + Enable Process Accounting (psacct) + The process accounting service, psacct, works with programs +including acct and ac to allow system administrators to view +user activity, such as commands issued by users of the system. + + The psacct service can be enabled with the following command: + $ sudo systemctl enable psacct.service + + AU-12 + CM-7 + Test attestation on 20121024 by DS + The psacct service can provide administrators a convenient +view into some user activities. However, it should be noted that the auditing +system and its audit records provide more authoritative and comprehensive +records. + + # +# Enable psacct.service for all systemd targets +# +systemctl enable psacct.service + +# +# Start psacct.service if not currently running +# +systemctl start psacct.service + + + + + + + + + + Disable Apache Qpid (qpidd) + The qpidd service provides high speed, secure, +guaranteed delivery services. It is an implementation of the Advanced Message +Queuing Protocol. By default the qpidd service will bind to port 5672 and +listen for connection attempts. + + The qpidd service can be disabled with the following command: + $ sudo systemctl disable qpidd.service + + AC-17(8) + CM-7 + 382 + The qpidd service is automatically installed when the "base" +package selection is selected during installation. The qpidd service listens +for network connections, which increases the attack surface of the system. If +the system is not intended to receive AMQP traffic, then the qpidd +service is not needed and should be disabled or removed. + + # +# Disable qpidd.service for all systemd targets +# +systemctl disable qpidd.service + +# +# Stop qpidd.service if currently running +# +systemctl stop qpidd.service + + + + + + + + + + Disable Quota Netlink (quota_nld) + The quota_nld service provides notifications to +users of disk space quota violations. It listens to the kernel via a netlink +socket for disk quota violations and notifies the appropriate user of the +violation using D-Bus or by sending a message to the terminal that the user has +last accessed. + + The quota_nld service can be disabled with the following command: + $ sudo systemctl disable quota_nld.service + + CM-7 + Test attestation on 20121024 by DS + If disk quotas are enforced on the local system, then the +quota_nld service likely provides useful functionality and should +remain enabled. However, if disk quotas are not used or user notification of +disk quota violation is not desired then there is no need to run this +service. + + # +# Disable quota_nld.service for all systemd targets +# +systemctl disable quota_nld.service + +# +# Stop quota_nld.service if currently running +# +systemctl stop quota_nld.service + + + + + + + + + + Disable Network Router Discovery Daemon (rdisc) + The rdisc service implements the client side of the ICMP +Internet Router Discovery Protocol (IRDP), which allows discovery of routers on +the local subnet. If a router is discovered then the local routing table is +updated with a corresponding default route. By default this daemon is disabled. + + The rdisc service can be disabled with the following command: + $ sudo systemctl disable rdisc.service + + AC-17(8) + AC-4 + CM-7 + 382 + Test attestation on 20121024 by DS + General-purpose systems typically have their network and routing +information configured statically by a system administrator. Workstations or +some special-purpose systems often use DHCP (instead of IRDP) to retrieve +dynamic network configuration information. + + # +# Disable rdisc.service for all systemd targets +# +systemctl disable rdisc.service + +# +# Stop rdisc.service if currently running +# +systemctl stop rdisc.service + + + + + + + + + + Disable Red Hat Network Service (rhnsd) + The Red Hat Network service automatically queries Red Hat Network +servers to determine whether there are any actions that should be executed, +such as package updates. This only occurs if the system was registered to an +RHN server or satellite and managed as such. + + The rhnsd service can be disabled with the following command: + $ sudo systemctl disable rhnsd.service + + AC-17(8) + CM-7 + 382 + 1.2.4 + Test attestation on 20121024 by DS + Although systems management and patching is extremely important to +system security, management by a system outside the enterprise enclave is not +desirable for some environments. However, if the system is being managed by RHN or + RHN Satellite Server the rhnsd daemon can remain on. + + # +# Disable rhnsd for all run levels +# +chkconfig --level 0123456 rhnsd off + +# +# Stop rhnsd if currently running +# +service rhnsd stop + + + + + + + + + + Disable Red Hat Subscription Manager Daemon (rhsmcertd) + The Red Hat Subscription Manager (rhsmcertd) periodically checks for +changes in the entitlement certificates for a registered system and updates it +accordingly. + + The rhsmcertd service can be disabled with the following command: + $ sudo systemctl disable rhsmcertd.service + + CM-7 + Test attestation on 20121024 by DS + The rhsmcertd service can provide administrators with some +additional control over which of their systems are entitled to particular +subscriptions. However, for systems that are managed locally or which are not +expected to require remote changes to their subscription status, it is +unnecessary and can be disabled. + + # +# Disable rhsmcertd.service for all systemd targets +# +systemctl disable rhsmcertd.service + +# +# Stop rhsmcertd.service if currently running +# +systemctl stop rhsmcertd.service + + + + + + + + + + Disable Cyrus SASL Authentication Daemon (saslauthd) + The saslauthd service handles plaintext authentication requests on +behalf of the SASL library. The service isolates all code requiring superuser +privileges for SASL authentication into a single process, and can also be used +to provide proxy authentication services to clients that do not understand SASL +based authentication. + + The saslauthd service can be disabled with the following command: + $ sudo systemctl disable saslauthd.service + + AC-17(8) + CM-7 + Test attestation on 20121024 by DS + The saslauthd service provides essential functionality for +performing authentication in some directory environments, such as those which +use Kerberos and LDAP. For others, however, in which only local files may be +consulted, it is not necessary and should be disabled. + + # +# Disable saslauthd.service for all systemd targets +# +systemctl disable saslauthd.service + +# +# Stop saslauthd.service if currently running +# +systemctl stop saslauthd.service + + + + + + + + + + Disable SMART Disk Monitoring Service (smartd) + SMART (Self-Monitoring, Analysis, and Reporting Technology) is a +feature of hard drives that allows them to detect symptoms of disk failure and +relay an appropriate warning. + + The smartd service can be disabled with the following command: + $ sudo systemctl disable smartd.service + + CM-7 + Test attestation on 20121024 by DS + SMART can help protect against denial of +service due to failing hardware. Nevertheless, if it is not needed or the +system's drives are not SMART-capable (such as solid state drives), it can be +disabled. + + # +# Disable smartd.service for all systemd targets +# +systemctl disable smartd.service + +# +# Stop smartd.service if currently running +# +systemctl stop smartd.service + + + + + + + + + + Disable System Statistics Reset Service (sysstat) + The sysstat service resets various I/O and CPU +performance statistics to zero in order to begin counting from a fresh state +at boot time. + + The sysstat service can be disabled with the following command: + $ sudo systemctl disable sysstat.service + + CM-7 + Test attestation on 20121024 by DS + By default the sysstat service merely runs a program at +boot to reset the statistics, which can be retrieved using programs such as +sar and sadc. These may provide useful insight into system +operation, but unless used this service can be disabled. + + # +# Disable sysstat.service for all systemd targets +# +systemctl disable sysstat.service + +# +# Stop sysstat.service if currently running +# +systemctl stop sysstat.service + + + + + + + + + + + Cron and At Daemons + The cron and at services are used to allow commands to +be executed at a later time. The cron service is required by almost +all systems to perform necessary maintenance tasks, while at may or +may not be required on a given system. Both daemons should be +configured defensively. + + Enable cron Service + The crond service is used to execute commands at +preconfigured times. It is required by almost all systems to perform necessary +maintenance tasks, such as notifying root of system activity. + + The crond service can be enabled with the following command: + $ sudo systemctl enable crond.service + + CM-7 + 6.1.2 + Test attestation on 20121024 by DS + Due to its usage for maintenance and security-supporting tasks, +enabling the cron daemon is essential. + + + # +# Enable crond.service for all systemd targets +# +systemctl enable crond.service + +# +# Start crond.service if not currently running +# +systemctl start crond.service + + + + + + + + + + Disable anacron Service + The cronie-anacron package, which provides anacron +functionality, is installed by default. + + The cronie-anacron package can be removed with the following command: + $ sudo yum erase cronie-anacron + + CM-7 + +The anacron service provides cron functionality for systems +such as laptops and workstations that may be shut down during the normal times +that cron jobs are scheduled to run. On systems which do not require this +additional functionality, anacron could needlessly increase the possible +attack surface for an intruder. + + + + + + + + Disable At Service (atd) + The at and batch commands can be used to +schedule tasks that are meant to be executed only once. This allows delayed +execution in a manner similar to cron, except that it is not +recurring. The daemon atd keeps track of tasks scheduled via +at and batch, and executes them at the specified time. + + The atd service can be disabled with the following command: + $ sudo systemctl disable atd.service + + CM-7 + 381 + +The atd service could be used by an unsophisticated insider to carry +out activities outside of a normal login session, which could complicate +accountability. Furthermore, the need to schedule tasks with at or +batch is not common. + + + # +# Disable atd.service for all systemd targets +# +systemctl disable atd.service + +# +# Stop atd.service if currently running +# +systemctl stop atd.service + + + + + + + + + + Restrict at and cron to Authorized Users if Necessary + +The /etc/cron.allow and /etc/at.allow files contain lists of users who are allowed +to use cron and at to delay execution of processes. If these files exist and +if the corresponding files /etc/cron.deny and /etc/at.deny do not exist, +then only users listed in the relevant allow files can run the crontab and at +commands to submit jobs to be run at scheduled intervals. +On many systems, only the system administrator needs the ability to schedule +jobs. Note that even if a given user is not listed in cron.allow, cron jobs can +still be run as that user. The cron.allow file controls only administrative access +to the crontab command for scheduling and modifying cron jobs. + + +To restrict at and cron to only authorized users: +Remove the cron.deny file:$ sudo rm /etc/cron.denyEdit /etc/cron.allow, adding one line for each user allowed to use the crontab command to create cron jobs.Remove the at.deny file:$ sudo rm /etc/at.denyEdit /etc/at.allow, adding one line for each user allowed to use the at command to create at jobs. + + + + + SSH Server + The SSH protocol is recommended for remote login and +remote file transfer. SSH provides confidentiality and integrity +for data exchanged between two systems, as well as server +authentication, through the use of public key cryptography. The +implementation included with the system is called OpenSSH, and more +detailed documentation is available from its website, +http://www.openssh.org. Its server program is called sshd and +provided by the RPM package openssh-server. + + SSH session Idle time + Specify duration of allowed idle time. + 300 + 300 + 600 + 900 + 3600 + 7200 + + + Install the OpenSSH Server Package + +The openssh-server package should be installed. + + The openssh-server package can be installed with the following command: + $ sudo yum install openssh-server + + SC-8 + 2418 + 2420 + 2421 + 2422 + SRG-OS-000423-GPOS-00187 + SRG-OS-000423-GPOS-00188 + SRG-OS-000423-GPOS-00189 + SRG-OS000423-GPOS-00190 + RHEL-07-040260 + +Without protection of the transmitted information, confidentiality, and +integrity may be compromised because unprotected communications can be +intercepted and either read or altered. + + + +package_command install openssh-server + + + + + + + + + + Enable the OpenSSH Service + The SSH server service, sshd, is commonly needed. + + The sshd service can be enabled with the following command: + $ sudo systemctl enable sshd.service + + SC-8 + 2418 + 2420 + 2421 + 2422 + SRG-OS-000423-GPOS-00187 + SRG-OS-000423-GPOS-00188 + SRG-OS-000423-GPOS-00189 + SRG-OS000423-GPOS-00190 + RHEL-07-TBD + +Without protection of the transmitted information, confidentiality, and +integrity may be compromised because unprotected communications can be +intercepted and either read or altered. + + + + + + + + + + + Disable SSH Server If Possible (Unusual) + The SSH server service, sshd, is commonly needed. +However, if it can be disabled, do so. + + The sshd service can be disabled with the following command: + $ sudo systemctl disable sshd.service +This is unusual, as SSH is a common method for encrypted and authenticated +remote access. + + Test attestation on 20121024 by DS + + # +# Disable sshd.service for all systemd targets +# +systemctl disable sshd.service + +# +# Stop sshd.service if currently running +# +systemctl stop sshd.service + + + + + + + Verify Permissions on SSH Server Public *.pub Key Files + + + To properly set the permissions of /etc/ssh/*.pub, run the command: + $ sudo chmod 0644 /etc/ssh/*.pub + + AC-6 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040640 + +If a public host key file is modified by an unauthorized user, the SSH service +may be compromised. + + + + + + + + + + + Verify Permissions on SSH Server Private *_key Key Files + + + To properly set the permissions of /etc/ssh/*_key, run the command: + $ sudo chmod 0600 /etc/ssh/*_key + + AC-6 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040650 + +If an unauthorized user obtains the private SSH host key file, the host could be +impersonated. + + + + + + + + + + + Remove SSH Server firewalld Firewall exception (Unusual) + By default, inbound connections to SSH's port are allowed. If +the SSH server is not being used, this exception should be removed from the +firewall configuration. + + + To configure firewalld to not allow access, run the following command(s): + + + +If inbound SSH connections are not expected, disallowing access to the SSH port will +avoid possible exploitation of the port by an attacker. + + + + + + + + Configure OpenSSH Server if Necessary + If the system needs to act as an SSH server, then +certain changes should be made to the OpenSSH daemon configuration +file /etc/ssh/sshd_config. The following recommendations can be +applied to this file. See the sshd_config(5) man page for more +detailed information. + + Allow Only SSH Protocol 2 + Only SSH protocol version 2 connections should be +permitted. The default setting in +/etc/ssh/sshd_config is correct, and can be +verified by ensuring that the following +line appears: +Protocol 2 + + AC-17(8).1(ii) + IA-5(1)(c) + 197 + 366 + 6.2.1 + SRG-OS-000074-GPOS-00042 + SRG-OS-000480-GPOS-00227 + RHEL-07-040590 + Test attestation on 20121024 by DS + +SSH protocol version 1 is an insecure implementation of the SSH protocol and +has many well-known vulnerability exploits. Exploits of the SSH daemon could provide +immediate root access to the system. + + + grep -qi ^Protocol /etc/ssh/sshd_config && \ + sed -i "s/Protocol.*/Protocol 2/gI" /etc/ssh/sshd_config +if ! [ $? -eq 0 ]; then + echo "Protocol 2" >> /etc/ssh/sshd_config +fi + + + + + + + + + + Limit Users' SSH Access + By default, the SSH configuration allows any user with an account +to access the system. In order to specify the users that are allowed to login +via SSH and deny all other users, add or correct the following line in the +/etc/ssh/sshd_config file: +DenyUsers USER1 USER2 +Where USER1 and USER2 are valid user names. + + AC-3 + +Specifying which accounts are allowed SSH access into the system reduces the +possibility of unauthorized access to the system. + + + + + Disable GSSAPI Authentication + Unless needed, SSH should not permit extraneous or unnecessary +authentication mechanisms like GSSAPI. To disable GSSAPI authentication, add or +correct the following line in the /etc/ssh/sshd_config file: +GSSAPIAuthentication no + + CM-6(c) + 368 + 318 + 1812 + 1813 + 1814 + SRG-OS-000364-GPOS-00151 + RHEL-07-040660 + +GSSAPI authentication is used to provide additional authentication mechanisms to +applications. Allowing GSSAPI authentication through SSH exposes the system's +GSSAPI to remote hosts, increasing the attack surface of the system. + + + + + + + + + + + Disable Kerberos Authentication + Unless needed, SSH should not permit extraneous or unnecessary +authentication mechanisms like Kerberos. To disable Kerberos authentication, add +or correct the following line in the /etc/ssh/sshd_config file: +KerberosAuthentication no + + CM-6(c) + 368 + 318 + 1812 + 1813 + 1814 + SRG-OS-000364-GPOS-00151 + RHEL-07-040670 + +Kerberos authentication for SSH is often implemented using GSSAPI. If Kerberos +is enabled through SSH, the SSH daemon provides a means of access to the +system's Kerberos implementation. Vulnerabilities in the system's Kerberos +implementations may be subject to exploitation. + + + + + + + + + + + Enable Use of StictModes + SSHs StrictModes option checks file and ownership permissions in +the user's home directory .ssh folder before accepting login. If world- +writable permissions are found, logon is rejected. To enable StrictModes in SSH, +add or correct the following line in the /etc/ssh/sshd_config file: +StrictModes yes + + AC-6 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040680 + +If other users have access to modify user-specific SSH configuration files, they +may be able to log into the system as another user. + + + + + + + + + + + Enable Use of Privilege Separation + When enabled, SSH will create an unprivileged child process that +has the privilege of the authenticated user. To enable privilege separation in +SSH, add or correct the following line in the /etc/ssh/sshd_config file: +UsePrivilegeSeparation yes + + AC-6 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040690 + +SSH daemon privilege separation causes the SSH process to drop root privileges +when not needed which would decrease the impact of software vulnerabilities in +the unprivileged section. + + + + + + + + + + + Disable Compression Or Set Compression to delayed + Compression is useful for slow network connections over long +distances but can cause performance issues on local LANs. If use of compression +is required, it should be enabled only after a user has authenticated; otherwise +, it should be disabled. To disable compression or delay compression until after +a user has successfully authenticated, add or correct the following line in the +/etc/ssh/sshd_config file: +Compression no or Compression delayed + + CM-6(b) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040700 + +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 wih root privileges. + + + + + + + + + + + Print Last Log + When enabled, SSH will display the date and time of the last +successful account logon. To enable LastLog in +SSH, add or correct the following line in the /etc/ssh/sshd_config file: +PrintLastLog yes + + AC-9 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040300 + +Providing users feedback on when account accesses last occurred facilitates user +recognition and reporting of unauthorized account use. + + + + + + + + + + + Set SSH Idle Timeout Interval + SSH allows administrators to set an idle timeout +interval. +After this interval has passed, the idle user will be +automatically logged out. + +To set an idle timeout interval, edit the following line in /etc/ssh/sshd_config as +follows: +ClientAliveInterval interval +The timeout interval is given in seconds. To have a timeout +of 10 minutes, set interval to 600. + +If a shorter timeout has already been set for the login +shell, that value will preempt any SSH +setting made here. Keep in mind that some processes may stop SSH +from correctly detecting that the user is idle. + + AC-2(5) + SA-8(i) + AC-12 + 1133 + 2361 + SRG-OS-000163-GPOS-00072 + SRG-OS-000279-GPOS-00109 + RHEL-07-040190 + Req-8.1.8 + 6.2.12 + Test attestation on 20121024 by DS + +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 let unattended. + + + +sshd_idle_timeout_value="" + +replace_or_append '/etc/ssh/sshd_config' '^ClientAliveInterval' $sshd_idle_timeout_value 'CCENUM' '%s %s' + + + + + + + + + + + Set SSH Client Alive Count + To ensure the SSH idle timeout occurs precisely when the ClientAliveCountMax is set, +edit /etc/ssh/sshd_config as +follows: +ClientAliveCountMax 0 + + AC-2(5) + SA-8 + AC-12 + 1133 + 2361 + SRG-OS-000163-GPOS-00072 + SRG-OS-000279-GPOS-00109 + RHEL-07-TBD + 6.2.12 + Test attestation on 20121024 by DS + +This ensures a user login will be terminated as soon as the ClientAliveCountMax +is reached. + + + +replace_or_append '/etc/ssh/sshd_config' '^ClientAliveCountMax' '0' 'CCENUM' '%s %s' + + + + + + + + + + Disable SSH Support for .rhosts Files + SSH can emulate the behavior of the obsolete rsh +command in allowing users to enable insecure access to their +accounts via .rhosts files. + +To ensure this behavior is disabled, add or correct the +following line in /etc/ssh/sshd_config: +IgnoreRhosts yes + + AC-3 + + 6.2.6 + +SSH trust relationships mean a compromise on one host +can allow an attacker to move trivially to other hosts. + + + grep -qi ^IgnoreRhosts /etc/ssh/sshd_config && \ + sed -i "s/IgnoreRhosts.*/IgnoreRhosts yes/gI" /etc/ssh/sshd_config +if ! [ $? -eq 0 ]; then + echo "IgnoreRhosts yes" >> /etc/ssh/sshd_config +fi + + + + + + + + + + Disable Host-Based Authentication + SSH's cryptographic host-based authentication is +more secure than .rhosts authentication. However, it is +not recommended that hosts unilaterally trust one another, even +within an organization. + +To disable host-based authentication, add or correct the +following line in /etc/ssh/sshd_config: +HostbasedAuthentication no + + AC-3 + CM-6(b) + 366 + SRG-OS-000480-GPOS-00229 + RHEL-07-010442 + 6.2.7 + Test attestation on 20121024 by DS + +SSH trust relationships mean a compromise on one host +can allow an attacker to move trivially to other hosts. + + + grep -q ^HostbasedAuthentication /etc/ssh/sshd_config && \ + sed -i "s/HostbasedAuthentication.*/HostbasedAuthentication no/g" /etc/ssh/sshd_config +if ! [ $? -eq 0 ]; then + echo "HostbasedAuthentication no" >> /etc/ssh/sshd_config +fi + + + + + + + + + + Enable Encrypted X11 Fordwarding + By default, remote X11 connections are not encrypted when initiated +by users. SSH has the capability to encrypt remote X11 connections when SSH's +X11Forwarding option is enabled. + +To enable X11 Forwarding, add or correct the +following line in /etc/ssh/sshd_config: +X11Forwarding yes + + CM-2(1)(b) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040540 + +Open X displays allow an attacker to capture keystrokes and to execute commands +remotely. + + + + + + + + + + + Disable SSH Root Login + The root user should never be allowed to login to a +system directly over a network. +To disable root login via SSH, add or correct the following line +in /etc/ssh/sshd_config: +PermitRootLogin no + + AC-3 + AC-6(2) + IA-2(1) + IA-2(5) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040310 + 6.2.8 + Test attestation on 20121024 by DS + +Even though the communications channel may be encrypted, an additional layer of +security is gained by extending the policy of not logging directly on as root. +In addition, logging in with a user-specific account provides individual +accountability of actions performed on the system and also helps to minimize +direct attack attempts on root's password. + + + +SSHD_CONFIG='/etc/ssh/sshd_config' + +# Obtain line number of first uncommented case-insensitive occurrence of Match +# block directive (possibly prefixed with whitespace) present in $SSHD_CONFIG +FIRST_MATCH_BLOCK=$(sed -n '/^[[:space:]]*Match[^\n]*/I{=;q}' $SSHD_CONFIG) + +# Obtain line number of first uncommented case-insensitive occurence of +# PermitRootLogin directive (possibly prefixed with whitespace) present in +# $SSHD_CONFIG +FIRST_PERMIT_ROOT_LOGIN=$(sed -n '/^[[:space:]]*PermitRootLogin[^\n]*/I{=;q}' $SSHD_CONFIG) + +# Case: Match block directive not present in $SSHD_CONFIG +if [ -z "$FIRST_MATCH_BLOCK" ] +then + + # Case: PermitRootLogin directive not present in $SSHD_CONFIG yet + if [ -z "$FIRST_PERMIT_ROOT_LOGIN" ] + then + # Append 'PermitRootLogin no' at the end of $SSHD_CONFIG + echo -e "\nPermitRootLogin no" >> $SSHD_CONFIG + + # Case: PermitRootLogin directive present in $SSHD_CONFIG already + else + # Replace first uncommented case-insensitive occurrence + # of PermitRootLogin directive + sed -i "$FIRST_PERMIT_ROOT_LOGIN s/^[[:space:]]*PermitRootLogin.*$/PermitRootLogin no/I" $SSHD_CONFIG + fi + +# Case: Match block directive present in $SSHD_CONFIG +else + + # Case: PermitRootLogin directive not present in $SSHD_CONFIG yet + if [ -z "$FIRST_PERMIT_ROOT_LOGIN" ] + then + # Prepend 'PermitRootLogin no' before first uncommented + # case-insensitive occurrence of Match block directive + sed -i "$FIRST_MATCH_BLOCK s/^\([[:space:]]*Match[^\n]*\)/PermitRootLogin no\n\1/I" $SSHD_CONFIG + + # Case: PermitRootLogin directive present in $SSHD_CONFIG and placed + # before first Match block directive + elif [ "$FIRST_PERMIT_ROOT_LOGIN" -lt "$FIRST_MATCH_BLOCK" ] + then + # Replace first uncommented case-insensitive occurrence + # of PermitRootLogin directive + sed -i "$FIRST_PERMIT_ROOT_LOGIN s/^[[:space:]]*PermitRootLogin.*$/PermitRootLogin no/I" $SSHD_CONFIG + + # Case: PermitRootLogin directive present in $SSHD_CONFIG and placed + # after first Match block directive + else + # Prepend 'PermitRootLogin no' before first uncommented + # case-insensitive occurrence of Match block directive + sed -i "$FIRST_MATCH_BLOCK s/^\([[:space:]]*Match[^\n]*\)/PermitRootLogin no\n\1/I" $SSHD_CONFIG + fi +fi + + + + + + + + + + Disable SSH Access via Empty Passwords + To explicitly disallow SSH login from accounts with +empty passwords, add or correct the following line in /etc/ssh/sshd_config: + +PermitEmptyPasswords no + +Any accounts with empty passwords should be disabled immediately, and PAM configuration +should prevent users from being able to assign themselves empty passwords. + + AC-3 + CM-6(b) + 366 + SRG-OS-000480-GPOS-00229 + RHEL-07-010440 + Test attestation on 20121024 by DS + +Configuring this setting for the SSH daemon provides additional assurance that +remote login via SSH will require a password, even in the event of +misconfiguration elsewhere. + + + +replace_or_append '/etc/ssh/sshd_config' '^PermitEmptyPasswords' 'no' 'CCENUM' '%s %s' + + + + + + + + + + Enable SSH Warning Banner + +To enable the warning banner and ensure it is consistent +across the system, add or correct the following line in /etc/ssh/sshd_config: +Banner /etc/issue +Another section contains information on how to create an +appropriate system-wide warning banner. + + AC-8(a) + AC-8(b) + AC-8(c)(1) + AC-8(c)(2) + AC-8(c)(3) + 48 + 50 + 1384 + 1385 + 1386 + 1387 + 1388 + SRG-OS-000023-GPOS-00006 + SRG-OS-000024-GPOS-00007 + SRG-OS-000228-GPOS-00088 + 6.2.14 + RHEL-07-040170 + Test attestation on 20121024 by DS + +The warning message reinforces policy awareness during the logon process and +facilitates possible legal action against attackers. Alternatively, systems +whose ownership should not be obvious should ensure usage of a banner that does +not provide easy attribution. + + + +replace_or_append '/etc/ssh/sshd_config' '^Banner' '/etc/issue' 'CCENUM' '%s %s' + + + + + + + + + + Do Not Allow SSH Environment Options + To ensure users are not able to override environment +options to the SSH daemon, add or correct the following line +in /etc/ssh/sshd_config: +PermitUserEnvironment no + + CM-6(b) + 366 + SRG-OS-000480-GPOS-00229 + RHEL-07-010441 + 6.2.10 + Test attestation on 20121024 by DS + +SSH environment options potentially allow users to bypass +access restriction in some configurations. + + + +replace_or_append '/etc/ssh/sshd_config' '^PermitUserEnvironment' 'no' 'CCENUM' '%s %s' + + + + + + + + + + Use Only Approved Ciphers + Limit the ciphers to those algorithms which are FIPS-approved. +Counter (CTR) mode is also preferred over cipher-block chaining (CBC) mode. +The following line in /etc/ssh/sshd_config +demonstrates use of FIPS-approved ciphers: +Ciphers aes128-ctr,aes192-ctr,aes256-ctr +The man page sshd_config(5) contains a list of supported ciphers. + + AC-3 + AC-17(2) + AU-10(5) + CM-6(b) + IA-5(1)(c) + IA-7 + 68 + 366 + 803 + SRG-OS-000033-GPOS-00014 + SRG-OS-000120-GPOS-00061 + SRG-OS-000125-GPOS-00065 + SRG-OS-000250-GPOS-00093 + SRG-OS-000393-GPOS-00173 + RHEL-07-040110 + 6.2.11 + Test attestation on 20121024 by DS + +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 system data may be compromised. + +Operating 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 industry and government requirements. For government systems, this allows +Security Levels 1, 2, 3, or 4 for use on Red Hat Enterprise Linux. + + + +replace_or_append '/etc/ssh/sshd_config' '^Ciphers' 'aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc' 'CCENUM' '%s %s' + + + + + + + + + + Use Only FIPS Approved MACs + Limit the MACs to those hash algorithms which are FIPS-approved. +The following line in /etc/ssh/sshd_config +demonstrates use of FIPS-approved MACs: +MACs hmac-sha2-512,hmac-sha2-256 +The man page sshd_config(5) contains a list of supported MACs. + + AC-17(2) + IA-7 + SC-13 + 68 + 803 + 1453 + 2449 + 2450 + SRG-OS-000250-GPOS-00093 + RHEL-07-040620 + +DoD Information Systems are required to use FIPS-approved cryptographic hash +functions. The only SSHv2 hash algorithms meeting this requirement is SHA2. + + + grep -qi ^MACs /etc/ssh/sshd_config && \ + sed -i "s/MACs.*/MACs hmac-sha2-512,hmac-sha2-256,hmac-sha1/gI" /etc/ssh/sshd_config +if ! [ $? -eq 0 ]; then + echo "MACs hmac-sha2-512,hmac-sha2-256,hmac-sha1" >> /etc/ssh/sshd_config +fi + + + + + + + + + + Strengthen Firewall Configuration if Possible + If the SSH server is expected to only receive connections from +the local network, then strengthen the default firewall rule for the SSH service +to only accept connections from the appropriate network segment(s). + +Determine an appropriate network block, netwk, network mask, mask, and +network protocol, ip_protocol, representing the machines on your network which will +be allowed to access this SSH server. + +Run the following command: +firewall-cmd --permanent --add-rich-rule='rule family="ip_protocol" source address="netwk/mask" service name="ssh" accept' + + +Restricting SSH access to only trusted network segments reduces exposure of the SSH +server to attacks from unauthorized networks. + + + + + System Security Services Daemon + +The System Security Services Daemon (SSSD) is a system daemon that provides access +to different identity and authentication providers such as Red Hat's IdM, Microsoft's AD, +openLDAP, MIT Kerberos, etc. It uses a common framework that can provide caching and offline +support to systems utilizing SSSD. SSSD using caching to reduce load on authentication +servers permit offline authentication as well as store extended user user data. + +For more information, see +https://access.redhat.com/documentation/en_US/Red_Hat_Enterprise_Linux/7/html/System-Level_Authentication_Guide/SSSD.html + + + Install the SSSD Package + +The sssd package should be installed. + + The sssd package can be installed with the following command: + $ sudo yum install sssd + + IA-5(10) + TBD + TBD + RHEL-07-TBD + + + + +package_command install sssd + + + + + + + + + + Enable the SSSD Service + The SSSD service should be enabled. + + The sssd service can be enabled with the following command: + $ sudo systemctl enable sssd.service + + IA-5(10) + TBD + TBD + RHEL-07-TBD + + + + # +# Disable sssd.service for all systemd targets +# +systemctl enable sssd.service + +# +# Stop sssd.service if currently running +# +systemctl start sssd.service + + + + + + + + + + Configure SSSD's Memory Cache to Expire + +SSSD's memory cache should be configured to set to expire records after 1 day. +To configure SSSD to expire memory cache, set memcache_timeout to +86400 under the [nss] section in /etc/sssd/sssd.conf. +For example: +[nss] +memcache_timeout = 86400 + + + IA-5(13) + 2007 + SRG-OS-000383-GPOS-00166 + RHEL-07-010400 + +If cached authentication information is out-of-date, the validity of the +authentication information may be questionable. + + + + + + + + + + + Configure SSSD to Expire Offline Credentials + +SSSD should be configured to expire offline credentials after 1 day. +To configure SSSD to expire offline credentials, set +offline_credentials_expiration to 1 under the [nss] +section in /etc/sssd/sssd.conf. For example: +[nss] +offline_credentials_expiration = 1 + + + IA-5(13) + 2007 + SRG-OS-000383-GPOS-00166 + RHEL-07-010401 + +If cached authentication information is out-of-date, the validity of the +authentication information may be questionable. + + + + + + + + + + + Configure SSSD to Expire SSH Known Hosts + +SSSD should be configured to expire keys from known SSH hosts after 1 day. +To configure SSSD to known SSH hosts, set ssh_known_hosts_timeout +to 86400 under the [nss] section in +/etc/sssd/sssd.conf. For example: +[nss] +ssh_known_hosts_timeout = 86400 + + + IA-5(13) + 2007 + SRG-OS-000383-GPOS-00166 + RHEL-07-010402 + +If cached authentication information is out-of-date, the validity of the +authentication information may be questionable. + + + + + + + + + + + + X Window System + The X Window System implementation included with the +system is called X.org. + + Disable X Windows + Unless there is a mission-critical reason for the +system to run a graphical user interface, ensure X is not set to start +automatically at boot and remove the X Windows software packages. +There is usually no reason to run X Windows +on a dedicated server machine, as it increases the system's attack surface and consumes +system resources. Administrators of server systems should instead login via +SSH or on the text console. + + Disable X Windows Startup By Setting Default Target + Systems that do not require a graphical user interface should only boot by +default into multi-user.target mode. This prevents accidental booting of the system +into a graphical.target mode. 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: +rm '/etc/systemd/system/default.target' +ln -s '/usr/lib/systemd/system/multi-user.target' '/etc/systemd/system/default.target' + + AC-17(8).1(ii) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040561 + Test attestation on 20121025 by DS + Services that are not required for system and application processes +must not be active to decrease the attack surface of the system. X windows has a +long history of security vulnerabilities and should not be used unless approved +and documented. + + + + + + + + + + Remove the X Windows Package Group + By removing the xorg-x11-server-common package, the system no longer has X Windows +installed. If X Windows is not installed then the system cannot boot into graphical user mode. +This prevents the system from being accidentally or maliciously booted into a graphical.target +mode. To do so, run the following command: +$ sudo yum groupremove "X Window System" +$ sudo yum remove xorg-x11-server-common + + AC-17(8).1(ii) + 366 + 3.2 + SRG-OS-000480-GPOS-00227 + RHEL-07-040560 + Test attestation on 20121025 by DS + Unnecessary service packages must not be installed to decrease the attack surface of the system. X windows has a long history of security +vulnerabilities and should not be installed unless approved and documented. + + + + + + + + + + + + + Avahi Server + The Avahi daemon implements the DNS Service Discovery +and Multicast DNS protocols, which provide service and host +discovery on a network. It allows a system to automatically +identify resources on the network, such as printers or web servers. +This capability is also known as mDNSresponder and is a major part +of Zeroconf networking. + + Disable Avahi Server if Possible + Because the Avahi daemon service keeps an open network +port, it is subject to network attacks. +Disabling it can reduce the system's vulnerability to such attacks. + + + Disable Avahi Server Software + + + The avahi-daemon service can be disabled with the following command: + $ sudo systemctl disable avahi-daemon.service + + CM-7 + 366 + 3.3 + +Because the Avahi daemon service keeps an open network +port, it is subject to network attacks. Its functionality +is convenient but is only appropriate if the local network +can be trusted. + + + # +# Disable avahi-daemon.service for all systemd targets +# +systemctl disable avahi-daemon.service + +# +# Stop avahi-daemon.service if currently running +# and disable avahi-daemon.socket so the avahi-daemon.service +# can't be activated +# +systemctl stop avahi-daemon.service +systemctl disable avahi-daemon.socket + + + + + + + + + + + Configure Avahi if Necessary + +If your system requires the Avahi daemon, its configuration can be restricted +to improve security. The Avahi daemon configuration file is +/etc/avahi/avahi-daemon.conf. The following security recommendations +should be applied to this file: +See the avahi-daemon.conf(5) man page, or documentation at +http://www.avahi.org, for more detailed information about the configuration options. + + + Serve Avahi Only via Required Protocol + +If you are using only IPv4, edit /etc/avahi/avahi-daemon.conf and ensure +the following line exists in the [server] section: +use-ipv6=no +Similarly, if you are using only IPv6, disable IPv4 sockets with the line: +use-ipv4=no + + CM-7 + + + + Check Avahi Responses' TTL Field + +To make Avahi ignore packets unless the TTL field is 255, edit +/etc/avahi/avahi-daemon.conf and ensure the following line +appears in the [server] section: +check-response-ttl=yes + + CM-7 + +This helps to ensure that only mDNS responses from the local network are +processed, because the TTL field in a packet is decremented from its initial +value of 255 whenever it is routed from one network to another. Although a +properly-configured router or firewall should not allow mDNS packets into +the local network at all, this option provides another check to ensure they +are not permitted. + + + + + Prevent Other Programs from Using Avahi's Port + +To prevent other mDNS stacks from running, edit /etc/avahi/avahi-daemon.conf +and ensure the following line appears in the [server] section: +disallow-other-stacks=yes + + CM-7 + +This helps ensure that only Avahi is responsible for mDNS traffic coming from +that port on the system. + + + + + Disable Avahi Publishing + +To prevent other mDNS stacks from running, edit /etc/avahi/avahi-daemon.conf +and ensure the following line appears in the [server] section: +disallow-other-stacks=yes + + CM-7 + +This helps ensure that only Avahi is responsible for mDNS traffic coming from +that port on the system. + + + + + Restrict Information Published by Avahi + +If it is necessary to publish some information to the network, it should not be joined +by any extraneous information, or by information supplied by a non-trusted source +on the system. +Prevent user applications from using Avahi to publish services by adding or +correcting the following line in the [publish] section: +disable-user-service-publishing=yes +Implement as many of the following lines as possible, to restrict the information +published by Avahi. +publish-addresses=no +publish-hinfo=no +publish-workstation=no +publish-domain=no +Inspect the files in the directory /etc/avahi/services/. Unless there +is an operational need to publish information about each of these services, +delete the corresponding file. + + CM-7 + +These options prevent publishing attempts from succeeding, +and can be applied even if publishing is disabled entirely via +disable-publishing. Alternatively, these can be used to restrict +the types of published information in the event that some information +must be published. + + + + + + + Print Support + The Common Unix Printing System (CUPS) service provides both local +and network printing support. A system running the CUPS service can accept +print jobs from other systems, process them, and send them to the appropriate +printer. It also provides an interface for remote administration through a web +browser. The CUPS service is installed and activated by default. The project +homepage and more detailed documentation are available at http://www.cups.org. + + + Disable the CUPS Service + + + The cups service can be disabled with the following command: + $ sudo systemctl disable cups.service + + CM-7 + 3.4 + Turn off unneeded services to reduce attack surface. + + + # +# Disable cups.service for all systemd targets +# +systemctl disable cups.service + +# +# Stop cups.service if currently running +# and disable cups.path and cups.socket so +# cups.service can't be activated +# +systemctl stop cups.service +systemctl disable cups.path +systemctl disable cups.socket + + + + + + + + + + Configure the CUPS Service if Necessary + CUPS provides the ability to easily share local printers with +other machines over the network. It does this by allowing machines to share +lists of available printers. Additionally, each machine that runs the CUPS +service can potentially act as a print server. Whenever possible, the printer +sharing and print server capabilities of CUPS should be limited or disabled. +The following recommendations should demonstrate how to do just that. + + + Disable Printer Browsing Entirely if Possible + By default, CUPS listens on the network for printer list +broadcasts on UDP port 631. This functionality is called printer browsing. +To disable printer browsing entirely, edit the CUPS configuration +file, located at /etc/cups/cupsd.conf, to include the following: +Browsing Off + + CM-7 + The CUPS print service can be configured to broadcast a list of +available printers to the network. Other machines on the network, also running +the CUPS print service, can be configured to listen to these broadcasts and add +and configure these printers for immediate use. By disabling this browsing +capability, the machine will no longer generate or receive such broadcasts. + + + + + + + + Disable Print Server Capabilities + To prevent remote users from potentially connecting to and using +locally configured printers, disable the CUPS print server sharing +capabilities. To do so, limit how the server will listen for print jobs by +removing the more generic port directive from /etc/cups/cupsd.conf: +Port 631 +and replacing it with the Listen directive: +Listen localhost:631 +This will prevent remote users from printing to locally configured printers +while still allowing local users on the machine to print normally. + + CM-7 + By default, locally configured printers will not be shared over the +network, but if this functionality has somehow been enabled, these +recommendations will disable it again. Be sure to disable outgoing printer list +broadcasts, or remote users will still be able to see the locally configured +printers, even if they cannot actually print to them. To limit print serving to +a particular set of users, use the Policy directive. + + + + + + + + + + DHCP + The Dynamic Host Configuration Protocol (DHCP) allows +systems to request and obtain an IP address and other configuration +parameters from a server. + +This guide recommends configuring networking on clients by manually editing +the appropriate files under /etc/sysconfig. Use of DHCP can make client +systems vulnerable to compromise by rogue DHCP servers, and should be avoided +unless necessary. If using DHCP is necessary, however, there are best practices +that should be followed to minimize security risk. + + + Disable DHCP Server + +The DHCP server dhcpd is not installed or activated by +default. If the software was installed and activated, but the +system does not need to act as a DHCP server, it should be disabled +and removed. + + + Disable DHCP Service + The dhcpd service should be disabled on +any system that does not need to act as a DHCP server. + + The dhcpd service can be disabled with the following command: + $ sudo systemctl disable dhcpd.service + + CM-7 + 366 + Test attestation on 20121024 by DS + +Unmanaged or unintentionally activated DHCP servers may provide faulty information +to clients, interfering with the operation of a legitimate site +DHCP server if there is one. + + + # +# Disable dhcpd.service for all systemd targets +# +systemctl disable dhcpd.service + +# +# Stop dhcpd.service if currently running +# +systemctl stop dhcpd.service + + + + + + + + + + Uninstall DHCP Server Package + If the system does not need to act as a DHCP server, +the dhcp package can be uninstalled. + + The dhcp package can be removed with the following command: + $ sudo yum erase dhcp + + CM-7 + 366 + 3.5 + Test attestation on 20121024 by DS + +Removing the DHCP server ensures that it cannot be easily or +accidentally reactivated and disrupt network operation. + + + +package_command remove dhcp + + + + + + + + + + + Disable DHCP Server + If the system must act as a DHCP server, the configuration +information it serves should be minimized. Also, support for other protocols +and DNS-updating schemes should be explicitly disabled unless needed. The +configuration file for dhcpd is called /etc/dhcp/dhcpd.conf. The file +begins with a number of global configuration options. The remainder of the file +is divided into sections, one for each block of addresses offered by dhcpd, +each of which contains configuration options specific to that address +block. + + Do Not Use Dynamic DNS + To prevent the DHCP server from receiving DNS information from +clients, edit /etc/dhcp/dhcpd.conf, and add or correct the following global +option: ddns-update-style none; + + The ddns-update-style option controls only whether +the DHCP server will attempt to act as a Dynamic DNS client. As long as the DNS +server itself is correctly configured to reject DDNS attempts, an incorrect +ddns-update-style setting on the client is harmless (but should be fixed as a +best practice). + CM-7 + The Dynamic DNS protocol is used to remotely update the data served +by a DNS server. DHCP servers can use Dynamic DNS to publish information about +their clients. This setup carries security risks, and its use is not +recommended. If Dynamic DNS must be used despite the risks it poses, it is +critical that Dynamic DNS transactions be protected using TSIG or some other +cryptographic authentication mechanism. See dhcpd.conf(5) for more information +about protecting the DHCP server from passing along malicious DNS data from its +clients. + + + + Deny Decline Messages + Edit /etc/dhcp/dhcpd.conf and add or correct the following +global option to prevent the DHCP server from responding the DHCPDECLINE +messages, if possible: deny declines; + CM-7 + The DHCPDECLINE message can be sent by a DHCP client to indicate +that it does not consider the lease offered by the server to be valid. By +issuing many DHCPDECLINE messages, a malicious client can exhaust the DHCP +server's pool of IP addresses, causing the DHCP server to forget old address +allocations. + + + + Deny BOOTP Queries + Unless your network needs to support older BOOTP clients, disable +support for the bootp protocol by adding or correcting the global option: +deny bootp; + + CM-7 + The bootp option tells dhcpd to respond to BOOTP queries. If support +for this simpler protocol is not needed, it should be disabled to remove attack +vectors against the DHCP server. + + + + + Minimize Served Information + Edit /etc/dhcp/dhcpd.conf. Examine each address range section within +the file, and ensure that the following options are not defined unless there is +an operational need to provide this information via DHCP: +option domain-name +option domain-name-servers +option nis-domain +option nis-servers +option ntp-servers +option routers +option time-offset + + By default, the Red Hat Enterprise Linux client installation uses DHCP +to request much of the above information from the DHCP server. In particular, +domain-name, domain-name-servers, and routers are configured via DHCP. These +settings are typically necessary for proper network functionality, but are also +usually static across machines at a given site. + CM-7 + Because the configuration information provided by the DHCP server +could be maliciously provided to clients by a rogue DHCP server, the amount of +information provided via DHCP should be minimized. Remove these definitions +from the DHCP server configuration to ensure that legitimate clients do not +unnecessarily rely on DHCP for this information. + + + + Configure Logging + Ensure that the following line exists in +/etc/rsyslog.conf: +daemon.* /var/log/daemon.log +Configure logwatch or other log monitoring tools to summarize error conditions +reported by the dhcpd process. + AU-12 + By default, dhcpd logs notices to the daemon facility. Sending all +daemon messages to a dedicated log file is part of the syslog configuration +outlined in the Logging and Auditing section + + + + + Disable DHCP Client + +DHCP is the default network configuration method provided by the system +installer, and common on many networks. Nevertheless, manual management +of IP addresses for systems implies a greater degree of management and +accountability for network activity. + + + Disable DHCP Client + +For each interface on the system (e.g. eth0), edit +/etc/sysconfig/network-scripts/ifcfg-interface and make the +following changes: + Correct the BOOTPROTO line to read: +BOOTPROTO=none + Add or correct the following lines, substituting the appropriate +values based on your site's addressing scheme: +NETMASK=255.255.255.0 +IPADDR=192.168.1.2 +GATEWAY=192.168.1.1 + + + CM-7 + 366 + Test attestation on 20121024 by DS + +DHCP relies on trusting the local network. If the local network is not trusted, +then it should not be used. However, the automatic configuration provided by +DHCP is commonly used and the alternative, manual configuration, presents an +unacceptable burden in many circumstances. + + + + + + + + + + + Configure DHCP Client if Necessary + If DHCP must be used, then certain configuration changes can +minimize the amount of information it receives and applies from the network, +and thus the amount of incorrect information a rogue DHCP server could +successfully distribute. For more information on configuring dhclient, see the +dhclient(8) and dhclient.conf(5) man pages. + + Minimize the DHCP-Configured Options + Create the file /etc/dhcp/dhclient.conf, and add an +appropriate setting for each of the ten configuration settings which can be +obtained via DHCP. For each setting, do one of the following: + +If the setting should not be configured remotely by the DHCP server, +select an appropriate static value, and add the line: +supersede setting value; +If the setting should be configured remotely by the DHCP server, add the lines: +request setting; +require setting; +For example, suppose the DHCP server should provide only the IP address itself +and the subnet mask. Then the entire file should look like: +supersede domain-name "example.com"; +supersede domain-name-servers 192.168.1.2; +supersede nis-domain ""; +supersede nis-servers ""; +supersede ntp-servers "ntp.example.com "; +supersede routers 192.168.1.1; +supersede time-offset -18000; +request subnet-mask; +require subnet-mask; + + In this example, the options nis-servers and +nis-domain are set to empty strings, on the assumption that the deprecated NIS +protocol is not in use. It is necessary to supersede settings for unused +services so that they cannot be set by a hostile DHCP server. If an option is +set to an empty string, dhclient will typically not attempt to configure the +service. + By default, the DHCP client program, dhclient, requests and applies +ten configuration options (in addition to the IP address) from the DHCP server. +subnet-mask, broadcast-address, time-offset, routers, domain-name, +domain-name-servers, host-name, nis-domain, nis-servers, and ntp-servers. Many +of the options requested and applied by dhclient may be the same for every +system on a network. It is recommended that almost all configuration options be +assigned statically, and only options which must vary on a host-by-host basis +be assigned via DHCP. This limits the damage which can be done by a rogue DHCP +server. If appropriate for your site, it is also possible to supersede the +host-name directive in /etc/dhcp/dhclient.conf, establishing a static +hostname for the machine. However, dhclient does not use the host name option +provided by the DHCP server (instead using the value provided by a reverse DNS +lookup). + + + + + Network Time Protocol + The Network Time Protocol is used to manage the system +clock over a network. Computer clocks are not very accurate, so +time will drift unpredictably on unmanaged systems. Central time +protocols can be used both to ensure that time is consistent among +a network of machines, and that their time is consistent with the +outside world. + +If every system on a network reliably reports the same time, then it is much +easier to correlate log messages in case of an attack. In addition, a number of +cryptographic protocols (such as Kerberos) use timestamps to prevent certain +types of attacks. If your network does not have synchronized time, these +protocols may be unreliable or even unusable. + +Depending on the specifics of the network, global time accuracy may be just as +important as local synchronization, or not very important at all. If your +network is connected to the Internet, using a public timeserver (or one +provided by your enterprise) provides globally accurate timestamps which may be +essential in investigating or responding to an attack which originated outside +of your network. + +A typical network setup involves a small number of internal systems operating +as NTP servers, and the remainder obtaining time information from those +internal servers. + +There is a choice between the daemons ntpd and chronyd, which +are available from the repositories in the ntp and chrony +packages respectively. + +The default chronyd daemon can work well when external time references +are only intermittently accesible, can perform well even when the network is +congested for longer periods of time, can usually synchronize the clock faster +and with better time accuracy, and quickly adapts to sudden changes in the rate +of the clock, for example, due to changes in the temperature of the crystal +oscillator. Chronyd should be considered for all systems which are +frequently suspended or otherwise intermittently disconnected and reconnected +to a network. Mobile and virtual systems for example. + +The ntpd NTP daemon fully supports NTP protocol version 4 (RFC 5905), +including broadcast, multicast, manycast clients and servers, and the orphan +mode. It also supports extra authentication schemes based on public-key +cryptography (RFC 5906). The NTP daemon (ntpd) should be considered +for systems which are normally kept permanently on. Systems which are required +to use broadcast or multicast IP, or to perform authentication of packets with +the Autokey protocol, should consider using ntpd. + +Refer to https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Configuring_NTP_Using_the_chrony_Suite.html for more detailed comparison of features of chronyd +and ntpd daemon features respectively, and for further guidance how to +choose between the two NTP daemons. + +The upstream manual pages at http://chrony.tuxfamily.org/manual.html for +chronyd and http://www.ntp.org for ntpd provide additional +information on the capabilities and configuration of each of the NTP daemons. + + + Vendor Approved Time Servers + The list of vendor-approved time servers + 0.rhel.pool.ntp.org,1.rhel.pool.ntp.org,2.rhel.pool.ntp.org,3.rhel.pool.ntp.org + 0.fedora.pool.ntp.org,1.fedora.pool.ntp.org,2.fedora.pool.ntp.org,3.fedora.pool.ntp.org + + + Enable the NTP Daemon + + The chronyd service can be enabled with the following command: + $ sudo systemctl enable chronyd.service +Note: The chronyd daemon is enabled by default. + + + The ntpd service can be enabled with the following command: + $ sudo systemctl enable ntpd.service +Note: The ntpd daemon is not enabled by default. Though as mentioned +in the previous sections in certain environments the ntpd daemon might +be preferred to be used rather than the chronyd one. Refer to: + https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Configuring_NTP_Using_the_chrony_Suite.html +for guidance which NTP daemon to choose depending on the environment used. + + AU-8(1) + 160 + Req-10.4 + 3.6 + Test attestation on 20121024 by DS + Enabling some of chronyd or ntpd services ensures +that the NTP daemon will be running and that the system will synchronize its +time to any servers specified. This is important whether the system is +configured to be a client (and synchronize only its own clock) or it is also +acting as an NTP server to other systems. Synchronizing time is essential for +authentication services such as Kerberos, but it is also important for +maintaining accurate logs and auditing possible security breaches. + +The chronyd and ntpd NTP daemons offer all of the +functionality of ntpdate, which is now deprecated. Additional +information on this is available at +http://support.ntp.org/bin/view/Dev/DeprecatingNtpdate + + + +if ! `rpm -q --quiet chrony` && ! `rpm -q --quiet ntp-`; then + + package_command install chrony + service_command enable chronyd +elif `rpm -q --quiet chrony`; then + if ! [ `/usr/sbin/pidof ntpd` ] ; then + + service_command enable chronyd + fi +else + + service_command enable ntpd +fi + + + + + + + + + + Specify a Remote NTP Server + Depending on specific functional requirements of a concrete +production environment, the Red Hat Enterprise Linux 7 Server system can be +configured to utilize the services of the chronyd NTP daemon (the +default), or services of the ntpd NTP daemon. Refer to +https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Configuring_NTP_Using_the_chrony_Suite.html +for more detailed comparison of the features of both of the choices, and for +further guidance how to choose between the two NTP daemons. + +To specify a remote NTP server for time synchronization, perform the following: + if the system is configured to use the chronyd as the NTP daemon (the +default), edit the file /etc/chrony.conf as follows, if the system is configured to use the ntpd as the NTP daemon, +edit the file /etc/ntp.conf as documented below. +Add or correct the following lines, substituting the IP or hostname of a remote +NTP server for ntpserver: +server ntpserver +This instructs the NTP software to contact that remote server to obtain time +data. + + AU-8(1) + 160 + Req-10.4.1 + Req-10.4.3 + 3.6 + Test attestation on 20121024 by DS + Synchronizing with an NTP server makes it possible to collate system +logs from multiple sources or correlate computer events with real time events. + + + +var_multiple_time_servers="" + +if ! `/usr/sbin/pidof ntpd`; then + if ! `grep -q ^server /etc/chrony.conf` ; then + if ! `grep -q '#[[:space:]]*server' /etc/chrony.conf` ; then + for i in `echo "$var_multiple_time_servers" | tr ',' '\n'` ; do + echo -ne "\nserver $i iburst" >> /etc/chrony.conf + done + else + sed -i 's/#[ ]*server/server/g' /etc/chrony.conf + fi + fi +else + if ! `grep -q ^server /etc/ntp.conf` ; then + if ! `grep -q '#[[:space:]]*server' /etc/ntp.conf` ; then + for i in `echo "$var_multiple_time_servers" | tr ',' '\n'` ; do + echo -ne "\nserver $i iburst" >> /etc/ntp.conf + done + else + sed -i 's/#[ ]*server/server/g' /etc/ntp.conf + fi + fi +fi + + + + + + + + + + Specify Additional Remote NTP Servers + Depending on specific functional requirements of a concrete +production environment, the Red Hat Enterprise Linux 7 Server system can be +configured to utilize the services of the chronyd NTP daemon (the +default), or services of the ntpd NTP daemon. Refer to +https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Configuring_NTP_Using_the_chrony_Suite.html +for more detailed comparison of the features of both of the choices, and for +further guidance how to choose between the two NTP daemons. + +Additional NTP servers can be specified for time synchronization. To do so, +perform the following: + if the system is configured to use the chronyd as the NTP daemon +(the default), edit the file /etc/chrony.conf as follows, if the system is configured to use the ntpd as the NTP daemon, +edit the file /etc/ntp.conf as documented below. +Add additional lines of the following form, substituting the IP address or +hostname of a remote NTP server for ntpserver: +server ntpserver + + AU-8(1) + Req-10.4.3 + Specifying additional NTP servers increases the availability of +accurate time data, in the event that one of the specified servers becomes +unavailable. This is typical for a system acting as an NTP server for +other systems. + + + +var_multiple_time_servers="" + +if ! `/usr/sbin/pidof ntpd`; then + if [ `grep -c '^server' /etc/chrony.conf` -lt 2 ]; then + if ! `grep -q '#[[:space:]]*server' /etc/chrony.conf` ; then + for i in `echo "$var_multiple_time_servers" | tr ',' '\n'` ; do + echo -ne "\nserver $i iburst" >> /etc/chrony.conf + done + else + sed -i 's/#[ ]*server/server/g' /etc/chrony.conf + fi + fi +else + if [ `grep -c '^server' /etc/ntp.conf` -lt 2 ]; then + if ! `grep -q '#[[:space:]]*server' /etc/ntp.conf` ; then + for i in `echo "$var_multiple_time_servers" | tr ',' '\n'` ; do + echo -ne "\nserver $i iburst" >> /etc/ntp.conf + done + else + sed -i 's/#[ ]*server/server/g' /etc/ntp.conf + fi + fi +fi + + + + + + + + Mail Server Software + +Mail servers are used to send and receive email over the network. +Mail is a very common service, and Mail Transfer Agents (MTAs) are obvious +targets of network attack. +Ensure that machines are not running MTAs unnecessarily, +and configure needed MTAs as defensively as possible. + +Very few systems at any site should be configured to directly receive email over the +network. Users should instead use mail client programs to retrieve email +from a central server that supports protocols such as IMAP or POP3. +However, it is normal for most systems to be independently capable of sending email, +for instance so that cron jobs can report output to an administrator. +Most MTAs, including Postfix, support a submission-only mode in which mail can be sent from +the local system to a central site MTA (or directly delivered to a local account), +but the system still cannot receive mail directly over a network. + +The alternatives program in Red Hat Enterprise Linux permits selection of other mail server software +(such as Sendmail), but Postfix is the default and is preferred. +Postfix was coded with security in mind and can also be more effectively contained by +SELinux as its modular design has resulted in separate processes performing specific actions. +More information is available on its website, http://www.postfix.org. + + + Enable Postfix Service + The Postfix mail transfer agent is used for local mail delivery +within the system. The default configuration only listens for connections to +the default SMTP port (port 25) on the loopback interface (127.0.0.1). It is +recommended to leave this service enabled for local mail delivery. + + The postfix service can be enabled with the following command: + $ sudo systemctl enable postfix.service + + Test attestation on 20121024 by DS + Local mail delivery is essential to some system maintenance and +notification tasks. + + + # +# Enable postfix.service for all systemd targets +# +systemctl enable postfix.service + +# +# Start postfix.service if not currently running +# +systemctl start postfix.service + + + + + + + + + + Uninstall Sendmail Package + Sendmail is not the default mail transfer agent and is +not installed by default. + + The sendmail package can be removed with the following command: + $ sudo yum erase sendmail + + CM-7 + Test attestation on 20121024 by DS + The sendmail software was not developed with security in mind and +its design prevents it from being effectively contained by SELinux. Postfix +should be used instead. + + + + + + + + + + + Configure SMTP For Mail Clients + This section discusses settings for Postfix in a submission-only +e-mail configuration. + + Disable Postfix Network Listening + +Edit the file /etc/postfix/main.cf to ensure that only the following +inet_interfaces line appears: +inet_interfaces = localhost + + CM-7 + 382 + 3.16 + Test attestation on 20121024 by DS + +This ensures postfix accepts mail messages +(such as cron job reports) from the local system only, +and not from the network, which protects it from network attack. + + + + + + + + + + + + Configure Operating System to Protect Mail Server + + The guidance in this section is appropriate for any host which is +operating as a site MTA, whether the mail server runs using Sendmail, Postfix, +or some other software. + + + Configure SSL Certificates for Use with SMTP AUTH + +If SMTP AUTH is to be used, the use of SSL to protect credentials in transit is strongly recommended. +There are also configurations for which it may be desirable to encrypt all mail in transit from one MTA to another, +though such configurations are beyond the scope of this guide. In either event, the steps for creating and installing +an SSL certificate are independent of the MTA in use, and are described here. + + + Ensure Security of Postfix SSL Certificate + Create the PKI directory for mail certificates, if it does not already exist: +$ sudo mkdir /etc/pki/tls/mail +$ sudo chown root:root /etc/pki/tls/mail +$ sudo chmod 755 /etc/pki/tls/mail +Using removable media or some other secure transmission format, install the files generated in the previous +step onto the mail server: +/etc/pki/tls/mail/serverkey.pem: the private key mailserverkey.pem +/etc/pki/tls/mail/servercert.pem: the certificate file mailservercert.pem +Verify the ownership and permissions of these files: +$ sudo chown root:root /etc/pki/tls/mail/serverkey.pem +$ sudo chown root:root /etc/pki/tls/mail/servercert.pem +$ sudo chmod 600 /etc/pki/tls/mail/serverkey.pem +$ sudo chmod 644 /etc/pki/tls/mail/servercert.pem +Verify that the CA's public certificate file has been installed as /etc/pki/tls/CA/cacert.pem, and has the +correct permissions: +$ sudo chown root:root /etc/pki/tls/CA/cacert.pem +$ sudo chmod 644 /etc/pki/tls/CA/cacert.pem + + + + + Configure Postfix if Necessary + Postfix stores its configuration files in the directory +/etc/postfix by default. The primary configuration file is +/etc/postfix/main.cf. + + + Configure SMTP Greeting Banner + Edit /etc/postfix/main.cf, and add or correct the +following line, substituting some other wording for the banner information if +you prefer: +smtpd_banner = $myhostname ESMTP + + AC-22 + AU-13 + The default greeting banner discloses that the listening mail +process is Postfix. When remote mail senders connect to the MTA on port 25, +they are greeted by an initial banner as part of the SMTP dialogue. This banner +is necessary, but it frequently gives away too much information, including the +MTA software which is in use, and sometimes also its version number. Remote +mail senders do not need this information in order to send mail, so the banner +should be changed to reveal only the hostname (which is already known and may +be useful) and the word ESMTP, to indicate that the modern SMTP protocol +variant is supported. + + + + + + + + Configure Postfix Resource Usage to Limit Denial of Service Attacks + Edit /etc/postfix/main.cf. Edit the following lines to +configure the amount of system resources Postfix can consume: +default_process_limit = 100 +smtpd_client_connection_count_limit = 10 +smtpd_client_connection_rate_limit = 30 +queue_minfree = 20971520 +header_size_limit = 51200 +message_size_limit = 10485760 +smtpd_recipient_limit = 100 +The values here are examples. + + Note: The values given here are examples, and may +need to be modified for any particular site. By default, the Postfix anvil +process gathers mail receipt statistics. To get information about about what +connection rates are typical at your site, look in /var/log/maillog +for lines with the daemon name postfix/anvil. + + These configuration options serve to make it more difficult for +attackers to consume resources on the MTA host. The +default_process_limit parameter controls how many smtpd +processes can exist at a time, while +smtpd_client_connection_count_limit controls the number of those which +can be occupied by any one remote sender, and +smtpd_client_connection_rate_limit controls the number of connections +any one client can make per minute. By default, local hosts (those in +mynetworks) are exempted from per-client rate limiting. The +queue_minfree parameter establishes a free space threshold, in order +to stop e-mail receipt before the queue filesystem is entirely full. The +header_size_limit, message_size_limit, and +smtpd_recipient_limit parameters place bounds on the legal sizes of +messages received via SMTP. + + + + Control Mail Relaying + Postfix's mail relay controls are implemented with the help of the +smtpd recipient restrictions option, which controls the restrictions placed on +the SMTP dialogue once the sender and recipient envelope addresses are known. +The guidance in the following sections should be applied to all machines. If +there are machines which must be allowed to relay mail, but which cannot be +trusted to relay unconditionally, configure SMTP AUTH with SSL support. + + + Configure Trusted Networks and Hosts + Edit /etc/postfix/main.cf, and configure the contents of +the mynetworks variable in one of the following ways: +If any machine in the subnet containing the MTA may be trusted to relay +messages, add or correct the following line: +mynetworks_style = subnet +This is also the default setting, and is in effect if all +my_networks_style directives are commented.If only the MTA host itself is trusted to relay messages, add or correct +the following line: +mynetworks_style = hostIf the set of machines which can relay is more complicated, manually +specify an entry for each netblock or IP address which is trusted to relay by +setting the mynetworks variable directly: +mynetworks = 10.0.0.0/16, 192.168.1.0/24, 127.0.0.1 + + The mynetworks variable must contain only the set of +machines for which this MTA should unconditionally relay mail. This is a trust +relationship - if spammers gain access to these machines, your site will +effectively become an open relay. It is recommended that only machines which +are managed by you or by another trusted organization be placed in mynetworks, +and users of all other machines be required to use SMTP AUTH to send mail. + + + + Enact SMTP Relay Restrictions + +To configure Postfix to restrict addresses to which it +will send mail, see: +http://www.postfix.org/SMTPD_ACCESS_README.html#danger + +The full contents of smtpd_recipient_restrictions will +vary by site, since this is a common place to put spam restrictions and other +site-specific options. The permit_mynetworks option allows all mail to +be relayed from the machines in mynetworks. Then, the +reject_unauth_destination option denies all mail whose destination +address is not local, preventing any other machines from relaying. These two +options should always appear in this order, and should usually follow one +another immediately unless SMTP AUTH is used. + + + + Enact SMTP Recipient Restrictions + +To configure Postfix to restrict addresses to which it +will send mail, see: +http://www.postfix.org/SMTPD_ACCESS_README.html#danger + +The full contents of smtpd_recipient_restrictions will +vary by site, since this is a common place to put spam restrictions and other +site-specific options. The permit_mynetworks option allows all mail to +be relayed from the machines in mynetworks. Then, the +reject_unauth_destination option denies all mail whose destination +address is not local, preventing any other machines from relaying. These two +options should always appear in this order, and should usually follow one +another immediately unless SMTP AUTH is used. + + + + Require SMTP AUTH Before Relaying from Untrusted Clients + SMTP authentication allows remote clients to relay mail safely by +requiring them to authenticate before submitting mail. Postfix's SMTP AUTH uses +an authentication library called SASL, which is not part of Postfix itself. To +enable the use of SASL authentication, see +http://www.postfix.org/SASL_README.html + + + + Use TLS for SMTP AUTH + +Postfix provides options to use TLS for certificate-based +authentication and encrypted sessions. An encrypted session protects the +information that is transmitted with SMTP mail or with SASL authentication. +To configure Postfix to protect all SMTP AUTH transactions +using TLS, see http://www.postfix.org/TLS_README.html. + + + + + + + + LDAP + LDAP is a popular directory service, that is, a +standardized way of looking up information from a central database. +Red Hat Enterprise Linux 7 includes software that enables a system to act as both +an LDAP client and server. + + + Configure OpenLDAP Clients + This section provides information on which security settings are +important to configure in OpenLDAP clients by manually editing the appropriate +configuration files. Red Hat Enterprise Linux 7 provides an automated configuration tool called +authconfig and a graphical wrapper for authconfig called +system-config-authentication. However, these tools do not provide as +much control over configuration as manual editing of configuration files. The +authconfig tools do not allow you to specify locations of SSL certificate +files, which is useful when trying to use SSL cleanly across several protocols. +Installation and configuration of OpenLDAP on Red Hat Enterprise Linux 7 is available at +https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html. + + Before configuring any system to be an +LDAP client, ensure that a working LDAP server is present on the +network. + + Configure LDAP Client to Use TLS For All Transactions + Configure LDAP to enforce TLS use. First, edit the file +/etc/nslcd.conf, and add or correct the following lines: +ssl start_tls +Then review the LDAP server and ensure TLS has been configured. + + CM-7 + 776 + 778 + 1453 + Test attestation on 20121024 by DS + The ssl directive specifies whether to use ssl or not. If +not specified it will default to no. It should be set to start_tls rather +than doing LDAP over SSL. + + + + + + + + + + Configure Certificate Directives for LDAP Use of TLS + Ensure a copy of a trusted CA certificate has been placed in +the file /etc/pki/tls/CA/cacert.pem. Configure LDAP to enforce TLS +use and to trust certificates signed by that CA. First, edit the file +/etc/nslcd.conf, and add or correct either of the following lines: +tls_cacertdir /etc/pki/tls/CA +or +tls_cacertfile /etc/pki/tls/CA/cacert.pem +Then review the LDAP server and ensure TLS has been configured. + + CM-7 + 776 + 778 + 1453 + Test attestation on 20121024 by DS + The tls_cacertdir or tls_cacertfile directives are required when +tls_checkpeer is configured (which is the default for openldap versions 2.1 and +up). These directives define the path to the trust certificates signed by the +site CA. + + + + + + + + + + + Configure OpenLDAP Server + This section details some security-relevant settings +for an OpenLDAP server. Installation and configuration of OpenLDAP on Red Hat Enterprise Linux 7 is available at: +https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html. + + + Uninstall openldap-servers Package + The openldap-servers package should be removed if not in use. +Is this machine the OpenLDAP server? If not, remove the package. +$ sudo yum erase openldap-servers +The openldap-servers RPM is not installed by default on Red Hat Enterprise Linux 7 +machines. It is needed only by the OpenLDAP server, not by the +clients which use LDAP for authentication. If the system is not +intended for use as an LDAP Server it should be removed. + + CM-7 + 366 + 3.7 + Test attestation on 20121024 by DS + Unnecessary packages should not be installed to decrease the attack +surface of the system. While this software is clearly essential on an LDAP +server, it is not necessary on typical desktop or workstation systems. + + + + + + + + + + + Install and Protect LDAP Certificate Files + Create the PKI directory for LDAP certificates if it does not already exist: +$ sudo mkdir /etc/pki/tls/ldap +$ sudo chown root:root /etc/pki/tls/ldap +$ sudo chmod 755 /etc/pki/tls/ldap +Using removable media or some other secure transmission format, install the certificate files +onto the LDAP server: +/etc/pki/tls/ldap/serverkey.pem: the private key ldapserverkey.pem/etc/pki/tls/ldap/servercert.pem: the certificate file ldapservercert.pem +Verify the ownership and permissions of these files: +$ sudo chown root:ldap /etc/pki/tls/ldap/serverkey.pem +$ sudo chown root:ldap /etc/pki/tls/ldap/servercert.pem +$ sudo chmod 640 /etc/pki/tls/ldap/serverkey.pem +$ sudo chmod 640 /etc/pki/tls/ldap/servercert.pem +Verify that the CA's public certificate file has been installed as +/etc/pki/tls/CA/cacert.pem, and has the correct permissions: +$ sudo mkdir /etc/pki/tls/CA +$ sudo chown root:root /etc/pki/tls/CA/cacert.pem +$ sudo chmod 644 /etc/pki/tls/CA/cacert.pem + +As a result of these steps, the LDAP server will have access to its own private +certificate and the key with which that certificate is encrypted, and to the +public certificate file belonging to the CA. Note that it would be possible for +the key to be protected further, so that processes running as ldap could not +read it. If this were done, the LDAP server process would need to be restarted +manually whenever the server rebooted. + + + + + + NFS and RPC + The Network File System is a popular distributed filesystem for +the Unix environment, and is very widely deployed. This section discusses the +circumstances under which it is possible to disable NFS and its dependencies, +and then details steps which should be taken to secure +NFS's configuration. This section is relevant to machines operating as NFS +clients, as well as to those operating as NFS servers. + + + Disable All NFS Services if Possible + If there is not a reason for the system to operate as either an +NFS client or an NFS server, follow all instructions in this section to disable +subsystems required by NFS. + + The steps in this section will prevent a machine +from operating as either an NFS client or an NFS server. Only perform these +steps on machines which do not need NFS at all. + + Disable Services Used Only by NFS + If NFS is not needed, disable the NFS client daemons nfslock, rpcgssd, and rpcidmapd. + +All of these daemons run with elevated privileges, and many listen for network +connections. If they are not needed, they should be disabled to improve system +security posture. + + Disable Network File System Lock Service (nfslock) + The Network File System Lock (nfslock) service starts the required +remote procedure call (RPC) processes which allow clients to lock files on the +server. If the local machine is not configured to mount NFS filesystems then +this service should be disabled. + + The nfslock service can be disabled with the following command: + $ sudo systemctl disable nfslock.service + + 3.8 + + # +# Disable nfs-lock.service for all systemd targets +# +systemctl disable nfs-lock.service + +# +# Stop nfs-lock.service if currently running +# +systemctl stop nfs-lock.service + + + + + + + Disable Secure RPC Client Service (rpcgssd) + +The rpcgssd service manages RPCSEC GSS contexts required to secure protocols +that use RPC (most often Kerberos and NFS). The rpcgssd service is the +client-side of RPCSEC GSS. If the system does not require secure RPC then this +service should be disabled. + + The rpcgssd service can be disabled with the following command: + $ sudo systemctl disable rpcgssd.service + + 3.8 + + # +# Disable nfs-secure.service (rpcgssd) for all systemd targets +# +systemctl disable nfs-secure.service + +# +# Stop nfs-secure.service (rpcgssd) if currently running +# +systemctl stop nfs-secure.service + + + + + + + Disable rpcbind Service + +The rpcbind utility maps RPC services to the ports on which they listen. RPC +processes notify rpcbind when they start, registering the ports they are +listening on and the RPC program numbers they expect to serve. The rpcbind +service redirects the client to the proper port number so it can communicate +with the requested service. If the system does not require RPC (such as for NFS +servers) then this service should be disabled. + + The rpcbind service can be disabled with the following command: + $ sudo systemctl disable rpcbind.service + + 3.8 + + + + + + + Disable RPC ID Mapping Service (rpcidmapd) + The rpcidmapd service is used to map user names and groups to UID +and GID numbers on NFSv4 mounts. If NFS is not in use on the local system then +this service should be disabled. + + The rpcidmapd service can be disabled with the following command: + $ sudo systemctl disable rpcidmapd.service + + 3.8 + + # +# Disable nfs-idmap.service (rpcidmapd) for all systemd targets +# +systemctl disable nfs-idmap.service + +# +# Stop nfs-idmap.service (rpcidmapd) if currently running +# +systemctl stop nfs-idmap.service + + + + + + + + + Configure All Machines which Use NFS + The steps in this section are appropriate for all machines which +run NFS, whether they operate as clients or as servers. + + Make Each Machine a Client or a Server, not Both + If NFS must be used, it should be deployed in the simplest +configuration possible to avoid maintainability problems which may lead to +unnecessary security exposure. Due to the reliability and security problems +caused by NFS (specially NFSv3 and NFSv2), it is not a good idea for machines +which act as NFS servers to also mount filesystems via NFS. At the least, +crossed mounts (the situation in which each of two servers mounts a filesystem +from the other) should never be used. + + + + Configure NFS Services to Use Fixed Ports (NFSv3 and NFSv2) + Firewalling should be done at each host and at the border +firewalls to protect the NFS daemons from remote access, since NFS servers +should never be accessible from outside the organization. However, by default +for NFSv3 and NFSv2, the RPC Bind service assigns each NFS service to a port +dynamically at service startup time. Dynamic ports cannot be protected by port +filtering firewalls such as firewalld. + +Therefore, restrict each service to always use a given port, so that +firewalling can be done effectively. Note that, because of the way RPC is +implemented, it is not possible to disable the RPC Bind service even if ports +are assigned statically to all RPC services. + +In NFSv4, the mounting and locking protocols have been incorporated into the +protocol, and the server listens on the the well-known TCP port 2049. As such, +NFSv4 does not need to interact with the rpcbind, lockd, and rpc.statd +daemons, which can and should be disabled in a pure NFSv4 environment. The +rpc.mountd daemon is still required on the NFS server to setup +exports, but is not involved in any over-the-wire operations. + + + Configure lockd to use static TCP port + Configure the lockd daemon to use a static TCP port as +opposed to letting the RPC Bind service dynamically assign a port. Edit the +file /etc/sysconfig/nfs. Add or correct the following line: +LOCKD_TCPPORT=lockd-port +Where lockd-port is a port which is not used by any other service on +your network. + + +Restrict service to always use a given port, so that firewalling can be done +effectively. + + + + + Configure lockd to use static UDP port + Configure the lockd daemon to use a static UDP port as +opposed to letting the RPC Bind service dynamically assign a port. Edit the +file /etc/sysconfig/nfs. Add or correct the following line: +LOCKD_UDPPORT=lockd-port +Where lockd-port is a port which is not used by any other service on +your network. + + Restricting services to always use a given port enables firewalling +to be done more effectively. + + + + + Configure statd to use static port + Configure the statd daemon to use a static port as +opposed to letting the RPC Bind service dynamically assign a port. Edit the +file /etc/sysconfig/nfs. Add or correct the following line: +STATD_PORT=statd-port +Where statd-port is a port which is not used by any other service on your network. + + Restricting services to always use a given port enables firewalling +to be done more effectively. + + + + + Configure mountd to use static port + Configure the mountd daemon to use a static port as +opposed to letting the RPC Bind service dynamically assign a port. Edit the +file /etc/sysconfig/nfs. Add or correct the following line: +MOUNTD_PORT=statd-port +Where mountd-port is a port which is not used by any other service on your network. + + Restricting services to always use a given port enables firewalling +to be done more effectively. + + + + + + + Configure NFS Clients + The steps in this section are appropriate for machines which operate as NFS clients. + + Disable NFS Server Daemons + +There is no need to run the NFS server daemons nfs and +rpcsvcgssd except on a small number of properly secured machines +designated as NFS servers. Ensure that these daemons are turned off on +clients. + + Specify UID and GID for Anonymous NFS Connections + To specify the UID and GID for remote root users, edit the /etc/exports file and add the following for each export: + +anonuid=value greater than UID_MAX from /etc/login.defs +anongid=value greater than GID_MAX from /etc/login.defs + +Alternatively, functionally equivalent values of 60001, 65534, 65535 may be used. + + Specifying the anonymous UID and GID ensures that the remote root user is mapped +to a local account which has no permissions on the system. + + + + + + + Disable Network File System (nfs) + The Network File System (NFS) service allows remote hosts to mount +and interact with shared filesystems on the local machine. If the local machine +is not designated as a NFS server then this service should be disabled. + + The nfs service can be disabled with the following command: + $ sudo systemctl disable nfs.service + + Test attestation on 20121025 by DS + Unnecessary services should be disabled to decrease the attack surface of the system. + + # +# Disable nfs.service for all systemd targets +# +systemctl disable nfs.service + +# +# Stop nfs.service if currently running +# +systemctl stop nfs.service + + + + + + + + + + Disable Secure RPC Server Service (rpcsvcgssd) + The rpcsvcgssd service manages RPCSEC GSS contexts required to +secure protocols that use RPC (most often Kerberos and NFS). The rpcsvcgssd +service is the server-side of RPCSEC GSS. If the system does not require secure +RPC then this service should be disabled. + + The rpcsvcgssd service can be disabled with the following command: + $ sudo systemctl disable rpcsvcgssd.service + + Test attestation on 20121025 by DS + Unnecessary services should be disabled to decrease the attack surface of the system. + + # +# Disable nfs-secure-server.service (rpcsvcgssd) for all systemd targets +# +systemctl disable nfs-secure-server.service + +# +# Stop nfs-secure-server.service (rpcsvcgssd) if currently running +# +systemctl stop nfs-secure-server.service + + + + + + + + + + + Mount Remote Filesystems with Restrictive Options + Edit the file /etc/fstab. For each filesystem whose type +(column 3) is nfs or nfs4, add the text +,nodev,nosuid to the list of mount options in column 4. If +appropriate, also add ,noexec. + +See the section titled "Restrict Partition Mount Options" for a description of +the effects of these options. In general, execution of files mounted via NFS +should be considered risky because of the possibility that an adversary could +intercept the request and substitute a malicious file. Allowing setuid files to +be executed from remote servers is particularly risky, both for this reason and +because it requires the clients to extend root-level trust to the NFS +server. + + Mount Remote Filesystems with nodev + + + Add the nodev option to the fourth column of + /etc/fstab for the line which controls mounting of + any NFS mounts. + + + CM-7 + MP-2 + Test attestation on 20121025 by DS + Legitimate device files should only exist in the /dev directory. NFS mounts +should not present device files to users. + + + + + + + + + + Mount Remote Filesystems with nosuid + + + Add the nosuid option to the fourth column of + /etc/fstab for the line which controls mounting of + any NFS mounts. + + + Test attestation on 20121025 by DS + NFS mounts should not present suid binaries to users. Only vendor-supplied suid executables +should be installed to their default location on the local filesystem. + + + + + + + + + + Mount Remote Filesystems with Kerberos Security + + + Add the sec=krb5:krb5i:krb5p option to the fourth column of + /etc/fstab for the line which controls mounting of + any NFS mounts. + + + AC-14(1) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-TBD + +When an NFS server is configured to use AUTH_SYS a selected userid and groupid are used to handle +requests from the remote user. The userid and groupid could mistakenly or maliciously be set +incorrectly. The AUTH_GSS method of authentication uses certificates on the server and client +systems to more securely authenticate the remote mount request. + + + + + + + + + + + + + Configure NFS Servers + The steps in this section are appropriate for machines which operate as NFS servers. + + Configure the Exports File Restrictively + Linux's NFS implementation uses the file /etc/exports to control what filesystems +and directories may be accessed via NFS. (See the exports(5) manpage for more information about the +format of this file.) + +The syntax of the exports file is not necessarily checked fully on reload, and syntax errors +can leave your NFS configuration more open than intended. Therefore, exercise caution when modifying +the file. + +The syntax of each line in /etc/exports is: +/DIR host1(opt1,opt2) host2(opt3) +where /DIR is a directory or filesystem to export, hostN is an IP address, netblock, +hostname, domain, or netgroup to which to export, and optN is an option. + + + + Use Access Lists to Enforce Authorization Restrictions + When configuring NFS exports, ensure that each export line in /etc/exports contains +a list of hosts which are allowed to access that export. If no hosts are specified on an export line, +then that export is available to any remote host which requests it. All lines of the exports file should +specify the hosts (or subnets, if needed) which are allowed to access the exported directory, so that +unknown or remote hosts will be denied. + +Authorized hosts can be specified in several different formats: +Name or alias that is recognized by the resolverFully qualified domain nameIP addressIP subnets in the format address/netmask or address/CIDR + + + + Export Filesystems Read-Only if Possible + If a filesystem is being exported so that users can view the files in a convenient +fashion, but there is no need for users to edit those files, exporting the filesystem read-only +removes an attack vector against the server. The default filesystem export mode is ro, +so do not specify rw without a good reason. + + + + Use Root-Squashing on All Exports + If a filesystem is exported using root squashing, requests from root on the client +are considered to be unprivileged (mapped to a user such as nobody). This provides some mild +protection against remote abuse of an NFS server. Root squashing is enabled by default, and +should not be disabled. + +Ensure that no line in /etc/exports contains the option no_root_squash. + + If the NFS server allows root access to local file systems from remote hosts, this +access could be used to compromise the system. + + + + + Restrict NFS Clients to Privileged Ports + By default, the server NFS implementation requires that all client requests be made +from ports less than 1024. If your organization has control over machines connected to its +network, and if NFS requests are prohibited at the border firewall, this offers some protection +against malicious requests from unprivileged users. Therefore, the default should not be changed. + +To ensure that the default has not been changed, ensure no line in +/etc/exports contains the option insecure. + + Allowing client requests to be made from ports higher than 1024 could allow a unprivileged +user to initiate an NFS connection. If the unprivileged user account has been compromised, an +attacker could gain access to data on the NFS server. + + + + Ensure Insecure File Locking is Not Allowed + By default the NFS server requires secure file-lock requests, +which require credentials from the client in order to lock a file. Most NFS +clients send credentials with file lock requests, however, there are a few +clients that do not send credentials when requesting a file-lock, allowing the +client to only be able to lock world-readable files. To get around this, the +insecure_locks option can be used so these clients can access the +desired export. This poses a security risk by potentially allowing the client +access to data for which it does not have authorization. +Remove any instances of the +insecure_locks option from the file /etc/exports. + + 764 + Allowing insecure file locking could allow for sensitive data to be +viewed or edited by an unauthorized user. + + + + + + + + + + + Use Kerberos Security on All Exports + +Using Kerberos on all exported mounts prevents a malicious client or user from +impersonating a system user. To cryptography authenticate users to the NFS server, +add sec=krb5:krb5i:krb5p to each export in /etc/exports. + + AC-14(1) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040740 + +When an NFS server is configured to use AUTH_SYS a selected userid and groupid are used to handle +requests from the remote user. The userid and groupid could mistakenly or maliciously be set +incorrectly. The AUTH_GSS method of authentication uses certificates on the server and client +systems to more securely authenticate the remote mount request. + + + + + + + + + + + + + DNS Server + Most organizations have an operational need to run at +least one nameserver. However, there are many common attacks +involving DNS server software, and this server software should +be disabled on any system +on which it is not needed. + + Disable DNS Server + +DNS software should be disabled on any machine which does not +need to be a nameserver. Note that the BIND DNS server software is +not installed on Red Hat Enterprise Linux 7 by default. The remainder of this section +discusses secure configuration of machines which must be +nameservers. + + + Disable DNS Server + + + The named service can be disabled with the following command: + $ sudo systemctl disable named.service + + CM-7 + 366 + +All network services involve some risk of compromise due to +implementation flaws and should be disabled if possible. + + + # +# Disable named.service for all systemd targets +# +systemctl disable named.service + +# +# Stop named.service if currently running +# +systemctl stop named.service + + + + + + + + + + Uninstall bind Package + To remove the bind package, which contains the +named service, run the following command: +$ sudo yum erase bind + + CM-7 + 366 + 3.9 + +If there is no need to make DNS server software available, +removing it provides a safeguard against its activation. + + + +package_command remove bind + + + + + + + + + + + Isolate DNS from Other Services + This section discusses mechanisms for preventing the DNS server +from interfering with other services. This is done both to protect the +remainder of the network should a nameserver be compromised, and to make direct +attacks on nameservers more difficult. + + Run DNS Software on Dedicated Servers + Since DNS is +a high-risk service which must frequently be made available to the entire +Internet, it is strongly recommended that no other services be offered by +machines which act as organizational DNS servers. + + + Run DNS Software in a chroot Jail + Install the bind-chroot package: +$ sudo yum install bind-chroot +Place a valid named.conf file inside the chroot jail: +$ sudo cp /etc/named.conf /var/named/chroot/etc/named.conf +$ sudo chown root:root /var/named/chroot/etc/named.conf +$ sudo chmod 644 /var/named/chroot/etc/named.conf +Create and populate an appropriate zone directory within the jail, based on the +options directive. If your named.conf includes: +options { +directory "/path/to/DIRNAME "; +... +} +then copy that directory and its contents from the original zone directory: +$ sudo cp -r /path/to/DIRNAME /var/named/chroot/DIRNAME +Add or correct the following line within /etc/sysconfig/named: +ROOTDIR=/var/named/chroot + + If you are running BIND in a chroot jail, then you +should use the jailed named.conf as the primary nameserver +configuration file. That is, when this guide recommends editing +/etc/named.conf, you should instead edit +/var/named/chroot/etc/named.conf. + + Chroot jails are not foolproof. However, they serve to make it more +difficult for a compromised program to be used to attack the entire host. They +do this by restricting a program's ability to traverse the directory upward, so +that files outside the jail are not visible to the chrooted process. Since RHEL +supports a standard mechanism for placing BIND in a chroot jail, you should +take advantage of this feature. + + + + Protect DNS Data from Tampering or Attack + This section discusses DNS configuration options which make it +more difficult for attackers to gain access to private DNS data or to modify +DNS data. + + Run Separate DNS Servers for External and Internal Queries + Is it possible to run external and internal nameservers on +separate machines? If so, follow the configuration guidance in this section. On +the external nameserver, edit /etc/named.conf to add or correct the +following directives: +options { + allow-query { any; }; + recursion no; + ... +}; +zone "example.com " IN { + ... +}; +On the internal nameserver, edit /etc/named.conf. Add or correct the +following directives, where SUBNET is the numerical IP representation of your +organization in the form xxx.xxx.xxx.xxx/xx: +acl internal { + SUBNET ; + localhost; +}; +options { + allow-query { internal; }; + ... +}; +zone "internal.example.com " IN { + ... +}; + + Enterprise nameservers generally serve two functions. One is to +provide public information about the machines in a domain for the benefit of +outside users who wish to contact those machines, for instance in order to send +mail to users in the enterprise, or to visit the enterprise's external web +page. The other is to provide nameservice to client machines within the +enterprise. Client machines require both private information about enterprise +machines (which may be different from the public information served to the rest +of the world) and public information about machines outside the enterprise, +which is used to send mail or visit websites outside of the organization. + +In order to provide the public nameservice function, it is necessary to share +data with untrusted machines which request it - otherwise, the enterprise +cannot be conveniently contacted by outside users. However, internal data +should be protected from disclosure, and serving irrelevant public name queries +for outside domains leaves the DNS server open to cache poisoning and other +attacks. Therefore, local network nameservice functions should not be provided +to untrusted machines. + +Separate machines should be used to fill these two functions whenever possible. + + + + Use Views to Partition External and Internal Information + If it is not possible to run external and internal nameservers on +separate physical machines, run BIND9 and simulate this feature using views. +Edit /etc/named.conf. Add or correct the following directives (where +SUBNET is the numerical IP representation of your organization in the form +xxx.xxx.xxx.xxx/xx): +acl internal { + SUBNET ; + localhost; +}; +view "internal-view" { + match-clients { internal; }; + zone "." IN { + type hint; + file "db.cache"; + }; + zone "internal.example.com " IN { + ... + }; +}; + +view "external-view" { + match-clients { any; }; + recursion no; + zone "example.com " IN { + ... + }; +}; + + As shown in the example, database files which are +required for recursion, such as the root hints file, must be available to any +clients which are allowed to make recursive queries. Under typical +circumstances, this includes only the internal clients which are allowed to use +this server as a general-purpose nameserver. + The view feature is provided by BIND9 as a way to allow a single +nameserver to make different sets of data available to different sets of +clients. If possible, it is always better to run external and internal +nameservers on separate machines, so that even complete compromise of the +external server cannot be used to obtain internal data or confuse internal DNS +clients. However, this is not always feasible, and use of a feature like views +is preferable to leaving internal DNS data entirely unprotected. + + + Disable Zone Transfers from the Nameserver + Is it necessary for a secondary nameserver to receive zone data +via zone transfer from the primary server? If not, follow the instructions in +this section. If so, see the next section for instructions on protecting zone +transfers. +Add or correct the following directive within /etc/named.conf: +options { + allow-transfer { none; }; + ... +} + + If both the primary and secondary nameserver are under your control, +or if you have only one nameserver, it may be possible to use an external +configuration management mechanism to distribute zone updates. In that case, it +is not necessary to allow zone transfers within BIND itself, so they should be +disabled to avoid the potential for abuse. + + + + Authenticate Zone Transfers + If it is necessary for a secondary nameserver to receive zone data +via zone transfer from the primary server, follow the instructions here. Use +dnssec-keygen to create a symmetric key file in the current directory: +$ cd /tmp +$ sudo dnssec-keygen -a HMAC-MD5 -b 128 -n HOST dns.example.com +Kdns.example.com .+aaa +iiiii +This output is the name of a file containing the new key. Read the file to find +the base64-encoded key string: +$ sudo cat Kdns.example.com .+NNN +MMMMM .key +dns.example.com IN KEY 512 3 157 base64-key-string +Add the directives to /etc/named.conf on the primary server: +key zone-transfer-key { + algorithm hmac-md5; + secret "base64-key-string "; +}; +zone "example.com " IN { + type master; + allow-transfer { key zone-transfer-key; }; + ... +}; +Add the directives below to /etc/named.conf on the secondary nameserver: +key zone-transfer-key { + algorithm hmac-md5; + secret "base64-key-string "; +}; + +server IP-OF-MASTER { + keys { zone-transfer-key; }; +}; + +zone "example.com " IN { + type slave; + masters { IP-OF-MASTER ; }; + ... +}; + + The purpose of the dnssec-keygen command is to +create the shared secret string base64-key-string. Once this secret has been +obtained and inserted into named.conf on the primary and secondary servers, the +key files Kdns.example.com .+NNN +MMMMM .key and Kdns.example.com .+NNN +MMMMM +.private are no longer needed, and may safely be deleted. + CM-7 + The BIND transaction signature (TSIG) functionality allows primary +and secondary nameservers to use a shared secret to verify authorization to +perform zone transfers. This method is more secure than using IP-based limiting +to restrict nameserver access, since IP addresses can be easily spoofed. +However, if you cannot configure TSIG between your servers because, for +instance, the secondary nameserver is not under your control and its +administrators are unwilling to configure TSIG, you can configure an +allow-transfer directive with numerical IP addresses or ACLs as a last resort. + + + + + Disable Dynamic Updates + Is there a mission-critical reason to enable the risky dynamic +update functionality? If not, edit /etc/named.conf. For each zone +specification, correct the following directive if necessary: +zone "example.com " IN { + allow-update { none; }; + ... +}; + + Dynamic updates allow remote servers to add, delete, or modify any +entries in your zone file. Therefore, they should be considered highly risky, +and disabled unless there is a very good reason for their use. If dynamic +updates must be allowed, IP-based ACLs are insufficient protection, since they +are easily spoofed. Instead, use TSIG keys (see the previous section for an +example), and consider using the update-policy directive to restrict changes to +only the precise type of change needed. + + + + + + FTP Server + FTP is a common method for allowing remote access to +files. Like telnet, the FTP protocol is unencrypted, which means +that passwords and other data transmitted during the session can be +captured and that the session is vulnerable to hijacking. +Therefore, running the FTP server software is not recommended. + +However, there are some FTP server configurations which may +be appropriate for some environments, particularly those which +allow only read-only anonymous access as a means of downloading +data available to the public. + + Disable vsftpd if Possible + To minimize attack surface, disable vsftpd if at all +possible. + + Disable vsftpd Service + + + The vsftpd service can be disabled with the following command: + $ sudo systemctl disable vsftpd.service + + CM-7 + 1436 + +Running FTP server software provides a network-based avenue +of attack, and should be disabled if not needed. +Furthermore, the FTP protocol is unencrypted and creates +a risk of compromising sensitive information. + + + # +# Disable vsftpd.service for all systemd targets +# +systemctl disable vsftpd.service + +# +# Stop vsftpd.service if currently running +# +systemctl stop vsftpd.service + + + + + + + + + + Uninstall vsftpd Package + + + The vsftpd package can be removed with the following command: + $ sudo yum erase vsftpd + + CM-6(b) + CM-7 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040490 + 3.10 + +Removing the vsftpd package decreases the risk of its +accidental activation. + + + +package_command remove vsftpd + + + + + + + + + + + Use vsftpd to Provide FTP Service if Necessary + If your use-case requires FTP service, install and +set-up vsftpd to provide it. + + Install vsftpd Package + If this machine must operate as an FTP server, install the vsftpd package via the standard channels. +$ sudo yum install vsftpd + + CM-7 + After Red Hat Enterprise Linux 2.1, Red Hat switched from distributing wu-ftpd with Red Hat Enterprise Linux to distributing vsftpd. For security +and for consistency with future Red Hat releases, the use of vsftpd is recommended. + + +package_command install vsftpd + + + + + + + + Use vsftpd to Provide FTP Service if Necessary + The primary vsftpd configuration file is +/etc/vsftpd.conf, if that file exists, or +/etc/vsftpd/vsftpd.conf if it does not. + + + Enable Logging of All FTP Transactions + Add or correct the following configuration options within the vsftpd +configuration file, located at /etc/vsftpd/vsftpd.conf: +xferlog_enable=YES +xferlog_std_format=NO +log_ftp_protocol=YES + + If verbose logging to vsftpd.log is done, sparse logging of downloads to /var/log/xferlog will not also occur. However, the information about what files were downloaded is included in the information logged to vsftpd.log + To trace malicious activity facilitated by the FTP service, it must be configured to ensure that all commands sent to +the FTP server are logged using the verbose vsftpd log +format. The default vsftpd log file is /var/log/vsftpd.log. + + + + + + + + + + Create Warning Banners for All FTP Users + Edit the vsftpd configuration file, which resides at /etc/vsftpd/vsftpd.conf +by default. Add or correct the following configuration options: +banner_file=/etc/issue + + 48 + This setting will cause the system greeting banner to be used for FTP connections as well. + + + + + + + + + + Restrict the Set of Users Allowed to Access FTP + This section describes how to disable non-anonymous (password-based) FTP logins, or, if it is not possible to +do this entirely due to legacy applications, how to restrict insecure FTP login to only those users who have an +identified need for this access. + + Restrict Access to Anonymous Users if Possible + Is there a mission-critical reason for users to transfer files to/from their own accounts using FTP, rather than +using a secure protocol like SCP/SFTP? If not, edit the vsftpd configuration file. Add or correct the following configuration option: +local_enable=NO +If non-anonymous FTP logins are necessary, follow the guidance in the remainder of this section to secure +these logins as much as possible. + CM-7 + AC-3 + The use of non-anonymous FTP logins is strongly discouraged. Since SSH clients and servers are widely available, and since SSH provides support for a transfer mode which resembles FTP in user interface, there is no good reason to allow password-based FTP access. + + + + Limit Users Allowed FTP Access if Necessary + If there is a mission-critical reason for users to access their accounts via the insecure FTP protocol, limit the set of users who are allowed this access. Edit the vsftpd configuration file. Add or correct the following configuration options: +userlist_enable=YES +userlist_file=/etc/vsftp.ftpusers +userlist_deny=NO +Edit the file /etc/vsftp.ftpusers. For each user USERNAME who should be allowed to access the system via FTP, add a line containing that user's name: +USERNAME +If anonymous access is also required, add the anonymous usernames to /etc/vsftp.ftpusers as well. +anonymous +ftp + + Historically, the file /etc/ftpusers contained a list of users who were not allowed to access the system via FTP. It was used to prevent system users such as the root user from logging in via the insecure FTP protocol. However, when the configuration option userlist deny=NO is set, vsftpd interprets ftpusers as the set of users who are allowed to login via FTP. Since it should be possible for most users to access their accounts via secure protocols, it is recommended that this setting be used, so that non-anonymous FTP access can be limited to legacy users who have been explicitly identified. + + + + Disable FTP Uploads if Possible + Is there a mission-critical reason for users to upload files via FTP? If not, +edit the vsftpd configuration file to add or correct the following configuration options: +write_enable=NO +If FTP uploads are necessary, follow the guidance in the remainder of this section to secure these transactions +as much as possible. + Anonymous FTP can be a convenient way to make files available for universal download. However, it is less +common to have a need to allow unauthenticated users to place files on the FTP server. If this must be done, it +is necessary to ensure that files cannot be uploaded and downloaded from the same directory. + + + + + Place the FTP Home Directory on its Own Partition + By default, the anonymous FTP root is the home directory of the FTP user account. The df command can +be used to verify that this directory is on its own partition. + If there is a mission-critical reason for anonymous users to upload files, precautions must be taken to prevent +these users from filling a disk used by other services. + + + + Configure Firewalls to Protect the FTP Server + By default, firewalld +blocks access to the ports used by the web server. + + To configure firewalld to allow access, run the following command(s): + firewall-cmd --permanent --add-service=ftp + + These settings configure firewalld to allow connections to an FTP server. The first line allows initial connections +to the FTP server port. +FTP is an older protocol which is not very compatible with firewalls. During the initial FTP dialogue, the client +and server negotiate an arbitrary port to be used for data transfer. The ip_conntrack_ftp module is used by +firewalld to listen to that dialogue and allow connections to the data ports which FTP negotiates. This allows an +FTP server to operate on a machine which is running a firewall. + + + + + Web Server + The web server is responsible for providing access to +content via the HTTP protocol. Web servers represent a significant +security risk because: + +The HTTP port is commonly probed by malicious sourcesWeb server software is very complex, and includes a long +history of vulnerabilitiesThe HTTP protocol is unencrypted and vulnerable to passive +monitoring + +The system's default web server software is Apache 2 and is +provided in the RPM package httpd. + + Disable Apache if Possible + If Apache was installed and activated, but the system +does not need to act as a web server, then it should be disabled +and removed from the system. + + + Disable httpd Service + + + The httpd service can be disabled with the following command: + $ sudo systemctl disable httpd.service + + CM-7 + +Running web server software provides a network-based avenue +of attack, and should be disabled if not needed. + + + # +# Disable httpd.service for all systemd targets +# +systemctl disable httpd.service + +# +# Stop httpd.service if currently running +# +systemctl stop httpd.service + + + + + + + + + + Uninstall httpd Package + + + The httpd package can be removed with the following command: + $ sudo yum erase httpd + + CM-7 + 3.11 + +If there is no need to make the web server software available, +removing it provides a safeguard against its activation. + + + +package_command remove httpd + + + + + + + + + + + Install Apache if Necessary + If httpd was not installed and activated, but the system +needs to act as a web server, then it should be installed on the system. Follow these +guidelines to install it defensively. The httpd package can be installed with +the following command: +$ sudo yum install httpd +This method of installation is recommended over installing the "Web Server" +package group during the system installation process. The Web Server package +group includes many packages which are likely extraneous, while the +command-line method installs only the required httpd package itself. + + + Confirm Minimal Built-in Modules Installed + The default httpd installation minimizes the number of +modules that are compiled directly into the binary (core prefork http_core +mod_so). This minimizes risk by limiting the capabilities allowed by the +web server. + +Query the set of compiled-in modules using the following command: +$ httpd -l +If the number of compiled-in modules is significantly larger than the +aforementioned set, this guide recommends re-installing httpd with a +reduced configuration. Minimizing the number of modules that are compiled into +the httpd binary, reduces risk by limiting the capabilities allowed by +the webserver. + + + + + Secure Apache Configuration + The httpd configuration file is +/etc/httpd/conf/httpd.conf. Apply the recommendations in the remainder +of this section to this file. + + Restrict Web Server Information Leakage + +The ServerTokens and ServerSignature directives determine how +much information the web server discloses about the configuration of the +system. + + Set httpd ServerTokens Directive to Prod + ServerTokens Prod restricts information in page headers, returning only the word "Apache." + +Add or correct the following directive in /etc/httpd/conf/httpd.conf: +ServerTokens Prod + + CM-7 + +Information disclosed to clients about the configuration of the web server and system could be used +to plan an attack on the given system. This information disclosure should be restricted to a minimum. + + + + + Set httpd ServerSignature Directive to Off + ServerSignature Off restricts httpd from displaying server version number +on error pages. + +Add or correct the following directive in /etc/httpd/conf/httpd.conf: +ServerSignature Off + + CM-7 + +Information disclosed to clients about the configuration of the web server and system could be used +to plan an attack on the given system. This information disclosure should be restricted to a minimum. + + + + + + Minimize Web Server Loadable Modules + +A default installation of httpd includes a plethora of dynamically shared objects (DSO) +that are loaded at run-time. Unlike the aforementioned compiled-in modules, a DSO can be +disabled in the configuration file by removing the corresponding LoadModule directive. + +Note: A DSO only provides additional functionality if associated directives are included +in the httpd configuration file. It should also be noted that removing a DSO will produce +errors on httpd startup if the configuration file contains directives that apply to that +module. Refer to http://httpd.apache.org/docs/ for details on which directives +are associated with each DSO. + +Following each DSO removal, the configuration can be tested with the following command +to check if everything still works: +$ sudo service httpd configtest +The purpose of each of the modules loaded by default will now be addressed one at a time. +If none of a module's directives are being used, remove it. + + + httpd Core Modules + +These modules comprise a basic subset of modules that are likely needed for base httpd +functionality; ensure they are not commented out in /etc/httpd/conf/httpd.conf: +LoadModule auth_basic_module modules/mod_auth_basic.so +LoadModule authn_default_module modules/mod_authn_default.so +LoadModule authz_host_module modules/mod_authz_host.so +LoadModule authz_user_module modules/mod_authz_user.so +LoadModule authz_groupfile_module modules/mod_authz_groupfile.so +LoadModule authz_default_module modules/mod_authz_default.so +LoadModule log_config_module modules/mod_log_config.so +LoadModule logio_module modules/mod_logio.so +LoadModule setenvif_module modules/mod_setenvif.so +LoadModule mime_module modules/mod_mome.so +LoadModule autoindex_module modules/mod_autoindex.so +LoadModule negotiation_module modules/mod_negotiation.so +LoadModule dir_module modules/mod_dir.so +LoadModule alias_module modules/mod_alias.so +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + Minimize Modules for HTTP Basic Authentication + +The following modules are necessary if this web server will provide content that will +be restricted by a password. + +Authentication can be performed using local plain text password files (authn_file), +local DBM password files (authn_dbm) or an LDAP directory. The only module required by +the web server depends on your choice of authentication. Comment out the modules you don't +need from the following: +LoadModule authn_file_module modules/mod_authn_file.so +LoadModule authn_dbm_module modules/mod_authn_dbm.so +authn_alias allows for authentication based on aliases. authn_anon +allows anonymous authentication similar to that of anonymous ftp sites. authz_owner +allows authorization based on file ownership. authz_dbm allows for authorization +based on group membership if the web server is using DBM authentication. + +If the above functionality is unnecessary, comment out the related module: +#LoadModule authn_alias_module modules/mod_authn_alias.so +#LoadModule authn_anon_module modules/mod_authn_anon.so +#LoadModule authz_owner_module modules/mod_authz_owner.so +#LoadModule authz_dbm_module modules/mod_authz_dbm.so + + + + Disable HTTP Digest Authentication + +The auth_digest module provides encrypted authentication sessions. +If this functionality is unnecessary, comment out the related module: +#LoadModule auth_digest_module modules/mod_auth_digest.so + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable HTTP mod_rewrite + +The mod_rewrite module is very powerful and can protect against +certain classes of web attacks. However, it is also very complex and has a +significant history of vulnerabilities itself. If its functionality is +unnecessary, comment out the related module: +#LoadModule rewrite_module modules/mod_rewrite.so + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable LDAP Support + +The ldap module provides HTTP authentication via an LDAP directory. +If its functionality is unnecessary, comment out the related modules: +#LoadModule ldap_module modules/mod_ldap.so +#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so +If LDAP is to be used, SSL encryption should be used as well. + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable Server Side Includes + +Server Side Includes provide a method of dynamically generating web pages through the +insertion of server-side code. However, the technology is also deprecated and +introduces significant security concerns. +If this functionality is unnecessary, comment out the related module: +#LoadModule include_module modules/mod_include.so +If there is a critical need for Server Side Includes, they should be enabled with the +option IncludesNoExec to prevent arbitrary code execution. Additionally, user +supplied data should be encoded to prevent cross-site scripting vulnerabilities. + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable MIME Magic + +The mime_magic module provides a second layer of MIME support that in most configurations +is likely extraneous. If its functionality is unnecessary, comment out the related module: +#LoadModule mime_magic_module modules/mod_mime_magic.so + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable WebDAV (Distributed Authoring and Versioning) + +WebDAV is an extension of the HTTP protocol that provides distributed and +collaborative access to web content. If its functionality is unnecessary, +comment out the related modules: +#LoadModule dav_module modules/mod_dav.so +#LoadModule dav_fs_module modules/mod_dav_fs.so +If there is a critical need for WebDAV, extra care should be taken in its configuration. +Since DAV access allows remote clients to manipulate server files, any location on the +server that is DAV enabled should be protected by access controls. + + +Minimizing the number of loadable modules available to the web server, reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable Server Activity Status + +The status module provides real-time access to statistics on the internal operation of +the web server. This may constitute an unnecessary information leak and should be disabled +unless necessary. To do so, comment out the related module: +#LoadModule status_module modules/mod_status.so +If there is a critical need for this module, ensure that access to the status +page is properly restricted to a limited set of hosts in the status handler +configuration. + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable Web Server Configuration Display + +The info module creates a web page illustrating the configuration of the web server. This +can create an unnecessary security leak and should be disabled. +If its functionality is unnecessary, comment out the module: +#LoadModule info_module modules/mod_info.so +If there is a critical need for this module, use the Location directive to provide +an access control list to restrict access to the information. + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable URL Correction on Misspelled Entries + +The speling module attempts to find a document match by allowing one misspelling in an +otherwise failed request. If this functionality is unnecessary, comment out the module: +#LoadModule speling_module modules/mod_speling.so +This functionality weakens server security by making site enumeration easier. + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable Proxy Support + +The proxy module provides proxying support, allowing httpd to forward requests and +serve as a gateway for other servers. If its functionality is unnecessary, comment out the module: +#LoadModule proxy_module modules/mod_proxy.so + +If proxy support is needed, load mod_proxy and the appropriate proxy protocol handler +module (one of mod_proxy_http, mod_proxy_ftp, or mod_proxy_connect). Additionally, +make certain that a server is secure before enabling proxying, as open proxy servers +are a security risk. mod_proxy_balancer enables load balancing, but requires that +mod status be enabled. + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable Cache Support + +The cache module allows httpd to cache data, optimizing access to +frequently accessed content. However, it introduces potential security flaws +such as the possibility of circumventing Allow and +Deny directives. + If this functionality is +unnecessary, comment out the module: +#LoadModule cache_module modules/mod_cache.so +If caching is required, it should not be enabled for any limited-access content. + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Disable CGI Support + +The cgi module allows HTML to interact with the CGI web programming language. + +If this functionality is unnecessary, comment out the module: +#LoadModule cgi_module modules/mod_cgi.so + +If the web server requires the use of CGI, enable mod_cgi. + + + +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + + Minimize Various Optional Components + +The following modules perform very specific tasks, sometimes providing access to +just a few additional directives. If such functionality is not required (or if you +are not using these directives), comment out the associated module: +External filtering (response passed through external program prior to client delivery) +#LoadModule ext_filter_module modules/mod_ext_filter.soUser-specified Cache Control and Expiration +#LoadModule expires_module modules/mod_expires.soCompression Output Filter (provides content compression prior to client delivery) +#LoadModule deflate_module modules/mod_deflate.soHTTP Response/Request Header Customization +#LoadModule headers_module modules/mod_headers.soUser activity monitoring via cookies +#LoadModule usertrack_module modules/mod_usertrack.soDynamically configured mass virtual hosting +#LoadModule vhost_alias_module modules/mod_vhost_alias.so +Minimizing the number of loadable modules available to the web server reduces risk +by limiting the capabilities allowed by the web server. + + + + Minimize Configuration Files Included + +The Include directive directs httpd to load supplementary configuration files +from a provided path. The default configuration loads all files that end in .conf +from the /etc/httpd/conf.d directory. + +To restrict excess configuration, the following line should be commented out and +replaced with Include directives that only reference required configuration files: +#Include conf.d/*.conf +If the above change was made, ensure that the SSL encryption remains loaded by +explicitly including the corresponding configuration file: +Include conf.d/ssl.conf +If PHP is necessary, a similar alteration must be made: +Include conf.d/php.conf + +Explicitly listing the configuration files to be loaded during web server start-up avoids +the possibility of unwanted or malicious configuration files to be automatically included as +part of the server's running configuration. + + + + + + + Directory Restrictions + +The Directory tags in the web server configuration file allow finer grained access +control for a specified directory. All web directories should be configured on a +case-by-case basis, allowing access only where needed. + + + Restrict Root Directory + +The httpd root directory should always have the most restrictive configuration enabled. +<Directory / > + Options None + AllowOverride None + Order allow,deny +</Directory> + + +The Web Server's root directory content should be protected from unauthorized access +by web clients. + + + + + Restrict Web Directory + +The default configuration for the web (/var/www/html) Directory allows directory +indexing (Indexes) and the following of symbolic links (FollowSymLinks). +Neither of these is recommended. + +The /var/www/html directory hierarchy should not be viewable via the web, and +symlinks should only be followed if the owner of the symlink also owns the linked file. + +Ensure that this policy is adhered to by altering the related section of the configuration: +<Directory "/var/www/html"> +# ... + Options SymLinksIfOwnerMatch +# ... +</Directory> + + +Access to the web server's directory hierarchy could allow access to unauthorized files +by web clients. Following symbolic links could also allow such access. + + + + + Restrict Other Critical Directories + +All accessible web directories should be configured with similarly restrictive settings. +The Options directive should be limited to necessary functionality and the AllowOverride +directive should be used only if needed. The Order and Deny access control tags +should be used to deny access by default, allowing access only where necessary. + + +Directories accessible from a web client should be configured with the least amount of +access possible in order to avoid unauthorized access to restricted content or server information. + + + + + Limit Available Methods + +Web server methods are defined in section 9 of RFC 2616 (http://www.ietf.org/rfc/rfc2616.txt). +If a web server does not require the implementation of all available methods, +they should be disabled. + +Note: GET and POST are the most common methods. A majority of the others +are limited to the WebDAV protocol. +<Directory /var/www/html> +# ... + # Only allow specific methods (this command is case-sensitive!) + <LimitExcept GET POST> + Order allow,deny + </LimitExcept> +# ... +</Directory> + + +Minimizing the number of available methods to the web client reduces risk +by limiting the capabilities allowed by the web server. + + + + + + Use Appropriate Modules to Improve httpd's Security + +Among the modules available for httpd are several whose use may improve the +security of the web server installation. This section recommends and discusses +the deployment of security-relevant modules. + + + Deploy mod_ssl + +Because HTTP is a plain text protocol, all traffic is susceptible to passive +monitoring. If there is a need for confidentiality, SSL should be configured +and enabled to encrypt content. + +Note: mod_nss is a FIPS 140-2 certified alternative to mod_ssl. +The modules share a considerable amount of code and should be nearly identical +in functionality. If FIPS 140-2 validation is required, then mod_nss should +be used. If it provides some feature or its greater compatibility is required, +then mod_ssl should be used. + + + Install mod_ssl + +Install the mod_ssl module: +$ sudo yum install mod_ssl + + mod_ssl provides encryption capabilities for the httpd Web server. Unencrypted +content is transmitted in plain text which could be passively monitored and accessed by +unauthorized parties. + + + + + + Deploy mod_security + +The security module provides an application level firewall for httpd. +Following its installation with the base ruleset, specific configuration advice can be found at +http://www.modsecurity.org/ to design a policy that best matches the security needs of +the web applications. Usage of mod_security is highly recommended for some environments, +but it should be noted this module does not ship with Red Hat Enterprise Linux itself, +and instead is provided via Extra Packages for Enterprise Linux (EPEL). +For more information on EPEL please refer to http://fedoraproject.org/wiki/EPEL. + + + Install mod_security + +Install the security module: +$ sudo yum install mod_security + + + mod_security provides an additional level of protection for the web server by +enabling the administrator to implement content access policies and filters at the +application layer. + + + + + + + Use Denial-of-Service Protection Modules + +Denial-of-service attacks are difficult to detect and prevent while maintaining +acceptable access to authorized users. However, some traffic-shaping +modules can be used to address the problem. Well-known DoS protection modules include: +mod_cband mod_bwshare mod_limitipconn mod_evasive +Denial-of-service prevention should be implemented for a web server if such a threat exists. +However, specific configuration details are very dependent on the environment and often best left +at the discretion of the administrator. + + + + Configure PHP Securely + +PHP is a widely-used and often misconfigured server-side scripting language. It should +be used with caution, but configured appropriately when needed. + +Review /etc/php.ini and make the following changes if possible: +# Do not expose PHP error messages to external users +display_errors = Off + +# Enable safe mode +safe_mode = On + +# Only allow access to executables in isolated directory +safe_mode_exec_dir = php-required-executables-path + +# Limit external access to PHP environment +safe_mode_allowed_env_vars = PHP_ + +# Restrict PHP information leakage +expose_php = Off + +# Log all errors +log_errors = On + +# Do not register globals for input data +register_globals = Off + +# Minimize allowable PHP post size +post_max_size = 1K + +# Ensure PHP redirects appropriately +cgi.force_redirect = 0 + +# Disallow uploading unless necessary +file_uploads = Off + +# Disallow treatment of file requests as fopen calls +allow_url_fopen = Off + +# Enable SQL safe mode +sql.safe_mode = On + + + + + Configure Operating System to Protect Web Server + +The following configuration steps should be taken on the machine which hosts the +web server, in order to provide as safe an environment as possible for the web server. + + + Restrict File and Directory Access + +Minimize access to critical httpd files and directories. + + + Set Permissions on the /var/log/httpd/ Directory + +Ensure that the permissions on the web server log directory is set to 700: +$ sudo chmod 700 /var/log/httpd/ +This is its default setting. + + CM-7 + +Access to the web server's log files may allow an unauthorized user or attacker +to access information about the web server or alter the server's log files. + + + + + + + + Set Permissions on the /etc/httpd/conf/ Directory + +Set permissions on the web server configuration directory to 750: +$ sudo chmod 750 /etc/httpd/conf/ + + +Access to the web server's configuration files may allow an unauthorized user or attacker +to access information about the web server or alter the server's configuration files. + + + + + + + + Set Permissions on All Configuration Files Inside /etc/httpd/conf/ + +Set permissions on the web server configuration files to 640: +$ sudo chmod 640 /etc/httpd/conf/* + + CM-7 + +Access to the web server's configuration files may allow an unauthorized user or attacker +to access information about the web server or to alter the server's configuration files. + + + + + + + + + Configure firewalld to Allow Access to the Web Server + +By default, firewalld +blocks access to the ports used by the web server. + + To configure firewalld to allow access, run the following command(s): + firewall-cmd --permanent --add-service=http + + To configure firewalld to allow access, run the following command(s): + firewall-cmd --permanent --add-service=https + + + + Run httpd in a chroot Jail if Practical + +Running httpd inside a chroot jail is designed to isolate the +web server process to a small section of the filesystem, limiting the damage if +it is compromised. Versions of Apache greater than 2.2.10 (such as the one +included with Red Hat Enterprise Linux 7) provide the ChrootDir directive. To run Apache +inside a chroot jail in /chroot/apache, add the following line to +/etc/httpd/conf/httpd.conf: ChrootDir /chroot/apache This +necessitates placing all files required by httpd inside +/chroot/apache , including httpd's binaries, modules, +configuration files, and served web pages. The details of this configuration +are beyond the scope of this guide. This may also require additional SELinux +configuration. + + + + + + + IMAP and POP3 Server + Dovecot provides IMAP and POP3 services. It is not +installed by default. The project page at http://www.dovecot.org +contains more detailed information about Dovecot +configuration. + + Disable Dovecot + If the system does not need to operate as an IMAP or +POP3 server, the dovecot software should be disabled and removed. + + + Disable Dovecot Service + + + The dovecot service can be disabled with the following command: + $ sudo systemctl disable dovecot.service + + +Running an IMAP or POP3 server provides a network-based +avenue of attack, and should be disabled if not needed. + + + # +# Disable dovecot.service for all systemd targets +# +systemctl disable dovecot.service + +# +# Stop dovecot.service if currently running +# +systemctl stop dovecot.service + + + + + + + + + + Uninstall dovecot Package + The dovecot package can be uninstalled +with the following command: +$ sudo yum erase dovecot + + 3.12 + +If there is no need to make the Dovecot software available, +removing it provides a safeguard against its activation. + + + +package_command remove dovecot + + + + + + + + + + + Configure Dovecot if Necessary + If the system will operate as an IMAP or +POP3 server, the dovecot software should be configured securely by following +the recommendations below. + + + Support Only the Necessary Protocols + Dovecot supports the IMAP and POP3 protocols, as well as +SSL-protected versions of those protocols. Configure the Dovecot server +to support only the protocols needed by your site. Edit /etc/dovecot/dovecot.conf. +Add or correct the following lines, replacing PROTOCOL with +only the subset of protocols (imap, imaps, +pop3, pop3s) required: +protocols = PROTOCOL +If possible, require SSL protection for all transactions. The SSL +protocol variants listen on alternate ports (995 instead of 110 for +pop3s, and 993 instead of 143 for imaps), and require SSL-aware clients. +An alternate approach is to listen on the standard port and require the +client to use the STARTTLS command before authenticating. + + +Configuring Dovecot to only support the protocols the protocols needed by +your site reduces the risk of an attacker using one of the unused protocols +to base an attack. + + + Enable SSL Support + SSL should be used to encrypt network traffic between the +Dovecot server and its clients. Users must authenticate to the Dovecot +server in order to read their mail, and passwords should never be +transmitted in clear text. In addition, protecting mail as it is +downloaded is a privacy measure, and clients may use SSL certificates +to authenticate the server, preventing another system from impersonating +the server. + + + Enable the SSL flag in /etc/dovecot.conf + To allow clients to make encrypted connections the ssl +flag in Dovecot's configuration file needs to be set to yes. + +Edit /etc/dovecot/conf.d/10-ssl.conf and add or correct the following line: +ssl = yes + + +SSL encrypt network traffic between the Dovecot server and its clients +protecting user credentials, mail as it is downloaded, and clients may use +SSL certificates to authenticate the server, preventing another system from +impersonating the server. + + + + + + + + Configure Dovecot to Use the SSL Certificate file + This option tells Dovecot where to find the the mail +server's SSL Certificate. + +Edit /etc/dovecot/conf.d/10-ssl.conf and add or correct the following +line (note: the path below is the default path set by the Dovecot installation. If +you are using a different path, ensure you reference the appropriate file): +ssl_cert = </etc/pki/dovecot/certs/dovecot.pem + + +SSL certificates are used by the client to authenticate the identity +of the server, as well as to encrypt credentials and message traffic. +Not using SSL to encrypt mail server traffic could allow unauthorized +access to credentials and mail messages since they are sent in plain +text over the network. + + + + + Configure Dovecot to Use the SSL Key file + This option tells Dovecot where to find the the mail +server's SSL Key. + +Edit /etc/dovecot/conf.d/10-ssl.conf and add or correct the following +line (note: the path below is the default path set by the Dovecot installation. If +you are using a different path, ensure you reference the appropriate file): +ssl_key = </etc/pki/dovecot/private/dovecot.pem + + +SSL certificates are used by the client to authenticate the identity +of the server, as well as to encrypt credentials and message traffic. +Not using SSL to encrypt mail server traffic could allow unauthorized +access to credentials and mail messages since they are sent in plain +text over the network. + + + + + Disable Plaintext Authentication + To prevent Dovecot from attempting plaintext +authentication of clients, edit /etc/dovecot/conf.d/10-auth.conf and add +or correct the following line: +disable_plaintext_auth = yes + + +Using plain text authentication to the mail server could allow an +attacker access to credentials by monitoring network traffic. + + + + + + + + + Allow IMAP Clients to Access the Server + The default firewalld configuration does not allow inbound +access to any services. This modification will allow remote hosts to +initiate connections to the IMAP daemon, while keeping all other ports +on the server in their default protected state. + + To configure firewalld to allow access, run the following command(s): + firewall-cmd --permanent --add-port=143/tcp and + + + + + + + Network Routing + A router is a very desirable target for a +potential adversary because they fulfill a variety of +infrastructure networking roles such as access to network segments, +gateways to other networks, filtering, etc. Therefore, if one is +required, the machine acting as a router should be dedicated +to that purpose alone and be stored in a physically secure +location. The system's default routing software is Quagga, and +provided in an RPM package of the same name. + + Disable Quagga if Possible + If Quagga was installed and activated, but the system +does not need to act as a router, then it should be disabled +and removed. + + + Disable Quagga Service + + + The zebra service can be disabled with the following command: + $ sudo systemctl disable zebra.service + + SC-32 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040730 + +Routing protocol daemons are typically used on routers to exchange network +topology information with other routers. If routing daemons are used when not +required, system network information may be unnecessarily transmitted across +the network. + + + # +# Disable zebra.service for all systemd targets +# +systemctl disable zebra.service + +# +# Stop zebra.service if currently running +# +systemctl stop zebra.service + + + + + + + + + + Uninstall quagga Package + + + The quagga package can be removed with the following command: + $ sudo yum erase quagga + + SC-32 + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-TBD + +Routing software is typically used on routers to exchange network topology information +with other routers. If routing software is used when not required, system network +information may be unnecessarily transmitted across the network. + +If there is no need to make the router software available, +removing it provides a safeguard against its activation. + + + +package_command remove quagga + + + + + + + + + + + + Samba(SMB) Microsoft Windows File Sharing Server + When properly configured, the Samba service allows +Linux machines to provide file and print sharing to Microsoft +Windows machines. There are two software packages that provide +Samba support. The first, samba-client, provides a series of +command line tools that enable a client machine to access Samba +shares. The second, simply labeled samba, provides the Samba +service. It is this second package that allows a Linux machine to +act as an Active Directory server, a domain controller, or as a +domain member. Only the samba-client package is installed by +default. + + Disable Samba if Possible + +Even after the Samba server package has been installed, it +will remain disabled. Do not enable this service unless it is +absolutely necessary to provide Microsoft Windows file and print +sharing functionality. + + + Disable Samba + + + The smb service can be disabled with the following command: + $ sudo systemctl disable smb.service + + 1436 + +Running a Samba server provides a network-based avenue of attack, and +should be disabled if not needed. + + + # +# Disable smb.service for all systemd targets +# +systemctl disable smb.service + +# +# Stop smb.service if currently running +# +systemctl stop smb.service + + + + + + + + + + Uninstall Samba Package + The samba package can be uninstalled +with the following command: +$ sudo yum erase samba + + 3.13 + +If there is no need to make the Samba software available, +removing it provides a safeguard against its activation. + + + +package_command remove samba + + + + + + + + + + + Configure Samba if Necessary + All settings for the Samba daemon can be found in +/etc/samba/smb.conf. Settings are divided between a +[global] configuration section and a series of user +created share definition sections meant to describe file or print +shares on the system. By default, Samba will operate in user mode +and allow client machines to access local home directories and +printers. It is recommended that these settings be changed or that +additional limitations be set in place. + + Restrict SMB File Sharing to Configured Networks + Only users with local user accounts will be able to log in to +Samba shares by default. Shares can be limited to particular users or network +addresses. Use the hosts allow and hosts deny directives +accordingly, and consider setting the valid users directive to a limited subset +of users or to a group of users. Separate each address, user, or user group +with a space as follows for a particular share or global: +[share] + hosts allow = 192.168.1. 127.0.0.1 + valid users = userone usertwo @usergroup +It is also possible to limit read and write access to particular users with the +read list and write list options, though the permissions set by the system +itself will override these settings. Set the read only attribute for each share +to ensure that global settings will not accidentally override the individual +share settings. Then, as with the valid users directive, separate each user or +group of users with a space: +[share] + read only = yes + write list = userone usertwo @usergroup + + The Samba service is only required for sharing files and printers +with Microsoft Windows workstations, and even then, other options may exist. + + + + Disable Root Access to SMB Shares + Administrators should not use administrator accounts to access +Samba file and printer shares. Disable the root user and the wheel +administrator group: +[share] + invalid users = root @wheel +If administrator accounts cannot be disabled, ensure that local machine +passwords and Samba service passwords do not match. + +Typically, administrator access is required when Samba must create user and +machine accounts and shares. Domain member servers and standalone servers may +not need administrator access at all. If that is the case, add the invalid +users parameter to [global] instead. + + + + + Require Client SMB Packet Signing, if using smbclient + +To require samba clients running smbclient to use +packet signing, add the following to the [global] section +of the Samba configuration file, /etc/samba/smb.conf: +client signing = mandatory +Requiring samba clients such as smbclient to use packet +signing ensures they can +only communicate with servers that support packet signing. + + +Packet signing can prevent +man-in-the-middle attacks which modify SMB packets in +transit. + + + ###################################################################### +#By Luke "Brisk-OH" Brisk +#luke.brisk@boeing.com or luke.brisk@gmail.com +###################################################################### + +CLIENTSIGNING=$( grep -ic 'client signing' /etc/samba/smb.conf ) + +if [ "$CLIENTSIGNING" -eq 0 ]; then + # Add to global section + sed -i 's/\[global\]/\[global\]\n\n\tclient signing = mandatory/g' /etc/samba/smb.conf +else + sed -i 's/[[:blank:]]*client[[:blank:]]signing[[:blank:]]*=[[:blank:]]*no/ client signing = mandatory/g' /etc/samba/smb.conf +fi + + + + + + + + + + + Require Client SMB Packet Signing, if using mount.cifs + Require packet signing of clients who mount Samba +shares using the mount.cifs program (e.g., those who specify shares +in /etc/fstab). To do so, ensure signing options (either +sec=krb5i or sec=ntlmv2i) are used. + +See the mount.cifs(8) man page for more information. A Samba +client should only communicate with servers who can support SMB +packet signing. + + +Packet signing can prevent man-in-the-middle +attacks which modify SMB packets in transit. + + + + + + + + + + + Restrict Printer Sharing + By default, Samba utilizes the CUPS printing service to enable +printer sharing with Microsoft Windows workstations. If there are no printers +on the local machine, or if printer sharing with Microsoft Windows is not +required, disable the printer sharing capability by commenting out the +following lines, found in /etc/samba/smb.conf: +[global] + load printers = yes + cups options = raw +[printers] + comment = All Printers + path = /usr/spool/samba + browseable = no + guest ok = no + writable = no + printable = yes +There may be other options present, but these are the only options enabled and +uncommented by default. Removing the [printers] share should be enough +for most users. If the Samba printer sharing capability is needed, consider +disabling the Samba network browsing capability or restricting access to a +particular set of users or network addresses. Set the valid users +parameter to a small subset of users or restrict it to a particular group of +users with the shorthand @. Separate each user or group of users with +a space. For example, under the [printers] share: +[printers] + valid users = user @printerusers + + The Samba service is only required for sharing files and printers +with Microsoft Windows workstations, and even then, other options may exist. Do +not use the Samba service to share files between Unix or Linux machines. + + + + + + Proxy Server + A proxy server is a very desirable target for a +potential adversary because much (or all) sensitive data for a +given infrastructure may flow through it. Therefore, if one is +required, the machine acting as a proxy server should be dedicated +to that purpose alone and be stored in a physically secure +location. The system's default proxy server software is Squid, and +provided in an RPM package of the same name. + + Disable Squid if Possible + If Squid was installed and activated, but the system +does not need to act as a proxy server, then it should be disabled +and removed. + + + Disable Squid + + + The squid service can be disabled with the following command: + $ sudo systemctl disable squid.service + + +Running proxy server software provides a network-based avenue +of attack, and should be removed if not needed. + + + # +# Disable squid.service for all systemd targets +# +systemctl disable squid.service + +# +# Stop squid.service if currently running +# +systemctl stop squid.service + + + + + + + + + + Uninstall squid Package + + + The squid package can be removed with the following command: + $ sudo yum erase squid + + 3.14 + +If there is no need to make the proxy server software available, +removing it provides a safeguard against its activation. + + + +package_command remove squid + + + + + + + + + + + + SNMP Server + The Simple Network Management Protocol allows +administrators to monitor the state of network devices, including +computers. Older versions of SNMP were well-known for weak +security, such as plaintext transmission of the community string +(used for authentication) and usage of easily-guessable +choices for the community string. + + Disable SNMP Server if Possible + The system includes an SNMP daemon that allows for its remote +monitoring, though it not installed by default. If it was installed and +activated but is not needed, the software should be disabled and removed. + + + Disable snmpd Service + + + The snmpd service can be disabled with the following command: + $ sudo systemctl disable snmpd.service + + +Running SNMP software provides a network-based avenue of attack, and +should be disabled if not needed. + + + # +# Disable snmpd.service for all systemd targets +# +systemctl disable snmpd.service + +# +# Stop snmpd.service if currently running +# +systemctl stop snmpd.service + + + + + + + + + + Uninstall net-snmp Package + The net-snmp package provides the snmpd service. + + The net-snmp package can be removed with the following command: + $ sudo yum erase net-snmp + + 3.15 + +If there is no need to run SNMP server software, +removing the package provides a safeguard against its +activation. + + + +package_command remove net-snmp + + + + + + + + + + + Configure SNMP Server if Necessary + If it is necessary to run the snmpd agent on the system, some best +practices should be followed to minimize the security risk from the +installation. The multiple security models implemented by SNMP cannot be fully +covered here so only the following general configuration advice can be offered: +use only SNMP version 3 security models and enable the use of authentication and encryptionwrite access to the MIB (Management Information Base) should be allowed only if necessaryall access to the MIB should be restricted following a principle of least privilegenetwork access should be limited to the maximum extent possible including restricting to expected network +addresses both in the configuration files and in the system firewall rulesensure SNMP agents send traps only to, and accept SNMP queries only from, authorized management +stationsensure that permissions on the snmpd.conf configuration file (by default, in /etc/snmp) are 640 or more restrictiveensure that any MIB files' permissions are also 640 or more restrictive + + + Configure SNMP Service to Use Only SNMPv3 or Newer + +Edit /etc/snmp/snmpd.conf, removing any references to rocommunity, rwcommunity, or com2sec. +Upon doing that, restart the SNMP service: +$ sudo service snmpd restart + + +Earlier versions of SNMP are considered insecure, as they potentially allow +unauthorized access to detailed system management information. + + + + + + + + + + + Ensure Default SNMP Password Is Not Used + +Edit /etc/snmp/snmpd.conf, remove or change the default community strings of +public and private. +Once the default community strings have been changed, restart the SNMP service: +$ sudo service snmpd restart + + IA-5.1(ii) + 366 + SRG-OS-000480-GPOS-00227 + RHEL-07-040580 + Test attestation on 20121214 by MAN + +Whether active or not, default simple network management protocol (SNMP) community +strings must be changed to maintain security. If the service is running with the +default authenticators, then anyone can gather data about the system and the network +and use the information to potentially compromise the integrity of the system and +network(s). + + + + + + + + + + + + + + + + + + + + python + 2.7.5 + 5.11 + 2016-12-05T12:48:07 + + + + CentOS 6 + + + + The operating system installed on the system is + CentOS 6 + + + + + + + + + + CentOS 7 + + + + The operating system installed on the system is + CentOS 7 + + + + + + + + + + Installed operating system is Fedora + + + + + + + The operating system installed on the system is Fedora + + + + + + + + + + + + + Red Hat Enterprise Linux 6 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + + The operating system installed on the system is + Red Hat Enterprise Linux 6 + + + + + + + + + + + + + + + Red Hat Enterprise Linux 7 + + + + The operating system installed on the system is + Red Hat Enterprise Linux 7 + + + + + + + + + + + + + + Scientific Linux 6 + + + + The operating system installed on the system is + Scientific Linux 6 + + + + + + + + + + Scientific Linux 7 + + + + The operating system installed on the system is + Scientific Linux 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + centos-release + + + centos-release + + + fedora-release + + + /etc/system-release-cpe + ^cpe:\/o:fedoraproject:fedora:[\d]+$ + 1 + + + redhat-release-workstation + + + redhat-release-server + + + redhat-release-computenode + + + + redhat-release-workstation + + + redhat-release-server + + + redhat-release-computenode + + + sl-release + + + sl-release + + + unix + + + ^6.*$ + + + ^7.*$ + + + ^6.*$ + + + ^6.*$ + + + ^6.*$ + + + unix + + + ^7.*$ + + + ^7.*$ + + + ^7.*$ + + + ^6.*$ + + + ^7.*$ + + + + + + + Red Hat Enterprise Linux 7 + + oval:ssg-installed_OS_is_rhel7:def:1 + + + Red Hat Enterprise Linux 7 Client + + oval:ssg-installed_OS_is_rhel7:def:1 + + + Red Hat Enterprise Linux 7 ComputeNode + + oval:ssg-installed_OS_is_rhel7:def:1 + + + CentOS 7 + + oval:ssg-installed_OS_is_centos7:def:1 + + + Scientific Linux 7 + + oval:ssg-installed_OS_is_sl7:def:1 + + + + + + python + 2.7.5 + 5.11 + 2016-12-05T12:48:07 + + + + + Set Accounts to Expire Following Password Expiration + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The accounts should be configured to expire automatically following password expiration. + + + + + + + + + Set All Accounts To Have Unique Names + + + All accounts on the system should have unique names for proper accountability. + + + + + + + + + + + Set Maximum Number of Concurrent Login Sessions Per User + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The maximum number of concurrent login sessions per user should meet + minimum requirements. + + + + + + + + + Set Password Expiration Parameters + + + The maximum password age policy should meet minimum requirements. + + + + + + + + + + + Set Password Expiration Parameters + + + The minimum password age policy should be set appropriately. + + + + + + + + + + + UID 0 Belongs Only To Root + + + Only the root account should be assigned a user id of 0. + + + + + + + + + + All Password Hashes Shadowed + + + All password hashes should be shadowed. + + + + + + + + + Set Password Expiration Parameters + + + The password minimum length should be set appropriately. + + + + + + + + + + + Set Password dcredit Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password dcredit should meet minimum requirements + + + + + + + + + + Set Password difok Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password difok should meet minimum requirements + + + + + + + + + + Set Password lcredit Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password lcredit should meet minimum requirements + + + + + + + + + + Set Password maxclassrepeat Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password maxclassrepeat should meet minimum + requirements using pam_pwquality + + + + + + + + + + Set Password maxrepeat Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password maxrepeat should meet minimum + requirements using pam_pwquality + + + + + + + + + + Set Password minclass Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password minclass should meet the minimum requirements + + + + + + + + + + Set Password minlen Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password minlen should meet minimum requirements + + + + + + + + + + Set Password ocredit Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password ocredit should meet minimum requirements + + + + + + + + + + Check pam_pwquality Existence in system-auth + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Check that pam_pwquality.so exists in system-auth + + + + + + + + + + Set Password retry Requirements + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + The password retry should meet minimum requirements + + + + + + + + + + + + + + + + + + + + Set Password ucredit Requirements + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The password ucredit should meet minimum requirements + + + + + + + + + + Limit Password Reuse + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The passwords to remember should be set correctly. + + + + + + + + + + + + Set Password Expiration Parameters + + + The password expiration warning age should be set appropriately. + + + + + + + + + + + Lock out account after failed login attempts + + + The number of allowed failed logins should be set correctly. + + + + + + + + + + + + + + + + Lock out account after failed login attempts + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The number of allowed failed logins should be set correctly. + + + + + + + + + + + + Lock out account after failed login attempts + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The number of allowed failed logins should be set correctly. + + + + + + + + + + + + + + Write permissions are disabled for group and other in all + directories in Root's Path + + + Check each directory in root's path and make use it does + not grant write permission to group and other + + + + + + + + + + + Set Interactive Session Timeout + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Checks interactive shell timeout + + + + + + + + + + Ensure that Users Have Sensible Umask Values set for bash + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The default umask for users of the bash shell + + + + + + + + + + Ensure that Users Have Sensible Umask Values set for csh + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The default umask for users of the csh shell + + + + + + + + + + Ensure that Users Have Sensible Umask Values in /etc/login.defs + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The default umask for all users specified in /etc/login.defs + + + + + + + + + + Ensure that Users Have Sensible Umask Values in /etc/profile + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The default umask for all users should be set correctly + + + + + + + + + + Aide Database Must Exist + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + CentOS 4 + CentOS 5 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + + The aide database must be initialized. + + + + + + + + + + + + Configure Periodic Execution of AIDE + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + By default, AIDE does not install itself for periodic + execution. Periodically running AIDE is necessary to reveal + unexpected changes in installed files. + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - chmod + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - chown + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fchmod + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fchmodat + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fchown + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fchownat + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fremovexattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - fsetxattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - lchown + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - lremovexattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - lsetxattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - removexattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + Audit Discretionary Access Control Modification Events - setxattr + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The changing of file permissions and attributes should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit File Deletion Events + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit files deletion events. + + + + + + + + + + + + + + + + + Make Audit Configuration Immutable + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Force a reboot to change audit rules is enabled + + + + + + + + + + + + + + + + + + + Audit Kernel Module Loading and Unloading + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The audit rules should be configured to log information about kernel module loading and unloading. + + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Login and Logout Events + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules should be configured to log successful and unsuccessful login and logout events. + + + + + + + + + + + + + + + + + + + + + + + Record Events that Modify the System's Mandatory Access Controls + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules that detect changes to the system's mandatory access controls (SELinux) are enabled. + + + + + + + + + + + + + + + + + + + Audit Information Export To Media + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules that detect the mounting of filesystems should be enabled. + + + + + + + + + + + + + + + + + Record Events that Modify the System's Network Environment + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The network environment should not be modified by anything other than + administrator action. Any change to network parameters should be audited. + + + + + + + + + + + + + + + + + + + + + + + + + + + Ensure auditd Collects Information on the Use of Privileged Commands + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules about the information on the use of privileged commands are enabled. + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Process and Session Initiation Information + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules should capture information about session initiation. + + + + + + + + + + + + + + + + + + + + + + + Audit System Administrator Actions + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit actions taken by system administrators on the system. + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through Adjtimex + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through adjtimex. + + + + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through Clock_settime + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through clock_settime. + + + + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through Settimeofday + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through settimeofday. + + + + + + + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through Stime + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through stime. Note that on + 64-bit architectures the stime system call is not defined in the audit + system calls lookup table. + + + + + + + + + + + + + + + + + + + + + Record Attempts to Alter Time Through the Localtime File + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Record attempts to alter time through /etc/localtime. + + + + + + + + + + + + + + + + + + + Ensure auditd Collects Unauthorized Access Attempts to Files (unsuccessful) + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit rules about the unauthorized access attempts to files (unsuccessful) are enabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Audit User/Group Modification + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Audit user/group modification. + + + + + + + + + + + + + + + + + + + + + + + + + The syslog Plugin Of the Audit Event Multiplexor (audispd) Is Activated + + + active setting in /etc/audisp/plugins.d/syslog.conf is set to 'yes' + + + + + + + + + + + Auditd Email Account to Notify Upon Action + + + action_mail_acct setting in /etc/audit/auditd.conf is set to a certain account + + + + + + + + + + + Auditd Action to Take When Disk is Low on Space + + + admin_space_left_action setting in /etc/audit/auditd.conf is set to a certain action + + + + + + + + + + + Auditd priority for flushing data to disk + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The setting for flush in /etc/audit/auditd.conf + + + + + + + + + Auditd Maximum Log File Size + + + max_log_file setting in /etc/audit/auditd.conf is set to at least a certain value + + + + + + + + + + + Auditd Action to Take When Maximum Log Size Reached + + + max_log_file_action setting in /etc/audit/auditd.conf is set to a certain action + + + + + + + + + + + Auditd Maximum Number of Logs to Retain + + + num_logs setting in /etc/audit/auditd.conf is set to at least a certain value + + + + + + + + + + + Auditd Action to Take When Disk Starting to Run Low on Space + + + space_left_action setting in /etc/audit/auditd.conf is set to a certain action + + + + + + + + + + + System Login Banner Compliance + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The system login banner text should be set correctly. + + + + + + + + + + Enable Auditing for Processes Which Start Prior to the Audit Daemon + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Look for argument audit=1 in the kernel line in /etc/default/grub. + + + + + + + + + + + + + + Disable Kernel Support for USB via Bootloader Configuration + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Look for 'nousb' argument in the kernel line in /etc/default/grub + + + + + + + + + + Set Boot Loader Password + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The grub2 boot loader should have password protection enabled. + + + + + + + + + + + + + Set the UEFI Boot Loader Password + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The UEFI grub2 boot loader should have password protection enabled. + + + + + + + + + + + + + Disable Printer Browsing Entirely if Possible + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The CUPS print service can be configured to broadcast a list + of available printers to the network. Other machines on the network, also + running the CUPS print service, can be configured to listen to these + broadcasts and add and configure these printers for immediate use. By + disabling this browsing capability, the machine will no longer generate + or receive such broadcasts. + + + + + + + + + + Disable Printer Server if Possible + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + By default, locally configured printers will not be shared + over the network, but if this functionality has somehow been enabled, + these recommendations will disable it again. Be sure to disable outgoing + printer list broadcasts, or remote users will still be able to see the + locally configured printers, even if they cannot actually print to them. + To limit print serving to a particular set of users, use the Policy + directive. + + + + + + + + + + Enable GNOME3 Login Warning Banner + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Enable the GNOME3 Login warning banner. + + + + + + + + + + + + + + Disable GNOME3 Automounting + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The system's default desktop environment, GNOME3, will mount + devices and removable media (such as DVDs, CDs and USB flash drives) + whenever they are inserted into the system. Disable automount and autorun + within GNOME3. + + + + + + + + + + + + + + + + + + Disable Ctrl-Alt-Del Reboot Key Sequence in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 ctrl-alt-del reboot key sequence in GNOME3. + + + + + + + + + + + + + + Disable Geolocation in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable GNOME3 Geolocation for the clock and system. + + + + + + + + + + + + + + + + Disable Power Settings in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable GNOME3 power settings. + + + + + + + + + + + + + + Disable the GNOME3 Login Restart and Shutdown Buttons + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 Login GUI Restart and Shutdown buttons to all users on the login screen. + + + + + + + + + + + + + + Disable All GNOME3 Thumbnailers + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The system's default desktop environment, GNOME3, uses a + number of different thumbnailer programs to generate thumbnails for any + new or modified content in an opened folder. Disable the execution of + these thumbnail applications within GNOME3. + + + + + + + + + + + + + + Disable User Administration in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable GNOME3's ability to give users some administrative rights. + + + + + + + + + + + + + + Disable the GNOME3 Login User List + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 GUI listing of all known users on the login screen. + + + + + + + + + + + + + + Disable WIFI Network Connection Creation in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 wireless network creation settings. + + + + + + + + + + + + + + Disable WIFI Network Notification in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disable the GNOME3 wireless network notification. + + + + + + + + + + + + + + Enable the GNOME3 Login Smartcard Authentication + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Enable smartcard authentication in the GNOME3 Login GUI. + + + + + + + + + + + + + + Enable GUI Warning Banner + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Enable the GUI warning banner. + + + + + + + + + + + + + + Set the GNOME3 Login Number of Failures + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Set the GNOME3 number of login failure attempts. + + + + + + + + + + + + + + Require Credential Prompting for Remote Access in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Configure GNOME3 to require credential prompting for remote access. + + + + + + + + + + + + + + Require Encryption for Remote Access in GNOME3 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Configure GNOME3 to require encryption for remote access connections. + + + + + + + + + + + + + + Enable GNOME3 Screensaver Idle Activation + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Idle activation of the screen saver should be enabled. + + + + + + + + + + + + + + Configure the GNOME3 GUI Screen locking + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The allowed period of inactivity before the screensaver is activated. + + + + + + + + + + + + + + + Enable GNOME3 Screensaver Lock After Idle Period + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Idle activation of the screen lock should be enabled. + + + + + + + + + + + + + + + + + + Implement Blank Screensaver + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The GNOME3 screensaver should be blank. + + + + + + + + + + + + + + Disable Full User Name on Splash Shield + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + GNOME3 screen splash shield should not display full name of logged in user. + + + + + + + + + + + + + + Directory /etc/httpd/conf/ Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Directory permissions for /etc/httpd/conf/ should be set to 0750 (or stronger). + + + + + + + + + + Directory /var/log/httpd/ Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Directory permissions for /var/log/httpd should be set to 0700 (or stronger). + + + + + + + + + + Verify that All World-Writable Directories Have Sticky Bits Set + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The sticky bit should be set for all world-writable directories. + + + + + + + + Find world writable directories not owned by a system account + + Red Hat Enterprise Linux 7 + + All world writable directories should be owned by a system user. + + + + + + + + Disable Host-Based Authentication + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + SSH host-based authentication should be disabled. + + + + + + + + + + Verify that Interactive Boot is Disabled + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The ability for users to perform interactive startups should + be disabled. + + + + + + + + + + + + + + Disable Prelinking + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + The prelinking feature can interfere with the operation of + checksum integrity tools (e.g. AIDE), mitigates the protection provided + by ASLR, and requires additional CPU cycles by software upgrades. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Disable Core Dumps + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Core dumps for all users should be disabled + + + + + + + + + Set Last Login/Access Notification + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Configure the system to notify users of last login/access using pam_lastlog. + + + + + + + + + + Implement Local DB for DConf User Profile + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The DConf User profile should have the local DB configured. + + + + + + + + + Enable SELinux in the GRUB2 Bootloader" + + Red Hat Enterprise Linux 7 + + + Check if selinux=0 OR enforcing=0 within the GRUB2 configuration files, fail if found. + + + + + + + + + + + + Ensure Yum gpgcheck Globally Activated + + + The gpgcheck option should be used to ensure that checking + of an RPM package's signature always occurs prior to its + installation. + + + + + + + + + + + + + Ensure gpgcheck Enabled For All Yum or Dnf Package Repositories + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + Ensure all yum or dnf repositories utilize signature checking. + + + + + + + + + + Ensure the logrotate utility performs the automatic rotation of log files on daily basis + + Debian 8 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + + The frequency of automatic log files rotation performed by the logrotate utility should be configured to run daily + + + + + + + + + + + Red Hat Release and Auxiliary gpg-pubkey Packages Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The Red Hat release and auxiliary key packages are required to be installed. + + + + + + + + + + + + + + + + + + + + + + + + File grub.cfg Owned By root Group + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The grub.cfg file should be owned by the root group. By default, this file is located at /boot/grub2/grub.cfg or, for EFI systems, at /boot/efi/EFI/redhat/grub.cfg + + + + + + + + + + Verify group who owns 'group' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/group file should be owned by the appropriate + group. + + + + + + + + + Verify group who owns 'gshadow' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/gshadow file should be owned by the appropriate + group. + + + + + + + + + Verify group who owns 'passwd' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/passwd file should be owned by the appropriate + group. + + + + + + + + + Verify user who owns 'group' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/group file should be owned by the appropriate + user. + + + + + + + + + Verify user who owns 'gshadow' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/gshadow file should be owned by the appropriate + user. + + + + + + + + + Verify user who owns 'passwd' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/passwd file should be owned by the appropriate + user. + + + + + + + + + Verify that System Executables Have Root Ownership + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + CentOS 4 + CentOS 5 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + + + Checks that /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, + /usr/local/sbin, /usr/libexec, and objects therein, are owned by root. + + + + + + + + + + + Verify that Shared Library Files Have Root Ownership + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + + Checks that /lib, /lib64, /usr/lib, /usr/lib64, /lib/modules, and + objects therein, are owned by root. + + + + + + + + + + + Verify /var/log/audit Ownership + + + Checks that all /var/log/audit files and directories are owned by the root user and group. + + + + + + + + + + + + + + + + + + + Verify that System Executables Have Restrictive Permissions + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + CentOS 4 + CentOS 5 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + + + Checks that binary files under /bin, /sbin, /usr/bin, /usr/sbin, + /usr/local/bin, /usr/local/sbin, and /usr/libexec are not group-writable or world-writable. + + + + + + + + + + Verify permissions on 'group' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + File permissions for /etc/group should be set + correctly. + + + + + + + + + Verify /etc/gshadow Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + This test makes sure that /etc/gshadow is owned by 0, group owned by 0, and has mode 0000. If + the target file or directory has an extended ACL then it will fail the mode check. + + + + + + + + + Verify /etc/passwd Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + This test makes sure that /etc/passwd is owned by 0, group owned by 0, and has mode 0644 (or stronger). If + the target file or directory has an extended ACL then it will fail the mode check. + + + + + + + + + Verify /etc/shadow Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + This test makes sure that /etc/shadow is owned by 0, group owned by 0, and has mode 0000. If + the target file or directory has an extended ACL then it will fail the mode check. + + + + + + + + + File grub.cfg Permissions + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + File permissions for grub.cfg should be set to 0600 (or stronger). By default, this file is located at /boot/grub2/grub.cfg or, for EFI systems, at /boot/efi/EFI/redhat/grub.cfg + + + + + + + + + + Proper Permissions User Home Directories + + + File permissions should be set correctly for the home directories for all user accounts. + + + + + + + + + + + Verify Permissions On Apache Web Server Configuration Files + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/httpd/conf/* files should have the appropriate permissions (0640 or stronger). + + + + + + + + + + Verify that Shared Library Files Have Restrictive Permissions + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + + Checks that /lib, /lib64, /usr/lib, /usr/lib64, /lib/modules, and + objects therein, are not group-writable or world-writable. + + + + + + + + + + + Find Unauthorized World-Writable Files + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The world-write permission should be disabled for all files. + + + + + + + + Find files unowned by a group + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + CentOS 4 + CentOS 5 + + All files should be owned by a group + + + + + + + + Verify /var/log/audit Permissions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Checks for correct permissions for all log files in /var/log/audit. + + + + + + + + + + + + File grub.cfg Owned By root User + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The grub.cfg file should be owned by the root user. By default, this file is located at /boot/grub2/grub.cfg or, for EFI systems, at /boot/efi/EFI/redhat/grub.cfg + + + + + + + + + + Disallow inbound firewall access to the SSH Server port + + Red Hat Enterprise Linux 7 + + If inbound SSH access is not needed, the firewall should disallow or reject access to + the SSH port (22). + + + + + + + + + + + + Banner for FTP Users + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + To trace malicious activity facilitated by the FTP + service, it must be configured to ensure that all commands sent to + the FTP server are logged using the verbose vsftpd log format. + + + + + + + + + + + + + + + Banner for FTP Users + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + This setting will cause the system greeting banner to be + used for FTP connections as well. + + + + + + + + + + All GIDs Are Present In /etc/group + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + CentOS 4 + CentOS 5 + Red Hat Enterprise Linux 4 + Red Hat Enterprise Linux 5 + + All GIDs referenced in /etc/passwd must be defined in /etc/group. + + + + + + + + + + + Disable GDM Automatic Login + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 7 + + Disable the GNOME Display Manager (GDM) ability to allow users to + automatically login. + + + + + + + + + + Disable GDM Guest Login + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 7 + + Disable the GNOME Display Manager (GDM) ability to allow guest users + to login. + + + + + + + + + + Verify group who owns 'shadow' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/shadow file should be owned by the appropriate + group. + + + + + + + + + Package Antivirus Installed + + + Antivirus software should be installed. + + + + + + + + + Package McAfeeVSEForLinux Installed + + + McAfee Antivirus software should be installed. + + + + + + + + + CentOS 6 + + + + The operating system installed on the system is + CentOS 6 + + + + + + + + + + CentOS 7 + + + + The operating system installed on the system is + CentOS 7 + + + + + + + + + + Installed operating system is Fedora + + + + + + + The operating system installed on the system is Fedora + + + + + + + + + + + + + Red Hat Enterprise Linux 6 + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + + The operating system installed on the system is + Red Hat Enterprise Linux 6 + + + + + + + + + + + + + + + Red Hat Enterprise Linux 7 + + + + The operating system installed on the system is + Red Hat Enterprise Linux 7 + + + + + + + + + + + + + + Scientific Linux 6 + + + + The operating system installed on the system is + Scientific Linux 6 + + + + + + + + + + Scientific Linux 7 + + + + The operating system installed on the system is + Scientific Linux 7 + + + + + + + + + + Disable dccp Kernel Module + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel module dccp should be disabled. + + + + + + + + + + + + + Disable usb-storage Kernel Module + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel module usb-storage should be disabled. + + + + + + + + + + + + + Configure LDAP to Use TLS for All Transactions + + Red Hat Enterprise Linux 7 + + Require the use of TLS for ldap clients. + + + + + + + + + + Configure LDAP CA Certificate Path + + Red Hat Enterprise Linux 7 + + Require the use of TLS for ldap clients. + + + + + + + + + + + Ensure Logwatch HostLimit Configured + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Test if HostLimit line in logwatch.conf is set appropriately. + + + + + + + + + Ensure Logwatch SplitHosts Configured + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Check if SplitHosts line in logwatch.conf is set appropriately. + + + + + + + + + Add nodev Option to /dev/shm + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Legitimate character and block devices should not exist + within temporary directories like /dev/shm. The nodev mount option should + be specified for /dev/shm. + + + + + + + + + Add noexec Option to /dev/shm + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + It can be dangerous to allow the execution of binaries from + world-writable temporary storage directories such as /dev/shm. The noexec + mount option prevents binaries from being executed out of + /dev/shm. + + + + + + + + + Add nosuid Option to /dev/shm + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nosuid mount option should be set for temporary storage + partitions such as /dev/shm. The suid/sgid permissions should not be + required in these world-writable directories. + + + + + + + + + Add nodev Option to Non-Root Local Partitions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nodev mount option prevents files from being interpreted + as character or block devices. Legitimate character and block devices + should exist in the /dev directory on the root partition or within chroot + jails built for system services. All other locations should not allow + character and block devices. + + + + + + + + + Mount Remote Filesystems with nodev + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nodev option should be enabled for all NFS mounts in /etc/fstab. + + + + + + + + + + + + Add nodev Option to Removable Media Partitions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nodev mount option prevents files from being interpreted + as character or block devices. Legitimate character and block devices + should exist in the /dev directory on the root partition or within chroot + jails built for system services. All other locations should not allow + character and block devices. + + + + + + + + + + + + + + + + + + + + + Add noexec Option to Removable Media Partitions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The noexec mount option prevents the direct execution of + binaries on the mounted filesystem. Users should not be allowed to + execute binaries that exist on partitions mounted from removable media + (such as a USB key). The noexec option prevents code from being executed + directly from the media itself, and may therefore provide a line of + defense against certain types of worms or malicious code. + + + + + + + + + + + + + + + + + + + + + Mount Remote Filesystems with nosuid + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nosuid option should be enabled for all NFS mounts in /etc/fstab. + + + + + + + + + + + + Verify No netrc Files Exist + + + The .netrc files contain login information used to auto-login into FTP servers and reside in the user's home directory. Any .netrc files should be removed. + + + + + + + + + Add nosuid Option to Removable Media Partitions + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nosuid mount option prevents set-user-identifier (suid) + and set-group-identifier (sgid) permissions from taking effect. These + permissions allow users to execute binaries with the same permissions as + the owner and group of the file respectively. Users should not be allowed + to introduce suid and guid files into the system via partitions mounted + from removeable media. + + + + + + + + + + + + + + + + + + + + + Require Client SMB Packet Signing, if using + mount.cifs + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Require packet signing of clients who mount + Samba shares using the mount.cifs program (e.g., those who + specify shares in /etc/fstab). To do so, ensure that signing + options (either sec=krb5i or sec=ntlmv2i) are + used. + + + + + + + + + + + + + + + + + Add nodev Option to /tmp + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Legitimate character and block devices should not exist + within temporary directories like /tmp. The nodev mount option should be + specified for /tmp. + + + + + + + + + Add noexec Option to /tmp + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + It can be dangerous to allow the execution of binaries from + world-writable temporary storage directories such as /tmp. The noexec + mount option prevents binaries from being executed out of + /tmp. + + + + + + + + + Add nosuid Option to /tmp + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The nosuid mount option should be set for temporary storage + partitions such as /tmp. The suid/sgid permissions should not be required + in these world-writable directories. + + + + + + + + + Bind Mount /var/tmp To /tmp + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /var/tmp directory should be bind mounted to /tmp in + order to consolidate temporary storage into one location protected by the + same techniques as /tmp. + + + + + + + + + + Disable Zeroconf Networking + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Disable Zeroconf automatic route assignment in the + 169.254.0.0 subnet. + + + + + + + + + Manually Assign IPv6 Router Address + + Red Hat Enterprise Linux 7 + + Define default gateways for IPv6 traffic + + + + + + + + + Disable Support for RPC IPv6 + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Disable ipv6 based rpc services + + + + + + + + + Enable Privacy Extensions for IPv6 + + Red Hat Enterprise Linux 7 + + Enable privacy extensions for IPv6 + + + + + + + + + Manually Assign Global IPv6 Address + + Red Hat Enterprise Linux 7 + + Manually configure addresses for IPv6 + + + + + + + + + Disable the network sniffer + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Disable the network sniffer + + + + + + + + + Direct root Logins Not Allowed + + + Preventing direct root logins help ensure accountability for actions + taken on the system using the root account. + + + + + + + + + + No nullok Option in /etc/pam.d/system-auth + + + The file /etc/pam.d/system-auth should not contain the nullok option + + + + + + + + + Find files unowned by a user + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + All files should be owned by a user + + + + + + + + + Ensure insecure_locks is disabled + + + Allowing insecure file locking could allow for sensitive + data to be viewed or edited by an unauthorized user. + + + + + + + + + No Legacy .rhosts Or hosts.equiv Files + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + There should not be any .rhosts or hosts.equiv files on the system. + + + + + + + + + + + System Accounts Do Not Run a Shell + + + The root account is the only system account that should have + a login shell. + + + + + + + + + + + + + + + + + + + + + + + Package aide Installed + + Red Hat Enterprise Linux 7 + + The RPM package aide should be installed. + + + + + + + + + Package audit Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package audit should be installed. + + + + + + + + + + Package bind Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package bind should be removed. + + + + + + + + + Package dconf Installed + + Red Hat Enterprise Linux 7 + + The RPM package dconf should be installed. + + + + + + + + + Package dhcp Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package dhcp should be removed. + + + + + + + + + Package dovecot Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package dovecot should be removed. + + + + + + + + + Package dracut-fips Installed + + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 7 + + The RPM package dracut-fips should be installed. + + + + + + + + + Package gdm Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package gdm should be installed. + + + + + + + + + Package httpd Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package httpd should be removed. + + + + + + + + + Package libreswan Installed + + Red Hat Enterprise Linux 7 + + The RPM package libreswan should be installed. + + + + + + + + + Package mcstrans Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package mcstrans should be removed. + + + + + + + + + Package net-snmp Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package net-snmp should be removed. + + + + + + + + + Package nss-pam-ldapd Removed + + Red Hat Enterprise Linux 7 + + The RPM package nss-pam-ldapd should be removed. + + + + + + + + + Package ntp Installed + + Red Hat Enterprise Linux 7 + + The RPM package ntp should be installed. + + + + + + + + + Package openldap-servers Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package openldap-servers should be removed. + + + + + + + + + Package openssh-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package openssh-server should be removed. + + + + + + + + + Package prelink Removed + + + The RPM package prelink should be removed. + + + + + + + + + + + Package rsh-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package rsh-server should be removed. + + + + + + + + + Package rsh Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package rsh should be removed. + + + + + + + + + Package rsyslog Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package rsyslog should be installed. + + + + + + + + + Package samba-common Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package samba-common should be removed. + + + + + + + + + Package screen Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package screen should be installed. + + + + + + + + + Package sendmail Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package sendmail should be removed. + + + + + + + + + Package setroubleshoot Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package setroubleshoot should be removed. + + + + + + + + + Package squid Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package squid should be removed. + + + + + + + + + Package talk-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package talk-server should be removed. + + + + + + + + + + Package talk Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package talk should be removed. + + + + + + + + + + Package telnet-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package telnet-server should be removed. + + + + + + + + + Package telnet Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package telnet should be removed. + + + + + + + + + Package tftp-server Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package tftp-server should be removed. + + + + + + + + + Package tftp Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package tftp should be removed. + + + + + + + + + Package vsftpd Installed + + Red Hat Enterprise Linux 7 + + The RPM package vsftpd should be installed. + + + + + + + + + Package vsftpd Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package vsftpd should be removed. + + + + + + + + + Package xinetd Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package xinetd should be removed. + + + + + + + + + Package xorg-x11-server-common Removed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package xorg-x11-server-common should be removed. + + + + + + + + + + Package ypbind Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package ypbind should be removed. + + + + + + + + + Package ypserv Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package ypserv should be removed. + + + + + + + + + Ensure /home Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + If user home directories will be stored locally, create a + separate partition for /home. If /home will be mounted from another + system such as an NFS server, then creating a separate partition is not + necessary at this time, and the mountpoint can instead be configured + later. + + + + + + + + + + Ensure /tmp Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /tmp directory is a world-writable directory used for + temporary file storage. Verify that it has its own partition or logical + volume. + + + + + + + + + + Ensure /var Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Ensuring that /var is mounted on its own partition enables + the setting of more restrictive mount options, which is used as temporary + storage by many program, particularly system services such as daemons. It + is not uncommon for the /var directory to contain world-writable + directories, installed by other software packages. + + + + + + + + + + Ensure /var/log Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + System logs are stored in the /var/log directory. Ensure + that it has its own partition or logical volume. + + + + + + + + + + Ensure /var/log/audit Located On Separate Partition + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Audit logs are stored in the /var/log/audit directory. + Ensure that it has its own partition or logical volume. Make absolutely + certain that it is large enough to store all audit logs that will be + created by the auditing daemon. + + + + + + + + + + Configure Postfix Against Unnecessary Release of Information + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Protect against unnecessary release of information. + + + + + + + + + Require Authentication for Single-User Mode + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The requirement for a password to boot into single-user mode + should be configured correctly. + + + + + + + + + + + + Require Client SMB Packet Signing in smb.conf + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Require samba clients which use smb.conf, such as smbclient, + to use packet signing. A Samba client should only communicate with + servers who can support SMB packet signing. + + + + + + + + + + Restrict Serial Port Root Logins + + + Preventing direct root login to serial port interfaces helps + ensure accountability for actions taken on the system using the root + account. + + + + + + + + + Ensure that No Dangerous Directories Exist in Root's Path + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The environment variable PATH should be set correctly for + the root user. + + + + + + + + + + + + + + Verify File Hashes with RPM + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + Fedora 22 + Fedora 23 + Fedora 24 + + Verify the RPM digests of system binaries using the RPM database. + + + + + + + + + + + Verify File Ownership And Permissions Using RPM + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Verify the integrity of installed packages + by comparing the installed files with information about the + files taken from the package metadata stored in the RPM + database. + + + + + + + + + + + + + Disable Rsyslogd from Accepting Remote Messages on Loghosts + Only + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + rsyslogd should reject remote messages + + + + + + + + + Send Logs to a Remote Loghost + + Debian 8 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Syslog logs should be sent to a remote loghost + + + + + + + + + + Restrict Virtual Console Root Logins + + + Preventing direct root login to virtual console devices + helps ensure accountability for actions taken on the system using the + root account. + + + + + + + + + Device Files Have Proper SELinux Context + + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 7 + + All device files in /dev should be assigned an SELinux security context other than 'device_t'. + + + + + + + + Ensure No Daemons are Unconfined by SELinux + + Red Hat Enterprise Linux 6 + Red Hat Enterprise Linux 7 + + All pids in /proc should be assigned an SELinux security context other than 'initrc_t'. + + + + + + + + Enable SELinux + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The SELinux policy should be set appropriately. + + + + + + + + + + SELinux Enforcing + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The SELinux state should be enforcing the local policy. + + + + + + + + + Change the default firewalld zone to drop + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Change the default firewalld zone to drop. + + + + + + + + + Set SHA512 Password Hashing Algorithm in /etc/libuser.conf + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The password hashing algorithm should be set correctly in /etc/libuser.conf. + + + + + + + + + Set SHA512 Password Hashing Algorithm in /etc/login.defs + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The password hashing algorithm should be set correctly in /etc/login.defs. + + + + + + + + + + + Set Password Hashing Algorithm in /etc/pam.d/system-auth + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The password hashing algorithm should be set correctly in /etc/pam.d/system-auth. + + + + + + + + + SNMP default communities disabled + + + SNMP default communities must be removed. + + + + + + + + + + SNMP use newer protocols + + + SNMP version 1 and 2c must not be enabled. + + + + + + + + + + Ensure Only Protocol 2 Connections Allowed + + Debian 8 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The OpenSSH daemon should be running protocol 2. + + + + + + + + + + + Disable Empty Passwords + + + Remote connections from accounts with empty passwords should + be disabled (and dependencies are met) + + + + + + + + + + Disable .rhosts Files + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + Emulation of the rsh command through the ssh server should + be disabled (and dependencies are met) + + + + + + + + + + Do Not Allow Users to Set Environment Options + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + PermitUserEnvironment should be disabled + + + + + + + + + + Disable DHCP Client + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + DHCP configuration should be static for all + interfaces. + + + + + + + + + Kernel "kernel.dmesg_restrict" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The "kernel.dmesg_restrict" kernel parameter should be set to "1" in both system configuration and system runtime. + + + + + + + + + + Kernel Runtime Parameter "kernel.exec-shield" Check + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel runtime parameter "kernel.exec-shield" should not be disabled and set to 1 on 32-bit systems. + + + + + + + + + + + + + + + + + + + + Kernel Runtime Parameter IPv6 Check + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Disables IPv6 for all network interfaces. + + + + + + + + + + + + Set Daemon umask + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The daemon umask should be set as appropriate + + + + + + + + + + Kernel "kernel.randomize_va_space" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "kernel.randomize_va_space" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "kernel.dmesg_restrict" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The kernel "kernel.dmesg_restrict" parameter should be set to "1" in system runtime. + + + + + + + + + Kernel "kernel.randomize_va_space" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "kernel.randomize_va_space" parameter should be set to "2" in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.disable_ipv6" Parameter Runtime Check + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.disable_ipv6" parameter should be set to "1" in system runtime. + + + + + + + + + Kernel "kernel.dmesg_restrict" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The kernel "kernel.dmesg_restrict" parameter should be set to "1" in the system configuration. + + + + + + + + + + + + + + Kernel "kernel.randomize_va_space" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "kernel.randomize_va_space" parameter should be set to "2" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.disable_ipv6" Parameter Configuration Check + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.disable_ipv6" parameter should be set to "1" in the system configuration. + + + + + + + + + + + + + TFTP Daemon Uses Secure Mode + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The TFTP daemon should use secure mode. + + + + + + + + + + Verify user who owns 'shadow' file + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The /etc/shadow file should be owned by the + appropriate user. + + + + + + + + + Deactivate Wireless Interfaces + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + All wireless interfaces should be disabled. + + + + + + + + Ensure that FAIL_DELAY is Configured in /etc/login.defs + + Red Hat Enterprise Linux 7 + + The delay between failed authentication attempts should be + set for all users specified in /etc/login.defs + + + + + + + + + Lock out the root account after failed login attempts + + Red Hat Enterprise Linux 7 + + The root account should be configured to deny access after the number of defined + failed attempts has been reached. + + + + + + + + + + + + Ensure YUM Removes Previous Package Versions + + Red Hat Enterprise Linux 7 + + The clean_requirements_on_remove option should be used to ensure that old + versions of software components are removed after updating. + + + + + + + + + Enable X11 Forwarding + + Red Hat Enterprise Linux 7 + + Enable X11Forwarding to encrypt X11 remote connections over SSH. + + + + + + + + + + Ensure gpgcheck Enabled for Local Packages + + Red Hat Enterprise Linux 7 + + The localpkg_gpgcheck option should be used to ensure that checking + of an RPM package's signature always occurs prior to its + installation. + + + + + + + + + Ensure gpgcheck Enabled for Repository Metadata + + Red Hat Enterprise Linux 7 + + The repo_gpgcheck option should be used to ensure that checking + of repository metadata always occurs. + + + + + + + + + SSH Server Private Key Permissions + + Red Hat Enterprise Linux 7 + + File permissions for the SSH Server's private keys should be +set to 0600 (or stronger). By default, these files are located at /etc/ssh. + + + + + + + + + SSHD Service Public Key Permissions + + Red Hat Enterprise Linux 7 + + File permissions for the SSH Server's public keys should be +set to 0644 (or stronger). By default, these files are located at /etc/ssh. + + + + + + + + + Find setgid files system packages + + Red Hat Enterprise Linux 7 + + All files with setgid should be owned by a base system package + + + + + + + + + Find setuid files from system packages + + Red Hat Enterprise Linux 7 + + All files with setuid should be owned by a base system package + + + + + + + + + Enable FIPS Mode in GRUB2 + + Red Hat Enterprise Linux 7 + + Look for argument fips=1 in the kernel line in /etc/default/grub. + + + + + + + + + + + + + + + + + + + Package kernel-PAE Installed + + Red Hat Enterprise Linux 7 + + The RPM package kernel-PAE should be installed on 32-bit + systems. + + + + + + + + + + + + Install McAfee Host-Based Intrusion Detection Software (HBSS) + + Red Hat Enterprise Linux 7 + + McAfee Host-Based Intrusion Detection Software (HBSS) software + should be installed. + + + + + + + + + + + + Disable bluetooth Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module bluetooth should be disabled. + + + + + + + + + + + + + Disable cramfs Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module cramfs should be disabled. + + + + + + + + + + + + + Disable freevxfs Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module freevxfs should be disabled. + + + + + + + + + + + + + Disable hfs Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module hfs should be disabled. + + + + + + + + + + + + + Disable hfsplus Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module hfsplus should be disabled. + + + + + + + + + + + + + Disable jffs2 Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module jffs2 should be disabled. + + + + + + + + + + + + + Disable sctp Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module sctp should be disabled. + + + + + + + + + + + + + Disable squashfs Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module squashfs should be disabled. + + + + + + + + + + + + + Disable udf Kernel Module + + Red Hat Enterprise Linux 7 + + The kernel module udf should be disabled. + + + + + + + + + + + + + Mount Remote Filesystems with Kerberos Security + + Red Hat Enterprise Linux 7 + + The Kerberos security option should be enabled for all NFS mounts in /etc/fstab. + + + + + + + + + + + Disable Client Dynamic DNS Updates + + Red Hat Enterprise Linux 7 + + Clients should not automatically update their own + DNS record. + + + + + + + + + + + Service nails Enabled + + Red Hat Enterprise Linux 7 + + The nails service should be enabled if possible. + + + + + + + + + + + + + + Service sshd Disabled + + Red Hat Enterprise Linux 7 + + The sshd service should be disabled if possible. + + + + + + + + + + + + Disable Compression Or Set Compression to delayed + + Red Hat Enterprise Linux 7 + + SSH should either have compression disabled or set to delayed. + + + + + + + + + + Disable Kerberos Authentication + + Red Hat Enterprise Linux 7 + + Unless needed, disable the Kerberos authentication option for +the SSH Server. + + + + + + + + + + Enable SSH Server's Strict Mode + + Red Hat Enterprise Linux 7 + + Enable StrictMode to check users home directory permissions +and configurations. + + + + + + + + + + Use Priviledge Separation + + Red Hat Enterprise Linux 7 + + Use priviledge separation to cause the SSH process to drop +root privileges when not needed. + + + + + + + + + + Configure SSSD's Memory Cache to Expire + + Red Hat Enterprise Linux 7 + + SSSD's memory cache should be configured to set to expire records after 1 day. + + + + + + + + + Configure SSSD to Expire Offline Credentials + + Red Hat Enterprise Linux 7 + + SSSD should be configured to expire offline credentials after 1 day. + + + + + + + + + Configure SSSD to Expire SSH Known Hosts + + Red Hat Enterprise Linux 7 + + SSSD should be configured to expire keys from known SSH hosts after 1 day. + + + + + + + + + Ensure !authenticate Is Not Used in Sudo + + Red Hat Enterprise Linux 7 + + Checks interactive shell timeout + + + + + + + + + + Ensure NOPASSWD Is Not Used in Sudo + + Red Hat Enterprise Linux 7 + + Checks interactive shell timeout + + + + + + + + + + Kernel "fs.suid_dumpable" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "fs.suid_dumpable" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.accept_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.accept_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.accept_source_route" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.accept_source_route" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.log_martians" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.log_martians" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.rp_filter" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.rp_filter" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.secure_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.secure_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.all.send_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.all.send_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.accept_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.accept_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.accept_source_route" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.accept_source_route" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.log_martians" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.log_martians" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.rp_filter" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.rp_filter" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.secure_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.secure_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.conf.default.send_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.conf.default.send_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.icmp_echo_ignore_broadcasts" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.icmp_echo_ignore_broadcasts" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.icmp_ignore_bogus_error_responses" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.icmp_ignore_bogus_error_responses" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.ip_forward" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.ip_forward" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv4.tcp_syncookies" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv4.tcp_syncookies" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_ra" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.all.accept_ra" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.all.accept_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_source_route" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.all.accept_source_route" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.forwarding" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.all.forwarding" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_ra" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.default.accept_ra" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_redirects" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.default.accept_redirects" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_source_route" Parameter Configuration and Runtime Check + + Red Hat Enterprise Linux 7 + + The "net.ipv6.conf.default.accept_source_route" kernel parameter should be set to the appropriate value in both system configuration and system runtime. + + + + + + + + + + + + + Kernel "fs.suid_dumpable" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "fs.suid_dumpable" parameter should be set to "0" in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.accept_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.accept_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.accept_source_route" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.accept_source_route" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.log_martians" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.log_martians" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.rp_filter" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.rp_filter" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.secure_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.secure_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.all.send_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.send_redirects" parameter should be set to "0" in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.accept_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.accept_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.accept_source_route" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.accept_source_route" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.log_martians" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.log_martians" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.rp_filter" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.rp_filter" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.ip_forward" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.ip_forward" parameter should be set to "0" in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.secure_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.secure_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.conf.default.send_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.send_redirects" parameter should be set to "0" in system runtime. + + + + + + + + + Kernel "net.ipv4.icmp_echo_ignore_broadcasts" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.icmp_echo_ignore_broadcasts" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.icmp_ignore_bogus_error_responses" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.icmp_ignore_bogus_error_responses" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv4.tcp_syncookies" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.tcp_syncookies" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.accept_ra" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_ra" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.accept_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.accept_source_route" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_source_route" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.all.forwarding" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.forwarding" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.default.accept_ra" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_ra" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.default.accept_redirects" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_redirects" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "net.ipv6.conf.default.accept_source_route" Parameter Runtime Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_source_route" parameter should be set to the appropriate value in system runtime. + + + + + + + + + Kernel "fs.suid_dumpable" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "fs.suid_dumpable" parameter should be set to "0" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.accept_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.accept_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.accept_source_route" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.accept_source_route" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.log_martians" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.log_martians" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.rp_filter" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.rp_filter" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.secure_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.secure_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.all.send_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.all.send_redirects" parameter should be set to "0" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.accept_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.accept_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.accept_source_route" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.accept_source_route" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.log_martians" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.log_martians" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.rp_filter" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.rp_filter" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.secure_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.secure_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.conf.default.send_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.conf.default.send_redirects" parameter should be set to "0" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.icmp_echo_ignore_broadcasts" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.icmp_echo_ignore_broadcasts" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.icmp_ignore_bogus_error_responses" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.icmp_ignore_bogus_error_responses" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.ip_forward" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.ip_forward" parameter should be set to "0" in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv4.tcp_syncookies" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv4.tcp_syncookies" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_ra" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_ra" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.accept_source_route" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.accept_source_route" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.all.forwarding" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.all.forwarding" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_ra" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_ra" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_redirects" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_redirects" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Kernel "net.ipv6.conf.default.accept_source_route" Parameter Configuration Check + + Red Hat Enterprise Linux 7 + + The kernel "net.ipv6.conf.default.accept_source_route" parameter should be set to the appropriate value in the system configuration. + + + + + + + + + + + + + Use Kerberos Security on All Exports + + Red Hat Enterprise Linux 7 + + Using Kerberos Security allows to cryptography authenticate a + valid user to an NFS share. + + + + + + + + + + Specify Multiple Remote chronyd NTP Servers for Time Data + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + Multiple chronyd NTP Servers for time synchronization should be specified. + + + + + + + + + + Specify a Remote NTP Server for Time Data + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + A remote NTP Server for time synchronization should be + specified (and dependencies are met) + + + + + + + + + + Disable Ctrl-Alt-Del Reboot Activation + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + By default, the system will reboot when the + Ctrl-Alt-Del key sequence is pressed. + + + + + + + + + Disable Plaintext Authentication in Dovecot + + Red Hat Enterprise Linux 7 + + Plaintext authentication of mail clients should be disabled. + + + + + + + + + + Enable SSL in Dovecot + + Red Hat Enterprise Linux 7 + + SSL capabilities should be enabled for the mail server. + + + + + + + + + + Specify Multiple Remote ntpd NTP Server for Time Data + + Red Hat Enterprise Linux 7 + + Multiple ntpd NTP Servers for time synchronization should be specified. + + + + + + + + + Specify a Remote ntpd NTP Server for Time Data + + Red Hat Enterprise Linux 7 + + A remote ntpd NTP Server for time synchronization should be + specified (and dependencies are met) + + + + + + + + + Package chrony Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package chrony should be installed. + + + + + + + + + + Package cronie Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package cronie should be installed. + + + + + + + + + + Package firewalld Installed + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + + The RPM package firewalld should be installed. + + + + + + + + + + Postfix network listening should be disabled + + Red Hat Enterprise Linux 7 + + Postfix network listening should be disabled + + + + + + + + + + + + Confirm Existence and Permissions of System Log Files + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + All syslog log files should be owned by the appropriate group. + + + + + + + + + + + Confirm Existence and Permissions of System Log Files + + Debian 8 + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + All syslog log files should be owned by the appropriate user. + + + + + + + + + + + Confirm Existence and Permissions of System Log Files + + Fedora 22 + Fedora 23 + Fedora 24 + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + File permissions for all syslog log files should be set correctly. + + + + + + + + + + + Service dovecot Disabled + + Red Hat Enterprise Linux 7 + + The dovecot service should be disabled if possible. + + + + + + + + + + + + Specify Multiple Remote chronyd Or ntpd NTP Servers for Time Data + + Red Hat Enterprise Linux 7 + + Multiple remote chronyd or ntpd NTP Servers for time synchronization should be specified (and dependencies are met) + + + + + + + + + + + + + + + + Specify Remote NTP chronyd Or ntpd Server for Time Data + + Red Hat Enterprise Linux 7 + + A remote chronyd or ntpd NTP Server for time synchronization should be specified (and dependencies are met) + + + + + + + + + + + + + + + + Package abrt Removed + + Red Hat Enterprise Linux 7 + + The RPM package abrt should be removed. + + + + + + + + + Package acpid Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package acpid should be removed. + + + + + + + + + Package at Removed + + Red Hat Enterprise Linux 7 + + The RPM package at should be removed. + + + + + + + + + Package autofs Removed + + Red Hat Enterprise Linux 7 + + The RPM package autofs should be removed. + + + + + + + + + Package avahi Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package avahi should be removed. + + + + + + + + + Package bluez Removed + + Red Hat Enterprise Linux 7 + + The RPM package bluez should be removed. + + + + + + + + + Package certmonger Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package certmonger should be removed. + + + + + + + + + Package cups Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package cups should be removed. + + + + + + + + + Package cyrus-sasl Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package cyrus-sasl should be removed. + + + + + + + + + Package dbus Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package dbus should be removed. + + + + + + + + + Package esc Installed + + Red Hat Enterprise Linux 7 + + The RPM package esc should be installed. + + + + + + + + + Package iputils Removed + + Red Hat Enterprise Linux 7 + + The RPM package iputils should be removed. + + + + + + + + + Package irqbalance Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package irqbalance should be installed. + + + + + + + + + Package kernel-tools Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package kernel-tools should be removed. + + + + + + + + + Package kexec-tools Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package kexec-tools should be removed. + + + + + + + + + Package libcgroup-tools Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package libcgroup-tools should be removed. + + + + + + + + + Package libcgroup Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package libcgroup should be removed. + + + + + + + + + Package mdadm Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package mdadm should be removed. + + + + + + + + + Package nfs-utils Removed + + Red Hat Enterprise Linux 7 + + The RPM package nfs-utils should be removed. + + + + + + + + + Package ntpdate Removed + + Red Hat Enterprise Linux 7 + + The RPM package ntpdate should be removed. + + + + + + + + + Package oddjob Removed + + Red Hat Enterprise Linux 7 + + The RPM package oddjob should be removed. + + + + + + + + + Package openssh-server Installed + + Red Hat Enterprise Linux 7 + + The RPM package openssh-server should be installed. + + + + + + + + + Package pam_pkcs11 Installed + + Red Hat Enterprise Linux 7 + + The RPM package pam_pkcs11 should be installed. + + + + + + + + + Package pcsc-lite Installed + + Red Hat Enterprise Linux 7 + + The RPM package pcsc-lite should be installed. + + + + + + + + + Package portreserve Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package portreserve should be removed. + + + + + + + + + Package postfix Installed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package postfix should be installed. + + + + + + + + + Package psacct Installed + + Red Hat Enterprise Linux 7 + + The RPM package psacct should be installed. + + + + + + + + + Package qpid-cpp-server Removed + + Red Hat Enterprise Linux 7 + + The RPM package qpid-cpp-server should be removed. + + + + + + + + + Package quagga Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package quagga should be removed. + + + + + + + + + Package quota-nld Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package quota-nld should be removed. + + + + + + + + + Package rhnsd Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package rhnsd should be removed. + + + + + + + + + Package samba Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package samba should be removed. + + + + + + + + + Package smartmontools Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package smartmontools should be removed. + + + + + + + + + Package sssd Installed + + Red Hat Enterprise Linux 7 + + The RPM package sssd should be installed. + + + + + + + + + Package subscription-manager Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package subscription-manager should be removed. + + + + + + + + + Package sysstat Removed + + Red Hat Enterprise Linux 7 + Red Hat Enterprise Linux 6 + + The RPM package sysstat should be removed. + + + + + + + + + Package tcp_wrappers Installed + + Red Hat Enterprise Linux 7 + + The RPM package tcp_wrappers should be installed. + + + + + + + + + + Package xinetd Installed + + Red Hat Enterprise Linux 7 + + The RPM package xinetd should be installed. + + + + + + + + + pcscd.socket Activation Socket Enabled + + Red Hat Enterprise Linux 7 + + The pcscd.socket activation socket should be enabled if possible. + + + + + + + + + + + + Service abrtd Disabled + + Red Hat Enterprise Linux 7 + + The abrtd service should be disabled if possible. + + + + + + + + + + + + Service acpid Disabled + + Red Hat Enterprise Linux 7 + + The acpid service should be disabled if possible. + + + + + + + + + + + + Service atd Disabled + + Red Hat Enterprise Linux 7 + + The atd service should be disabled if possible. + + + + + + + + + + + + Service auditd Enabled + + Red Hat Enterprise Linux 7 + + The auditd service should be enabled if possible. + + + + + + + + + + + + Service autofs Disabled + + Red Hat Enterprise Linux 7 + + The autofs service should be disabled if possible. + + + + + + + + + + + + Service avahi-daemon Disabled + + Red Hat Enterprise Linux 7 + + The avahi-daemon service should be disabled if possible. + + + + + + + + + + + + Service bluetooth Disabled + + Red Hat Enterprise Linux 7 + + The bluetooth service should be disabled if possible. + + + + + + + + + + + + Service certmonger Disabled + + Red Hat Enterprise Linux 7 + + The certmonger service should be disabled if possible. + + + + + + + + + + + + Service cgconfig Disabled + + Red Hat Enterprise Linux 7 + + The cgconfig service should be disabled if possible. + + + + + + + + + + + + Service cgred Disabled + + Red Hat Enterprise Linux 7 + + The cgred service should be disabled if possible. + + + + + + + + + + + + Service chronyd Enabled + + Red Hat Enterprise Linux 7 + + The chronyd service should be enabled if possible. + + + + + + + + + + + + Service chronyd Or Service ntpd Enabled + + Red Hat Enterprise Linux 7 + + At least one of the chronyd or ntpd services should be enabled if possible. + + + + + + + + + + Service cpupower Disabled + + Red Hat Enterprise Linux 7 + + The cpupower service should be disabled if possible. + + + + + + + + + + + + Service crond Enabled + + Red Hat Enterprise Linux 7 + + The crond service should be enabled if possible. + + + + + + + + + + + + Service cups Disabled + + Red Hat Enterprise Linux 7 + + The cups service should be disabled if possible. + + + + + + + + + + + + Service debug-shell Disabled + + Red Hat Enterprise Linux 7 + + The debug-shell service should be disabled if possible. + + + + + + + + + Service dhcpd Disabled + + Red Hat Enterprise Linux 7 + + The dhcpd service should be disabled if possible. + + + + + + + + + + + + Service firewalld Enabled + + Red Hat Enterprise Linux 7 + + The firewalld service should be enabled if possible. + + + + + + + + + + + + Service httpd Disabled + + Red Hat Enterprise Linux 7 + + The httpd service should be disabled if possible. + + + + + + + + + + + + Service irqbalance Enabled + + Red Hat Enterprise Linux 7 + + The irqbalance service should be enabled if possible. + + + + + + + + + + + + Service kdump Disabled + + Red Hat Enterprise Linux 7 + + The kdump service should be disabled if possible. + + + + + + + + + + + + Service mdmonitor Disabled + + Red Hat Enterprise Linux 7 + + The mdmonitor service should be disabled if possible. + + + + + + + + + + + + Service messagebus Disabled + + Red Hat Enterprise Linux 7 + + The messagebus service should be disabled if possible. + + + + + + + + + + + + Service named Disabled + + Red Hat Enterprise Linux 7 + + The named service should be disabled if possible. + + + + + + + + + + + + Service netconsole Disabled + + Red Hat Enterprise Linux 7 + + The netconsole service should be disabled if possible. + + + + + + + + + Service nfs Disabled + + Red Hat Enterprise Linux 7 + + The nfs service should be disabled if possible. + + + + + + + + + + + + Service nfslock Disabled + + Red Hat Enterprise Linux 7 + + The nfslock service should be disabled if possible. + + + + + + + + + + + + Service ntpd Enabled + + Red Hat Enterprise Linux 7 + + The ntpd service should be enabled if possible. + + + + + + + + + + + + Service ntpdate Disabled + + Red Hat Enterprise Linux 7 + + The ntpdate service should be disabled if possible. + + + + + + + + + + + + Service oddjobd Disabled + + Red Hat Enterprise Linux 7 + + The oddjobd service should be disabled if possible. + + + + + + + + + + + + Service portreserve Disabled + + Red Hat Enterprise Linux 7 + + The portreserve service should be disabled if possible. + + + + + + + + + + + + Service postfix Enabled + + Red Hat Enterprise Linux 7 + + The postfix service should be enabled if possible. + + + + + + + + + + + + Service psacct Enabled + + Red Hat Enterprise Linux 7 + + The psacct service should be enabled if possible. + + + + + + + + + + + + Service qpidd Disabled + + Red Hat Enterprise Linux 7 + + The qpidd service should be disabled if possible. + + + + + + + + + + + + Service quota_nld Disabled + + Red Hat Enterprise Linux 7 + + The quota_nld service should be disabled if possible. + + + + + + + + + + + + Service rdisc Disabled + + Red Hat Enterprise Linux 7 + + The rdisc service should be disabled if possible. + + + + + + + + + + + + Service rexec Disabled + + Red Hat Enterprise Linux 7 + + The rexec service should be disabled if possible. + + + + + + + + + + + + + Service rhnsd Disabled + + Red Hat Enterprise Linux 7 + + The rhnsd service should be disabled if possible. + + + + + + + + + + + + Service rhsmcertd Disabled + + Red Hat Enterprise Linux 7 + + The rhsmcertd service should be disabled if possible. + + + + + + + + + + + + Service rlogin Disabled + + Red Hat Enterprise Linux 7 + + The rlogin service should be disabled if possible. + + + + + + + + + + + + + Service rpcbind Disabled + + Red Hat Enterprise Linux 7 + + The rpcbind service should be disabled if possible. + + + + + + + + + + + + Service rpcgssd Disabled + + Red Hat Enterprise Linux 7 + + The rpcgssd service should be disabled if possible. + + + + + + + + + + + + Service rpcidmapd Disabled + + Red Hat Enterprise Linux 7 + + The rpcidmapd service should be disabled if possible. + + + + + + + + + + + + Service rpcsvcgssd Disabled + + Red Hat Enterprise Linux 7 + + The rpcsvcgssd service should be disabled if possible. + + + + + + + + + + + + Service rsh Disabled + + Red Hat Enterprise Linux 7 + + The rsh service should be disabled if possible. + + + + + + + + + + + + + Service rsyslog Enabled + + Red Hat Enterprise Linux 7 + + The rsyslog service should be enabled if possible. + + + + + + + + + + + + Service saslauthd Disabled + + Red Hat Enterprise Linux 7 + + The saslauthd service should be disabled if possible. + + + + + + + + + + + + Service smartd Disabled + + Red Hat Enterprise Linux 7 + + The smartd service should be disabled if possible. + + + + + + + + + + + + Service smb Disabled + + Red Hat Enterprise Linux 7 + + The smb service should be disabled if possible. + + + + + + + + + + + + Service snmpd Disabled + + Red Hat Enterprise Linux 7 + + The snmpd service should be disabled if possible. + + + + + + + + + + + + Service squid Disabled + + Red Hat Enterprise Linux 7 + + The squid service should be disabled if possible. + + + + + + + + + + + + Service sshd Enabled + + Red Hat Enterprise Linux 7 + + The sshd service should be enabled if possible. + + + + + + + + + + + + Service sssd Enabled + + Red Hat Enterprise Linux 7 + + The sssd service should be enabled if possible. + + + + + + + + + + + + Service sysstat Disabled + + Red Hat Enterprise Linux 7 + + The sysstat service should be disabled if possible. + + + + + + + + + + + + Service telnet Disabled + + Red Hat Enterprise Linux 7 + + The telnet service should be disabled if possible. + + + + + + + + + + + + + Service tftp Disabled + + Red Hat Enterprise Linux 7 + + The tftp service should be disabled if possible. + + + + + + + + + + + + Service vsftpd Disabled + + Red Hat Enterprise Linux 7 + + The vsftpd service should be disabled if possible. + + + + + + + + + + + + Service xinetd Disabled + + Red Hat Enterprise Linux 7 + + The xinetd service should be disabled if possible. + + + + + + + + + + + + Service ypbind Disabled + + Red Hat Enterprise Linux 7 + + The ypbind service should be disabled if possible. + + + + + + + + + + + + Service zebra Disabled + + Red Hat Enterprise Linux 7 + + The zebra service should be disabled if possible. + + + + + + + + + + + + Enable Smart Card Login + + Red Hat Enterprise Linux 7 + + Enable Smart Card logins + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /etc/default/useradd + ^\s*INACTIVE\s*=\s*(\d+)\s*$ + 1 + + + /etc/passwd + + ^([^:]+):.*$ + 1 + + + oval:ssg-variable_count_of_all_usernames_from_etc_passwd:var:1 + + + /etc/security/limits.conf + ^[\s]*\*[\s]+(?:(?:hard)|(?:-))[\s]+maxlogins[\s]+(\d+)\s*$ + 1 + + + + + /etc/login.defs + + .*\n[^#]*(PASS_MAX_DAYS\s+\d+)\s*\n + 1 + + + oval:ssg-variable_last_pass_max_days_instance_value:var:1 + + + + + /etc/login.defs + + .*\n[^#]*(PASS_MIN_DAYS\s+\d+)\s*\n + 1 + + + oval:ssg-variable_last_pass_min_days_instance_value:var:1 + + + /etc/passwd + ^(?!root:)[^:]*:[^:]*:0 + 1 + + + .* + + + + + /etc/login.defs + + .*\n[^#]*(PASS_MIN_LEN\s+\d+)\s*\n + 1 + + + oval:ssg-variable_last_pass_min_len_instance_value:var:1 + + + /etc/security/pwquality.conf + ^dcredit[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^difok[\s]*=[\s]*(\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^lcredit[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^maxclassrepeat[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^maxrepeat[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^minclass[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^minlen[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/security/pwquality.conf + ^ocredit[\s]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_pwquality\.so.*$ + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_cracklib\.so.*retry=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_pwquality\.so.*retry=([0-9]*).*$ + 1 + + + /etc/security/pwquality.conf + ^ucredit[s\]*=[\s]*(-?\d+)(?:[\s]|$) + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:sufficient)|(?:required))\s+pam_unix\.so.*remember=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*password\s+(?:(?:requisite)|(?:required))\s+pam_pwhistory\.so.*remember=([0-9]*).*$ + 1 + + + + + /etc/login.defs + + .*\n[^#]*(PASS_WARN_AGE\s+\d+)\s*\n + 1 + + + oval:ssg-variable_last_pass_warn_age_instance_value:var:1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*auth[\s]+required[\s]+pam_faillock\.so[\s]+preauth[\s]+silent[\s]+[^\n]*deny=([0-9]+)[\s]*(?s).*[\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]+(?s).*[\n][\s]*auth[\s]+\[default=die\][\s]+pam_faillock\.so[\s]+authfail[\s]+[^\n]*deny=([0-9]+)[^\n]*[\n] + + 1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*account[\s]+required[\s]+pam_faillock\.so[^\n]*[\n][\s]*account[\s]+required[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*auth[\s]+required[\s]+pam_faillock\.so[\s]+preauth[\s]+silent[\s]+[^\n]*deny=([0-9]+)[\s]*(?s).*[\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]+(?s).*[\n][\s]*auth[\s]+\[default=die\][\s]+pam_faillock\.so[\s]+authfail[\s]+[^\n]*deny=([0-9]+)[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*account[\s]+required[\s]+pam_faillock\.so[^\n]*[\n][\s]*account[\s]+required[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + /etc/pam.d/system-auth + ^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*fail_interval=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*fail_interval=([0-9]*).*$ + 1 + + + /etc/pam.d/password-auth + ^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*fail_interval=([0-9]*).*$ + 1 + + + /etc/pam.d/password-auth + ^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*fail_interval=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*unlock_time=([0-9]*).*$ + 1 + + + /etc/pam.d/system-auth + ^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*unlock_time=([0-9]*).*$ + 1 + + + /etc/pam.d/password-auth + ^\s*auth\s+(?:(?:sufficient)|(?:\[default=die\]))\s+pam_faillock\.so\s+authfail.*unlock_time=([0-9]*).*$ + 1 + + + /etc/pam.d/password-auth + ^\s*auth\s+(?:(?:required))\s+pam_faillock\.so\s+preauth.*unlock_time=([0-9]*).*$ + 1 + + + + PATH + + + + + oval:ssg-state_accounts_root_path_dirs_wrong_perms:ste:1 + oval:ssg-state_accounts_root_path_dirs_symlink:ste:1 + + + /etc/profile + ^[\s]*TMOUT[\s]*=[\s]*(.*)[\s]*$ + 1 + + + /etc/profile.d + ^.*\.sh$ + ^[\s]*TMOUT[\s]*=[\s]*(.*)[\s]*$ + 1 + + + /etc/bashrc + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_bashrc_umask_as_number:var:1 + + + /etc/csh.cshrc + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_csh_cshrc_umask_as_number:var:1 + + + /etc/login.defs + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_login_defs_umask_as_number:var:1 + + + /etc/profile + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_profile_umask_as_number:var:1 + + + /etc/aide.conf + ^@@define[\s]DBDIR[\s]+(/.*)$ + 1 + + + /etc/aide.conf + ^database_out=file:@@{DBDIR}/([a-z.]+)$ + + 1 + + + + + + /etc/crontab + ^[0-9]*[\s]*[0-9]*[\s]*\*[\s]*\*[\s]*\*[\s]*root[\s]*/usr/sbin/aide[\s]*\-\-check.*$ + 1 + + + /etc/cron.d + ^.*$ + ^[0-9]*[\s]*[0-9]*[\s]*\*[\s]*\*[\s]*\*[\s]*root[\s]*/usr/sbin/aide[\s]*\-\-check.*$ + 1 + + + /var/spool/cron/root + ^[0-9]*[\s]*[0-9]*[\s]*\*[\s]*\*[\s]*\*[\s]*(root|)/usr/sbin/aide[\s]*\-\-check.*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+chmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+chmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+chmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+chmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+chown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+chown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+chown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+chown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchmod[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchmodat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchmodat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchmodat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchmodat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchownat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchownat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fchownat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fchownat[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+fsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+fsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lchown[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lremovexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+lsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+lsetxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+removexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+removexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+removexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+removexattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+setxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+setxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b32[\s]+)(?:.*-S[\s]+setxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+(?:.*-F[\s]+arch=b64[\s]+)(?:.*-S[\s]+setxattr[\s]+)(?:.*-F\s+auid>=1000[\s]+)(?:.*-F\s+auid!=4294967295[\s]+).*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+rmdir\s+\-S\s+unlink\s+\-S\s+unlinkat\s+\-S\s+rename\s+\-S\s+renameat\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+rmdir\s+\-S\s+unlink\s+\-S\s+unlinkat\s+\-S\s+rename\s+\-S\s+renameat\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-e\s+2\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-e\s+2\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/usr/sbin/insmod[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/usr/sbin/rmmod[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/usr/sbin/modprobe[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+init_module\s+\-S\s+delete_module\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/usr/sbin/insmod[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/usr/sbin/rmmod[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/usr/sbin/modprobe[\s]+\-p[\s]+\b([raw]*x[raw]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+init_module\s+\-S\s+delete_module\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/log/tallylog\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/run/faillock/\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/log/lastlog\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/log/tallylog\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/run/faillock/\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/log/lastlog\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/selinux/[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/selinux/[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+mount\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+mount\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+sethostname\s+\-S\s+setdomainname\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/issue[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/issue\.net[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/hosts[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/sysconfig/network[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+sethostname\s+\-S\s+setdomainname\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/issue[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/issue\.net[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/hosts[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/sysconfig/network[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + + / + + [a-z]+ + oval:ssg-state_setuid_or_setgid_set:ste:1 + oval:ssg-state_dev_proc_sys_dirs:ste:1 + + + oval:ssg-variable_count_of_suid_sgid_binaries_on_system:var:1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*(-a always,exit -F path=[^\n]+ -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged)[\s]*$ + 1 + oval:ssg-state_proper_audit_rule_but_for_unprivileged_command:ste:1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*(-a always,exit -F path=[^\n]+ -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged)[\s]*$ + 1 + oval:ssg-state_proper_audit_rule_but_for_unprivileged_command:ste:1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/run/utmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/log/btmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w\s+/var/log/wtmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/run/utmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/log/btmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-w\s+/var/log/wtmp\s+\-p\s+wa\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/sudoers[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/sudoers[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32[\s]+-S[\s]+clock_settime[\s]+-F[\s]+a0=(?:0x)?0[\s]+(?:-F[\s]+key=|-k[\s]+)time-change[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64[\s]+-S[\s]+clock_settime[\s]+-F[\s]+a0=(?:0x)?0[\s]+(?:-F[\s]+key=|-k[\s]+)time-change[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32[\s]+-S[\s]+clock_settime[\s]+-F[\s]+a0=(?:0x)?0[\s]+(?:-F[\s]+key=|-k[\s]+)time-change[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64[\s]+-S[\s]+clock_settime[\s]+-F[\s]+a0=(?:0x)?0[\s]+(?:-F[\s]+key=|-k[\s]+)time-change[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+settimeofday[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+settimeofday[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+settimeofday[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+settimeofday[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+stime[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+stime[\s]+.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^[\s]*-w[\s]+\/etc\/localtime[\s]+-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^[\s]*-w[\s]+\/etc\/localtime[\s]+-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*-k[\s]+[\S]+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+\-F\s+arch=b32\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EACCES\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+\-F\s+arch=b32\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EPERM\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+\-F\s+arch=b64\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EACCES\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-a\s+always,exit\s+\-F\s+arch=b64\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EPERM\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+\-F\s+arch=b32\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EACCES\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+\-F\s+arch=b32\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EPERM\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+\-F\s+arch=b64\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EACCES\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /etc/audit/audit.rules + ^\-a\s+always,exit\s+\-F\s+arch=b64\s+?\-S\s+creat\s+\-S\s+open\s+\-S\s+openat\s+\-S\s+open_by_handle_at\s+\-S\s+truncate\s+\-S\s+ftruncate\s+\-F\s+exit=\-EPERM\s+\-F\s+auid>=1000\s+\-F\s+auid!=4294967295\s+\-k\s+[-\w]+\s*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/augenrules.*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/group[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s+]\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/passwd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/gshadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/shadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/rules\.d/.*\.rules + ^\-w[\s]+/etc/security/opasswd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /usr/lib/systemd/system/auditd.service + ^ExecStartPost=\-\/sbin\/auditctl.*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/group[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s+]\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/passwd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/gshadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/shadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audit/audit.rules + ^\-w[\s]+/etc/security/opasswd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+\w+[\s]*$ + 1 + + + /etc/audisp/plugins.d/syslog.conf + + + ^[ ]*active[ ]+=[ ]+yes[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*action_mail_acct[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*admin_space_left_action[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*flush[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*max_log_file[ ]+=[ ]+(\d+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*max_log_file_action[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*num_logs[ ]+=[ ]+(\d+)[ ]*$ + 1 + + + /etc/audit/auditd.conf + + + ^[ ]*space_left_action[ ]+=[ ]+(\S+)[ ]*$ + 1 + + + /etc/issue + + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX="(.*)"$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX_DEFAULT="(.*)"$ + 1 + + + /etc/default/grub + ^\s*GRUB_DISABLE_RECOVERY=(.*)$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX="(.*)"$ + 1 + + + /boot/grub2/grub.cfg + + + /boot/grub2/grub2.cfg + ^[\s]*set[\s]+superusers=\"(?i)(?!root|admin|administrator)(?-i).*\"$ + 1 + + + /boot/grub2/grub2.cfg + ^[\s]*password_pbkdf2[\s]+.*[\s]+grub\.pbkdf2\.sha512.*$ + 1 + + + /boot/efi/EFI/(redhat|fedora)/grub.cfg + + + /boot/efi/EFI/(redhat|fedora)/grub.cfg + ^[\s]*set[\s]+superusers=\"(?i)(?!root|admin|administrator)(?-i).*\"$ + 1 + + + /boot/efi/EFI/(redhat|fedora)/grub.cfg + ^[\s]*password_pbkdf2[\s]+.*[\s]+grub\.pbkdf2\.sha512.*$ + 1 + + + /etc/cups/cupsd.conf + ^[\s]*Browsing[\s]+(?:Off|No) + 1 + + + /etc/cups/cupsd.conf + ^[\s]*BrowseAllow[\s]+(?:none) + 1 + + + /etc/cups/cupsd.conf + ^[\s]*Port[\s]+(\d)+ + 1 + + + /etc/cups/cupsd.conf + ^[\s]*Listen[\s]+(?:localhost|127\.0\.0\.1|::1):(\d)+ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?banner-message-enable=true$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/banner-message-enable$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/media-handling]([^\n]*\n+)+?automount=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/media-handling/automount$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/media-handling]([^\n]*\n+)+?automount-open=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/media-handling/automount-open$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/media-handling]([^\n]*\n+)+?autorun-never=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/media-handling/autorun-never$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/settings-daemon/plugins/media-keys]([^\n]*\n+)+?logout=''$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/settings-daemon/plugins/media-keys/logout$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/system/location]([^\n]*\n+)+?enabled=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/system/location/enabled$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/clocks]([^\n]*\n+)+?geolocation=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/clocks/geolocation$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/settings-daemon/plugins/power/active]([^\n]*\n+)+?active=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/settings-daemon/plugins/power/active$ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?disable-restart-buttons=true$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/disable-restart-buttons$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/thumbnailers]([^\n]*\n+)+?disable-all=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/thumbnailers/disable-all$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/lockdown]([^\n]*\n+)+?user-administratrion-enabled=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/lockdown/user-administration-disabled$ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?disable-user-list=true$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/disable-user-list$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/nm-applet]([^\n]*\n+)+?disable-wifi-create=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/nm-applet/disable-wifi-create$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/nm-applet]([^\n]*\n+)+?suppress-wireless-networks-available=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/nm-applet/suppress-wireless-networks-available$ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?enable-smartcard-authentication=true$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/enable-smartcard-authentication$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/banner-message-text$ + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^banner-message-text=[\s']*([^']*) + 1 + + + /etc/dconf/db/gdm.d/ + ^.*$ + ^\[org/gnome/login-screen]([^\n]*\n+)+?allowed-failures=3$ + 1 + + + /etc/dconf/db/gdm.d/locks/ + ^.*$ + ^/org/gnome/login-screen/allowed-failures$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/Vino]([^\n]*\n+)+?authentication-methods=\['vnc'\]$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/Vino/authentication-methods$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/Vino]([^\n]*\n+)+?require-encryption=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/Vino/require-encryption$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?idle-activation-enabled=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/idle-activation-enabled$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + + ^\[org/gnome/desktop/session]([^\n]*\n+)+?idle-delay=uint32[\s][0-9]*$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/session/idle-delay$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + + ^idle-delay[\s=]*uint32[\s]([^=\s]*) + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?lock-enabled=true$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/lock-enabled$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?lock-delay=uint32[\s]0$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/lock-delay$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?picture-uri=string[\s]\'\'$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/picture-uri$ + 1 + + + /etc/dconf/db/local.d/ + ^.*$ + ^\[org/gnome/desktop/screensaver]([^\n]*\n+)+?show-full-name-in-top-bar=false$ + 1 + + + /etc/dconf/db/local.d/locks/ + ^.*$ + ^/org/gnome/desktop/screensaver/show-full-name-in-top-bar$ + 1 + + + /etc/httpd/conf + + + + /var/log/httpd + + + + + / + + oval:ssg-state_world_writable_and_not_sticky:ste:1 + + + + / + + oval:ssg-state_gid_is_user_and_world_writable:ste:1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)HostbasedAuthentication(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX=".*systemd.confirm_spawn=(?:1|yes|true|on).*$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX_DEFAULT=".*systemd.confirm_spawn=(?:1|yes|true|on).*$ + 1 + + + /etc/sysconfig/prelink + ^[\s]*PRELINKING=no[\s]* + 1 + + + /etc/security/limits.conf + ^[\s]*\*[\s]+(?:hard|-)[\s]+core[\s]+([\d]+) + 1 + + + + + /etc/pam.d/postlogin + [\n][\s]*session[\s]+\[default=1\][\s]+pam_lastlog.so[\s\w\d\=]+showfailed[\s\w\d\=]*\n[\s]*session[\s]+optional[\s]+pam_lastlog.so[\s\w\d\=]+showfailed[\s\w\d\=]*[\n] + 1 + + + /etc/dconf/profile/user + ^user-db:user\nsystem-db:local$ + 1 + + + /etc/default/grub + ^[\s]*GRUB_CMDLINE_LINUX.*(selinux|enforcing)=0.*$ + 1 + + + /etc/grub2.cfg + ^.*(selinux|enforcing)=0.*$ + 1 + + + /etc/grub.d + ^.*$ + ^.*(selinux|enforcing)=0.*$ + 1 + + + /etc/yum.conf + ^\s*gpgcheck\s*=\s*1\s*$ + 1 + + + /etc/dnf/dnf.conf + ^\s*gpgcheck\s*=\s*1\s*$ + 1 + + + /etc/yum.repos.d + .* + ^\s*gpgcheck\s*=\s*0\s*$ + 1 + + + + + /etc/logrotate.conf + + (?:daily)*.*(?=[\n][\s]*daily)(.*)$ + 1 + + oval:ssg-state_another_rotate_interval_after_daily:ste:1 + + + /etc/cron.daily/logrotate + ^[\s]*/usr/sbin/logrotate[\s]*/etc/logrotate.conf(?:.*)$ + 1 + + + gpg-pubkey + + + /boot/grub2/grub.cfg + + + /boot/efi/EFI/redhat/grub.cfg + + + /etc/group + + + /etc/gshadow + + + /etc/passwd + + + /etc/group + + + /etc/gshadow + + + /etc/passwd + + + + ^\/(|s)bin|^\/usr\/(|local\/)(|s)bin|^\/usr\/libexec + + oval:ssg-state_owner_binaries_not_root:ste:1 + + + + ^\/(|s)bin|^\/usr\/(|local\/)(|s)bin|^\/usr\/libexec + ^.*$ + oval:ssg-state_owner_binaries_not_root:ste:1 + + + + ^\/lib(|64)\/|^\/usr\/lib(|64)\/ + + oval:ssg-state_owner_libraries_not_root:ste:1 + + + + ^\/lib(|64)\/|^\/usr\/lib(|64)\/ + ^.*$ + oval:ssg-state_owner_libraries_not_root:ste:1 + + + /etc/audit/auditd.conf + ^[ ]*log_group[ ]+=[ ]+root[ ]*$ + 1 + + + + /var/log/audit + + oval:ssg-state_owner_not_root_root_var_log_audit:ste:1 + + + + /var/log/audit + ^.*$ + oval:ssg-state_owner_not_root_root_var_log_audit:ste:1 + + + + /var/log/audit + + oval:ssg-state_owner_not_root_var_log_audit-non_root:ste:1 + + + + /var/log/audit + ^.*$ + oval:ssg-state_owner_not_root_var_log_audit-non_root:ste:1 + + + + ^\/(|s)bin|^\/usr\/(|local\/)(|s)bin|^\/usr\/libexec + ^.*$ + oval:ssg-state_perms_binary_files_nogroupwrite_noworldwrite:ste:1 + oval:ssg-state_perms_binary_files_symlink:ste:1 + + + /etc/group + + + /etc/gshadow + + + /etc/passwd + + + /etc/shadow + + + /boot/grub2/grub.cfg + + + /boot/efi/EFI/redhat/grub.cfg + + + + /home + + oval:ssg-state_home_dirs_home_itself:ste:1 + oval:ssg-state_home_dirs_wrong_perm:ste:1 + + + + /etc/httpd/conf + ^.*$ + + + + ^\/lib(|64)|^\/usr\/lib(|64) + + oval:ssg-state_perms_nogroupwrite_noworldwrite:ste:1 + oval:ssg-perms_state_symlink:ste:1 + + + + ^\/lib(|64)|^\/usr\/lib(|64) + ^.*$ + oval:ssg-state_perms_nogroupwrite_noworldwrite:ste:1 + oval:ssg-perms_state_symlink:ste:1 + + + + / + ^.*$ + oval:ssg-state_file_permissions_unauthorized_world_write:ste:1 + + oval:ssg-state_file_permissions_unauthorized_world_write_exclude_special_selinux_files:ste:1 + oval:ssg-state_file_permissions_unauthorized_world_write_exclude_proc:ste:1 + oval:ssg-state_file_permissions_unauthorized_world_write_exclude_sys:ste:1 + + + + + / + .* + oval:ssg-state_file_permissions_ungroupowned:ste:1 + + + /etc/group + ^[^:]+:[^:]*:([\d]+):[^:]*$ + 1 + + + + /var/log/audit + ^.*$ + oval:ssg-state_not_mode_0640:ste:1 + + + + /var/log/audit + ^.*$ + oval:ssg-state_not_mode_0600:ste:1 + + + /boot/grub2/grub.cfg + + + /boot/efi/EFI/redhat/grub.cfg + + + /etc/firewalld/services + ^.*\.xml$ + /service/service[@name='ssh'] + + + /etc/firewalld/services + ^.*\.xml$ + /service/port[@port='22'] + + + /etc/firewalld/zones + ^.*\.xml$ + /zone/service[@name='ssh'] + + + /etc/firewalld/zones + ^.*\.xml$ + /zone/port[@port='22'] + + + /etc/vsftpd/vsftpd.conf + ^[\s]*xferlog_enable[\s]*=[\s]*YES$ + 1 + + + /etc/vsftpd/vsftpd.conf + ^[\s]*xferlog_std_format[\s]*=[\s]*NO$ + 1 + + + /etc/vsftpd/vsftpd.conf + ^[\s]*log_ftp_protocol[\s]*=[\s]*YES$ + 1 + + + /etc/vsftpd/vsftpd.conf + ^[\s]*banner_file[\s]*=[\s]*/etc/issue*$ + 1 + + + /etc/group + + ^.*:x:([0-9]+): + 1 + + + /etc/passwd + + ^.*:[0-9]+:([0-9]+): + 1 + + + /etc/gdm/custom.conf + ^\[daemon]([^\n]*\n+)+?AutomaticLoginEnable=[Ff]alse$ + 1 + + + /etc/gdm/custom.conf + ^\[daemon]([^\n]*\n+)+?TimedLoginEnable=[Ff]alse$ + 1 + + + /etc/shadow + + + McAfeeVSEForLinux + + + + centos-release + + + centos-release + + + fedora-release + + + /etc/system-release-cpe + ^cpe:\/o:fedoraproject:fedora:[\d]+$ + 1 + + + redhat-release-workstation + + + redhat-release-server + + + redhat-release-computenode + + + + redhat-release-workstation + + + redhat-release-server + + + redhat-release-computenode + + + sl-release + + + sl-release + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+dccp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+usb-storage\s+(/bin/false|/bin/true)$ + 1 + + + /etc/nslcd.conf + ^[\s]*ssl[\s]+start_tls[\s]*$ + 1 + + + /etc/nslcd.conf + ^[\s]*tls_cacertdir[\s]+/etc/pki/tls/CA$ + 1 + + + /etc/nslcd.conf + ^[\s]*tls_cacertfile[\s]+/etc/pki/tls/CA/.*\.(pem|crt)$ + 1 + + + /etc/logwatch/conf/logwatch.conf + ^[\s]HostLimit[\s]*=[\s]*no[\s]*$ + 1 + + + /etc/logwatch/conf/logwatch.conf + ^[\s]SplitHosts[\s]*=[\s]*yes[\s]*$ + 1 + + + /dev/shm + + + /dev/shm + + + /dev/shm + + + + ^/\w.*$ + oval:ssg-state_local_nodev:ste:1 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+(.*)$ + + 0 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+.*$ + + 0 + + + + + + oval:ssg-var_removable_partition:var:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_nodev_runtime_cd_dvd_drive:ste:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_nodev_runtime_not_cd_dvd_drive:ste:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_noexec_runtime_cd_dvd_drive:ste:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_noexec_runtime_not_cd_dvd_drive:ste:1 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+(.*)$ + + 0 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+.*$ + + 0 + + + + /home + ^\.netrc$ + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_nosuid_runtime_cd_dvd_drive:ste:1 + + + /etc/fstab + + 1 + + + + ^.*$ + + oval:ssg-state_nosuid_runtime_not_cd_dvd_drive:ste:1 + + + /etc/fstab + ^[\s]*[\S]+[\s]+[\S]+[\s]+cifs[\s]+([\S]+) + 1 + + + /etc/mtab + ^[\s]*[\S]+[\s]+[\S]+[\s]+cifs[\s]+([\S]+) + 1 + + + /tmp + + + /tmp + + + /tmp + + + /var/tmp + + + /etc/mtab + ^[\s]*/tmp[\s]+/var/tmp[\s]+.*bind.*$ + + 1 + + + /etc/sysconfig/network + ^[\s]*NOZEROCONF[\s]*=[\s]*yes + 1 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^IPV6_DEFAULTGW=.+$ + 1 + + + /etc/netconfig + ^udp6\s+tpi_clts\s+v\s+inet6\s+udp\s+-\s+-$ + 1 + + + /etc/netconfig + ^tcp6\s+tpi_cots_ord\s+v\s+inet6\s+tcp\s+-\s+-$ + 1 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^IPV6_PRIVACY=rfc3041$ + 1 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^IPV6ADDR=.+$ + 1 + + + ^.*$ + oval:ssg-state_promisc:ste:1 + + + /etc/securetty + ^.*$ + 1 + + + /etc/securetty + ^$ + 1 + + + /etc/pam.d/system-auth + \s*nullok\s* + 1 + + + /etc/passwd + ^[^:]+:[^:]+:([\d]+):[\d]+:[^:]*:[^:]+:[^:]*$ + 1 + + + + / + .* + oval:ssg-file_permissions_unowned_userid_list_match:ste:1 + + + /etc/exports + ^(.*?(\binsecure_locks\b)[^$]*)$ + 1 + + + /root + ^\.(r|s)hosts$ + + + + /home + ^\.(r|s)hosts$ + + + /etc + ^s?hosts\.equiv$ + + + + /etc/login.defs + + .*\n(?!#|SYS_)(UID_MIN[\s]+[\d]+)\s*\n + 1 + + + + /etc/login.defs + + .*\n[^#]*(SYS_UID_MIN[\s]+[\d]+)\s*\n + 1 + + + + /etc/login.defs + + .*\n[^#]*(SYS_UID_MAX[\s]+[\d]+)\s*\n + 1 + + + /etc/passwd + ^(?!root).*:x:([\d]+):[\d]+:[^:]*:[^:]*:(?!\/sbin\/nologin|\/bin\/sync|\/sbin\/shutdown|\/sbin\/halt).*$ + 1 + + + oval:ssg-variable_default_range_quad_expr:var:1 + + + oval:ssg-variable_reserved_range_quad_expr:var:1 + + + oval:ssg-variable_dynalloc_range_quad_expr:var:1 + + + aide + + + audit + + + bind + + + dconf + + + dhcp + + + dovecot + + + dracut-fips + + + gdm + + + httpd + + + libreswan + + + mcstrans + + + net-snmp + + + nss-pam-ldapd + + + ntp + + + openldap-servers + + + openssh-server + + + prelink + + + rsh-server + + + rsh + + + rsyslog + + + samba-common + + + screen + + + sendmail + + + setroubleshoot + + + squid + + + talk-server + + + talk + + + telnet-server + + + telnet + + + tftp-server + + + tftp + + + vsftpd + + + vsftpd + + + xinetd + + + xorg-x11-server-common + + + ypbind + + + ypserv + + + /home + + + /tmp + + + /var + + + /var/log + + + /var/log/audit + + + /etc/postfix/main.cf + ^[\s]*smtpd_banner[\s]*=[\s]*\$myhostname[\s]+ESMTP[\s]*$ + 1 + + + /usr/lib/systemd/system/rescue.service + ^ExecStart=\-.*/sbin/sulogin + 1 + + + /usr/lib/systemd/system/runlevel1.target + ^Requires=.*rescue.service + 1 + + + + /etc/systemd/system + ^rescue.service$ + + + + /etc/systemd/system + ^runlevel1.target$ + + + /etc/samba/smb.conf + ^[\s]*client[\s]+signing[\s]*=[\s]*mandatory + 1 + + + /etc/securetty + ^ttyS[0-9]+$ + 1 + + + + PATH + + + + .* + .* + .* + .* + .* + ^.*bin/.*$ + oval:ssg-state_files_fail_md5_hash:ste:1 + + + + .* + .* + .* + .* + .* + .* + oval:ssg-state_files_fail_user_ownership:ste:1 + + + + .* + .* + .* + .* + .* + .* + oval:ssg-state_files_fail_group_ownership:ste:1 + + + + .* + .* + .* + .* + .* + .* + oval:ssg-state_files_fail_mode:ste:1 + + + /etc/rsyslog.conf + ^[\s]*\$(?:Input(?:TCP|RELP)|UDP)ServerRun + 1 + + + /etc/rsyslog.conf + ^\*\.\*[\s]+(?:@|\:omrelp\:) + 1 + + + /etc/rsyslog.d + .* + ^\*\.\*[\s]+(?:@|\:omrelp\:) + 1 + + + /etc/securetty + ^vc/[0-9]+$ + 1 + + + + /dev + ^.*$ + oval:ssg-state_selinux_all_devicefiles_labeled:ste:1 + + + + /proc + ^.*$ + oval:ssg-state_selinux_confinement_of_daemons:ste:1 + + + /etc/selinux/config + ^[\s]*SELINUXTYPE[\s]*=[\s]*([^\s]*) + 1 + + + /etc/selinux/config + ^[\s]*SELINUX[\s]*=[\s]*(.*)[\s]*$ + 1 + + + /etc/firewalld/firewalld.conf + ^DefaultZone=drop$ + 1 + + + /etc/libuser.conf + ^[\s]*crypt_style[\s]+=[\s]+(?i)sha512[\s]*$ + 1 + + + + + /etc/login.defs + + .*\n[^#]*(ENCRYPT_METHOD\s+\w+)\s*\n + 1 + + + oval:ssg-variable_last_encrypt_method_instance_value:var:1 + + + /etc/pam.d/system-auth + ^[\s]*password[\s]+(?:(?:required)|(?:sufficient))[\s]+pam_unix\.so[\s]+.*sha512.*$ + 1 + + + /etc/snmp/snmpd.conf + ^[\s]*(com2se|rocommunity|rwcommunity|createUser).*(public|private) + 1 + + + /etc/snmp/snmpd.conf + ^[\s]*(com2se|rocommunity|rwcommunity) + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)Protocol[\s]+2[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)PermitEmptyPasswords(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)IgnoreRhosts(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)PermitRootLogin(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)PermitUserEnvironment(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)Banner(?-i)[\s]+/etc/issue[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)ClientAliveInterval[\s]+(\d+)[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)ClientAliveCountMax[\s]+([\d]+)[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)Ciphers(?-i)[\s]+aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)MACs(?-i)[\s]+hmac-sha2-512,hmac-sha2-256,hmac-sha1[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^[\s]*BOOTPROTO[\s]*=[\s"]*([^#"\s]*) + 1 + + + /etc/sysctl.conf + ^[\s]*kernel.exec-shield[\s]*=[\s]*1[\s]*$ + 1 + + + kernel.exec-shield + + + /boot/grub2/grub.cfg + [\s]*noexec[\s]*=[\s]*off + 1 + + + /etc/init.d/functions + ^[\s]*(?i)UMASK(?-i)[\s]+([^#\s]*) + 1 + + + oval:ssg-var_etc_init_d_functions_umask_as_number:var:1 + + + kernel.dmesg_restrict + + + kernel.randomize_va_space + + + net.ipv6.conf.all.disable_ipv6 + + + + + /etc/sysctl.d + + ^.*$ + (?:^|.*\n)[^#]*kernel.dmesg_restrict[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*kernel.dmesg_restrict[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + ^[\s]*kernel.randomize_va_space[\s]*=[\s]*2[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*kernel.randomize_va_space[\s]*=[\s]*2[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*kernel.randomize_va_space[\s]*=[\s]*2[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*kernel.randomize_va_space[\s]*=[\s]*2[\s]*$ + 1 + + + /etc/sysctl.conf + ^[\s]*net.ipv6.conf.all.disable_ipv6[\s]*=[\s]*1[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv6.conf.all.disable_ipv6[\s]*=[\s]*1[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv6.conf.all.disable_ipv6[\s]*=[\s]*1[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv6.conf.all.disable_ipv6[\s]*=[\s]*1[\s]*$ + 1 + + + + + + + /etc/xinetd.d/tftp + ^[\s]*server_args[\s]+=[\s]+\-s[\s]+.+$ + 1 + + + /etc/shadow + + + /proc/net/wireless + ^\s*[-\w]+: + 1 + + + /etc/login.defs + ^[\s]*(?i)FAIL_DELAY(?-i)[\s]+([^#\s]*) + 1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*auth[\s]+required[\s]+pam_faillock\.so[\s]+preauth[\s]+silent[\s]+[^\n]*even_deny_root[\s]*(?s).*[\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/system-auth + + [\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]+(?s).*[\n][\s]*auth[\s]+\[default=die\][\s]+pam_faillock\.so[\s]+authfail[\s]+[^\n]*even_deny_root[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*auth[\s]+required[\s]+pam_faillock\.so[\s]+preauth[\s]+silent[\s]+[^\n]*even_deny_root[\s]*(?s).*[\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]*[\n] + + 1 + + + + + /etc/pam.d/password-auth + + [\n][\s]*auth[\s]+(?:(?:sufficient)|(?:\[.*default=die.*\]))[\s]+pam_unix\.so[^\n]+(?s).*[\n][\s]*auth[\s]+\[default=die\][\s]+pam_faillock\.so[\s]+authfail[\s]+[^\n]*even_deny_root[^\n]*[\n] + + 1 + + + /etc/yum.conf + ^\s*clean_requirements_on_remove\s*=\s*(1|True|yes)\s*$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)X11Forwarding(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/yum.conf + ^\s*localpkg_gpgcheck\s*=\s*(1|True|yes)\s*$ + 1 + + + /etc/yum.conf + ^\s*repo_gpgcheck\s*=\s*(1|True|yes)\s*$ + 1 + + + /etc/ssh/ + ^.*key$ + + + /etc/ssh/ + ^.*key.pub$ + + + + / + ^.*$ + oval:ssg-state_file_permissions_unauthorized_sgid:ste:1 + oval:ssg-state_sgid_whitelist:ste:1 + + + + / + ^.*$ + oval:ssg-state_file_permissions_unauthorized_suid:ste:1 + oval:ssg-state_suid_whitelist:ste:1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX="(.*)"$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX_DEFAULT="(.*)"$ + 1 + + + /etc/default/grub + ^\s*GRUB_CMDLINE_LINUX_DEFAULT=.*$ + 1 + + + kernel-PAE + + + MFErt + + + MFEcma + + + /opt/McAfee/accm/bin + accm + + + /opt/McAfee/auditengine/bin + auditmanager + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+bluetooth\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+cramfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+freevxfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+hfsplus\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+jffs2\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+sctp\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+squashfs\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.d + ^.*\.conf$ + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modprobe.conf + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /etc/modules-load.d + ^.*\.conf$ + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /run/modules-load.d + ^.*\.conf$ + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /usr/lib/modules-load.d + ^.*\.conf$ + ^\s*install\s+udf\s+(/bin/false|/bin/true)$ + 1 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+(.*)$ + + 0 + + + /etc/fstab + ^\s*\[?[\.\w-:]+\]?:[/\w-]+\s+[/\w-]+\s+nfs[4]?\s+.*$ + + 0 + + + /etc/sysconfig/network-scripts + ifcfg-.* + ^[\s]*DHCP_HOSTNAME[\s]*=.*$ + 1 + + + /etc/dhclient.*\.conf + ^[\s]*send[\s]+host-name.*$ + 1 + + + /etc/dhcp + ^.*$ + ^[\s]*send[\s]+host-name.*$ + 1 + + + nails + 0 + + + nails + 1 + + + nails + 2 + + + nails + 3 + + + nails + 4 + + + nails + 5 + + + nails + 6 + + + multi-user.target + + + /etc/ssh/sshd_config + ^[\s]*(?i)Compression(?-i)[\s]+(no|delayed)[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)GSSAPIAuthentication(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)KerberosAuthentication(?-i)[\s]+no[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)StrictModes(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)PrintLastLog(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/ssh/sshd_config + ^[\s]*(?i)UsePrivilegeSeparation(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$ + 1 + + + /etc/sssd/sssd.conf + ^\[nss]([^\n]*\n+)+?memcache_timeout[\s]+=[\s]+86400$ + 1 + + + /etc/sssd/sssd.conf + ^\[nss]([^\n]*\n+)+?offline_credentials_expiration[\s]+=[\s]+1$ + 1 + + + /etc/sssd/sssd.conf + ^\[nss]([^\n]*\n+)+?ssh_known_hosts_timeout[\s]+=[\s]+86400$ + 1 + + + /etc/sudoers + ^(?!#).*[\s]+\!authenticate.*$ + 1 + + + /etc/sudoers.d + ^.*$ + ^(?!#).*[\s]+\!authenticate.*$ + 1 + + + /etc/sudoers + ^(?!#).*[\s]+NOPASSWD[\s]*\:.*$ + 1 + + + /etc/sudoers.d + ^.*$ + ^(?!#).*[\s]+NOPASSWD[\s]*\:.*$ + 1 + + + fs.suid_dumpable + + + net.ipv4.conf.all.accept_redirects + + + net.ipv4.conf.all.accept_source_route + + + net.ipv4.conf.all.log_martians + + + net.ipv4.conf.all.rp_filter + + + net.ipv4.conf.all.secure_redirects + + + net.ipv4.conf.all.send_redirects + + + net.ipv4.conf.default.accept_redirects + + + net.ipv4.conf.default.accept_source_route + + + net.ipv4.conf.default.log_martians + + + net.ipv4.conf.default.rp_filter + + + net.ipv4.ip_forward + + + net.ipv4.conf.default.secure_redirects + + + net.ipv4.conf.default.send_redirects + + + net.ipv4.icmp_echo_ignore_broadcasts + + + net.ipv4.icmp_ignore_bogus_error_responses + + + net.ipv4.tcp_syncookies + + + net.ipv6.conf.all.accept_ra + + + net.ipv6.conf.all.accept_redirects + + + net.ipv6.conf.all.accept_source_route + + + net.ipv6.conf.all.forwarding + + + net.ipv6.conf.default.accept_ra + + + net.ipv6.conf.default.accept_redirects + + + net.ipv6.conf.default.accept_source_route + + + /etc/sysctl.conf + ^[\s]*fs.suid_dumpable[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*fs.suid_dumpable[\s]*=[\s]*0[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*fs.suid_dumpable[\s]*=[\s]*0[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*fs.suid_dumpable[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.all.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.all.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + ^[\s]*net.ipv4.conf.all.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.all.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.all.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.all.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.log_martians[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.rp_filter[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.conf.default.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.conf.default.secure_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + ^[\s]*net.ipv4.conf.default.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.default.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.default.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.conf.default.send_redirects[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.icmp_echo_ignore_broadcasts[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_echo_ignore_broadcasts[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_echo_ignore_broadcasts[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_echo_ignore_broadcasts[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.icmp_ignore_bogus_error_responses[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_ignore_bogus_error_responses[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_ignore_bogus_error_responses[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.icmp_ignore_bogus_error_responses[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + ^[\s]*net.ipv4.ip_forward[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.ip_forward[\s]*=[\s]*0[\s]*$ + 1 + + + /run/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.ip_forward[\s]*=[\s]*0[\s]*$ + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + ^[\s]*net.ipv4.ip_forward[\s]*=[\s]*0[\s]*$ + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv4.tcp_syncookies[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.tcp_syncookies[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.tcp_syncookies[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv4.tcp_syncookies[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.all.forwarding[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.forwarding[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.forwarding[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.all.forwarding[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_ra[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_redirects[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.conf + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /run/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /usr/lib/sysctl.d + ^.*\.conf$ + (?:^|.*\n)[^#]*net.ipv6.conf.default.accept_source_route[\s]*=[\s]*(\d+)[\s]*\n + 1 + + + /etc/exports + ^\/.*\((\S+)\)$ + 0 + + + /etc/exports + ^\/.*$ + 0 + + + /etc/chrony.conf + ^([\s]*server[\s]+.+$){2,}$ + 1 + + + /etc/chrony.conf + ^[\s]*server[\s]+.+$ + 1 + + + /etc/systemd/system/ctrl-alt-del.target + + + /etc/dovecot/conf.d/10-auth.conf + ^[\s]*disable_plaintext_auth[\s]*=[\s]*yes[\s]*$ + 1 + + + /etc/dovecot/conf.d/10-ssl.conf + ^[\s]*ssl[\s]*=[\s]*yes[\s]*$ + 1 + + + /etc/ntp.conf + ^([\s]*server[\s]+.+$){2,}$ + 1 + + + /etc/ntp.conf + ^[\s]*server[\s]+.+$ + 1 + + + chrony + + + cronie + + + firewalld + + + /etc/postfix/main.cf + ^[\s]*inet_interfaces[\s]*=[\s]*localhost[\s]*$ + 1 + + + /etc/rsyslog.conf + ^\$IncludeConfig[\s]+([^\s;]+) + 1 + + + + + ^[^(\s|#|\$)]+[\s]+.*[\s]+-?(/+[^:;\s]+);*.*$ + 1 + + + + + + /etc/rsyslog.conf + ^\$IncludeConfig[\s]+([^\s;]+) + 1 + + + + + ^[^(\s|#|\$)]+[\s]+.*[\s]+-?(/+[^:;\s]+);*.*$ + 1 + + + + + + /etc/rsyslog.conf + ^\$IncludeConfig[\s]+([^\s;]+) + 1 + + + + + ^[^(\s|#|\$)]+[\s]+.*[\s]+-?(/+[^:;\s]+);*.*$ + 1 + + + + + + multi-user.target + + + /etc/systemd/system/default.target + + + abrt + + + acpid + + + at + + + autofs + + + avahi + + + bluez + + + certmonger + + + cups + + + cyrus-sasl + + + dbus + + + esc + + + iputils + + + irqbalance + + + kernel-tools + + + kexec-tools + + + libcgroup-tools + + + libcgroup + + + mdadm + + + nfs-utils + + + ntpdate + + + oddjob + + + openssh-server + + + pam_pkcs11 + + + pcsc-lite + + + portreserve + + + postfix + + + psacct + + + qpid-cpp-server + + + quagga + + + quota-nld + + + rhnsd + + + samba + + + smartmontools + + + sssd + + + subscription-manager + + + sysstat + + + tcp_wrappers + + + xinetd + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/xinetd.d/rexec + ^\s*disable\s+=\s+yes\s*$ + 1 + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/xinetd.d/rlogin + ^\s*disable\s+=\s+yes\s*$ + 1 + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/xinetd.d/rsh + ^\s*disable\s+=\s+yes\s*$ + 1 + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/xinetd.d/telnet + ^\s*disable\s+=\s+no\s*$ + 1 + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + multi-user.target + + + /etc/pam_pkcs11/pam_pkcs11.conf + + ^[\s]*cert_policy[ ]=(.*)$ + 1 + + + + /etc/pam.d/system-auth + + 1 + + + + /etc/pam.d/system-auth + + 1 + + + + /etc/pam.d/smartcard-auth + + 1 + + + + + + + + -1 + + + + + + + + + + + + + + + x + + + + + + 1 + + + + 1 + + + + 1 + + + + + + + + + + 1 + + + + 1 + + + + 1 + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + symbolic link + + + + + + + + + + + + + + + + + + true + true + + + ^\/(dev|proc|sys)\/.*$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ^.*audit=1.*$ + + + ^true|"true"$ + + + ^.*nousb.*$ + + + + + + + + + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + false + + + false + true + + + 1000 + true + + + 0 + + + + }[^{]+[\n][\s]*(weekly|monthly|yearly)|[\n][\s]*(weekly|monthly|yearly)[^}]+{ + + + 4ae0493b + fd431d51 + + + 45700c69 + 2fa658e0 + + + 53a7ff4b + f4a80eb5 + + + 4e0fd3a3 + c105b9de + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + 0 + + + 0 + 0 + + + true + true + + + symbolic link + + + false + false + false + false + false + false + false + false + + + 0 + + + 0 + + + false + false + false + false + false + false + false + false + false + false + false + false + + + 0 + + + 0 + + + false + false + false + false + false + false + false + false + + + 0 + + + 0 + + + false + false + false + false + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + + + + /home + + + true + true + true + true + true + true + true + + + false + false + false + false + false + false + false + false + false + + + true + true + + + symbolic link + + + regular + true + + + ^/selinux/(?:(?:member)|(?:user)|(?:relabel)|(?:create)|(?:access)|(?:context))$ + + + ^/proc/.*$ + + + ^/sys/.*$ + + + + + + + true + true + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + true + + + 0 + + + + + + 0 + + + unix + + + ^6.*$ + + + ^7.*$ + + + ^6.*$ + + + ^6.*$ + + + ^6.*$ + + + unix + + + ^7.*$ + + + ^7.*$ + + + ^7.*$ + + + ^6.*$ + + + ^7.*$ + + + nodev + + + noexec + + + nosuid + + + + ^/dev/.*$ + nodev + + + ^.*nodev.*$ + + + /dev/cdrom + + + ^.*,?nodev,?.*$ + + + + nodev + + + ^.*,?nodev,?.* + + + + nodev + + + ^.*,?noexec,?.*$ + + + + noexec + + + ^.*,?noexec,?.* + + + + noexec + + + ^.*nosuid.*$ + + + ^.*,?nosuid,?.*$ + + + + nosuid + + + ^.*,?nosuid,?.* + + + + nosuid + + + 2 + sec=(krb5i|ntlmv2i) + + + nodev + + + noexec + + + nosuid + + + PROMISC + + + + + + 0 + + + 0 + + + 0 + + + ^[:\.] + + + :: + + + \.\. + + + [:\.]$ + + + ^[^/] + + + [^\\]:[^/] + + + fail + + + + + + + + fail + + + fail + + + fail + + + device_t + + + initrc_t + + + + + + + + + SHA512 + + + + + + 0 + + + 0 + + + ^(static|none)$ + + + 1 + + + + + + 1 + + + 2 + + + 1 + + + 1 + + + ppc64 + + + ppc64le + + + i686 + + + x86_64 + + + 0 + + + + + + false + false + false + false + false + false + false + + + false + false + false + false + false + + + true + + + + + + true + + + + + + ^.*fips=1.*$ + + + ^.*sec=krb5:krb5i:krb5p.*$ + + + true + false + + + sshd.service + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ^.*,sec=krb5\:krb5i\:krb5p.*$ + + + /etc/systemd/system/ctrl-alt-del.target + /dev/null + + + regular + 0 + + + regular + 0 + + + regular + false + false + false + false + false + false + false + + + dovecot.service + + + /etc/systemd/system/default.target + /lib/systemd/system/multi-user.target$ + + + pcscd.socket + + + abrtd.service + + + acpid.service + + + atd.service + + + auditd.service + + + autofs.service + + + avahi-daemon.service + + + bluetooth.service + + + certmonger.service + + + cgconfig.service + + + cgred.service + + + chronyd.service + + + cpupower.service + + + crond.service + + + cups.service + + + debug-shell.service + + + dhcpd.service + + + firewalld.service + + + httpd.service + + + irqbalance.service + + + kdump.service + + + mdmonitor.service + + + messagebus.service + + + named.service + + + netconsole.service + + + nfs.service + + + nfslock.service + + + ntpd.service + + + ntpdate.service + + + oddjobd.service + + + portreserve.service + + + postfix.service + + + psacct.service + + + qpidd.service + + + quota_nld.service + + + rdisc.service + + + rexec.socket + + + rhnsd.service + + + rhsmcertd.service + + + rlogin.socket + + + rpcbind.service + + + rpcgssd.service + + + rpcidmapd.service + + + rpcsvcgssd.service + + + rsh.socket + + + rsyslog.service + + + saslauthd.service + + + smartd.service + + + smb.service + + + snmpd.service + + + squid.service + + + sshd.service + + + sssd.service + + + sysstat.service + + + telnet.socket + + + tftp.service + + + vsftpd.service + + + xinetd.service + + + ypbind.service + + + zebra.service + + + ^.*ocsp_on.*$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + / + + + + + + -a always,exit -F path= + + -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /dev/cdrom + /dev/dvd + /dev/scd0 + /dev/sr0 + + + + ^[\s]* + + + [\s]+[/\w]+[\s]+[\w]+[\s]+([^\s]+)(?:[\s]+[\d]+){2}$ + + + + + ^[\s]* + + + [\s]+[/\w]+[\s]+[\w]+[\s]+([^\s]+)(?:[\s]+[\d]+){2}$ + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + + + + + + + + + + + + -1 + + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + 64 + + + + 8 + + + + + + + + /usr/bin/cgclassify + /usr/bin/cgexec + /usr/sbin/netreport + /usr/bin/crontab + /usr/bin/gnomine + /usr/bin/iagno + /usr/bin/locate + /usr/bin/lockfile + /usr/bin/same-gnome + /usr/bin/screen + /usr/bin/ssh-agent + /usr/bin/wall + /usr/bin/write + /usr/lib/vte/gnome-pty-helper + /usr/lib/vte-2.90/gnome-pty-helper + /usr/lib/vte-2.91/gnome-pty-helper + /usr/lib64/vte/gnome-pty-helper + /usr/lib64/vte-2.90/gnome-pty-helper + /usr/lib64/vte-2.91/gnome-pty-helper + /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache + /usr/libexec/kde4/kdesud + /usr/libexec/openssh/ssh-keysign + /usr/libexec/utempter/utempter + /usr/lib/mailman/cgi-bin/admindb + /usr/lib/mailman/cgi-bin/admin + /usr/lib/mailman/cgi-bin/confirm + /usr/lib/mailman/cgi-bin/create + /usr/lib/mailman/cgi-bin/edithtml + /usr/lib/mailman/cgi-bin/listinfo + /usr/lib/mailman/cgi-bin/options + /usr/lib/mailman/cgi-bin/private + /usr/lib/mailman/cgi-bin/rmlist + /usr/lib/mailman/cgi-bin/roster + /usr/lib/mailman/cgi-bin/subscribe + /usr/lib/mailman/mail/mailman + /usr/sbin/lockdev + /usr/sbin/postdrop + /usr/sbin/postqueue + /usr/sbin/sendmail.sendmail + + + /usr/bin/abrt-action-install-debuginfo-to-abrt-cache + /usr/bin/at + /usr/bin/chage + /usr/bin/chfn + /usr/bin/chsh + /usr/bin/crontab + /usr/bin/fusermount + /usr/bin/gpasswd + /usr/bin/ksu + /usr/bin/mount + /usr/bin/newgrp + /usr/bin/passwd + /usr/bin/pkexec + /usr/bin/staprun + /usr/bin/sudoedit + /usr/bin/sudo + /usr/bin/su + /usr/bin/umount + /usr/bin/Xorg + /usr/lib64/amanda/application/amgtar + /usr/lib64/amanda/application/amstar + /usr/lib64/amanda/calcsize + /usr/lib64/amanda/dumper + /usr/lib64/amanda/killpgrp + /usr/lib64/amanda/planner + /usr/lib64/amanda/rundump + /usr/lib64/amanda/runtar + /usr/lib64/dbus-1/dbus-daemon-launch-helper + /usr/lib/amanda/application/amgtar + /usr/lib/amanda/application/amstar + /usr/lib/amanda/calcsize + /usr/lib/amanda/dumper + /usr/lib/amanda/killpgrp + /usr/lib/amanda/planner + /usr/lib/amanda/rundump + /usr/lib/amanda/runtar + /usr/lib/dbus-1/dbus-daemon-launch-helper + /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache + /usr/libexec/kde4/kpac_dhcp_helper + /usr/libexec/qemu-bridge-helper + /usr/libexec/spice-gtk-x86_64/spice-client-glib-usb-acl-helper + /usr/libexec/sssd/krb5_child + /usr/libexec/sssd/ldap_child + /usr/libexec/sssd/proxy_child + /usr/libexec/sssd/selinux_child + /usr/lib/polkit-1/polkit-agent-helper-1 + /usr/sbin/amcheck + /usr/sbin/amservice + /usr/sbin/mount.nfs + /usr/sbin/pam_timestamp_check + /usr/sbin/unix_chkpwd + /usr/sbin/userhelper + /usr/sbin/usernetctl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %/etc/rsyslog.conf + + + + + + + + + + + + + + + + + + + %/etc/rsyslog.conf + + + + + + + + + + + + + + + + + + + %/etc/rsyslog.conf + + + + + + + + + + + + + \nauth[\s]+required[\s]+pam_env.so + \nauth[\s]+\[success=1[\s]default=ignore\][\s]pam_succeed_if.so[\s]service[\s]notin[\s] + login:gdm:xdm:kdm:xscreensaver:gnome-screensaver:kscreensaver[\s]quiet[\s]use_uid + \nauth[\s]+\[success=done[\s]authinfo_unavail=ignore[\s]ignore=ignore[\s]default=die\][\s] + pam_pkcs11.so[\s]nodebug\n + + + + + \nauth[\s]+required[\s]+pam_env.so + \nauth[\s]+\[success=1[\s]default=ignore\][\s]pam_succeed_if.so[\s]service[\s]notin[\s] + login:gdm:xdm:kdm:xscreensaver:gnome-screensaver:kscreensaver[\s]quiet[\s]use_uid + \nauth[\s]+\[success=done[\s]ignore=ignore[\s]default=die\][\s] + pam_pkcs11.so[\s]nodebug[\s]wait_for_card\n + + + + + \nauth[\s]+required[\s]+pam_env.so + \nauth[\s]+\[success=done[\s]ignore=ignore[\s]default=die\][\s] + pam_pkcs11.so[\s]nodebug[\s]wait_for_card\n.* + \npassword[\s]+required[\s]+pam_pkcs11.so\n + + + + diff --git a/security_tools/openvas_scanner/RPM-GPG-KEY-EPEL b/security_tools/openvas_scanner/RPM-GPG-KEY-EPEL new file mode 100755 index 000000000..f205ede46 --- /dev/null +++ b/security_tools/openvas_scanner/RPM-GPG-KEY-EPEL @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.11 (GNU/Linux) + +mQINBFKuaIQBEAC1UphXwMqCAarPUH/ZsOFslabeTVO2pDk5YnO96f+rgZB7xArB +OSeQk7B90iqSJ85/c72OAn4OXYvT63gfCeXpJs5M7emXkPsNQWWSju99lW+AqSNm +jYWhmRlLRGl0OO7gIwj776dIXvcMNFlzSPj00N2xAqjMbjlnV2n2abAE5gq6VpqP +vFXVyfrVa/ualogDVmf6h2t4Rdpifq8qTHsHFU3xpCz+T6/dGWKGQ42ZQfTaLnDM +jToAsmY0AyevkIbX6iZVtzGvanYpPcWW4X0RDPcpqfFNZk643xI4lsZ+Y2Er9Yu5 +S/8x0ly+tmmIokaE0wwbdUu740YTZjCesroYWiRg5zuQ2xfKxJoV5E+Eh+tYwGDJ +n6HfWhRgnudRRwvuJ45ztYVtKulKw8QQpd2STWrcQQDJaRWmnMooX/PATTjCBExB +9dkz38Druvk7IkHMtsIqlkAOQMdsX1d3Tov6BE2XDjIG0zFxLduJGbVwc/6rIc95 +T055j36Ez0HrjxdpTGOOHxRqMK5m9flFbaxxtDnS7w77WqzW7HjFrD0VeTx2vnjj +GqchHEQpfDpFOzb8LTFhgYidyRNUflQY35WLOzLNV+pV3eQ3Jg11UFwelSNLqfQf +uFRGc+zcwkNjHh5yPvm9odR1BIfqJ6sKGPGbtPNXo7ERMRypWyRz0zi0twARAQAB +tChGZWRvcmEgRVBFTCAoNykgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iQI4BBMB +AgAiBQJSrmiEAhsPBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBqL66iNSxk +5cfGD/4spqpsTjtDM7qpytKLHKruZtvuWiqt5RfvT9ww9GUUFMZ4ZZGX4nUXg49q +ixDLayWR8ddG/s5kyOi3C0uX/6inzaYyRg+Bh70brqKUK14F1BrrPi29eaKfG+Gu +MFtXdBG2a7OtPmw3yuKmq9Epv6B0mP6E5KSdvSRSqJWtGcA6wRS/wDzXJENHp5re +9Ism3CYydpy0GLRA5wo4fPB5uLdUhLEUDvh2KK//fMjja3o0L+SNz8N0aDZyn5Ax +CU9RB3EHcTecFgoy5umRj99BZrebR1NO+4gBrivIfdvD4fJNfNBHXwhSH9ACGCNv +HnXVjHQF9iHWApKkRIeh8Fr2n5dtfJEF7SEX8GbX7FbsWo29kXMrVgNqHNyDnfAB +VoPubgQdtJZJkVZAkaHrMu8AytwT62Q4eNqmJI1aWbZQNI5jWYqc6RKuCK6/F99q +thFT9gJO17+yRuL6Uv2/vgzVR1RGdwVLKwlUjGPAjYflpCQwWMAASxiv9uPyYPHc +ErSrbRG0wjIfAR3vus1OSOx3xZHZpXFfmQTsDP7zVROLzV98R3JwFAxJ4/xqeON4 +vCPFU6OsT3lWQ8w7il5ohY95wmujfr6lk89kEzJdOTzcn7DBbUru33CQMGKZ3Evt +RjsC7FDbL017qxS+ZVA/HGkyfiu4cpgV8VUnbql5eAZ+1Ll6Dw== +=hdPa +-----END PGP PUBLIC KEY BLOCK----- diff --git a/security_tools/openvas_scanner/RPM-GPG-KEY-fedora-22 b/security_tools/openvas_scanner/RPM-GPG-KEY-fedora-22 new file mode 100755 index 000000000..27c119870 --- /dev/null +++ b/security_tools/openvas_scanner/RPM-GPG-KEY-fedora-22 @@ -0,0 +1,31 @@ +pub 4096R/8E1431D5 2014-07-09 Fedora (22) + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.11 (GNU/Linux) + +mQINBFO8uscBEADWHjOQeufsWIPFwX/43vHXQb95U39CS2o/uw56hp+M87RWxTfY +b+FtjYdQ4vKCEvrgdGCLFrW74YkdaTVKd/3C0aQolEzhrgrHOCyPw3DxC2dwnHMe +8z9uVxDTmitzCtIAR2eqeanNZIQzYDwcgzmXoxF2n/nZHQB2iPQj/QCXYVClddRk ++8MXC3YHtfGUmWeXl3840mSxMo6F48KNhzg0OzissHgU0xyfCWUYr1HYc4Q8aEVc +2N99ahxTPdWc7KmoYbHHlIlP13zCixkxelKcb7+phJ0k0jn0lVaKigN3UjKRt3C/ +WeLnOvdpQZIk0NP1mZ1wqNfiEW3lyymogr1qZTUUviG6xKXa4swaKKb2sSEddENJ +5S0YjFzT1l5jih3aLxQepn/HQ0AHHwAVPWDy2RaRh9pOtUbvF5kQTElV0YjGPaVc +JyGjkTCUPBjfvUG+bh6pvznQ1z85s0JssP0j3a20EzcYahnMhM7l+VSw0OP0O2dX +NWlIjfilaujvNybXY2r3FXopbH46RMuoOlADTZo6iLgKq64hLKpGIAn5koxTSs8R +1akOa4FlPqY+PMhGKHYQPXxQIr4wtrMNJ+Vp4hdKz1SWkoTWsKgycWDW+7Oswwph +VCDd0PWy2RpFeTZtXu8QUvxL3ZKCd9T8UNhqZ8TQfSKvuncgE/tQhMXgzQARAQAB +tCZGZWRvcmEgKDIyKSA8ZmVkb3JhQGZlZG9yYXByb2plY3Qub3JnPokCOAQTAQIA +IgUCU7y6xwIbDwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEa3AlI4UMdUu +pBAA1FVUUGWxOxF1MsFjgz7c7fx7rKg8Uj8ep+pVAo8klqGE8TPIRlWiuL/JEbPJ +Y3Aiv6agGVhCG8UrTzoei/aLbDA4WAUgHRANAbgqLd+HldA6dGXDJPBnci9Aze2X +w2luyWPNUa5SHAETy80XHjvXagjZApPWlTePpZB7aKsrc2arpuPxUVWlGKavja6a +2SY5aO4vqnB3rx3q6dfymcZ36TUcOc1H3yKpZ2keRxez6lLVi/DXDZU+D8q2Irjg +4gfqXvqVnoof27MawCA6bqNIHAz5f167BQjXqDtlNcIpO7cDEDuQTHQa4dNFxhto +9Rd3czWFIBTJkoGFeuYMLqAK+VbG2lhLmLs9sDf3gF5smlkadmzCz2VIIlLmI+Ot +F4Bv/lCJSIDrJua1s4xE+yC7hrCgQQ9I/ElF0r5K8LGSJgnZi2xnmSb9WDjTcIGP +I4P298v+ufY7vjJtIf5w3izS2/lPuqOonX6F69AUhyloPDO4XBVHmy0FOpuLePPD +6huG0cXq6omESVg0XERdmrowvDSjdrI6+m95DG/98KmUCDawq9jxjjc/8iO2BXDl +QpwANPpgEOduaWZiO6XAGHETuUOc66txDrVog08jTJFQOwXW3qa9loj44eZB/U50 +gz+KtT56HkLzsFd0X906Kr+5iiIbCz2mooEmcjfQgEW6nYc= +=yhf1 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/security_tools/openvas_scanner/RPM-GPG-KEY-fedora-22_sec b/security_tools/openvas_scanner/RPM-GPG-KEY-fedora-22_sec new file mode 100755 index 000000000..8539818a8 --- /dev/null +++ b/security_tools/openvas_scanner/RPM-GPG-KEY-fedora-22_sec @@ -0,0 +1,65 @@ +pub 4096R/A29CB19C 2014-07-09 Fedora Secondary (22) +sub 4096g/9A007DB4 2014-07-09 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.11 (GNU/Linux) + +mQINBFO8u6YBEADZC195A/9R9ohpiM1JUMyitt7uCwhatgJ2q9d4PWVR4uqJeGq5 +9HJ5KWbo1akVpZ3hGdEwWqMReHJiTtzCT0VysiasifRSeRGgkxNp+TKvz6jUI3Is +dKyw992F/ARfToAIRrpn4Idbl/TGz3y1aJ2u5wuaWKRupaUEG7urfPECb6vNTyJ4 +PURcv4sZLxrdtaibMOu9FzPPLAiYjmdfDv/LIey1rBnsv+NBhfb7HjVMy3y7a0Os +yn7ru2IPHElAnDMbyfMGgFW7W2cv4QPynIjR1Od3zRkHA0aZQ81DPB++Qzu8zCnA +37IlU3Ro26xEkd8GwenJlrQQ3yfeQLwLczyXPy/6zK3ZWeIEeq6jvhsZu/nzZ2P7 +DshKFWrou4nW5ZTPZvVNlJ3sGv1u9V9cnvse332SitNxP/cPEX+ObIkq3IQs6fp4 +uKAwBR4pEBPkt14oZIinVY9ujLBL8XOJnd/+A3vKPwCnUDO0NWs66yQQQIOs2gfv +uPekB6JAEP3ChgKe9sLY9e+zN7W3Ehf/kcLnYsbzf+f2N92vAiswYm7fr7t9nJ3o +kYlHo3ZG7Ka0meFmUIxPR3+ns7d+qKAKV6o8gBgNJ49REfZjihd9QE0MbQ6STJww +zb82/xuhXGh7SdkiY5mJY7qGV9enMUr8hTlhVNQFo2JqqBvojX74b3WpuQARAQAB +tDBGZWRvcmEgU2Vjb25kYXJ5ICgyMikgPGZlZG9yYUBmZWRvcmFwcm9qZWN0Lm9y +Zz6JAjgEEwECACIFAlO8u6YCGw8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJ +ENjR+oyinLGcV18P/2iS8Oyuhh3mEqCkmdAqj8bdGn3DaUVy3QqvsSWyVnzPz/vH +JURDUv2RMXYx2OUOAvVs67nWVlbhgHqgqWZD42uFl4JKhC2eo367iIcm4lz3yewW +zzMq3xHr3a9CHuuuNWwVpGOSS2rouFZ6X8m6WPLeTJwmKAO1++BsdM8hojCJMR8t +Urfzo5rbDVieuzv0s5Hld1/1nuZzvxKuwJ1W3WbD1LFwJwa5ehePOUFDXJMflZeS +KHE+bNtfxS7ly/QDZ+Gf2cwpqwPCz2ooOEnN5Fc6WvDmkIEYE64w6VCJKFvaSvMl +DsJVWxnpfXbCRUhE8F+oplizxK03kgBkDQA3nN6YsAPrSM+UgXkreQLHKEJ/6X5i +ljUU61bLyVsBaqifE4dkEFlsx2J2LYSn78y5OmsQJTIncjhYAxZmdK49tschDFP/ +fbTRaHZ1LLu4Ecua7Ih8DKIG+j5DIWgWmDAdVNMyGIeyhHEjJKdA/5r8c8yWyEOA +PbqtMccS2LCSz3B63e8c4BmtWbN2j+gFY+A0NLc86E/phIF2Djhg+Ty+/AYpDQ1L +lvKsrXUnKbNFEM9nW517Fxbyv1Jy8SnTOrUQmMbyE2xKpx08yQhUDedf/MLxpW3h +uoS60vIniphIFCJTwAyBhRtBja9gxiFl49O0CiuLxgFIUMavCyTgdUrVFhgwuQQN +BFO8u6YQEACi/FTGMHh29b3Jf2uBs6gSxhLfvlh5GqWJfmjpZdJLoeFwEzJUidPy +vdLsTNaRupniEPUAnbQ6KxUjkSjjzF+zEOKBd8QG5a8KfCMp1QKV+qXByUVoVg1V +SDCuXLE3skifVD8C0YTd8z59DfCYV8hRugrUfue6S120LETo7/IkF9IMDqCBfPJa +IXgonkU6Wb2leenDrv0LqN46Fob9HJP0V9TVbhIYO2rkeyaybGMyj/IHj6KqCcSy +bO4McfRbsGXHGms1HRLd+sq67aeoBiNJn4hf7qpMvg2PugARbBZkyNuvqwWRQ/uo +rbb9aXzi25+L2CXYCicX5mDo2c9ftJri5BHLBSaw48tmu8adHk3ON7ZruIVIuHDp +D4wIH2tcvx3eFACYe0aLLXQlhCzPwILm9oyzyW+IktX5UWDJwwVf3RdV/fhQmLBg +OncgYiiI3uWLq9Z4UzKZxaeZyiDntvri10iTaVyPWrYyDa6vQqddKMLuDNrHrZYx +4frJYxTvROz0vErB5adw/kPcde4RKl1niOehWSQ2Rb5h8XciZyDcAyIEnRVQWb7s +LWxNthZ6pH+JKio432sqiP1guZfeyBWdzXSxKJVp5zPTPtRAmubuC65Zl4FyeM6A +0yPs8OF6EII9x53jiOYFB+xfoWa53xGwcdxMcRE0Z8yPg1D7v7Vc2wADBRAAglvQ +Aex4NWp/22TlacJe3VeF/KX9XDXw++8dQ6xt/VYaG8Nn4B+DMOlJHUc7HK7rQvje +g9mIN1VSLG7J9Y9vPyunKYVHLcihfM5Uetjh0gLgfQqoH6SU+2GlZLfEFIsxbS0c +ZmQGG35QztBMT2tm0o675IeivalzU28nZRKcMqW4x4t9tC0jtxgFDo4wFOvww1KB +PsXYV/FSttpDhm2DZvpY5kBxqB0SSnmbyXtEscPWmTQavPAHwRiMWZnptnMQ31ij +cufjWVElrwiL1vo09pJDhaTIs2pOhAF/srRwjvkl+3LOeRd6ahZ/EFxyWzfMtnEB +s39PaCyg8IRLnI74ZfZxWHJnHqYI2widJQDlF2MG4STGsq8W7AjzfGe/mOAJznSb +nxumrYm7pqIJ0gHfJLtokvS19qXvIWtkPyXCmSLGJKLdS1FArZ7k6KvY8f/M48CG +EgGo5VZQlsMBb0/Wk59VM2JAjm5aJwM02A3Diund/eE6H0y/w3brEWVRRCwOu5FU +rB8WasJ81jKtxgB1axlWvtTNjb6lZVIIJLnWhS/YkZorPGs7U8HEcBVqkue+ym0V +p8jBt2SDtNRvp+LScyVMRX+jzKJleQ8Zrrv0CsjUulZDif9S/F/4RmjkMRqvTMNn +wuDA/VbQ6WN3eHooWoIhh20TfTDyUG+K7esg52yJAh8EGAECAAkFAlO8u6YCGwwA +CgkQ2NH6jKKcsZy83hAAr1iGX2iP6SRTMM0jpOal+zpi3OAaIH9FPmAPM4yrcTc4 +j0bWdmzckV7C8JMzwKIl80do84ptO1Nud7+AEa2NzJEJ0xs4F7X6+Wn5I+UIcLWP +v1CFR/fR1WQX2pL/dVRsdb+KHNYn8Gep8Ez8kA8Llod+8Dd/xDUhOnYkOChs3nDo +95eGT1ucj+zf6zcyVks54UbAWnOVdEwp2mwQSy7Uio93qVTR1Sg6kuMfY4EoueRC +baulA4RJyBWUc5aNTzL5O9nA8lU06X4/lUX4Z/Zbh5leuMuvf9FU0mhCxq9Z5Rvq +HS+j7cFMkKoyAe5wpjv7/c3ZS7hv+C3BPh/X0uSMDrtP+MwAIPw3cShtq7LyO2tx +W6q3/rHwrylYmd+TY3NYl+ztTCpLtaDFx1B1E5QrNk/Vrw0EamT0I18fPKbb/6V3 +Yn3PC0bkA3TVK9KrxUc7vpP8OKbYhEK1MuubvnK+m+EVJCHKmyqnpt+8KoGSN0+E +6aTuGJG7uq1xMrt0l38erM3y3Uk2mSWxb3G/8LPiQwaFlppgl1rJtYDQAaSz2r+/ +cOJOy11pNL2D434fi+Jgt1RxAfw6gyb6VbZzUkvKvLMD06B5PObv4afpVhyiiVt8 +ypzn1el8uL5hyRm7SODXMvHU9uS7tYIKcjTY0rzOhRGpSBILd467FfGt84Xwpa8= +=laf4 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/security_tools/openvas_scanner/RPM-GPG-KEY.art.txt b/security_tools/openvas_scanner/RPM-GPG-KEY.art.txt new file mode 100755 index 000000000..825424e1f --- /dev/null +++ b/security_tools/openvas_scanner/RPM-GPG-KEY.art.txt @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBEGP+skRBACyZz7muj2OgWc9FxK+Hj7tWPnrfxEN+0PE+n8MtqH+dxwQpMTd +gDpOXxJa45GM5pEwB6CFSFK7Fb/faniF9fDbm1Ga7MpBupIBYLactkoOTZMuTlGB +T0O5ha4h26YLqFfQOtlEi7d0+BDDdfHRQw3o67ycgRnLgYSA79DISc3MywCgk2TR +yd5sRfZAG23b4EDl+D0+oaMEAK73J7zuxf6F6V5EaxLd/w4JVB2xW0Glcn0fACOe +8FV9lzcZuo2xPpdGuyj02f/xlqvEav3XqTfFU2no61mA2pamaRNhlo+CEfGc7qde +/1twfSgOYqzeCx7+aybyPo8Th41b80FT19mfkjBf6+5NbUHffRabFFh1FmcPVNBn +F3FoA/95nRIzqDMItdTRitaZn02dIGNjdwllBD75bSVEvaR9O5hjBo0VMc25DB7f +DM2qEO52wCQbAKw9zFC284ekZVDaK4aHYt7iobHaqJEpKHgsDut5WWuMiSLR+SsF +aBHIZ9HvrKWLSUQKHU6A1Hva0P0r3GnoCMc/VCVfrLl721SjPbQzQXRvbWljIFJv +Y2tldCBUdXJ0bGUgPGFkbWluQGF0b21pY3JvY2tldHR1cnRsZS5jb20+iFkEExEC +ABkFAkGP+skECwcDAgMVAgMDFgIBAh4BAheAAAoJEDKpURRevSdEzcQAn1hSHqTO +jwv/z/picpOnR+mgycwHAKCBex2ciyXo5xeaQ9w7OMf7Jsmon7kBDQRBj/rMEAQA +6JvRndqE4koK0e49fUkICm1X0ZEzsVg9VmUW+Zft5guCRxmGlYTmtlC7oJCToRP/ +m/xH5uIevGiJycRKB0Ix+Csl6f9QuTkQ7tSTHcaIKbI3tL1x6CCBoWeTGYaOJlvk +ubrmajiMFaBfopLH2firoSToDGoUvv4e7bImIHEgNr8AAwUEAND0YR9DOEZvc+Lq +Ta/PQyxkdZ75o+Ty/O64E3OmO1Tuw2ciSQXCcwrbrMSE6EHHetxtGCnOdkjjjtmH +AnxsxdONv/EJuQmLcoNcsigZZ4tfRdmtXgcbnOmXBgmy1ea1KvWcsmecNSAMJHwR +7vDDKzbj4mSmudzjapHeeOewFF10iEYEGBECAAYFAkGP+swACgkQMqlRFF69J0Sq +nQCfa/q9Y/oY4dOTGj6MsdmRIQkKZhYAoIscjinFwTru4FVi2MIEzUUMToDK +=NOIx +-----END PGP PUBLIC KEY BLOCK----- diff --git a/security_tools/openvas_scanner/RPM-GPG-KEY.atomicorp.txt b/security_tools/openvas_scanner/RPM-GPG-KEY.atomicorp.txt new file mode 100755 index 000000000..8f1dfb51f --- /dev/null +++ b/security_tools/openvas_scanner/RPM-GPG-KEY.atomicorp.txt @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBFCrkUwBEADpjFL/PJmBGz36ZZVCGE9nxxrwYdIDYjvrjS9Xoq0qExcJE2qD +VitCDI9KLX7/qu61985vF13C5oqpuhl7nqTjwC59VJM+bitblj7o4DtKflyVtUK8 +ee0PwDnOk0NDHZZVB2KcaLs+cblbZL6LOjtQgWqjE7VH5AreeaqaJldP8kRBl/2R +Ug8o8NyUlvhGVKK/s7scIU9GhV4diFnNipnpdSZtRO1wgkGJ/uMhkSVRVrS1Ci0p +iADA+gmbmHpyk+H8JrtuiHm5K0OE31MoIM5jLwEpTzX5yQXOCEkQ8Dmfxy5T1qSV +1d6WdmoBmcXltfXifbNLkOYdZCTiW1z9uxi+PZ0GAyv04qICElDgCSGJ/5UxOjYG +GhDNRs7BmEHSfQHD9kE7VJ98JnQPqcwOO6IBgRuEt4z9Qw/ksPBBeZ11ktitWPDl +xP4PBy/JNb1/B2BmvjYvmYk88w9OUbwMXL8pkiQ/xMf3IltXKig6dOnjNOfQhmMf +uYztVbPtHct4eCxx12ThfvixygG/TIeq4VHbg0GW+wt39LtSgV+3BUz9QiQKY/wo +SIJbK5oaK0ZNdah8DCqco6xyNH67qbahZoXS2K+y0Um2+0ZBFH7wLrswW4eRTVsk +RFr79V/a8vh09GqoKN4tzNwpId4n5ivuwoYbca5j1AoW0GR4ne8MdSbAtwARAQAB +tEJBdG9taWNvcnAgKEF0b21pY29ycCBPZmZpY2lhbCBTaWduaW5nIEtleSkgPHN1 +cHBvcnRAYXRvbWljb3JwLmNvbT6JAjYEEwECACAFAlCrkUwCGwMGCwkIBwMCBBUC +CAMEFgIDAQIeAQIXgAAKCRD/vV0KRSCvqax4D/9G93N+b8CHcGQRzdpRnjLQ3lRp +vSFZlc2dBW7d9PuoO8yw0nJ5QkEfROZvg6fgNesYzDUdYcqSiTb91sDv2XENS3h7 +D9gx4kutGbb/KZNH8LJfinq429zvA00xdct5zL9c7PKM/qRxE1zdZlyJ03/ewLI5 +qyvcaHgZ8PQze1+vye0txuC40FVdCkZCXWlgX3Tw+JaCPtKHsC91+fcvKGRUEb5/ ++3owf3bnuKem3dcqlZlpniJtUIqfgwSTIZUwNfbE4jYsF/0mtM0wruJN0CWf5zCg +ICLG3TrcwrDEgSDkci+igcxz9heQ9DXuFuaUDE+DndyoeY7UmHjpGwmHwsJ0HttB +V574FB5oFndS4+AAz8ut6UT5ydEaPsMnQYAeSJxU0C5EFyA3UjIOsSe1esVm3sDq +VezPn4Q74Ex6YMX5w9OGCVlpl/TLM7b0UD0158RT6rxkW8owXaJwb1JO8wUNSIzN +2E2tm6FRVpOdxhR2CdkKMNilOG6glpi+3ZRgrXEr83bAYN6rwyUWHW3ihdfzVX6t +ZzIJVvnnEzxQaUISI/ZMzVlmzgyxOYseXHeapFJG92gNwxu2IqFlQ4xWUBkJiQll +ZkDBI7nqmV87cSJZsQPQPEzZej6rKA/pvOaUR9+p9jCildt2m9ulozk2pXgJgNVb +kt1o05etg6iRaeSaNQ== +=DrwN +-----END PGP PUBLIC KEY BLOCK----- diff --git a/security_tools/openvas_scanner/ReadMe b/security_tools/openvas_scanner/ReadMe new file mode 100755 index 000000000..f670b87c2 --- /dev/null +++ b/security_tools/openvas_scanner/ReadMe @@ -0,0 +1,48 @@ +OPENVAS Automation suits contains 2 major component. + +"openvas_setup_cli.py" script will be used to setup repo, install the require package, +download/setup the vulnerability database from openvas server,client server certificate setup, +restart the relevent services, add users and launch prechecks before scan on local system. +setup script will take around 40-50 min to complete all processes. + +"openvas_omp.py" will be used to setup target, create task, launch scan, monitor scan +from callback function and generate the report in human readable format on local system. +Scan will take around 30-45 min once openvas related setup will be done + +* Steps to execute OPENVAS:- + +1) simple scan:- + +run the "openvas_omp.py" script from terminal, it will do everything and generate the report in + +openvas_scanner directory. + +Total time to complete:- 1.5 hr(apprx) + +Min Space Require:- More than 1GB + +$ ./openvas_omp.py + +2) Scan from autotest:- + +go to security_tools/openvas_scanner directory and locate the control file + +For example:- + +cd /usr/local/autotest_base/autotest-client-tests/security_tools/openvas_scanner + +$ /usr/local/autotest_base/autotest/client/autotest -d /usr/local/autotest_base/autotest-client-tests/linux-tools control + + +* ISSUES:- + +1) There is known issue with openvas8/9 due to libssh binary.so download the "0.6.4" source (https://red.libssh.org/projects/libssh/files +and close the 0.6.4 version) and compile it. Had to fiddle with the "cmake" and "make" putting the compiled libs in the /usr/lib directory +and not /usr/lib64 directory. Finally just moved them manually and fixed the symbolic links. + +https://forums.atomicorp.com/viewtopic.php?t=8047&p=43818 + +openvassd: symbol lookup error: /lib64/libopenvas_base.so.8: undefined symbol: ssh_pki_key_ecdsa_name + +2) Since the script support x86_64, ia32, ppc64, ppc64le and s390x based arch. so i kept the public repo key for reference. it may possible +that key need to be changed in future, so kindly update new key if repo setup fail. diff --git a/security_tools/openvas_scanner/control b/security_tools/openvas_scanner/control new file mode 100755 index 000000000..f66edeb50 --- /dev/null +++ b/security_tools/openvas_scanner/control @@ -0,0 +1,11 @@ +AUTHOR = " Anup Kumar, anupkumk@in.ibm.com " +NAME = "openvas_scanner" +TEST_CATEGORY = "Functional" +TEST_CLASS = "Security Tools" +TEST_TYPE = "client" +TIME = 'SHORT' +DOC = ''' + Security Scan through openvas + ''' +path = '/usr/local/autotest_base/autotest-client-tests/security_tools/' +job.run_test('openvas_scanner',test_path=path) diff --git a/security_tools/openvas_scanner/openvas-check-setup b/security_tools/openvas_scanner/openvas-check-setup new file mode 100755 index 000000000..2f67f42f1 --- /dev/null +++ b/security_tools/openvas_scanner/openvas-check-setup @@ -0,0 +1,1099 @@ +#!/bin/sh + +############################################################################### +# OpenVAS +# $Id$ +# +# Script for checking completeness and readiness of OpenVAS. +# +# Authors: +# Jan-Oliver Wagner +# Michael Wiegand +# +# Copyright: +# Copyright (C) 2011-2016 Greenbone Networks GmbH +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2, +# or at your option any later version, as published by the +# Free Software Foundation +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################### + +LOG=/tmp/openvas-check-setup.log +CHECKVERSION=2.3.7 + +if [ "$1" = "--server" -o "$2" = "--server" -o "$3" = "--server" ] +then + MODE="server" +else + MODE="desktop" +fi + +if [ "$1" = "--skip-nmap" -o "$2" = "--skip-nmap" -o "$3" = "--skip-nmap" ] +then + SKIP_NMAP="1" +else + SKIP_NMAP="0" +fi + +# Current default is OpenVAS-8: +VER="8" +SCANNER_MAJOR="5" +SCANNER_MINOR="0" +MANAGER_MAJOR="6" +MANAGER_MINOR="0" +ADMINISTRATOR_MAJOR="0" +ADMINISTRATOR_MINOR="0" +GSA_MAJOR="6" +GSA_MINOR="0" +CLI_MAJOR="1" +CLI_MINOR="4" + +if [ "$1" = "--v9" -o "$2" = "--v9" -o "$3" = "--v9" ] +then + VER="9" + SCANNER_MAJOR="5" + SCANNER_MINOR="1" + MANAGER_MAJOR="7" + MANAGER_MINOR="0" + ADMINISTRATOR_MAJOR="0" + ADMINISTRATOR_MINOR="0" + GSA_MAJOR="7" + GSA_MINOR="0" + CLI_MAJOR="1" + CLI_MINOR="4" +elif [ "$1" = "--v8" -o "$2" = "--v8" -o "$3" = "--v8" ] +then + VER="8" + SCANNER_MAJOR="5" + SCANNER_MINOR="0" + MANAGER_MAJOR="6" + MANAGER_MINOR="0" + ADMINISTRATOR_MAJOR="0" + ADMINISTRATOR_MINOR="0" + GSA_MAJOR="6" + GSA_MINOR="0" + CLI_MAJOR="1" + CLI_MINOR="4" +elif [ "$1" = "--v7" -o "$2" = "--v7" -o "$3" = "--v7" ] +then + VER="7" + SCANNER_MAJOR="4" + SCANNER_MINOR="0" + MANAGER_MAJOR="5" + MANAGER_MINOR="0" + ADMINISTRATOR_MAJOR="0" + ADMINISTRATOR_MINOR="0" + GSA_MAJOR="5" + GSA_MINOR="0" + CLI_MAJOR="1" + CLI_MINOR="3" +elif [ "$1" = "--v6" -o "$2" = "--v6" -o "$3" = "--v6" ] +then + VER="6" + SCANNER_MAJOR="3" + SCANNER_MINOR="4" + MANAGER_MAJOR="4" + MANAGER_MINOR="0" + ADMINISTRATOR_MAJOR="1" + ADMINISTRATOR_MINOR="3" + GSA_MAJOR="4" + GSA_MINOR="0" + CLI_MAJOR="1" + CLI_MINOR="2" + GSD_MAJOR="1" + GSD_MINOR="2" +fi + +echo "openvas-check-setup $CHECKVERSION" +echo " Test completeness and readiness of OpenVAS-$VER" +if [ "$VER" = "8" ] +then + echo " (add '--v6' or '--v7' or '--v9'" + echo " if you want to check for another OpenVAS version)" +fi +echo "" +echo " Please report us any non-detected problems and" +echo " help us to improve this check routine:" +echo " http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss" +echo "" +echo " Send us the log-file ($LOG) to help analyze the problem." +echo "" + +if [ "$MODE" = "desktop" ] +then + echo " Use the parameter --server to skip checks for client tools" + echo " like GSD and OpenVAS-CLI." + echo "" +fi + +log_and_print () +{ + echo " " $1 + echo " " $1 >> $LOG +} + +check_failed () +{ + echo "" + echo " ERROR: Your OpenVAS-$VER installation is not yet complete!" + echo "" + echo "Please follow the instructions marked with FIX above and run this" + echo "script again." + echo "" + echo "If you think this result is wrong, please report your observation" + echo "and help us to improve this check routine:" + echo "http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss" + echo "Please attach the log-file ($LOG) to help us analyze the problem." + echo "" + exit 1 +} + + +# LOG start +echo "openvas-check-setup $CHECKVERSION" > $LOG +echo " Mode: $MODE" >> $LOG +echo " Date: " `date -R` >> $LOG +echo "" >> $LOG + + +echo "Step 1: Checking OpenVAS Scanner ... " + +echo "Checking for old OpenVAS Scanner <= 2.0 ..." >> $LOG +openvasd -V >> $LOG 2>&1 +if [ $? -eq 0 ] +then + log_and_print "ERROR: Old version of OpenVAS Scanner detected." + log_and_print "FIX: Please remove the installation of the old OpenVAS Scanner (openvasd)." + check_failed +fi +echo "" >> $LOG + +echo "Checking presence of OpenVAS Scanner ..." >> $LOG +openvassd --version >> $LOG 2>&1 +if [ $? -ne 0 ] +then + log_and_print "ERROR: No OpenVAS Scanner (openvassd) found." + log_and_print "FIX: Please install OpenVAS Scanner." + check_failed +fi +echo "" >> $LOG + +echo "Checking OpenVAS Scanner version ..." >> $LOG + +VERSION=`openvassd --version 2>>$LOG | head -1 | sed -e "s/OpenVAS Scanner //"` + +if [ `echo $VERSION | grep "^$SCANNER_MAJOR\.$SCANNER_MINOR" | wc -l` -ne "1" ] +then + log_and_print "ERROR: OpenVAS Scanner too old or too new: $VERSION" + log_and_print "FIX: Please install OpenVAS Scanner $SCANNER_MAJOR.$SCANNER_MINOR." + log_and_print "HINT: Please see the --v6/7/8/9 command line options to check other major versions." + check_failed +fi +echo "" >> $LOG + +log_and_print "OK: OpenVAS Scanner is present in version $VERSION." + +openvassd -s >> $LOG 2>&1 + +OPENVASSD_CONFIG_FILE=$(openvassd -s | awk '/^config_file/ { print $3 }') +if [ -n "$OPENVASSD_CONFIG_FILE" ] +then + if [ -e "$OPENVASSD_CONFIG_FILE" ] && [ ! -O "$OPENVASSD_CONFIG_FILE" ] + then + log_and_print "WARNING: The config file used by OpenVAS Scanner is not owned by the current user." + log_and_print " Some of the following tests may produce incorrect results." + log_and_print "SUGGEST: Run 'openvas-check-setup' as the user owning the OpenVAS Scanner installation" + log_and_print " to ensure correct results." + fi +fi + +if [ $VER -lt 9 ] +then + echo "Checking OpenVAS Scanner CA cert ..." >> $LOG + CAFILE=`openvassd -s 2>>$LOG | grep ca_file | sed -e "s/^ca_file = //"` + if [ ! -e $CAFILE ] + then + log_and_print "ERROR: No CA certificate file of OpenVAS Scanner found." + log_and_print "FIX: Run 'openvas-mkcert'." + check_failed + fi + echo "" >> $LOG + + log_and_print "OK: OpenVAS Scanner CA Certificate is present as $CAFILE." +fi + +if [ "$VER" -ge 8 ] +then + echo "Checking presence of redis ..." >> $LOG + BINARY=`redis-server --version` + + if [ $? -ne 0 ] + then + log_and_print "ERROR: No redis-server installation found." + log_and_print "FIX: You should install redis-server for improved scalability and ability to trace/debug the KB" + check_failed + else + VERSION=`redis-server --version | awk '{ print $4 }'` + if [ `echo $VERSION | grep sha` ] + then + VERSION=`redis-server --version | awk '{ print $3 }'` + fi + log_and_print "OK: redis-server is present in version $VERSION." + HAVE_REDIS=1 + fi + echo "" >> $LOG + + if [ $HAVE_REDIS -eq 1 ] + then + echo "Checking if redis-server is configured properly to run with openVAS ..." >> $LOG + REDISSOCKET=`openvassd -s 2>>$LOG | grep kb_location | sed -e "s/^kb_location = //"` + if [ -z "$REDISSOCKET" ] + then + log_and_print "ERROR: scanner is not configured to use a redis-server socket." + log_and_print "FIX: Configure the kb_location setting of the scanner to the path of the redis-server socket." + check_failed + else + log_and_print "OK: scanner (kb_location setting) is configured properly using the redis-server socket: $REDISSOCKET" + echo "Checking if redis-server is running ..." >> $LOG + if [ -e $REDISSOCKET ] + then + log_and_print "OK: redis-server is running and listening on socket: $REDISSOCKET." + else + log_and_print "ERROR: redis-server is not running or not listening on socket: $REDISSOCKET" + log_and_print "FIX: You should start the redis-server or configure it to listen on socket: $REDISSOCKET" + check_failed + fi + fi + log_and_print "OK: redis-server configuration is OK and redis-server is running." + fi + + echo "" >> $LOG +fi + +echo "Checking NVT collection ..." >> $LOG +PLUGINSFOLDER=`openvassd -s 2>>$LOG | grep plugins_folder | sed -e "s/^plugins_folder = //"` +if [ ! -d $PLUGINSFOLDER ] +then + log_and_print "ERROR: Directory containing the NVT collection not found." + log_and_print "FIX: Run a NVT synchronization script like openvas-nvt-sync or greenbone-nvt-sync." + check_failed +fi +OLDPLUGINSFOLDER=`echo "$PLUGINSFOLDER" | grep -q -v "/var/" 2>&1` +if [ $? -eq 0 ] +then + CONFFILE=`openvassd -s 2>>$LOG | grep config_file | sed -e "s/^config_file = //"` + log_and_print "ERROR: Your OpenVAS Scanner configuration seems to be from a pre-OpenVAS-4 installation and contains non-FHS compliant paths." + log_and_print "FIX: Delete your OpenVAS Scanner Configuration file ($CONFFILE)." + check_failed +fi +NVTCOUNT=`find $PLUGINSFOLDER -name "*nasl" | wc -l` +if [ $NVTCOUNT -lt 10 ] +then + log_and_print "ERROR: The NVT collection is very small." + if [ $VER -ge 9 ] + then + log_and_print "FIX: Run a synchronization script like greenbone-nvt-sync." + else + log_and_print "FIX: Run a synchronization script like openvas-nvt-sync or greenbone-nvt-sync." + fi + check_failed +fi +echo "" >> $LOG + +log_and_print "OK: NVT collection in $PLUGINSFOLDER contains $NVTCOUNT NVTs." + +echo "Checking status of signature checking in OpenVAS Scanner ..." >> $LOG +NOSIGCHECK=`openvassd -s 2>>$LOG | grep nasl_no_signature_check | sed -e "s/^nasl_no_signature_check = //"` +if [ $NOSIGCHECK != "no" ] +then + log_and_print "WARNING: Signature checking of NVTs is not enabled in OpenVAS Scanner." + log_and_print "SUGGEST: Enable signature checking (see http://www.openvas.org/trusted-nvts.html)." +else + log_and_print "OK: Signature checking of NVTs is enabled in OpenVAS Scanner." +fi +echo "" >> $LOG + +CACHEFOLDER=`openvassd -s 2>>$LOG | grep cache_folder | sed -e "s/^cache_folder = //"` +CACHECOUNT=`find $CACHEFOLDER -name "*nvti" | wc -l` +if [ $CACHECOUNT -lt $NVTCOUNT ] +then + log_and_print "WARNING: The initial NVT cache has not yet been generated." + log_and_print "SUGGEST: Start OpenVAS Scanner for the first time to generate the cache." +else + log_and_print "OK: The NVT cache in $CACHEFOLDER contains $CACHECOUNT files for $NVTCOUNT NVTs." +fi +echo "" >> $LOG + +echo "Step 2: Checking OpenVAS Manager ... " + +echo "Checking presence of OpenVAS Manager ..." >> $LOG +openvasmd --version >> $LOG 2>&1 +if [ $? -ne 0 ] +then + log_and_print "ERROR: No OpenVAS Manager (openvasmd) found." + log_and_print "FIX: Please install OpenVAS Manager." + check_failed +fi +echo "" >> $LOG + +VERSION=`openvasmd --version | head -1 | sed -e "s/OpenVAS Manager //"` + +if [ `echo $VERSION | grep "^$MANAGER_MAJOR\.$MANAGER_MINOR" | wc -l` -ne "1" ] +then + log_and_print "ERROR: OpenVAS Manager too old or too new: $VERSION" + log_and_print "FIX: Please install OpenVAS Manager $MANAGER_MAJOR.$MANAGER_MINOR." + log_and_print "HINT: Please see the --v6/7/8/9 command line options to check other major versions." + check_failed +fi +echo "" >> $LOG + +log_and_print "OK: OpenVAS Manager is present in version $VERSION." + +if [ $VER -lt 9 ] +then + echo "Checking OpenVAS Manager client certificate ..." >> $LOG + CERTDIR=`dirname $CAFILE` + CLIENTCERTFILE="$CERTDIR/clientcert.pem" + if [ ! -e $CLIENTCERTFILE ] + then + log_and_print "ERROR: No client certificate file of OpenVAS Manager found." + if [ $VER -ge 7 ] + then + log_and_print "FIX: Run 'openvas-mkcert-client -n -i'" + else + log_and_print "FIX: Run 'openvas-mkcert-client -n om -i'" + fi + check_failed + fi + echo "" >> $LOG + + log_and_print "OK: OpenVAS Manager client certificate is present as $CLIENTCERTFILE." +fi + +echo "Checking OpenVAS Manager database ..." >> $LOG +# Guess openvas state dir from $PLUGINSFOLDER +STATEDIR=`dirname $PLUGINSFOLDER` +TASKSDB="$STATEDIR/mgr/tasks.db" +if [ ! -e $TASKSDB ] +then + log_and_print "ERROR: No OpenVAS Manager database found. (Tried: $TASKSDB)" + log_and_print "FIX: Run 'openvasmd --rebuild' while OpenVAS Scanner is running." + + OPENVASSD_RUNNING=`ps -Af | grep -ic "[o]penvassd: waiting for incoming connections"` + if [ $OPENVASSD_RUNNING -eq 0 ] + then + log_and_print "WARNING: OpenVAS Scanner is NOT running!" ; + log_and_print "SUGGEST: Start OpenVAS Scanner (openvassd)." ; + fi + + check_failed +fi +echo "" >> $LOG + +log_and_print "OK: OpenVAS Manager database found in $TASKSDB." + +echo "Checking access rights of OpenVAS Manager database ..." >> $LOG +TASKSDBPERMS=`stat -c "%a" "$TASKSDB"` +if [ "$TASKSDBPERMS" != "600" ] +then + log_and_print "ERROR: The access rights of the OpenVAS Manager database are incorrect." + log_and_print "FIX: Run 'chmod 600 $TASKSDB'." + check_failed +fi +echo "" >> $LOG + +log_and_print "OK: Access rights for the OpenVAS Manager database are correct." + +echo "Checking sqlite3 presence ..." >> $LOG +SQLITE3=`type sqlite3 2> /dev/null` +if [ $? -ne 0 ] +then + log_and_print "WARNING: Could not find sqlite3 binary, extended manager checks of the OpenVAS Manager installation are disabled." + log_and_print "SUGGEST: Install sqlite3." + HAVE_SQLITE=0 +else + log_and_print "OK: sqlite3 found, extended checks of the OpenVAS Manager installation enabled." + HAVE_SQLITE=1 +fi +echo "" >> $LOG + +if [ $HAVE_SQLITE -eq 1 ] +then + echo "Checking OpenVAS Manager database revision ..." >> $LOG + TASKSDBREV=`sqlite3 $TASKSDB "select value from meta where name='database_version';"` + if [ -z $TASKSDBREV ] + then + log_and_print "ERROR: Could not determine database revision, database corrupt or in invalid format." + log_and_print "FIX: Delete database at $TASKSDB and rebuild it." + check_failed + else + log_and_print "OK: OpenVAS Manager database is at revision $TASKSDBREV." + fi + echo "Checking database revision expected by OpenVAS Manager ..." >> $LOG + MANAGERDBREV=`openvasmd --version | grep "Manager DB revision" | sed -e "s/.*\ //"` + if [ -z $MANAGERDBREV ] + then + log_and_print "ERROR: Could not determine database revision expected by OpenVAS Manager." + log_and_print "FIX: Ensure OpenVAS Manager is installed correctly." + check_failed + else + log_and_print "OK: OpenVAS Manager expects database at revision $MANAGERDBREV." + fi + if [ $TASKSDBREV -lt $MANAGERDBREV ] + then + log_and_print "ERROR: Database schema is out of date." + log_and_print "FIX: Run 'openvasmd --migrate'." + check_failed + else + log_and_print "OK: Database schema is up to date." + fi + echo "Checking OpenVAS Manager database (NVT data) ..." >> $LOG + DBNVTCOUNT=`sqlite3 $TASKSDB "select count(*) from nvts;"` + if [ $DBNVTCOUNT -lt 20000 ] + then + log_and_print "ERROR: The number of NVTs in the OpenVAS Manager database is too low." + log_and_print "FIX: Make sure OpenVAS Scanner is running with an up-to-date NVT collection and run 'openvasmd --rebuild'." + + OPENVASSD_RUNNING=`ps -Af | grep -ic "[o]penvassd: waiting for incoming connections"` + if [ $OPENVASSD_RUNNING -eq 0 ] + then + log_and_print "WARNING: OpenVAS Scanner is NOT running!" ; + log_and_print "SUGGEST: Start OpenVAS Scanner (openvassd)." ; + fi + + check_failed + else + log_and_print "OK: OpenVAS Manager database contains information about $DBNVTCOUNT NVTs." + fi +fi + +if [ $ADMINISTRATOR_MAJOR = "0" ] +then + echo "Checking if users exist ..." >> $LOG + if [ $VER != "7" ] + then + USERCOUNT=`openvasmd --get-users | sed -e "/^$/d" | wc -l` + else + USERCOUNT=`openvasmd --list-users | sed -e "/^$/d" | wc -l` + fi + if [ $USERCOUNT -eq 0 ] + then + log_and_print "ERROR: No users found. You need to create at least one user to log in." + log_and_print " It is recommended to have at least one user with role Admin." + log_and_print "FIX: create a user by running 'openvasmd --create-user= --role=Admin && openvasmd --user= --new-password='" + check_failed + else + log_and_print "OK: At least one user exists." + fi + echo "" >> $LOG +fi + +# TODO: Do a check for presence of at least one Admin user. + +echo "Checking OpenVAS SCAP database ..." >> $LOG +# Guess openvas state dir from $PLUGINSFOLDER +STATEDIR=`dirname $PLUGINSFOLDER` +SCAPDB="$STATEDIR/scap-data/scap.db" +if [ ! -e $SCAPDB ] +then + log_and_print "ERROR: No OpenVAS SCAP database found. (Tried: $SCAPDB)" + if [ $VER -ge 9 ] + then + log_and_print "FIX: Run a SCAP synchronization script like greenbone-scapdata-sync." + else + log_and_print "FIX: Run a SCAP synchronization script like openvas-scapdata-sync or greenbone-scapdata-sync." + fi + check_failed +fi +echo "" >> $LOG + +log_and_print "OK: OpenVAS SCAP database found in $SCAPDB." + +if [ "$VER" -ge 6 ] +then + echo "Checking OpenVAS CERT database ..." >> $LOG + # Guess openvas state dir from $PLUGINSFOLDER + STATEDIR=`dirname $PLUGINSFOLDER` + CERTDB="$STATEDIR/cert-data/cert.db" + if [ ! -e $CERTDB ] + then + log_and_print "ERROR: No OpenVAS CERT database found. (Tried: $CERTDB)" + if [ $VER -ge 9 ] + then + log_and_print "FIX: Run a CERT synchronization script like greenbone-certdata-sync." + else + log_and_print "FIX: Run a CERT synchronization script like openvas-certdata-sync or greenbone-certdata-sync." + fi + check_failed + fi + echo "" >> $LOG + + log_and_print "OK: OpenVAS CERT database found in $CERTDB." +fi + +echo "Checking xsltproc presence ..." >> $LOG +XSLTPROC=`type xsltproc 2> /dev/null` +if [ $? -ne 0 ] +then + log_and_print "WARNING: Could not find xsltproc binary, most report formats will not work." + log_and_print "SUGGEST: Install xsltproc." +else + log_and_print "OK: xsltproc found." +fi +echo "" >> $LOG + + +if [ $ADMINISTRATOR_MAJOR != "0" ] +then + echo "Step 3: Checking OpenVAS Administrator ... " + + echo "Checking presence of OpenVAS Administrator ..." >> $LOG + openvasad --version >> $LOG 2>&1 + if [ $? -ne 0 ] + then + log_and_print "ERROR: No OpenVAS Administrator (openvasad) found." + log_and_print "FIX: Please install OpenVAS Administrator." + check_failed + fi + echo "" >> $LOG + + VERSION=`openvasad --version | head -1 | sed -e "s/OpenVAS Administrator //"` + + if [ `echo $VERSION | grep "^$ADMINISTRATOR_MAJOR\.$ADMINISTRATOR_MINOR" | wc -l` -ne "1" ] + then + log_and_print "ERROR: OpenVAS Administrator too old or too new: $VERSION" + log_and_print "FIX: Please install OpenVAS Administrator $ADMINISTRATOR_MAJOR.$ADMINISTRATOR_MINOR." + log_and_print "HINT: Please see the --v6/7/8/9 command line options to check other major versions." + check_failed + fi + echo "" >> $LOG + + log_and_print "OK: OpenVAS Administrator is present in version $VERSION." + + echo "Checking if users exist ..." >> $LOG + USERCOUNT=`openvasad -c "list_users" | sed -e "/^$/d" | wc -l` + if [ $USERCOUNT -eq 0 ] + then + log_and_print "ERROR: No users found. You need to create at least one user to log in." + log_and_print " It is recommended to have at least one user with role Admin." + log_and_print "FIX: Create a user using 'openvasad -c 'add_user' -n --role=Admin'" + check_failed + else + log_and_print "OK: At least one user exists." + fi + echo "" >> $LOG + + echo "Checking if at least one admin user exists ..." >> $LOG + ADMINEXISTS=`ls $STATEDIR/users/*/isadmin 2> /dev/null` + if [ $? -ne 0 ] + then + log_and_print "ERROR: No admin user found. You need to create at least one admin user to log in." + log_and_print "FIX: Create a user using 'openvasad -c 'add_user' -n -r Admin'" + check_failed + else + log_and_print "OK: At least one admin user exists." + fi + echo "" >> $LOG +else + echo "Step 3: Checking user configuration ... " + # TODO: Here we need new tests for presense of user and admin. Possibly based + # on sqlite3 calls (which in turn means to check for sqlite3 which isn't a runtime + # requirement for OpenVAS). +fi + +if [ $VER -ge 6 ] +then + echo "Checking status of password policy ..." >> $LOG + CONFFILE=`openvassd -s 2>>$LOG | grep config_file | sed -e "s/^config_file = //"` + CONFDIR=`dirname $CONFFILE` + grep -v "^[#]" $CONFDIR/pwpolicy.conf | grep -v "^$" > /dev/null 2>&1 + if [ $? -ne 0 ] + then + log_and_print "WARNING: Your password policy is empty." + log_and_print "SUGGEST: Edit the $CONFDIR/pwpolicy.conf file to set a password policy." + else + log_and_print "OK: The password policy file at $CONFDIR/pwpolicy.conf contains entries." + fi + echo "" >> $LOG +fi + +echo "Step 4: Checking Greenbone Security Assistant (GSA) ... " + +echo "Checking presence of Greenbone Security Assistant ..." >> $LOG +gsad --version >> $LOG 2>&1 +if [ $? -ne 0 ] +then + log_and_print "ERROR: No Greenbone Security Assistant (gsad) found." + log_and_print "FIX: Please install Greenbone Security Assistant." + check_failed +fi +echo "" >> $LOG + +VERSION=`gsad --version | head -1 | sed -e "s/Greenbone Security Assistant //"` + +if [ `echo $VERSION | grep "^$GSA_MAJOR\.$GSA_MINOR" | wc -l` -ne "1" ] +then + log_and_print "ERROR: Greenbone Security Assistant too old or too new: $VERSION" + log_and_print "FIX: Please install Greenbone Security Assistant $GSA_MAJOR.$GSA_MINOR." + log_and_print "HINT: Please see the --v6/7/8/9 command line options to check other major versions." + check_failed +fi +echo "" >> $LOG + +log_and_print "OK: Greenbone Security Assistant is present in version $VERSION." + +if [ "$VER" -ge 9 ] +then + echo "Verifying certificate infrastructure ..." >> $LOG + openvas-manage-certs -V >> $LOG 2>&1 + if [ $? -ne 0 ] + then + log_and_print "ERROR: Your OpenVAS certificate infrastructure did NOT pass validation." + log_and_print "FIX: Run 'openvas-manage-certs -a'." + check_failed + fi + echo "" >> $LOG + + log_and_print "OK: Your OpenVAS certificate infrastructure passed validation." +fi + + +echo "Step 5: Checking OpenVAS CLI ... " + +if [ "$MODE" != "server" ] +then + echo "Checking presence of OpenVAS CLI ..." >> $LOG + omp --version >> $LOG 2>&1 + if [ $? -ne 0 ] + then + log_and_print "ERROR: No OpenVAS CLI (omp) found." + log_and_print "FIX: Please install OpenVAS CLI." + log_and_print "HINT: Please see the --server command line option to skip this check." + check_failed + fi + echo "" >> $LOG + + VERSION=`omp --version | head -1 | sed -e "s/OMP Command Line Interface //"` + + if [ `echo $VERSION | grep "^$CLI_MAJOR\.$CLI_MINOR" | wc -l` -ne "1" ] + then + log_and_print "ERROR: OpenVAS CLI too old or too new: $VERSION" + log_and_print "FIX: Please install OpenVAS CLI $CLI_MAJOR.$CLI_MINOR." + log_and_print "HINT: Please see the --v6/7/8/9 command line options to check other major versions." + check_failed + fi + echo "" >> $LOG + + log_and_print "OK: OpenVAS CLI version $VERSION." +else + log_and_print "SKIP: Skipping check for OpenVAS CLI." +fi + + +echo "Step 6: Checking Greenbone Security Desktop (GSD) ... " + +if [ "$MODE" != "server" -a "$VER" -le 6 ] +then + echo "Checking presence of Greenbone Security Desktop ..." >> $LOG + + DISPLAY=fake gsd --version >> $LOG 2>&1 + if [ $? -ne 0 ] + then + if [ "$VER" -ge 6 ] + then + log_and_print "WARNING: No Greenbone Security Desktop (gsd) found or too old." + log_and_print "SUGGEST: Please install Greenbone Security Desktop $GSD_MAJOR.$GSD_MINOR." + else + log_and_print "ERROR: No Greenbone Security Desktop (gsd) found or too old." + log_and_print "FIX: Please install Greenbone Security Desktop $GSD_MAJOR.$GSD_MINOR." + check_failed + fi + log_and_print "SKIP: Skipping further check for Greenbone Security Desktop." + else + echo "" >> $LOG + + VERSION=`gsd --version | head -1 | sed -e "s/Greenbone Security Desktop //"` + + if [ `echo $VERSION | grep "^$GSD_MAJOR\.$GSD_MINOR" | wc -l` -ne "1" ] + then + if [ $VER -lt "6" ] + then + log_and_print "ERROR: Greenbone Security Desktop too old or too new: $VERSION" + log_and_print "FIX: Please install Greenbone Security Desktop $GSD_MAJOR.$GSD_MINOR." + log_and_print "HINT: Please see the --v6/7/8/9 command line options to check other major versions." + check_failed + else + log_and_print "WARNING: Greenbone Security Desktop too old or too new: $VERSION" + log_and_print "SUGGEST: Please install Greenbone Security Desktop $GSD_MAJOR.$GSD_MINOR." + log_and_print "HINT: Please see the --v6/7/8/9 command line options to check other major versions." + fi + fi + echo "" >> $LOG + + log_and_print "OK: Greenbone Security Desktop is present in Version $VERSION." + fi +else + log_and_print "SKIP: Skipping check for Greenbone Security Desktop." +fi + + +echo "Step 7: Checking if OpenVAS services are up and running ... " + +echo "Checking netstat presence ..." >> $LOG +NETSTAT=`type netstat 2> /dev/null` +if [ $? -ne 0 ] +then + log_and_print "WARNING: Could not find netstat binary, checks of the OpenVAS services are disabled." + log_and_print "SUGGEST: Install netstat." + HAVE_NETSTAT=0 +else + log_and_print "OK: netstat found, extended checks of the OpenVAS services enabled." + HAVE_NETSTAT=1 +fi +echo "" >> $LOG + +if [ $HAVE_NETSTAT -eq 1 ] +then + netstat -A inet -A inet6 -ntlp 2> /dev/null >> $LOG + OPENVASSD_HOST=`netstat -A inet -A inet6 -ntlp 2> /dev/null | grep openvassd | awk -F\ '{print $4}' | awk -F: 'sub(FS $NF,x)'` + OPENVASSD_PORT=`netstat -A inet -A inet6 -ntlp 2> /dev/null | grep openvassd | awk -F\ '{print $4}' | awk -F: '{print $NF}'` + OPENVASMD_HOST=`netstat -A inet -A inet6 -ntlp 2> /dev/null | grep openvasmd | awk -F\ '{print $4}' | awk -F: 'sub(FS $NF,x)'` + OPENVASMD_PORT=`netstat -A inet -A inet6 -ntlp 2> /dev/null | grep openvasmd | awk -F\ '{print $4}' | awk -F: '{print $NF}'` + OPENVASAD_HOST=`netstat -A inet -A inet6 -ntlp 2> /dev/null | grep openvasad | awk -F\ '{print $4}' | awk -F: 'sub(FS $NF,x)'` + OPENVASAD_PORT=`netstat -A inet -A inet6 -ntlp 2> /dev/null | grep openvasad | awk -F\ '{print $4}' | awk -F: '{print $NF}'` + GSAD_HOST=`netstat -A inet -A inet6 -ntlp 2> /dev/null | grep gsad | awk -F\ '{print $4}' | awk -F: 'sub(FS $NF,x)'` + GSAD_PORT=`netstat -A inet -A inet6 -ntlp 2> /dev/null | grep gsad | awk -F\ '{print $4}' | awk -F: '{print $NF}' | tail -1` + + if [ $VER -ge 9 ] + then + OPENVASSD_SOCKET_FOUND=0 + if netstat -A unix -nlp 2> /dev/null | grep "openvassd\.sock" > /dev/null + then + OPENVASSD_SOCKET_FOUND=1 + fi + if [ $OPENVASSD_SOCKET_FOUND -eq 1 ] + then + log_and_print "OK: OpenVAS Scanner is running and listening on a Unix domain socket." + OPENVASSD_PORT=1 ; + else + log_and_print "ERROR: OpenVAS Scanner is NOT running!" + log_and_print "FIX: Start OpenVAS Scanner (openvassd)." + OPENVASSD_PORT=-1 ; + fi + else + case "$OPENVASSD_HOST" in + "0.0.0.0"|"::") log_and_print "OK: OpenVAS Scanner is running and listening on all interfaces." ;; + "127.0.0.1") log_and_print "OK: OpenVAS Scanner is running and listening only on the local interface." ;; + "") OPENVASSD_PROC=`ps -Af | grep -ic "[o]penvassd: waiting for incoming connections"` + if [ $OPENVASSD_PROC -eq 0 ] + then + log_and_print "ERROR: OpenVAS Scanner is NOT running!" ; + log_and_print "FIX: Start OpenVAS Scanner (openvassd)." ; + OPENVASSD_PORT=-1 ; + else + log_and_print "WARNING: OpenVAS Scanner seems to be run by another user!" ; + log_and_print "FIX: If intended this is OK (e.g. as root). But we can not determine the port." ; + log_and_print "FIX: You might face subsequent problems if not intended." ; + OPENVASSD_PORT=1 ; + fi + ;; + esac + case $OPENVASSD_PORT in + -1) ;; + 9391) log_and_print "OK: OpenVAS Scanner is listening on port 9391, which is the default port." ;; + *) log_and_print "WARNING: OpenVAS Scanner is listening on port $OPENVASSD_PORT, which is NOT the default port!" + log_and_print "SUGGEST: Ensure OpenVAS Scanner is listening on port 9391." ;; + esac + fi + + if [ $VER -ge 9 ] + then + OPENVASMD_SOCKET_FOUND=0 + if netstat -A unix -nlp 2> /dev/null | grep "openvasmd\.sock" > /dev/null + then + OPENVASMD_SOCKET_FOUND=1 + fi + if [ $OPENVASMD_SOCKET_FOUND -eq 1 ] + then + log_and_print "OK: OpenVAS Manager is running and listening on a Unix domain socket." + OPENVASMD_PORT=1 + else + case "$OPENVASMD_HOST" in + "0.0.0.0"|"::") log_and_print "OK: OpenVAS Manager is running and listening on all interfaces." ;; + "127.0.0.1") log_and_print "WARNING: OpenVAS Manager is running and listening only on the local interface." + log_and_print "This means that you will not be able to access the OpenVAS Manager from the" + log_and_print "outside using GSD or OpenVAS CLI." + log_and_print "SUGGEST: Ensure that OpenVAS Manager listens on all interfaces unless you want" + log_and_print "a local service only." + OPENVASMD_PORT=1 ;; + "") log_and_print "ERROR: OpenVAS Manager is NOT running!" + log_and_print "FIX: Start OpenVAS Manager (openvasmd)." + OPENVASMD_PORT=-1 ;; + esac + fi + else + case "$OPENVASMD_HOST" in + "0.0.0.0"|"::") log_and_print "OK: OpenVAS Manager is running and listening on all interfaces." ;; + "127.0.0.1") log_and_print "WARNING: OpenVAS Manager is running and listening only on the local interface." + log_and_print "This means that you will not be able to access the OpenVAS Manager from the" + log_and_print "outside using GSD or OpenVAS CLI." + log_and_print "SUGGEST: Ensure that OpenVAS Manager listens on all interfaces unless you want" + log_and_print "a local service only." ;; + "") log_and_print "ERROR: OpenVAS Manager is NOT running!" + log_and_print "FIX: Start OpenVAS Manager (openvasmd)." + OPENVASMD_PORT=-1 ;; + esac + case $OPENVASMD_PORT in + -1) ;; + 9390) log_and_print "OK: OpenVAS Manager is listening on port 9390, which is the default port." ;; + *) log_and_print "WARNING: OpenVAS Manager is listening on port $OPENVASMD_PORT, which is NOT the default port!" + log_and_print "SUGGEST: Ensure OpenVAS Manager is listening on port 9390." ;; + esac + fi + + if [ $ADMINISTRATOR_MAJOR != "0" ] + then + case "$OPENVASAD_HOST" in + "0.0.0.0") log_and_print "OK: OpenVAS Administrator is running and listening on all interfaces." ;; + "127.0.0.1") log_and_print "OK: OpenVAS Administrator is running and listening only on the local interface." ;; + "") log_and_print "ERROR: OpenVAS Administrator is NOT running!" + log_and_print "FIX: Start OpenVAS Administrator (openvasad)." + OPENVASAD_PORT=-1 ;; + esac + case $OPENVASAD_PORT in + -1) ;; + 9393) log_and_print "OK: OpenVAS Administrator is listening on port 9393, which is the default port." ;; + *) log_and_print "WARNING: OpenVAS Administrator is listening on port $OPENVASAD_PORT, which is NOT the default port!" + log_and_print "SUGGEST: Ensure OpenVAS Administrator is listening on port 9393." ;; + esac + else + OPENVASAD_PORT=1; # to make this not a failure because we do not need openvasad at all + fi + + case "$GSAD_HOST" in + "0.0.0.0"|"::") log_and_print "OK: Greenbone Security Assistant is running and listening on all interfaces." ;; + "127.0.0.1") log_and_print "WARNING: Greenbone Security Assistant is running and listening only on the local interface." + log_and_print "This means that you will not be able to access the Greenbone Security Assistant from the" + log_and_print "outside using a web browser." + log_and_print "SUGGEST: Ensure that Greenbone Security Assistant listens on all interfaces." ;; + "") log_and_print "ERROR: Greenbone Security Assistant is NOT running!" + log_and_print "FIX: Start Greenbone Security Assistant (gsad)." + GSAD_PORT=-1 ;; + esac + case $GSAD_PORT in + -1) ;; + 80|443|9392) log_and_print "OK: Greenbone Security Assistant is listening on port $GSAD_PORT, which is the default port." ;; + *) log_and_print "WARNING: Greenbone Security Assistant is listening on port $GSAD_PORT, which is NOT the default port!" + log_and_print "SUGGEST: Ensure Greenbone Security Assistant is listening on one of the following ports: 80, 443, 9392." ;; + esac + + if [ $OPENVASSD_PORT -eq -1 ] || [ $OPENVASMD_PORT -eq -1 ] || [ $OPENVASAD_PORT -eq -1 ] || [ $GSAD_PORT -eq -1 ] + then + check_failed + fi + +fi + +echo "Step 8: Checking nmap installation ..." + +echo "Checking presence of nmap ..." >> $LOG +NMAP=`type nmap 2> /dev/null` +if [ $? -ne 0 ] +then + if [ $SKIP_NMAP -eq 0 ] + then + log_and_print "ERROR: No nmap installation found." + log_and_print "FIX: The predefined scan configurations needs nmap as a port scanner. You should install nmap (see http://nmap.org)." + log_and_print "HINT: Please see the --skip-nmap command line option to skip this check." + check_failed + else + log_and_print "WARNING: No nmap installation found." + log_and_print "WARNING: You need to add a port scanner from the 'Port scanners' family to your custom scan config and install this port scanner on your system." + fi +else + VERSION=`nmap --version | awk '/Nmap version/ { print $3 }'` + if [ `echo $VERSION | grep "5\.51" | wc -l` -ne "1" ] + then + log_and_print "WARNING: Your version of nmap is not fully supported: $VERSION" + log_and_print "SUGGEST: You should install nmap 5.51 if you plan to use the nmap NSE NVTs." + else + log_and_print "OK: nmap is present in version $VERSION." + fi +fi +echo "" >> $LOG + +echo "Step 10: Checking presence of optional tools ..." + +echo "Checking presence of pdflatex ..." >> $LOG +PDFLATEX=`type pdflatex 2> /dev/null` +if [ $? -ne 0 ] +then + log_and_print "WARNING: Could not find pdflatex binary, the PDF report format will not work." + log_and_print "SUGGEST: Install pdflatex." + HAVE_PDFLATEX=0 +else + log_and_print "OK: pdflatex found." + HAVE_PDFLATEX=1 +fi +echo "" >> $LOG + +if [ $HAVE_PDFLATEX -eq 1 ] +then + echo "Checking presence of LaTeX packages required for PDF report generation ..." >> $LOG + PDFTMPDIR=`mktemp -d -t openvas-check-setup-tmp.XXXXXXXXXX` + TEXFILE="$PDFTMPDIR/test.tex" + cat < $TEXFILE +\documentclass{article} +\pagestyle{empty} + +%\usepackage{color} +\usepackage{tabularx} +\usepackage{geometry} +\usepackage{comment} +\usepackage{longtable} +\usepackage{titlesec} +\usepackage{chngpage} +\usepackage{calc} +\usepackage{url} +\usepackage[utf8x]{inputenc} + +\DeclareUnicodeCharacter {135}{{\textascii ?}} +\DeclareUnicodeCharacter {129}{{\textascii ?}} +\DeclareUnicodeCharacter {128}{{\textascii ?}} + +\usepackage{colortbl} + +% must come last +\usepackage{hyperref} +\definecolor{linkblue}{rgb}{0.11,0.56,1} +\definecolor{inactive}{rgb}{0.56,0.56,0.56} +\definecolor{openvas_debug}{rgb}{0.78,0.78,0.78} +\definecolor{openvas_false_positive}{rgb}{0.2275,0.2275,0.2275} +\definecolor{openvas_log}{rgb}{0.2275,0.2275,0.2275} +\definecolor{openvas_hole}{rgb}{0.7960,0.1137,0.0902} +\definecolor{openvas_note}{rgb}{0.3255,0.6157,0.7961} +\definecolor{openvas_report}{rgb}{0.68,0.74,0.88} +\definecolor{openvas_user_note}{rgb}{1.0,1.0,0.5625} +\definecolor{openvas_user_override}{rgb}{1.0,1.0,0.5625} +\definecolor{openvas_warning}{rgb}{0.9764,0.6235,0.1922} +\hypersetup{colorlinks=true,linkcolor=linkblue,urlcolor=blue,bookmarks=true,bookmarksopen=true} +\usepackage[all]{hypcap} + +%\geometry{verbose,a4paper,tmargin=24mm,bottom=24mm} +\geometry{verbose,a4paper} +\setlength{\parskip}{\smallskipamount} +\setlength{\parindent}{0pt} + +\title{PDF Report Test} +\pagestyle{headings} +\pagenumbering{arabic} +\begin{document} +This is a test of the PDF generation capabilities of your OpenVAS installation. Please ignore. +\end{document} +EOT + pdflatex -interaction batchmode -output-directory $PDFTMPDIR $TEXFILE > /dev/null 2>&1 + if [ ! -f "$PDFTMPDIR/test.pdf" ] + then + log_and_print "WARNING: PDF generation failed, most likely due to missing LaTeX packages. The PDF report format will not work." + log_and_print "SUGGEST: Install required LaTeX packages." + else + log_and_print "OK: PDF generation successful. The PDF report format is likely to work." + fi + if [ -f "$PDFTMPDIR/test.log" ] + then + cat $PDFTMPDIR/test.log >> $LOG + fi + rm -rf $PDFTMPDIR +fi + +echo "Checking presence of ssh-keygen ..." >> $LOG +SSHKEYGEN=`type ssh-keygen 2> /dev/null` +if [ $? -ne 0 ] +then + log_and_print "WARNING: Could not find ssh-keygen binary, LSC credential generation for GNU/Linux targets will not work." + log_and_print "SUGGEST: Install ssh-keygen." + HAVE_SSHKEYGEN=0 +else + log_and_print "OK: ssh-keygen found, LSC credential generation for GNU/Linux targets is likely to work." + HAVE_SSHKEYGEN=1 +fi +echo "" >> $LOG + +if [ $HAVE_SSHKEYGEN -eq 1 ] +then + echo "Checking presence of rpm ..." >> $LOG + RPM=`type rpm 2> /dev/null` + if [ $? -ne 0 ] + then + log_and_print "WARNING: Could not find rpm binary, LSC credential package generation for RPM and DEB based targets will not work." + log_and_print "SUGGEST: Install rpm." + HAVE_RPM=0 + else + log_and_print "OK: rpm found, LSC credential package generation for RPM based targets is likely to work." + HAVE_RPM=1 + fi + echo "" >> $LOG + + if [ $HAVE_RPM -eq 1 ] + then + echo "Checking presence of alien ..." >> $LOG + ALIEN=`type alien 2> /dev/null` + if [ $? -ne 0 ] + then + log_and_print "WARNING: Could not find alien binary, LSC credential package generation for DEB based targets will not work." + log_and_print "SUGGEST: Install alien." + HAVE_ALIEN=0 + else + log_and_print "OK: alien found, LSC credential package generation for DEB based targets is likely to work." + HAVE_ALIEN=1 + fi + echo "" >> $LOG + fi +fi + +echo "Checking presence of nsis ..." >> $LOG +NSIS=`type makensis 2> /dev/null` +if [ $? -ne 0 ] +then + log_and_print "WARNING: Could not find makensis binary, LSC credential package generation for Microsoft Windows targets will not work." + log_and_print "SUGGEST: Install nsis." + HAVE_NSIS=0 +else + log_and_print "OK: nsis found, LSC credential package generation for Microsoft Windows targets is likely to work." + HAVE_NSIS=1 +fi + +echo "Checking for SELinux ..." >> $LOG +selinux=`getenforce 2>/dev/null` +if [ $? -eq 0 ] +then + if [ $selinux != "Disabled" ] + then + log_and_print "ERROR: SELinux is enabled. For a working OpenVAS installation you need to disable it." + log_and_print "FIX: Please disable SELinux." + check_failed + else + log_and_print "OK: SELinux is disabled." + fi +fi + +echo "" >> $LOG + +echo "" +echo "It seems like your OpenVAS-$VER installation is OK." +echo "" +echo "If you think it is not OK, please report your observation" +echo "and help us to improve this check routine:" +echo "http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss" +echo "Please attach the log-file ($LOG) to help us analyze the problem." +echo "" diff --git a/security_tools/openvas_scanner/openvas_omp.py b/security_tools/openvas_scanner/openvas_omp.py new file mode 100755 index 000000000..65f5e778f --- /dev/null +++ b/security_tools/openvas_scanner/openvas_omp.py @@ -0,0 +1,498 @@ +#!/usr/bin/env python + +""" +The contents of this file are classes and functions to automate OPENVAS. +The automation script will be used to setup target, create task, launch scan, +monitor scan from callback function and generate the report in human readable +format on local system. on localhost.Scan will take around 30-45 min +once openvas related setup will be done. scan will be triggered from autotest as well. + +Author: Anup Kumar + +""" + + +import re +import sys +import os +import time +import csv +from functools import partial +from threading import Event, Timer, Semaphore +from openvas_setup_cli import * + + +def set_interval(interval, times=-1): + """ + Decorator to execute a function periodically using a timer + The function will be executed in a background thread + """ + + def outer_wrap(function): + if not callable(function): + raise TypeError( + "Expected function, got %r instead" % + type(function)) + + # This will be the function to be called + def wrap(*args, **kwargs): + + stop = Event() + + # This is another function to be executed + # in a different thread to simulate set_interval + def inner_wrap(): + i = 0 + while i != times and not stop.isSet(): + stop.wait(interval) + function(*args, **kwargs) + i += 1 + + t = Timer(0, inner_wrap) + t.daemon = True + t.start() + + return stop + + return wrap + + return outer_wrap + + +def my_print_status(i): + """ + This function will be used in callback function + """ + print(str(i)) + sys.stdout.flush + + +class openvas_cli(openvas_setup_cli): + + def __init__(self, **kwargs): + """ + """ + openvas_setup_cli.__init__(self) + # Error counter + self.error_counter = 0 + # Old progress + self.old_progress = 0.0 + # Init various vars + self.function_handle = None + self.task_report_id = None + + def cleanup(self): + """ + Remove the unused file after scan completion + """ + try: + logging.debug("Restoring the changes") + os.system("rm omp.config") + os.system("rm target_file") + os.system("rm config_file") + os.system("rm check_task_init") + os.system("rm setup_error_log") + os.system("rm setup_log") + os.system("rm task_progress") + os.system("rm task_file") + os.system("rm output_file") + os.system( + "mv /etc/yum.repos.d/atomic.repo_org /etc/yum.repos.d/atomic.repo") + os.system( + "mv /etc/yum.repos.d/epel.repo_org /etc/yum.repos.d/epel.repo") + os.system("mv /etc/redis.conf_org /etc/redis.conf") + if self.check_sepolicy == "Enforcing": + os.system("setenforce 1") + logging.info( + "Restoring Selinux policy to Enforcing after scan") + logging.info("Cleanup Done") + + except IOError as err: + logging.debug(err) + + def check_return_status(self, status): + """ + Vaildate the submitted job for target,task, scan and report + """ + self.status = status + return_status = { + '200': 'OK', + '201': 'OK resource created', + '202': 'OK request submitted', + '400': 'Syntax error', + '401': 'Authenticate first', + '403': 'Access to resource forbidden', + '404': 'Resource missing', + '409': 'Resource busy', + '500': 'Internal error', + '503': 'Service temporarily down' + } + + for key_code, value in return_status.iteritems(): + if key_code == status: + return value + + def get_configs(self): + """ + Function will return the config key use to setup the target + """ + scan_config_file = "config_file" + os.popen("omp --get-configs >%s" % scan_config_file) + + try: + full_deep_ulti = os.popen( + "cat %s | grep ultimate | grep deep | awk '{print $1}'" % + (scan_config_file)).read() + full_deep = os.popen( + "cat %s | grep -v ultimate | grep deep | awk '{print $1}'" % + (scan_config_file)).read() + full_fast_ulti = os.popen( + "cat %s | grep ultimate | grep fast | awk '{print $1}'" % + (scan_config_file)).read() + full_fast = os.popen( + "cat %s | grep -v ultimate | grep fast | awk '{print $1}'" % + (scan_config_file)).read() + + if(full_deep_ulti): + return full_deep_ulti + elif(full_deep): + return full_deep + elif(full_fast_ulti): + return full_deep + elif(full_deep): + return full_deep + + except ResultError as e: + raise OpenVasServerError( + "Unable to find configuration id Error: %s" % + e.message) + + def create_target(self, target_name, host): + + cmd_target = "%s_%s%s" % ( + target_name, host, host) + # checking existing target + check_target_name = target_name + '_' + host + + logging.info("Target name is: %s" % check_target_name) + list_target = "target_file" + os.popen("omp --get-targets >%s" % list_target) + cmd_target_check = os.system( + "cat %s | grep -i %s" % + (list_target, check_target_name)) + + if cmd_target_check == 0: + target_id = os.popen("cat %s | grep -i %s | awk '{print $1}'" % ( + list_target, check_target_name)).read() + logging.debug("Target ID is: %s" % target_id) + return target_id + + else: + tg_output = os.popen("omp -X '%s'" % (cmd_target)).read() + target_code = re.search('status="(\d+)"', tg_output).group(1) + status_string = self.check_return_status(target_code) + try: + if status_string.find("OK") == 0: + target_id = re.search( + 'id="(\w+-\w+-\w+-\w+-\w+)"', tg_output).group(1) + logging.debug("Target ID is: %s" % target_id) + return target_id + + except ClientError as e: + raise OpenVasTargetError( + "Unable to create the target %s, Error: %s" % + (target_name, e.message)) + + def create_task(self, config_id, target_id, task_name, host): + + config_id = self.get_configs() + logging.info("Creating Task") + t_c1 = "%s_%s" % (target_id).rstrip('\n') + task_command = " ".join([t_c1, t_c2, t_c3]) + + # checking existing task + check_task_name = task_name + '_' + host + logging.debug("Task name is: %s" % check_task_name) + list_task = "task_file" + os.popen("omp --get-tasks >%s" % list_task) + cmd_task_check = os.system( + "cat %s | grep -i %s" % + (list_task, check_task_name)) + + if cmd_task_check == 0: + task_id = os.popen("cat %s | grep -i %s | awk '{print $1}'" % ( + list_task, check_task_name)).read() + logging.debug("Task ID is:%s" % task_id) + return task_id + + else: + task_output = os.popen("omp -X '%s'" % (task_command)).read() + status_code = re.search('status="(\d+)"', task_output).group(1) + status_string = self.check_return_status(status_code) + try: + if status_string.find("OK") == 0: + task_id = re.search( + 'id="(\w+-\w+-\w+-\w+-\w+)"', + task_output).group(1) + logging.debug("Task ID is:%s" % task_id) + return task_id + + except ClientError as e: + raise OpenVasProfileError( + "Unable to create task %s, Error: %s" % + (check_task_name, e.message)) + + def start_scan(self, task_id): + self.task_id = task_id + s_s1 = "" % (self.task_id).rstrip('\n') + + scan_command = " ".join([s_s1, s_s2]) + logging.info("Starting the OPENVAS System Scan in few Sec") + scan_output = os.popen("omp -X '%s'" % (scan_command)).read() + scan_code = re.search('status="(\d+)"', scan_output).group(1) + status_string = self.check_return_status(scan_code) + + try: + if status_string.find("OK") == 0: + task_report_id = re.search( + '>(\w+-\w+-\w+-\w+-\w+)<', scan_output).group(1) + logging.debug("Report id is %s" % task_report_id) + return task_report_id + + except ClientError as e: + raise OpenVasClientError( + "Scan failed to start Error: %s" % + e.message) + sys.exit() + + def delete_task(self, task_id): + """ + Delete the Schedule task for cleanup + """ + self.task_id = task_id + logging.info("Deleting the Task %s" % self.task_id) + try: + os.system("omp -D %s" % self.task_id) + + except ServerError as e: + raise OpenVasServerError( + "Unable to delete the task %s, Error: %s" % + (task_id, e.message)) + + def monitor_scan(self): + + semp = Semaphore(0) + self.call_back_end = partial(lambda x: x.release(), semp) + self.call_back_progress = my_print_status + + # print "call back_end is %s" %self.callback_end + # print "call back_progress is %s" %self.callback_progress + logging.info("Scan in progress\n") + + # Callback is set? + if self.call_back_end or self.call_back_progress: + # schedule a function to run in 15 seconds to Monitor the Callback + logging.debug( + "Wait to Finish the Scan, Monitoring job in every 15 sec") + self.function_handle = self.callback( + self.call_back_end, self.call_back_progress) + + semp.acquire() + + def is_task_running(self, task_id): + """ + task will run in either "Running" or "Requested" + """ + # Get status of task + self.task_id = task_id + status_task_file = "check_task_init" + os.popen("omp --get-tasks >%s" % status_task_file) + task_status = os.popen( + "cat %s | grep -i \"%s\" | awk '{print $2}'" % + (status_task_file, self.task_id)).read().rstrip('\n') + + if task_status is None: + logging.debug("Task not found") + else: + return task_status in ("Running", "Requested") + + def get_tasks_progress(self, task_id): + """ + Get the progress of the task. + + """ + if not isinstance(task_id, str): + raise TypeError("Expected string, got %r instead" % type(task_id)) + + t_progress = 0.0 # Task Progress Statics + + # Get task progress status + + status_task_file = "task_progress" + os.popen("omp --get-tasks >%s" % status_task_file) + task_status = os.popen( + "cat %s | grep -i \"%s\" | awk '{print $2}'" % + (status_task_file, self.task_id)).read().rstrip('\n') + if task_status is None: + logging.debug("Task not found") + + elif task_status in ("Running", "Pause Requested", "Paused"): + h1 = os.popen("cat %s | grep -i \"%s\" | awk '{print $3}'" % ( + status_task_file, self.task_id)).read().rstrip('\n') + + h = h1.rstrip('%') + if h is not None: + t_progress += float(h) + + elif task_status in ("Delete Requested", "Done", "Stop Requested", "Stopped", "Internal Error"): + return 100.0 # Task finished + + logging.debug("Monitoring Scan,Wait to complete") + return t_progress + + @set_interval(15.0) + def callback(self, func_end, func_status): + """ + This callback function is called periodically from a timer. + + :func_end: Function called when task end. + :type func_end: funtion pointer + :param func_status: Function called for update task status. + :type func_status: funtion pointer + + """ + # Check if audit was finished + try: + if not self.is_task_running(self.task_id): + # Task is finished. Stop the callback interval + self.function_handle.set() + + # Call the callback function + if func_end: + func_end() + + # Reset error counter + self.error_counter = 0 + + except ServerError as e: + raise OpenVasTaskNotFinishedError( + "Task is not running Error: %s" % e.message) + + self.error_counter += 1 + + # Checks for error number + if self.error_counter >= 5: + # Stop the callback interval + self.function_handle.set() + func_end() + + if func_status: + try: + t = self.get_tasks_progress(self.task_id) + + # Save old progress + self.old_progress = t + func_status(1.0 if t == 0.0 else t) + + except ServerError as e: + raise OpenVasScanError( + "Unable to find the running Task Progress Error: %s" % + e.message) + + func_status(self.old_progress) + + def create_report(self, report_id): + ''' + Function will generate the report in csv and html format. it will also + parse the output for regression dashboard + ''' + self.report_id = report_id + tool_name = 'openvas' + os_ref = self.full_project.split('-')[0] + arch = self.full_project.split('-')[-1] + result_dir = '/root/Security_Results' + scan_report_csv = "%s-%s-%s.csv" % (tool_name, + self.full_project, + time.strftime('%Y-%m-%d')) + scan_report_html = "%s-%s-%s.html" % (tool_name, + self.full_project, + time.strftime('%Y-%m-%d')) + reg_report = "reg_%s-%s-%s.csv" % (tool_name, + self.full_project, + time.strftime('%Y-%m-%d')) + logging.info("Report ID is:%s" % self.report_id) + + csv_report_id = os.popen( + "omp --get-report-formats | grep 'CSV'| grep 'Results'| awk '{print $1}'").read().rstrip('\n') + + #text_report_id = os.popen("omp --get-report-formats |grep 'TXT'| awk '{print $1}'").read().rstrip('\n') + #xml_report_id = os.popen("omp --get-report-formats|grep 'XML'| grep -v 'Anonymous'|awk '{print $1}'").read().rstrip('\n') + html_report_id = os.popen( + "omp --get-report-formats | grep 'HTML'| awk '{print $1}'").read().rstrip('\n') + + # create report in different format + logging.info("Generating Report in CSV and HTML") + try: + os.system( + "omp --get-report %s --format %s > %s" % + (self.report_id, csv_report_id, scan_report_csv)) + os.system("omp --get-report %s --format %s > %s" % + (self.report_id, html_report_id, scan_report_html)) + if os.stat(scan_report_csv).st_size > 0: + with open(scan_report_csv, 'r') as ar, open(reg_report, 'w') as rr: + data = csv.reader(ar) + reg_data = [[tool_name, os_ref, arch, row[7], row[5]] + for row in data] + output = csv.writer(rr) + for row in reg_data: + output.writerow(row) + ar.close() + rr.close() + os.system("sed -i '1s/%s/OS_Name/' %s" % (os_ref, reg_report)) + os.system("sed -i '1s/%s/Arch/' %s" % (arch, reg_report)) + os.system("sed -i '1s/%s/Tools/' %s" % (tool_name, reg_report)) + + logging.info("Copying the Result Common directory") + logging.info("Result path is %s" % result_dir) + if not os.path.exists(result_dir): + os.makedirs(result_dir) + os.system( + "cp %s %s %s %s" % + (scan_report_csv, + scan_report_html, + reg_report, + result_dir)) + + else: + logging.debug("Report doesn't exist Check Openvas Setup") + + except ResultError as e: + raise OpenVasTaskNotFinishedError( + "Unable to Create report Error: %s %s" % + (self.report_id, e.message)) + + +if __name__ == "__main__": + + try: + obj = openvas_cli() + obj.client_omp_config() + obj.openvas_repo_setup() + obj.install_openvas_pkg() + obj.openvas_data_setup() + obj.check_openvas_services() + obj.verify_setup() + config_id = obj.get_configs() + target_id = obj.create_target('omp_scan', 'localhost') + task_id = obj.create_task( + config_id, target_id, 'omp_scan', 'localhost') + task_report_id = obj.start_scan(task_id) + obj.monitor_scan() + obj.create_report(task_report_id) + + finally: + obj.delete_task(task_id) + obj.cleanup() diff --git a/security_tools/openvas_scanner/openvas_scanner.py b/security_tools/openvas_scanner/openvas_scanner.py new file mode 100755 index 000000000..0dbdce916 --- /dev/null +++ b/security_tools/openvas_scanner/openvas_scanner.py @@ -0,0 +1,55 @@ +#!/bin/python +import os +import subprocess +import logging +import time +import sys + +from autotest.client import test +from autotest.client.shared import error + + +class openvas_scanner(test.test): + + """ + Autotest module for scanning the system for CVEs by openvas tools + + """ + version = 1 + nfail = 0 + path = '' + + def initialize(self): + """ + Sets the overall failure counter for the test. + """ + self.nfail = 0 + logging.info('\n Test initialize successfully') + + def run_once(self, test_path=''): + """ + Trigger test run + """ + try: + cwd = os.getcwd() + os.chdir(cwd) + ret_val = subprocess.Popen( + ['./openvas_omp.py'], + cwd="%s/openvas_scanner" % + (test_path)) + time.sleep(100) + ret_val.communicate() + if ret_val.returncode != 0: + self.nfail += 1 + + except error.CmdError as e: + self.nfail += 1 + logging.error("Test Failed: %s", e) + + def postprocess(self): + if self.nfail != 0: + logging.info('\n nfails is non-zero') + raise error.TestError('\nTest failed') + else: + logging.info('\n Test completed successfully ') + sys.exit() diff --git a/security_tools/openvas_scanner/openvas_setup_cli.py b/security_tools/openvas_scanner/openvas_setup_cli.py new file mode 100755 index 000000000..66bf8ab2a --- /dev/null +++ b/security_tools/openvas_scanner/openvas_setup_cli.py @@ -0,0 +1,655 @@ +#!/usr/bin/env python + +""" +The contents of this file are classes and functions for OPENVAS cli setup. +The automation script will be used to setup repo, install the required package, +download and setup the vulnerability database from openvas server, certificate setup and +prechecks before the actual scan on local system.. +setup script will take around 40-50 min to complete all processes. +Scan will be triggered from autotest as well +Author: Anup Kumar + +""" +import re +import sys +import os +import time +import logging +import pexpect +from ConfigParser import SafeConfigParser + + +####################################### +# OPENVAS EXCEPTION CLASSES # +####################################### + + +class Error(Exception): + + """Base class for OMP errors.""" + + def __str__(self): + return repr(self) + + +class ErrorResponse(Error): + + def __init__(self, msg="", *args): + self.message = msg + Error.__init__(*args) + + def __str__(self): + return self.message + + +class ClientError(ErrorResponse): + """command execution error,made by the client""" + + +class ServerError(ErrorResponse): + """command processing error by manager""" + + +class ResultError(Error): + """Get invalid answer from Server""" + + def __str__(self): + return 'Result Error: answer from command %s is invalid' % self.args + + +class NvtError(ErrorResponse): + """command processing error by scanner""" + + +class CertError(ErrorResponse): + """command processing error by scanner""" + + +###################################### +# HIGH LEVEL EXCEPTION CLASSES # +###################################### + + +class OpenVasException(Exception): + """Base class for OpenVAS exceptions.""" + + +class OpenVasServerError(OpenVasException): + """Error message from the OpenVAS server.""" + + +class OpenVasClientError(OpenVasException): + """Error message from the OpenVAS client.""" + + +class OpenVasProfileError(OpenVasException): + """Profile error.""" + + +class OpenVasTargetError(OpenVasException): + """Target related errors.""" + + +class OpenVasScanError(OpenVasException): + """Task related errors.""" + + +class OpenVasTaskNotFinishedError(OpenVasException): + """Task not finished""" + + +class OpenVasNvtDownloadError(OpenVasException): + """Nvt Downloading error""" + + +class OpenVasCertDownloadError(OpenVasException): + """Certificate Downloading error""" + + +########################################## +# OPENVAS SETUP FOR ALL ARCH # +########################################## + +class openvas_setup_cli(object): + + def __init__(self): + + self.output_file = 'output_file' + self.u_name = 'admin' + self.u_pass = 'man@twork17' + + def client_omp_config(self): + """ + File will use to setup the scan on localhost target + """ + user_check = os.popen("whoami").read().rstrip('\n') + if user_check == "root": + omp_config = 'Connection' + logging.info("Creating omp config file") + with open('omp.config', 'wb') as config_fh: + pr1 = SafeConfigParser() + pr1.add_section(omp_config) + pr1.set(omp_config, 'host', "localhost") + pr1.set(omp_config, 'port', "9390") + pr1.set(omp_config, 'username', self.u_name) + pr1.set(omp_config, 'password', self.u_pass) + pr1.write(config_fh) + config_fh.close() + + if not os.path.exists("/root/omp.config"): + logging.debug("Copy omp configuration to root") + os.system("cp omp.config /root/") + + else: + logging.debug( + "Aborting the scan due to unavailability of root user") + sys.exit() + + def get_arch_os_version(self): + """ + Function will return the os version wrt to centos and arch + + """ + self.check_sepolicy = os.popen("getenforce").read().rstrip('\n') + if self.check_sepolicy == "Enforcing": + os.system("setenforce 0") + logging.info( + "Selinux policy turning to Permissive for openvas scan") + try: + self.arch_os_ver = [] + f1 = os.popen("cat /etc/os-release").read() + d_name = re.search('ID="(\S+)"', f1).group(1) + v_id = re.search('VERSION_ID="(\S+)"', f1).group(1) + check_arch = os.popen( + "uname -r").read().rstrip('\n').split('.')[-1] + ref_vid = str(float(v_id) + 1) + ref_full_name = "".join([d_name, ref_vid]) + arch_os_ver = [ref_full_name, check_arch] + full_name = "".join([d_name, v_id]) + self.full_project = "-".join([full_name, check_arch]) + return arch_os_ver + + except (TypeError, ValueError) as e: + self.logging.warning("Invalid Project configuration file") + self.logging.debug(e) + + def openvas_repo_setup(self): + """ + Function will setup the repo for openvas8 (epel repo) + and openvas 9 (atomic) + + """ + key_dir = os.getcwd() + self.arch_os_ver = self.get_arch_os_version() + system_os = self.arch_os_ver[0] + distro_os_ref = int(re.search(r'\d+', system_os).group()) - 1 + arch = self.arch_os_ver[1] + + # setting centos repo for openvas 9, it install openvas realted + # dependency + + if arch in ("x86_64", "ia32", "ppc64le", "ppc64"): + cust_repo = 'CentOS' + set_arch = ' ' + logging.info("Setting the centos repo") + if os.path.isfile("/etc/yum.repos.d/centos.repo"): + os.system( + "mv /etc/yum.repos.d/centos.repo /etc/yum.repos.d/centos.repo_org") + fh = open('/etc/yum.repos.d/centos.repo', 'w') + cent_par = SafeConfigParser() + cent_par.add_section(cust_repo) + cent_par.set(cust_repo, 'name', 'centos') + if arch == 'x86_64': + cent_par.set( + cust_repo, 'baseurl', 'http://mirror.centos.org/centos/%s/os/%s/' % + (distro_os_ref, arch)) + else: + if arch == 'ia32': + set_arch = 'i386' + else: + set_arch = arch + cent_par.set( + cust_repo, 'baseurl', 'http://mirror.centos.org/altarch/%s/os/%s/' % + (distro_os_ref, set_arch)) + cent_par.set(cust_repo, 'enabled', '1') + cent_par.set(cust_repo, 'gpgcheck', '0') + cent_par.write(fh) + fh.close() + + # setting openvas repo + try: + + # setting repo for + if arch is None: + logging.debug("Arch not listing") + + elif arch in ("x86_64", "ia32"): + # setting the atomic repo + cust_repo = 'atomic' + logging.info("Setting the atomic repo") + if os.path.isfile("/etc/yum.repos.d/atomic.repo"): + os.system( + "mv /etc/yum.repos.d/atomic.repo /etc/yum.repos.d/atomic.repo_org") + + if arch == 'ia32': + arch_flag = 'i386' + set_distro_os_ref = 6.5 + else: + arch_flag = 'x86_64' + set_distro_os_ref = distro_os_ref + # Now setting the atomic repo + fp = open('/etc/yum.repos.d/atomic.repo', 'w') + parser = SafeConfigParser() + parser.add_section(cust_repo) + parser.set( + cust_repo, + 'name', + 'CentOS / Red Hat Enterprise Linux $releasever - atomic') + parser.set( + cust_repo, + 'mirrorlist', + 'http://updates.atomicorp.com/channels/mirrorlist/atomic/centos-%s-%s' % + (set_distro_os_ref, arch_flag)) + + parser.set(cust_repo, 'enabled', '1') + parser.set(cust_repo, 'protect', '0') + parser.set( + cust_repo, 'gpgkey', 'file:%s/RPM-GPG-KEY.art.txt' + ' file:%s/RPM-GPG-KEY.atomicorp.txt' % + (key_dir, key_dir)) + + parser.set(cust_repo, 'gpgcheck', '1') + parser.write(fp) + fp.close() + logging.info("Installing the Atomic GPG keys") + if not os.path.isfile("RPM-GPG-KEY.art.txt"): + try: + os.system( + "wget -q https://www.atomicorp.com/RPM-GPG-KEY.art.txt") + except IOError as err: + logging.debug(err) + + if not os.path.isfile("RPM-GPG-KEY.atomicorp.txt"): + try: + os.system( + "wget -q https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt") + except IOError as err: + logging.debug(err) + + logging.info("Initiating the atomic Repo") + + elif arch in ("ppc64le", "ppc64", "ppc"): + # setting the epel repo + logging.info("Setting the epel repo") + cust1_repo = 'epel' + if os.path.isfile("/etc/yum.repos.d/epel.repo"): + os.system( + "mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo_org") + + fp1 = open('/etc/yum.repos.d/epel.repo', 'w') + parser1 = SafeConfigParser() + parser1.add_section(cust1_repo) + parser1.set( + cust1_repo, + 'name', + 'Extra Packages for Enterprise Linux %s - $basearch' % + (distro_os_ref)) + parser1.set( + cust1_repo, + 'mirrorlist', + 'https://mirrors.fedoraproject.org/metalink?repo=epel-%s&arch=$basearch' % + (distro_os_ref)) + + parser1.set(cust1_repo, 'failovermethod', 'priority') + parser1.set(cust1_repo, 'enabled', '1') + parser1.set( + cust1_repo, + 'gpgkey', + 'file:%s/RPM-GPG-KEY-EPEL' % + key_dir) + parser1.set(cust1_repo, 'gpgcheck', '1') + parser1.write(fp1) + fp1.close() + logging.info("Initiating the epel Repo") + + elif arch in "s390x": + # setting the fedora repo + logging.info("Setting the fedora 24 repo") + cust2_repo = 'fedora' + if os.path.isfile("/etc/yum.repos.d/fedora.repo"): + os.system( + "mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo_org") + + fp2 = open('/etc/yum.repos.d/fedora.repo', 'w') + parser2 = SafeConfigParser() + parser2.add_section(cust2_repo) + parser2.set(cust2_repo, 'name', 'Fedora 22 - $basearch') + parser2.set( + cust2_repo, + '#baseurl', + 'http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/') + parser2.set( + cust2_repo, + 'metalink', + 'https://mirrors.fedoraproject.org/metalink?repo=fedora-22&arch=$basearch') + parser2.set(cust2_repo, 'failovermethod', 'priority') + parser2.set(cust2_repo, 'enabled', '1') + parser2.set( + cust2_repo, 'gpgkey', 'file:%s/RPM-GPG-KEY-fedora-22' + ' file:%s/RPM-GPG-KEY-fedora-22_sec' % + (key_dir, key_dir)) + parser2.set(cust2_repo, 'gpgcheck', '1') + parser2.set(cust2_repo, 'skip_if_unavailable', 'False') + parser2.write(fp2) + fp2.close() + logging.info("Initiating the Fedora Repo") + + os.system("yum clean all > %s" % self.output_file) + os.system("yum repolist > %s" % self.output_file) + time.sleep(10) + + except IOError as err: + logging.info("Repo failed to setup") + logging.debug(err) + sys.exit() + + def install_openvas_pkg(self, reinstall=0): + """ + Function will install openvas related packages + """ + check_arch = self.arch_os_ver[1] + logging.info("Installing the required package") + + pkg_list = ( + "sqlite3", + "redis", + "gnutls", + "libksba", + "libssh", + "curl", + "rsync", + "nmap", + "openvas-cli", + "greenbone-security-assistant", + "pexpect", + "openvas-libraries", + "openvas-smb", + "openvas-manager", + "openvas-scanner", + "openvas-gsa") + + for pkg in pkg_list: + os.system( + "yum %s -y %s >%s" % + (('install', 'reinstall')[reinstall], pkg, self.output_file)) + + if check_arch in "x86_64": + # Libssh issue with openvas 9 + #b_dir = os.getcwd() + #os.system("cp %s/libssh/libssh.so.4.5.0 /usr/lib/" % b_dir) + #os.system("ln -s /usr/lib/libssh.so.4.5.0 /usr/lib/libssh.so.4") + v9_pkg = ( + "openvas-libraries", + "openvas-cli", + "openvas-manager", + "openvas-scanner", + "greenbone-security-assistant") + for pkg in v9_pkg: + os.system("yum reinstall -y %s >%s" % (pkg, self.output_file)) + + elif check_arch in "ia32": + os.system("yumdownloader openvas-cli") + full_name = os.popen("ls openvas-cli*").read().rstrip('\n') + os.system("rpm -ivh %s --nodeps" % full_name) + # private directory should be available to download nvt + if not os.path.isdir("/var/lib/openvas/plugins/private"): + os.system("mkdir /var/lib/openvas/plugins/private") + + elif check_arch in "s390x": + + local_pkgs = ( + "libgcrypt", + "libksba", + "openvas-cli", + "openvas-libraries", + "openvas-manager", + "openvas-scanner", + "openvas-gsa") + for rpm_pkg in local_pkgs: + os.system("yumdownloader %s" % rpm_pkg) + full_name = os.popen( + "ls %s*| grep -i s390x" % + rpm_pkg).read().rstrip('\n') + os.system("rpm -ivh %s --nodeps" % full_name) + os.system("rm %s" % full_name) + + if not os.path.isdir("/private"): + os.system("mkdir /private") + if not os.path.isdir("/var/lib/openvas/plugins/private"): + os.system("mkdir /var/lib/openvas/plugins/private") + + time.sleep(10) + + def check_openvas_services(self, restart=0): + """ + check redis, openvas-scanner,openvas-manager and running on proper port + if not restart this + """ + openvas_services = ( + "redis", + "openvas-scanner", + "openvas-manager", + "gsad", + "openvas-gsa") + logging.info("check the openvas related services on correct port") + for ov_service in openvas_services: + #os.system("systemctl enable %s" %ov_service) + cmd_service = os.system( + "systemctl %s %s >%s" % + (("start", "restart")[restart], ov_service, self.output_file)) + + if cmd_service == 0: + logging.info("Service %s in stated state" % ov_service) + if ov_service == "openvas-manager": + md_port_check = os.system( + "netstat -npl | grep -i openvasmd | grep -i 9390") + if md_port_check == 0: + logging.info("%s is running on port 9390" % ov_service) + else: + logging.debug( + "restarting %s on correct port" % + ov_service) + os.popen("openvasmd -p 9390 -a 127.0.0.1") + + def openvas_data_setup(self, restart=0): + + try: + if os.path.exists("/etc/redis.conf"): + os.system("cp /etc/redis.conf /etc/redis.conf_org") + with open("/etc/redis.conf", "a") as file: + file.writelines("unixsocket /tmp/redis.sock \n") + file.close() + + except OSError: + logging.debug("Failed to find redis config file") + + logging.info("Downloading/Updating NVT, CERT, and SCAP data") + default_downloader = 'rsync' + check_greenbone = os.system( + "rpm -qa | grep -i greenbone >%s" % + self.output_file) + + if check_greenbone == 0: + g_nvt_sync = os.popen("which greenbone-nvt-sync").read() + g_cert_sync = os.popen("which greenbone-certdata-sync").read() + g_scap_sync = os.popen("which greenbone-scapdata-sync").read() + v9_scan_sync_data = (g_nvt_sync, g_cert_sync, g_scap_sync) + + for sync_data in v9_scan_sync_data: + logging.info("Downloading Data from %s script" % sync_data) + + try: + rsync_cert_sync = os.system( + "%s --%s" % + (sync_data, default_downloader)) + if rsync_cert_sync is not None: + default_downloader = 'wget' + wget_cert_sync = os.system( + "%s --%s" % + (sync_data, default_downloader)) + if wget_cert_sync is not None: + default_downloader = 'http' + os.system( + "%s --%s" % + (sync_data, default_downloader)) + time.sleep(10) + + except NvtError as e: + raise OpenVasNvtDownloadError( + "Can't download the Nvt form %s sync. Error: %s" % + (sync_data, e.message)) + + if not os.path.exists('/var/lib/openvas/CA/cacert.pem'): + logging.info("Managing Certificate") + try: + os.system("openvas-manage-certs -a") + time.sleep(120) + except CertError as e: + raise OpenVasCertDownloadError("Error: %s" % e.message) + os.system( + "systemctl %s %s >%s" % + (("start", "restart")[restart], 'redis', self.output_file)) + os.system( + "systemctl %s %s >%s" % + (("start", "restart")[restart], 'openvas-scanner', self.output_file)) + logging.info("Pausing while openvas-scanner loads NVTs...") + time.sleep(20) + os.system("openvasmd --migrate") + os.system( + "systemctl %s %s >%s" % + (("start", "restart")[restart], 'openvas-manager', self.output_file)) + time.sleep(20) + os.system("openvasmd --update --progress") + + else: + o_nvt_sync = os.popen("which openvas-nvt-sync").read() + o_cert_sync = os.popen("which openvas-certdata-sync").read() + o_scap_sync = os.popen("which openvas-scapdata-sync").read() + v8_scan_sync_data = (o_nvt_sync, o_cert_sync, o_scap_sync) + for sync_data in v8_scan_sync_data: + logging.info("Downloading Data from %s script" % sync_data) + + try: + rsync_cert_sync = os.system( + "%s --%s" % + (sync_data, default_downloader)) + if rsync_cert_sync is not None: + default_downloader = 'wget' + wget_cert_sync = os.system( + "%s --%s" % + (sync_data, default_downloader)) + if wget_cert_sync is not None: + default_downloader = 'http' + os.system( + "%s --%s" % + (sync_data, default_downloader)) + time.sleep(10) + + except NvtError as e: + raise OpenVasNvtDownloadError( + "Can't download the Nvt form %s sync. Error: %s" % + (sync_data, e.message)) + + # download certificate + logging.info("Creating the Scanner Certificate") + try: + + if not (os.path.exists('/etc/pki/openvas/CA/cacert.pem') + or os.path.exists('/var/lib/openvas/CA/cacert.pem')): + child = pexpect.spawn('openvas-mkcert') + child.expect('CA certificate .*: ') + child.sendline('1000') + child.expect('Server certificate life .*: ') + child.sendline('365') + child.expect('Your country .*: ') + child.sendline('IN') + child.expect('Your state .*: ') + child.sendline('none') + child.expect('Your location .*: ') + child.sendline('bang') + child.expect('Your organization .*: ') + child.sendline('ibm') + child.expect('Press .* ') + child.sendline(' ') + + logging.info("Creating Client Certificate") + os.system("openvas-mkcert-client -n -i") + time.sleep(120) + + except CertError as e: + raise OpenVasCertDownloadError("Error: %s" % e.message) + os.system( + "systemctl %s %s >%s" % + (("start", "restart")[restart], 'redis', self.output_file)) + os.system( + "systemctl %s %s >%s" % + (("start", "restart")[restart], 'openvas-scanner', self.output_file)) + logging.info("Pausing while openvas-scanner loads NVTs...") + time.sleep(20) + os.system("openvasmd --rebuild --progress -v") + os.system( + "systemctl %s %s >%s" % + (("start", "restart")[restart], 'openvas-manager', self.output_file)) + time.sleep(20) + os.system( + "openvasmd --create-user='%s' >%s" % + (self.u_name, self.output_file)) + os.system("openvasmd --user='%s' --new-password='%s' >%s" % + (self.u_name, self.u_pass, self.output_file)) + + def verify_setup(self): + """ + Check the installation setup + """ + ch_arch = self.arch_os_ver[1] + if ch_arch not in ("ia32", "s390x"): + install_log = "setup_log" + error_file = "setup_error_log" + str1 = "Greenbone Security Assistant" + str2 = "ERROR: Your OpenVAS-" + str3 = "ERROR: No OpenVAS SCAP database" + str4 = "ERROR: The number of NVTs" + str5 = "ERROR: SELinux is enabled" + match = 0 + + setup_check = os.system( + "rpm -qa | grep -i greenbone >%s" % + self.output_file) + if setup_check == 0: + command = "openvas-check-setup --v9" + else: + command = "openvas-check-setup" + + os.system("/bin/bash %s > %s" % (command, install_log)) + os.system("cat %s | grep 'ERROR' >%s" % (install_log, error_file)) + with open(error_file) as fh: + + for line in fh: + if str1 in line or str2 in line or str5 in line: + continue + elif str3 in line: + check_scap = os.system( + "which openvas-scapdata-sync >%s" % + self.output_file) + if check_scap == 0: + os.system("openvas-scapdata-sync") + else: + os.system("greenbone-scapdata-sync") + elif str4 in line: + os.system("openvasmd --rebuild") + else: + match += 1 + time.sleep(10) + if match >= 1: + logging.debug("openvas setup is not completed") + sys.exit()