Server | Playbook | Task | Module | Change |
---|
JC-HardenTest | harden_rhel7.yml | AD.1.1.1.0.0 | PATCH_RHEL | PASSWORD | Implement all password controls for key common services (PAM) | community.general.system.pamd | |
JC-HardenTest | harden_rhel7.yml | AD.1.1.1.1 | PATCH_RHEL | PASSWORD | Default maximum password age (login.defs) | ansible.builtin.lineinfile | "--- before: /etc/login.defs (content)
+++ after: /etc/login.defs (content)
@@ -22,7 +22,7 @@
#\tPASS_MIN_LEN\tMinimum acceptable password length.
#\tPASS_WARN_AGE\tNumber of days warning given before a password expires.
#
-PASS_MAX_DAYS\t99999
+PASS_MAX_DAYS 90
PASS_MIN_DAYS\t0
PASS_MIN_LEN\t5
PASS_WARN_AGE\t7
"
after_header: /etc/login.defs (file attributes)
before_header: /etc/login.defs (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.1.1.2 | PATCH_RHEL | PASSWORD | Per-userid password age setting, in days (shadow) | ansible.builtin.user | |
JC-HardenTest | harden_rhel7.yml | AD.1.1.2 | PATCH_RHEL | PASSWORD | Default password minimal length (login.defs) | ansible.builtin.lineinfile | "--- before: /etc/login.defs (content)
+++ after: /etc/login.defs (content)
@@ -24,7 +24,7 @@
#
PASS_MAX_DAYS 90
PASS_MIN_DAYS\t0
-PASS_MIN_LEN\t5
+PASS_MIN_LEN 8
PASS_WARN_AGE\t7
#
"
after_header: /etc/login.defs (file attributes)
before_header: /etc/login.defs (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.1.2 | PATCH_RHEL | PASSWORD | Complexity (PAM) | community.general.system.pamd | |
JC-HardenTest | harden_rhel7.yml | AD.1.1.3.1 | PATCH_RHEL | PASSWORD | Default minimum number of days that must elapse between password changes (login.defs) | ansible.builtin.lineinfile | "--- before: /etc/login.defs (content)
+++ after: /etc/login.defs (content)
@@ -23,7 +23,7 @@
#\tPASS_WARN_AGE\tNumber of days warning given before a password expires.
#
PASS_MAX_DAYS 90
-PASS_MIN_DAYS\t0
+PASS_MIN_DAYS 1
PASS_MIN_LEN 8
PASS_WARN_AGE\t7
"
after_header: /etc/login.defs (file attributes)
before_header: /etc/login.defs (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.1.3.2 | PATCH_RHEL | PASSWORD | Per-userid min number of days between user-initiated password changes (shadow) | ansible.builtin.user | |
JC-HardenTest | harden_rhel7.yml | AD.1.1.4.1 | PATCH_RHEL | PASSWORD | Prevent reuse of last eight passwords (PAM) | community.general.system.pamd | |
JC-HardenTest | harden_rhel7.yml | AD.1.1.6.0 | PATCH_RHEL | PASSWORD | Threshold for consecutive failed login attempts (PAM) | community.general.system.pamd | |
JC-HardenTest | harden_rhel7.yml | AD.1.1.9.1 | PATCH_RHEL | PASSWORD | Exemptions to password rules, Non expiring password | ansible.builtin.lineinfile | "--- before: /etc/login.defs (content)
+++ after: /etc/login.defs (content)
@@ -22,7 +22,7 @@
#\tPASS_MIN_LEN\tMinimum acceptable password length.
#\tPASS_WARN_AGE\tNumber of days warning given before a password expires.
#
-PASS_MAX_DAYS 90
+PASS_MAX_DAYS 99999
PASS_MIN_DAYS 1
PASS_MIN_LEN 8
PASS_WARN_AGE\t7
"
after_header: /etc/login.defs (file attributes)
before_header: /etc/login.defs (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.1.10.1 | PATCH_RHEL | PASSWORD | Value of login shell attribute in /etc/passwd must be /sbin/nologin | ansible.builtin.lineinfile | |
JC-HardenTest | harden_rhel7.yml | AD.1.1.12.1 | PATCH_RHEL | PASSWORD | "x","!", "!!", or "*" specified in the password (2nd) field of the userid | ansible.builtin.lineinfile | |
JC-HardenTest | harden_rhel7.yml | AD.1.2.1.1 | PATCH_RHEL | LOGGING | Implement logging for syslog systems | ansible.builtin.copy | after: '*.info;mail.none;authpriv.none;cron.none /var/log/messages
authpriv.* /var/log/secure'
after_header: /runner/project/roles/harden-rhel7/files/AD_1_2_1_1_rhel.j2
before: ''
|
JC-HardenTest | harden_rhel7.yml | AD.1.2.1.3 | PATCH_RHEL | LOGGING | Implement rsyslog.conf | ansible.builtin.blockinfile | "--- before: /etc/rsyslog.conf (content)
+++ after: /etc/rsyslog.conf (content)
@@ -21,6 +21,12 @@
#### GLOBAL DIRECTIVES ####
+# BEGIN ANSIBLE MANAGED BLOCK
+filter f_authpriv { facility(authpriv); };
+destination authpriv { file(\"/var/log/secure;RSYSLOG_TraditionalFileFormat\"); };
+source src { internal(); };
+log { source(src); filter(f_authpriv); destination(authpriv); };
+# END ANSIBLE MANAGED BLOCK
# Where to place auxiliary files
$WorkDirectory /var/lib/rsyslog
"
after_header: /etc/rsyslog.conf (file attributes)
before_header: /etc/rsyslog.conf (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.2.1.4 | PATCH_RHEL | LOGGING | rsyslog.conf addition | ansible.builtin.blockinfile | "--- before: /etc/rsyslog.conf (content)
+++ after: /etc/rsyslog.conf (content)
@@ -22,10 +22,9 @@
#### GLOBAL DIRECTIVES ####
# BEGIN ANSIBLE MANAGED BLOCK
-filter f_authpriv { facility(authpriv); };
-destination authpriv { file(\"/var/log/secure;RSYSLOG_TraditionalFileFormat\"); };
-source src { internal(); };
-log { source(src); filter(f_authpriv); destination(authpriv); };
+$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+*.info;mail.none;authpriv.none;cron.none /var/log/messages
+authpriv.* /var/log/secure
# END ANSIBLE MANAGED BLOCK
# Where to place auxiliary files
"
after_header: /etc/rsyslog.conf (file attributes)
before_header: /etc/rsyslog.conf (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.2.4.1 | PATCH_RHEL | LOGGING | Creating /var/log/faillog file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.2 | PATCH_RHEL | LOGGING | audit.log must exist | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.1 | PATCH_RHEL | LOGGING | audit.rules must contain /usr perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -3,3 +3,4 @@
+-a exit,always -F path=/usr -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.2 | PATCH_RHEL | LOGGING | audit.rules must contain /etc perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -4,3 +4,4 @@
-a exit,always -F path=/usr -F perm=a
+-a exit,always -F path=/etc -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.3 | PATCH_RHEL | LOGGING | audit.rules must contain /var/log perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -5,3 +5,4 @@
-a exit,always -F path=/usr -F perm=a
-a exit,always -F path=/etc -F perm=a
+-a exit,always -F path=/var/log -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.4 | PATCH_RHEL | LOGGING | audit.rules must contain /tmp perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -6,3 +6,4 @@
-a exit,always -F path=/usr -F perm=a
-a exit,always -F path=/etc -F perm=a
-a exit,always -F path=/var/log -F perm=a
+-a exit,always -F path=/tmp -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.5 | PATCH_RHEL | LOGGING | audit.rules must contain /var/log/faillog perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -7,3 +7,4 @@
-a exit,always -F path=/etc -F perm=a
-a exit,always -F path=/var/log -F perm=a
-a exit,always -F path=/tmp -F perm=a
+-a exit,always -F path=/var/log/faillog -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.6 | PATCH_RHEL | LOGGING | audit.rules must contain /var/log/messages perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -8,3 +8,4 @@
-a exit,always -F path=/var/log -F perm=a
-a exit,always -F path=/tmp -F perm=a
-a exit,always -F path=/var/log/faillog -F perm=a
+-a exit,always -F path=/var/log/messages -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.7 | PATCH_RHEL | LOGGING | audit.rules must contain /var/log/wtmp perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -9,3 +9,4 @@
-a exit,always -F path=/tmp -F perm=a
-a exit,always -F path=/var/log/faillog -F perm=a
-a exit,always -F path=/var/log/messages -F perm=a
+-a exit,always -F path=/var/log/wtmp -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.8 | PATCH_RHEL | LOGGING | audit.rules must contain /var/log/secure perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -10,3 +10,4 @@
-a exit,always -F path=/var/log/faillog -F perm=a
-a exit,always -F path=/var/log/messages -F perm=a
-a exit,always -F path=/var/log/wtmp -F perm=a
+-a exit,always -F path=/var/log/secure -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.9 | PATCH_RHEL | LOGGING | audit.rules must contain /etc/ssh/sshd_config perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -11,3 +11,4 @@
-a exit,always -F path=/var/log/messages -F perm=a
-a exit,always -F path=/var/log/wtmp -F perm=a
-a exit,always -F path=/var/log/secure -F perm=a
+-a exit,always -F path=/etc/ssh/sshd_config -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.10 | PATCH_RHEL | LOGGING | audit.rules must contain /etc/default perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -12,3 +12,4 @@
-a exit,always -F path=/var/log/wtmp -F perm=a
-a exit,always -F path=/var/log/secure -F perm=a
-a exit,always -F path=/etc/ssh/sshd_config -F perm=wa
+-a exit,always -F path=/etc/default -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.11 | PATCH_RHEL | LOGGING | audit.rules must contain /var/log/audit/audit.log perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -13,3 +13,4 @@
-a exit,always -F path=/var/log/secure -F perm=a
-a exit,always -F path=/etc/ssh/sshd_config -F perm=wa
-a exit,always -F path=/etc/default -F perm=wa
+-a exit,always -F path=/var/log/audit/audit.log -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.12 | PATCH_RHEL | LOGGING | audit.rules must contain /etc/audit/auditd.conf perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -14,3 +14,4 @@
-a exit,always -F path=/etc/ssh/sshd_config -F perm=wa
-a exit,always -F path=/etc/default -F perm=wa
-a exit,always -F path=/var/log/audit/audit.log -F perm=a
+-a exit,always -F path=/etc/audit/auditd.conf -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.13 | PATCH_RHEL | LOGGING | audit.rules must contain /etc/audit/audit.rules perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -15,3 +15,4 @@
-a exit,always -F path=/etc/default -F perm=wa
-a exit,always -F path=/var/log/audit/audit.log -F perm=a
-a exit,always -F path=/etc/audit/auditd.conf -F perm=wa
+-a exit,always -F path=/etc/audit/audit.rules -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.14 | PATCH_RHEL | LOGGING | audit.rules must contain /sbin/auditctl perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -16,3 +16,4 @@
-a exit,always -F path=/var/log/audit/audit.log -F perm=a
-a exit,always -F path=/etc/audit/auditd.conf -F perm=wa
-a exit,always -F path=/etc/audit/audit.rules -F perm=wa
+-a exit,always -F path=/sbin/auditctl -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.15 | PATCH_RHEL | LOGGING | audit.rules must contain /sbin/auditd perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -17,3 +17,4 @@
-a exit,always -F path=/etc/audit/auditd.conf -F perm=wa
-a exit,always -F path=/etc/audit/audit.rules -F perm=wa
-a exit,always -F path=/sbin/auditctl -F perm=a
+-a exit,always -F path=/sbin/auditd -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.16 | PATCH_RHEL | LOGGING | audit.rules must contain /sbin/ausearch perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -18,3 +18,4 @@
-a exit,always -F path=/etc/audit/audit.rules -F perm=wa
-a exit,always -F path=/sbin/auditctl -F perm=a
-a exit,always -F path=/sbin/auditd -F perm=a
+-a exit,always -F path=/sbin/ausearch -F perm=a
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.18 | PATCH_RHEL | LOGGING | audit.rules must contain /etc/syslog.conf perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -19,3 +19,4 @@
-a exit,always -F path=/sbin/auditctl -F perm=a
-a exit,always -F path=/sbin/auditd -F perm=a
-a exit,always -F path=/sbin/ausearch -F perm=a
+-a exit,always -F path=/etc/syslog.conf -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.19 | PATCH_RHEL | LOGGING | audit.rules must contain /etc/snmpd.conf perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -20,3 +20,4 @@
-a exit,always -F path=/sbin/auditd -F perm=a
-a exit,always -F path=/sbin/ausearch -F perm=a
-a exit,always -F path=/etc/syslog.conf -F perm=wa
+-a exit,always -F path=/etc/snmpd.conf -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.20 | PATCH_RHEL | LOGGING | audit.rules must contain /etc/snmp/snmpd.conf perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -21,3 +21,4 @@
-a exit,always -F path=/sbin/ausearch -F perm=a
-a exit,always -F path=/etc/syslog.conf -F perm=wa
-a exit,always -F path=/etc/snmpd.conf -F perm=wa
+-a exit,always -F path=/etc/snmp/snmpd.conf -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.21 | PATCH_RHEL | LOGGING | audit.rules must contain /etc/snmpd/snmpd.conf perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -22,3 +22,4 @@
-a exit,always -F path=/etc/syslog.conf -F perm=wa
-a exit,always -F path=/etc/snmpd.conf -F perm=wa
-a exit,always -F path=/etc/snmp/snmpd.conf -F perm=wa
+-a exit,always -F path=/etc/snmpd/snmpd.conf -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.22 | PATCH_RHEL | LOGGING | audit.rules must contain /root/.rhosts perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -23,3 +23,4 @@
-a exit,always -F path=/etc/snmpd.conf -F perm=wa
-a exit,always -F path=/etc/snmp/snmpd.conf -F perm=wa
-a exit,always -F path=/etc/snmpd/snmpd.conf -F perm=wa
+-a exit,always -F path=/root/.rhosts -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.20.1.2.3.23 | PATCH_RHEL | LOGGING | audit.rules must contain /root/.netrc perms | ansible.builtin.lineinfile | "--- before: /etc/audit/audit.rules (content)
+++ after: /etc/audit/audit.rules (content)
@@ -24,3 +24,4 @@
-a exit,always -F path=/etc/snmp/snmpd.conf -F perm=wa
-a exit,always -F path=/etc/snmpd/snmpd.conf -F perm=wa
-a exit,always -F path=/root/.rhosts -F perm=wa
+-a exit,always -F path=/root/.netrc -F perm=wa
"
after_header: /etc/audit/audit.rules (file attributes)
before_header: /etc/audit/audit.rules (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.5.1.2 | PATCH_RHEL | NETWORK SETTINGS | Anonymous FTP - ftp account home directory | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.5.8.8 | PATCH_RHEL | NETWORK SETTINGS | NETSTAT must be enabled for monitoring | ansible.builtin.yum | |
JC-HardenTest | harden_rhel7.yml | AD.1.5.9.18 | PATCH_RHEL | NETWORK SETTINGS | NO REMEDIATION | SNMP community string set to public | ansible.builtin.lineinfile | "--- before: /etc/snmp/snmpd.conf (content)
+++ after: /etc/snmp/snmpd.conf (content)
@@ -38,7 +38,6 @@
# First, map the community name \"public\" into a \"security name\"
# sec.name source community
-com2sec notConfigUser default public
####
# Second, map the security name into a group name:
@@ -109,7 +108,6 @@
# First, map the community name \"public\" into a \"security name\"
# sec.name source community
-#com2sec notConfigUser default public
# Second, map the security name into a group name:
# groupName securityModel securityName
"
after_header: /etc/snmp/snmpd.conf (file attributes)
before_header: /etc/snmp/snmpd.conf (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.5.9.20 | PATCH_RHEL | NETWORK SETTINGS | Enable tcp syncookies to prevent syn flooding (sysctl.conf) | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.1.5.9.21 | PATCH_RHEL | NETWORK SETTINGS | Turn off ICMP broadcasts (sysctl.conf) | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.1.5.9.22 | PATCH_RHEL | NETWORK SETTINGS | Disable ICMP Redirect Acceptance (sysctl.conf) | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.1.8.2.1 | PATCH_RHEL | OSR | Creating root/.rhosts file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.2.2 | PATCH_RHEL | OSR | Creating root/.netrc file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.4.1 | PATCH_RHEL | OSR | Setting permissions on /etc/security/passwd file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.4.2 | PATCH_RHEL | OSR | Setting permissions on /etc/shadow file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.6.1 | PATCH_RHEL | OSR | Setting permissions on /var/log/faillog file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.6.2 | PATCH_RHEL | OSR | Setting permissions on /var/log/tallylog file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.7.1 | PATCH_RHEL | OSR | Setting permissions on /var/log/messages file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.7.2 | PATCH_RHEL | OSR | Setting permissions on /var/log/wtmp file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.8 | PATCH_RHEL | OSR | Setting permissions on /var/log/secure file | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.9 | PATCH_RHEL | OSR | Setting permissions on /tmp directory | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.10 | PATCH_RHEL | OSR | Setting permissions on snmpd.conf | ansible.builtin.file | |
JC-HardenTest | harden_rhel7.yml | AD.1.8.11 | PATCH_RHEL | OSR | Setting permissions on /var/tmp directory | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.12.3 | PATCH_RHEL | OSR | Setting permissions on /var/log/wtmp directory | ansible.builtin.file | after
...
before
...
|
JC-HardenTest | harden_rhel7.yml | AD.1.8.22.3 | PATCH_RHEL | OSR | Files in /usr/local should not have other write / execute | ansible.builtin.file | |
JC-HardenTest | harden_rhel7.yml | AD.1.8.22.4 | PATCH_RHEL | OSR | Files in /tmp should not have other write / execute | ansible.builtin.file | |
JC-HardenTest | harden_rhel7.yml | AD.1.9.1.2 | PATCH_RHEL | OSR | Default UMASK /etc/bashrc | ansible.builtin.lineinfile | "--- before: /etc/bashrc (content)
+++ after: /etc/bashrc (content)
@@ -70,7 +70,7 @@
if [ $UID -gt 199 ] && [ \"`/usr/bin/id -gn`\" = \"`/usr/bin/id -un`\" ]; then
umask 002
else
- umask 022
+umask x77
fi
SHELL=/bin/bash
"
after_header: /etc/bashrc (file attributes)
before_header: /etc/bashrc (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.9.1.2.1 | PATCH_RHEL | OSR | Default UMASK /etc/login.defs | ansible.builtin.lineinfile | "--- before: /etc/login.defs (content)
+++ after: /etc/login.defs (content)
@@ -70,3 +70,4 @@
# Use SHA512 to encrypt password.
ENCRYPT_METHOD SHA512
+umask 077
"
after_header: /etc/login.defs (file attributes)
before_header: /etc/login.defs (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.1.9.1.7 | PATCH_RHEL | OSR | Default UMASK (multiple files) | ansible.builtin.lineinfile | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.2 | PATCH_RHEL | BUILD SPECIFIC | Network Time Protocol (NTP) should be installed | ansible.builtin.yum | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.2 | PATCH_RHEL | BUILD SPECIFIC | Network Time Protocol (NTP) should be enabled | ansible.builtin.service | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.8 | PATCH_RHEL | BUILD SPECIFIC | IPV6 should be disabled (net.ipv6.conf.all.disable_ipv6) | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.8 | PATCH_RHEL | BUILD SPECIFIC | IPV6 should be disabled (net.ipv6.conf.default.disable_ipv6) | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.10 | PATCH_RHEL | BUILD SPECIFIC | Enable Network Autonegotiate | ansible.builtin.lineinfile | "--- before: /etc/sysconfig/network-scripts/ifcfg-ens192 (content)
+++ after: /etc/sysconfig/network-scripts/ifcfg-ens192 (content)
@@ -15,3 +15,4 @@
UUID=\"f415b800-14dd-4e10-8e5a-480c2aa228bf\"
DEVICE=\"ens192\"
ONBOOT=\"yes\"
+ETHTOOL_OPTS=\"autoneg on\"
"
after_header: /etc/sysconfig/network-scripts/ifcfg-ens192 (file attributes)
before_header: /etc/sysconfig/network-scripts/ifcfg-ens192 (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.13 | PATCH_RHEL | BUILD SPECIFIC | SNMP should be enabled | ansible.builtin.service | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.14 | PATCH_RHEL | BUILD SPECIFIC | Iptables should be installed | ansible.builtin.yum | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.15 | PATCH_RHEL | BUILD SPECIFIC | Firewalld should be disabled | ansible.builtin.service | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.16 | PATCH_RHEL | BUILD SPECIFIC | Selinux should be disabled | ansible.posix.selinux | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.17 | PATCH_RHEL | BUILD SPECIFIC | biosdevname should be disabled | ansible.builtin.lineinfile | "--- before: /etc/default/grub (content)
+++ after: /etc/default/grub (content)
@@ -3,5 +3,5 @@
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT=\"console\"
-GRUB_CMDLINE_LINUX=\"rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet\"
+GRUB_CMDLINE_LINUX=\"rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet biosdevname=0\"
GRUB_DISABLE_RECOVERY=\"true\"
"
after_header: /etc/default/grub (file attributes)
before_header: /etc/default/grub (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.20 | PATCH_RHEL | BUILD SPECIFIC | IP Forwarding should be disabled | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.43 | PATCH_RHEL | BUILD SPECIFIC | Set Daemon umask | ansible.builtin.lineinfile | "--- before: /etc/sysconfig/init (content)
+++ after: /etc/sysconfig/init (content)
@@ -15,3 +15,4 @@
SETCOLOR_WARNING=\"echo -en \\\\033[0;33m\"
# terminal sequence to reset to the default color.
SETCOLOR_NORMAL=\"echo -en \\\\033[0;39m\"
+umask 027
"
after_header: /etc/sysconfig/init (file attributes)
before_header: /etc/sysconfig/init (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.44 | PATCH_RHEL | BUILD SPECIFIC | Remove X Windows | ansible.builtin.lineinfile | "--- before: /etc/inittab (content)
+++ after: /etc/inittab (content)
@@ -15,3 +15,4 @@
# To set a default target, run:
# systemctl set-default TARGET.target
#
+id:3:initdefault:
"
after_header: /etc/inittab (file attributes)
before_header: /etc/inittab (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.45 | PATCH_RHEL | BUILD SPECIFIC | Disable Avahi Server (remove ZeroConf) | ansible.builtin.lineinfile | '--- before: /etc/sysconfig/network (content)
+++ after: /etc/sysconfig/network (content)
@@ -1 +1,2 @@
# Created by anaconda
+NOZEROCONF=yes
'
after_header: /etc/sysconfig/network (file attributes)
before_header: /etc/sysconfig/network (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.48 | PATCH_RHEL | BUILD SPECIFIC | Disable Send Packet Redirects | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.49 | PATCH_RHEL | BUILD SPECIFIC | Disable Source Routed Packet Acceptance | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.50 | PATCH_RHEL | BUILD SPECIFIC | Log Suspicious Packets (all) | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.50 | PATCH_RHEL | BUILD SPECIFIC | Log Suspicious Packets (default) | ansible.posix.sysctl | |
JC-HardenTest | harden_rhel7.yml | AD.99.1.54 | PATCH_RHEL | BUILD SPECIFIC | Set SSH Protocol to 2 | ansible.builtin.lineinfile | "--- before: /etc/ssh/sshd_config (content)
+++ after: /etc/ssh/sshd_config (content)
@@ -20,7 +20,7 @@
#ListenAddress ::
# The default requires explicit activation of protocol 1
-#Protocol 2
+Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
"
after_header: /etc/ssh/sshd_config (file attributes)
before_header: /etc/ssh/sshd_config (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.55 | PATCH_RHEL | BUILD SPECIFIC | Set SSH LogLevel to INFO | ansible.builtin.lineinfile | "--- before: /etc/ssh/sshd_config (content)
+++ after: /etc/ssh/sshd_config (content)
@@ -41,7 +41,7 @@
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
-#LogLevel INFO
+LogLevel INFO
# Authentication:
"
after_header: /etc/ssh/sshd_config (file attributes)
before_header: /etc/ssh/sshd_config (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.56 | PATCH_RHEL | BUILD SPECIFIC | Disable SSH X11 Forwarding | ansible.builtin.lineinfile | "--- before: /etc/ssh/sshd_config (content)
+++ after: /etc/ssh/sshd_config (content)
@@ -112,7 +112,7 @@
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
-X11Forwarding yes
+X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
"
after_header: /etc/ssh/sshd_config (file attributes)
before_header: /etc/ssh/sshd_config (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.57 | PATCH_RHEL | BUILD SPECIFIC | Set SSH IgnoreRhosts to Yes | ansible.builtin.lineinfile | "--- before: /etc/ssh/sshd_config (content)
+++ after: /etc/ssh/sshd_config (content)
@@ -71,7 +71,7 @@
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
-#IgnoreRhosts yes
+IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
"
after_header: /etc/ssh/sshd_config (file attributes)
before_header: /etc/ssh/sshd_config (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.58 | PATCH_RHEL | BUILD SPECIFIC | Set SSH PermitEmptyPasswords to No | ansible.builtin.lineinfile | "--- before: /etc/ssh/sshd_config (content)
+++ after: /etc/ssh/sshd_config (content)
@@ -75,7 +75,7 @@
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
-#PermitEmptyPasswords no
+PermitEmptyPasswords no
PasswordAuthentication yes
# Change to no to disable s/key passwords
"
after_header: /etc/ssh/sshd_config (file attributes)
before_header: /etc/ssh/sshd_config (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.59 | PATCH_RHEL | BUILD SPECIFIC | Use Only Approved Cipher in Counter Mode | ansible.builtin.lineinfile | "--- before: /etc/ssh/sshd_config (content)
+++ after: /etc/ssh/sshd_config (content)
@@ -151,3 +151,4 @@
#\tAllowTcpForwarding no
#\tPermitTTY no
#\tForceCommand cvs server
+Ciphers aes128-ctr,aes192-ctr,aes256-ctr
"
after_header: /etc/ssh/sshd_config (file attributes)
before_header: /etc/ssh/sshd_config (file attributes)
|
JC-HardenTest | harden_rhel7.yml | AD.99.1.60 | PATCH_RHEL | BUILD SPECIFIC | Upgrade Password Hashing Algorithm to SHA-512 | ansible.builtin.lineinfile | "--- before: /etc/login.defs (content)
+++ after: /etc/login.defs (content)
@@ -68,6 +68,6 @@
USERGROUPS_ENAB yes
# Use SHA512 to encrypt password.
-ENCRYPT_METHOD SHA512
+ENCRYPT_METHOD SHA512
umask 077
"
after_header: /etc/login.defs (file attributes)
before_header: /etc/login.defs (file attributes)
|
JC-HardenTest | harden_rhel7.yml | restart ssh | ansible.builtin.service | |