# # This script is Copyright (C) 2004-2021 and is owned by Tenable, Inc. or an Affiliate thereof. # # This script is released under the Tenable Subscription License and # may not be used from within scripts released under another license # without authorization from Tenable, Inc. # # See the following licenses for details: # # http://static.tenable.com/prod_docs/Nessus_6_SLA_and_Subscription_Agreement.pdf # # @PROFESSIONALFEED@ # # $Revision: 1.23 $ # $Date: 2021/06/17 $ # # description : This document implements CIS Level 1 benchmarks for SUSE Linux Enterprise 11 v2.1.0 # https://workbench.cisecurity.org/files/1864 # # #CIS SUSE Linux Enterprise Server 11 L1 v2.1.0 # # CIS # SUSE Linux Enterprise Server 11 L1 v2.1.0 # 2.1.0 # https://workbench.cisecurity.org/files/1864 # #unix,cis,suse,linux,enterprise,server,suse_11,agent #LEVEL,CSCv6,CIS_Recommendation # # # BANNER_TEXT # All activities performed on this system will be monitored. # Banner Text # This is the text for the warning a user receives when logging onto the system. # # # NTP_SERVER # 192\.168\.0\.1 # NTP server address # The IP address for the NTP server. # # # SYSLOG_SERVER # 192\.168\.0\.1 # Log server address # The IP address or FQDN of the syslog server for your organization. # # # HOSTS_ALLOW_NETWORK # 192\.0\.2\.0\\/255\.255\.255\.0 # Hosts.allow network # The IP address and network mask allowed access to the system as it appears in hosts.allow. If all systems are allowed use 'ALL'. # # # TRY_FIRST_PASS # try_first_pass # 5.3.1 - try_first_pass # retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password # # # PW_RETRY # [1-3] # 5.3.1 - Allowed PW Retries # retry=3 - Allow 3 tries before sending back a failure. # # # PW_MINLEN # (1[4-9]|[2-9][0-9]) # 5.3.1 - PW minimum length # minlen=14 - password must be 14 characters or more # # # PW_DCREDIT # -1 # 5.3.1 - PW number of digits # dcredit=-1 - provide at least one digit # # # PW_UCREDIT # -1 # 5.3.1 - PW number of uppercase chars # ucredit=-1 - provide at least one uppercase character # # # PW_OCREDIT # -1 # 5.3.1 - PW number of special chars # ocredit=-1 - provide at least one special character # # # PW_LCREDIT # -1 # 5.3.1 - PW number of lowercase chars # lcredit=-1 - provide at least one lowercase character # # # type : FILE_CONTENT_CHECK description : "SUSE Linux 11 is installed" file : "/etc/SuSE-release" regex : "^[\\s]*VERSION[\\s]*=" expect : "^[\\s]*VERSION[\\s]*=[\\s]*11[\\s]*$" description : "CIS_SUSE_Linux_Enterprise_Server_11_v2.1.0_L1.audit Level 1" system : "Linux" type : CMD_EXEC description : "1.1.1.1 Ensure mounting of cramfs filesystems is disabled - /etc/modprobe.d/*" info : "The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image. Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install cramfs /bin/true Run the following command to unload the cramfs module: # rmmod cramfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.1,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install cramfs /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.1 Ensure mounting of cramfs filesystems is disabled - modprobe" info : "The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image. Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install cramfs /bin/true Run the following command to unload the cramfs module: # rmmod cramfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.1,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/modprobe -n -v cramfs | /usr/bin/awk '{print} END {if (NR == 0) print \"fail\"}'" expect : "install /bin/true" system : "Linux" type : CMD_EXEC description : "1.1.1.1 Ensure mounting of cramfs filesystems is disabled - lsmod" info : "The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image. Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install cramfs /bin/true Run the following command to unload the cramfs module: # rmmod cramfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.1,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/lsmod cramfs | /usr/bin/awk \'{print} END {if (NR == 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.2 Ensure mounting of freevxfs filesystems is disabled - /etc/modprobe.d/*" info : "The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install freevxfs /bin/true Run the following command to unload the freevxfs module: # rmmod freevxfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.2,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install freevxfs /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.2 Ensure mounting of freevxfs filesystems is disabled - modprobe" info : "The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install freevxfs /bin/true Run the following command to unload the freevxfs module: # rmmod freevxfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.2,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/modprobe -n -v freevxfs | /usr/bin/awk '{print} END {if (NR == 0) print \"fail\"}'" expect : "install /bin/true" system : "Linux" type : CMD_EXEC description : "1.1.1.2 Ensure mounting of freevxfs filesystems is disabled - lsmod" info : "The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install freevxfs /bin/true Run the following command to unload the freevxfs module: # rmmod freevxfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.2,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/lsmod freevxfs | /usr/bin/awk \'{print} END {if (NR == 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.3 Ensure mounting of jffs2 filesystems is disabled - /etc/modprobe.d/*" info : "The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install jffs2 /bin/true Run the following command to unload the jffs2 module: # rmmod jffs2" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.3,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install jffs2 /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.3 Ensure mounting of jffs2 filesystems is disabled - modprobe" info : "The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install jffs2 /bin/true Run the following command to unload the jffs2 module: # rmmod jffs2" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.3,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/modprobe -n -v jffs2 | /usr/bin/awk '{print} END {if (NR == 0) print \"fail\"}'" expect : "install /bin/true" system : "Linux" type : CMD_EXEC description : "1.1.1.3 Ensure mounting of jffs2 filesystems is disabled - lsmod" info : "The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install jffs2 /bin/true Run the following command to unload the jffs2 module: # rmmod jffs2" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.3,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/lsmod jffs2 | /usr/bin/awk \'{print} END {if (NR == 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.4 Ensure mounting of hfs filesystems is disabled - /etc/modprobe.d/*" info : "The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfs /bin/true Run the following command to unload the hfs module: # rmmod hfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.4,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install hfs /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.4 Ensure mounting of hfs filesystems is disabled - modprobe" info : "The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfs /bin/true Run the following command to unload the hfs module: # rmmod hfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.4,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/modprobe -n -v hfs | /usr/bin/awk '{print} END {if (NR == 0) print \"fail\"}'" expect : "install /bin/true" system : "Linux" type : CMD_EXEC description : "1.1.1.4 Ensure mounting of hfs filesystems is disabled - lsmod" info : "The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfs /bin/true Run the following command to unload the hfs module: # rmmod hfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.4,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/lsmod hfs | /usr/bin/awk \'{print} END {if (NR == 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.5 Ensure mounting of hfsplus filesystems is disabled - /etc/modprobe.d/*" info : "The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfsplus /bin/true Run the following command to unload the hfsplus module: # rmmod hfsplus" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install hfsplus /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.5 Ensure mounting of hfsplus filesystems is disabled - modprobe" info : "The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfsplus /bin/true Run the following command to unload the hfsplus module: # rmmod hfsplus" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/modprobe -n -v hfsplus | /usr/bin/awk '{print} END {if (NR == 0) print \"fail\"}'" expect : "install /bin/true" system : "Linux" type : CMD_EXEC description : "1.1.1.5 Ensure mounting of hfsplus filesystems is disabled - lsmod" info : "The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install hfsplus /bin/true Run the following command to unload the hfsplus module: # rmmod hfsplus" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/lsmod hfsplus | /usr/bin/awk \'{print} END {if (NR == 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.6 Ensure mounting of squashfs filesystems is disabled - /etc/modprobe.d/*" info : "The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs). A squashfs image can be used without having to first decompress the image. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true Run the following command to unload the squashfs module: # rmmod squashfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.6,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install squashfs /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.6 Ensure mounting of squashfs filesystems is disabled - modprobe" info : "The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs). A squashfs image can be used without having to first decompress the image. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true Run the following command to unload the squashfs module: # rmmod squashfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.6,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/modprobe -n -v squashfs | /usr/bin/awk '{print} END {if (NR == 0) print \"fail\"}'" expect : "install /bin/true" system : "Linux" type : CMD_EXEC description : "1.1.1.6 Ensure mounting of squashfs filesystems is disabled - lsmod" info : "The squashfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems (similar to cramfs). A squashfs image can be used without having to first decompress the image. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install squashfs /bin/true Run the following command to unload the squashfs module: # rmmod squashfs" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.6,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/lsmod squashfs | /usr/bin/awk \'{print} END {if (NR == 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.7 Ensure mounting of udf filesystems is disabled - /etc/modprobe.d/*" info : "The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true Run the following command to unload the udf module: # rmmod udf" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install udf /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.1.7 Ensure mounting of udf filesystems is disabled - modprobe" info : "The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true Run the following command to unload the udf module: # rmmod udf" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSCv6|3.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/modprobe -n -v udf | /usr/bin/awk '{print} END {if (NR == 0) print \"fail\"}'" expect : "install /bin/true" system : "Linux" type : CMD_EXEC description : "1.1.1.7 Ensure mounting of udf filesystems is disabled - lsmod" info : "The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats. Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install udf /bin/true Run the following command to unload the udf module: # rmmod udf" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|1.1.1.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|13,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/lsmod udf | /usr/bin/awk \'{print} END {if (NR == 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "1.1.3 Ensure nodev option set on /tmp partition" info : "The nodev mount option specifies that the filesystem cannot contain special devices. Since the /tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /tmp." solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,nodev /tmp" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.3,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /tmp '" expect : "[\\s]*[,]?nodev" system : "Linux" type : CMD_EXEC description : "1.1.4 Ensure nosuid option set on /tmp partition" info : "The nosuid mount option specifies that the filesystem cannot contain setuid files. Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp." solution : "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,nosuid /tmp" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.4,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /tmp '" expect : "[\\s]*[,]?nosuid" system : "Linux" type : CMD_EXEC description : "1.1.5 Ensure noexec option set on /tmp partition" info : "The noexec mount option specifies that the filesystem cannot contain executable binaries. Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp." solution : "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /tmp: # mount -o remount,noexec /tmp" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.5,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|2,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /tmp '" expect : "[\\s]*[,]?noexec" system : "Linux" type : CMD_EXEC description : "1.1.8 Ensure nodev option set on /var/tmp partition" info : "The nodev mount option specifies that the filesystem cannot contain special devices. Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /var/tmp." solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,nodev /var/tmp" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.8,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /var/tmp '" expect : "[\\s]*[,]?nodev" system : "Linux" type : CMD_EXEC description : "1.1.9 Ensure nosuid option set on /var/tmp partition" info : "The nosuid mount option specifies that the filesystem cannot contain setuid files. Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp." solution : "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,nosuid /var/tmp" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.9,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /var/tmp '" expect : "[\\s]*[,]?nosuid" system : "Linux" type : CMD_EXEC description : "1.1.10 Ensure noexec option set on /var/tmp partition" info : "The noexec mount option specifies that the filesystem cannot contain executable binaries. Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp." solution : "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. See the fstab(5) manual page for more information. Run the following command to remount /var/tmp: # mount -o remount,noexec /var/tmp" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.10,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /var/tmp '" expect : "[\\s]*[,]?noexec" system : "Linux" type : CMD_EXEC description : "1.1.14 Ensure nodev option set on /home partition" info : "The nodev mount option specifies that the filesystem cannot contain special devices. Since the user partitions are not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices." solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition. See the fstab(5) manual page for more information. # mount -o remount,nodev /home" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.14,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /home '" expect : "[\\s]*[,]?nodev" system : "Linux" type : CMD_EXEC description : "1.1.15 Ensure nodev option set on /dev/shm partition" info : "The nodev mount option specifies that the filesystem cannot contain special devices. Since the /dev/shm filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in /dev/shm partitions." solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,nodev /dev/shm" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.15,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /dev/shm '" expect : "[\\s]*[,]?nodev" system : "Linux" type : CMD_EXEC description : "1.1.16 Ensure nosuid option set on /dev/shm partition" info : "The nosuid mount option specifies that the filesystem cannot contain setuid files. Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." solution : "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,nosuid /dev/shm" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.16,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /dev/shm '" expect : "[\\s]*[,]?nosuid" system : "Linux" type : CMD_EXEC description : "1.1.17 Ensure noexec option set on /dev/shm partition" info : "The noexec mount option specifies that the filesystem cannot contain executable binaries. Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system." solution : "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information. Run the following command to remount /dev/shm: # mount -o remount,noexec /dev/shm" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.1.17,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount | /usr/bin/grep 'on /dev/shm '" expect : "[\\s]*[,]?noexec" system : "Linux" type : CMD_EXEC description : "1.1.18 Ensure nodev option set on removable media partitions" info : "The nodev mount option specifies that the filesystem cannot contain special devices. Removable media containing character and block special devices could be used to circumvent security controls by allowing non-root users to access sensitive device files such as /dev/kmem or the raw disk partitions. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.1.18,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1NS,NESA|T3.2.1,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount" expect : "Manual Review Required" severity : MEDIUM system : "Linux" type : CMD_EXEC description : "1.1.19 Ensure nosuid option set on removable media partitions" info : "The nosuid mount option specifies that the filesystem cannot contain setuid files. Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.1.19,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1NS,NESA|T3.2.1,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount" expect : "Manual Review Required" severity : MEDIUM system : "Linux" type : CMD_EXEC description : "1.1.20 Ensure noexec option set on removable media partitions" info : "The noexec mount option specifies that the filesystem cannot contain executable binaries. Setting this option on a file system prevents users from executing programs from the removable media. This deters users from being able to introduce potentially malicious software on the system. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "Edit the /etc/fstab file and add noexec to the fourth field (mounting options) of all removable media partitions. Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.1.20,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1NS,NESA|T3.2.1,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/mount" expect : "Manual Review Required" severity : MEDIUM system : "Linux" description : "1.1.21 Ensure sticky bit is set on all world-writable directories" info : "Setting the sticky bit on world writable directories prevents users from deleting or renaming files in that directory that are not owned by them. This feature prevents the ability to delete or rename files in world writable directories (such as /tmp) that are owned by another user." solution : "Run the following command to set the sticky bit on all world writable directories: # df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type d -perm -0002 2>/dev/null | xargs chmod a+t" reference : "800-171|3.1.5,800-53|AC-6.,CIS_Recommendation|1.1.21,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|13,CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|13.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" name : "find_world_writeable_directories" system : "Linux" type : CHKCONFIG description : "1.1.22 Disable Automounting" info : "autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives. With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves." solution : "Run the following command to disable autofs: # chkconfig autofs off Impact: The use portable hard drives is very common for workstation users. If your organization allows the use of portable storage or media on workstations and physical access controls to workstations is considered adequate there is little value add in turning off automounting." reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|1.1.22,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "autofs" levels : "123456" status : OFF system : "Linux" type : CMD_EXEC description : "1.2.1 Ensure package manager repositories are configured" info : "Systems need to have package manager repositories configured to ensure they receive the latest patches and updates. If a system's package repositories are misconfigured important patches may not be identified or a rogue repository could introduce compromised software. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "Configure your package manager repositories according to site policy." reference : "800-171|3.14.1,800-53|SI-2c.,CIS_Recommendation|1.2.1,CN-L3|8.1.4.4(e),CN-L3|8.1.10.5(a),CN-L3|8.1.10.5(b),CN-L3|8.5.4.1(b),CN-L3|8.5.4.1(d),CN-L3|8.5.4.1(e),CSF|ID.RA-1,CSF|PR.IP-12,ITSG-33|SI-2,LEVEL|1NS,NESA|T7.6.2,NESA|T7.7.1,NIAv2|AM38,NIAv2|AM39,NIAv2|SS14b,QCSC-v1|11.2,SWIFT-CSCv1|2.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/bin/zypper repos" expect : "" severity : MEDIUM system : "Linux" type : CMD_EXEC description : "1.2.2 Ensure GPG keys are configured" info : "Most packages managers implement GPG key signing to verify package integrity during installation. It is important to ensure that updates are obtained from a valid source to protect against spoofing that could lead to the inadvertent installation of malware on the system. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "Update your package manager GPG keys in accordance with site policy." reference : "800-53|SI-7(6),CIS_Recommendation|1.2.2,CSF|PR.DS-6,ITSG-33|SI-7,ITSG-33|SI-7a.,LEVEL|1NS,NESA|T3.4.1,NESA|T7.3.2,NESA|T7.3.3,QCSC-v1|3.2,SWIFT-CSCv1|6.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/rpm -q --queryformat \"%{SUMMARY}\\n\" gpg-pubkey" expect : "" dont_echo_cmd : YES severity : MEDIUM system : "Linux" type : RPM_CHECK description : "1.3.1 Ensure AIDE is installed" info : "AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system. By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries." solution : "Run the following command to install aide: # zypper install aide Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options. Initialize AIDE: # aide --init # mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db The name of the aide.db.new database may be different on your system." reference : "800-171|3.4.8,800-53|CM-7(5),CIS_Recommendation|1.3.1,CSCv6|2.2,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.5.1,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS15a,PCI-DSSv3.1|12.3.7,PCI-DSSv3.2|12.3.7,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "aide-0.0.0-0" operator : "gt" required : YES system : "Linux" type : CMD_EXEC description : "1.3.2 Ensure filesystem integrity is regularly checked" info : "Periodic checking of the filesystem integrity is needed to detect changes to the filesystem. Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion." solution : "Run the following command: # crontab -u root -e Add the following line to the crontab: 0 5 * * * /usr/bin/aide --check" reference : "800-53|SI-7(1),CIS_Recommendation|1.3.2,CN-L3|7.1.3.5(b),CSF|PR.DS-6,ITSG-33|SI-7(1),LEVEL|1S,NESA|T7.3.3,QCSC-v1|3.2,SWIFT-CSCv1|6.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/bin/crontab -l" expect : "^(\\d{1,2}|\\*|[\\s]+){9,}[\\s]+(root)?[\\s]*/usr/[s]?bin/aide[\\s]+--check[\\s]*(.*)$" system : "Linux" type : FILE_CHECK description : "1.4.1 Ensure permissions on bootloader config are configured" info : "The grub configuration file contains information on boot settings and passwords for unlocking boot options. The grub configuration is usually located at /boot/grub/menu.lst and linked as /boot/grub/grub.conf . Setting the permissions to read and write for root only prevents non-root users from seeing the boot parameters or changing them. Non-root users who read the boot parameters may be able to identify weaknesses in security upon boot and be able to exploit them." solution : "Run the following commands to set permissions on your grub configuration: # chown root:root /boot/grub/menu.lst# chmod og-rwx /boot/grub/menu.lst" reference : "800-53|SI-7(9),CIS_Recommendation|1.4.1,CN-L3|8.1.2.3,CN-L3|8.1.4.6,CSCv6|3.1,CSF|PR.DS-6,ITSG-33|SI-7,ITSG-33|SI-7a.,LEVEL|1S,NESA|T3.4.1,NESA|T7.3.2,NESA|T7.3.3,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|3.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/boot/grub/menu.lst" owner : "root" mask : "177" group : "root" system : "Linux" type : FILE_CONTENT_CHECK description : "1.4.2 Ensure bootloader password is set - superusers" info : "Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time)." solution : "Create an encrypted password with grub-md5-crypt: # grub-md5-cryptPassword: Retype Password: Copy and paste the into the global section of /boot/grub/menu.lst: password --md5 " reference : "800-53|SI-7(9),CIS_Recommendation|1.4.2,CN-L3|8.1.2.3,CN-L3|8.1.4.6,CSF|PR.DS-6,ITSG-33|SI-7,ITSG-33|SI-7a.,LEVEL|1S,NESA|T3.4.1,NESA|T7.3.2,NESA|T7.3.3,QCSC-v1|3.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/boot/grub/menu.lst" regex : "^[\\s]*set[\\s]*superusers[\\s]*=" expect : "^[\\s]*set[\\s]*superusers[\\s]*=\".+\"*$" system : "Linux" type : FILE_CONTENT_CHECK description : "1.4.2 Ensure bootloader password is set - password_pbkdf2" info : "Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time)." solution : "Create an encrypted password with grub-md5-crypt: # grub-md5-cryptPassword: Retype Password: Copy and paste the into the global section of /boot/grub/menu.lst: password --md5 " reference : "800-53|SI-7(9),CIS_Recommendation|1.4.2,CN-L3|8.1.2.3,CN-L3|8.1.4.6,CSF|PR.DS-6,ITSG-33|SI-7,ITSG-33|SI-7a.,LEVEL|1S,NESA|T3.4.1,NESA|T7.3.2,NESA|T7.3.3,QCSC-v1|3.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/boot/grub2/menu.lst" regex : "^[\\s]*password" expect : "^[\\s]*password_pbkdf2[\\s]+[^\\s]+[\\s]+[^\\s]+[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "1.4.3 Ensure authentication required for single user mode" info : "Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader. Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." solution : "Edit /etc/inittab and set ~~:S:respawn to '/sbin/sulogin': ~~:S:respawn:/sbin/sulogin" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.4.3,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/inittab" regex : "^[\\s]*~~:S:" expect : "^[\\s]*~~:S:respawn:\/sbin\/sulogin[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "1.5.1 Ensure core dumps are restricted - hard core 0" info : "A core dump is the memory of an executable program. It is generally used to determine why a program aborted. It can also be used to glean confidential information from a core file. The system provides the ability to set a soft limit for core dumps, but this can be overridden by the user. Setting a hard limit on core dumps prevents users from overriding the soft variable. If core dumps are required, consider setting limits for user groups (see limits.conf(5) ). In addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from dumping core." solution : "Add the following line to the /etc/security/limits.conf file: * hard core 0 Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0 Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.5.1,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|13,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/security/limits.conf" regex : "^[\\s]*\\*[\\s]+hard[\\s]+core" expect : "^[\\s]*\\*[\\s]+hard[\\s]+core[\\s]+0[\\s]*$" system : "Linux" type : CMD_EXEC description : "1.5.1 Ensure core dumps are restricted - fs.suid_dumpable" info : "A core dump is the memory of an executable program. It is generally used to determine why a program aborted. It can also be used to glean confidential information from a core file. The system provides the ability to set a soft limit for core dumps, but this can be overridden by the user. Setting a hard limit on core dumps prevents users from overriding the soft variable. If core dumps are required, consider setting limits for user groups (see limits.conf(5) ). In addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from dumping core." solution : "Add the following line to the /etc/security/limits.conf file: * hard core 0 Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0 Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.5.1,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|13,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl fs.suid_dumpable" expect : "^[\\s]*fs\\.suid_dumpable[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "1.5.1 Ensure core dumps are restricted - /etc/sysctl" info : "A core dump is the memory of an executable program. It is generally used to determine why a program aborted. It can also be used to glean confidential information from a core file. The system provides the ability to set a soft limit for core dumps, but this can be overridden by the user. Setting a hard limit on core dumps prevents users from overriding the soft variable. If core dumps are required, consider setting limits for user groups (see limits.conf(5) ). In addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from dumping core." solution : "Add the following line to the /etc/security/limits.conf file: * hard core 0 Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: fs.suid_dumpable = 0 Run the following command to set the active kernel parameter: # sysctl -w fs.suid_dumpable=0" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|1.5.1,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|13,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*fs\\.suid_dumpable[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" type : CMD_EXEC description : "OS 32bit check" cmd : "/bin/uname -a | /bin/grep x86_64 | /usr/bin/awk '{print} END {if (NR == 0) print \"none\"}'" expect : "none" system : "Linux" type : CMD_EXEC description : "1.5.2 Ensure XD/NX support is enabled" info : "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. Enabling any feature that can protect against buffer overflow attacks enhances the security of the system." solution : "On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios." reference : "800-53|SI-16.,CIS_Recommendation|1.5.2,ITSG-33|SI-16,LEVEL|1NS" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/dmesg | /bin/grep \'NX (Execute\' 2>&1" expect : "NX[\\s]+\\(Execute[\\s]+Disable\\)[\\s]+protection:[\\s]+active" description : "1.5.2 Ensure XD/NX support is enabled" info : "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. Enabling any feature that can protect against buffer overflow attacks enhances the security of the system." solution : "On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems: If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios." reference : "800-53|SI-16.,CIS_Recommendation|1.5.2,ITSG-33|SI-16,LEVEL|1NS" see_also : "https://workbench.cisecurity.org/files/1864" system : "Linux" type : CMD_EXEC description : "1.5.3 Ensure address space layout randomization (ASLR) is enabled - sysctl" info : "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process. Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." solution : "Set the following parameter in the /etc/sysctl.conf file: kernel.randomize_va_space = 2 Run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2" reference : "800-53|SI-16.,CIS_Recommendation|1.5.3,CSCv6|3.1,CSCv6|8.4,ITSG-33|SI-16,LEVEL|1S,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl kernel.randomize_va_space" expect : "^[\\s]*kernel\\.randomize_va_space[\\s]*=[\\s]*2[\\s]*$" system : "Linux" type : CMD_EXEC description : "1.5.3 Ensure address space layout randomization (ASLR) is enabled - /etc/sysctl" info : "Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process. Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting." solution : "Set the following parameter in the /etc/sysctl.conf file: kernel.randomize_va_space = 2 Run the following command to set the active kernel parameter: # sysctl -w kernel.randomize_va_space=2" reference : "800-53|SI-16.,CIS_Recommendation|1.5.3,CSCv6|8.4,ITSG-33|SI-16,LEVEL|1S" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*kernel\\.randomize_va_space[[:space:]]*=[[:space:]]*2[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : RPM_CHECK description : "1.5.4 Ensure prelink is disabled" info : "prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases. The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc." solution : "Run the following commands to restore binaries to normal and uninstall prelink: # prelink -ua# zypper remove prelink" reference : "800-171|3.4.8,800-53|CM-7(4),CIS_Recommendation|1.5.4,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS13a,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "prelink-0.0.0-0" operator : "lt" system : "Linux" type : BANNER_CHECK description : "1.7.1.1 Ensure message of the day is configured properly - banner text" info : "The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the 'uname -a' command once they have logged in." solution : "Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of \m, \r, \s, or \v." reference : "800-171|3.1.9,800-53|AC-8,CIS_Recommendation|1.7.1.1,CSCv6|3.1,ITSG-33|AC-8,LEVEL|1S,NESA|M1.3.6,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/motd" # Note: Variable @BANNER_TEXT@ replaced with "All activities performed on this system will be monitored." in field "content". content : "All activities performed on this system will be monitored." system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "1.7.1.1 Ensure message of the day is configured properly - mrsv" info : "The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the 'uname -a' command once they have logged in." solution : "Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of \m, \r, \s, or \v." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.7.1.1,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/motd" regex : "\\\\[mrsv]" expect : "\\\\[mrsv]" required : NO system : "Linux" type : BANNER_CHECK description : "1.7.1.2 Ensure local login warning banner is configured properly - banner text" info : "The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the 'uname -a' command once they have logged in." solution : "Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of \m, \r, \s, or \v: # echo 'Authorized uses only. All activity may be monitored and reported.' > /etc/issue" reference : "800-171|3.1.9,800-53|AC-8,CIS_Recommendation|1.7.1.2,CSCv6|3.1,ITSG-33|AC-8,LEVEL|1NS,NESA|M1.3.6,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/issue" # Note: Variable @BANNER_TEXT@ replaced with "All activities performed on this system will be monitored." in field "content". content : "All activities performed on this system will be monitored." system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "1.7.1.2 Ensure local login warning banner is configured properly - mrsv" info : "The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the 'uname -a' command once they have logged in." solution : "Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of \m, \r, \s, or \v: # echo 'Authorized uses only. All activity may be monitored and reported.' > /etc/issue" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.7.1.2,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1NS,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/issue" regex : "\\\\[mrsv]" expect : "\\\\[mrsv]" required : NO system : "Linux" type : BANNER_CHECK description : "1.7.1.3 Ensure remote login warning banner is configured properly - banner text" info : "The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the 'uname -a' command once they have logged in." solution : "Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of \m, \r, \s, or \v: # echo 'Authorized uses only. All activity may be monitored and reported.' > /etc/issue.net" reference : "800-171|3.1.9,800-53|AC-8,CIS_Recommendation|1.7.1.3,CSCv6|3.1,ITSG-33|AC-8,LEVEL|1NS,NESA|M1.3.6,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/issue.net" # Note: Variable @BANNER_TEXT@ replaced with "All activities performed on this system will be monitored." in field "content". content : "All activities performed on this system will be monitored." system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "1.7.1.3 Ensure remote login warning banner is configured properly - mrsv" info : "The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the 'uname -a' command once they have logged in." solution : "Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of \m, \r, \s, or \v: # echo 'Authorized uses only. All activity may be monitored and reported.' > /etc/issue.net" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.7.1.3,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1NS,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/issue.net" regex : "\\\\[mrsv]" expect : "\\\\[mrsv]" required : NO system : "Linux" type : FILE_CHECK description : "1.7.1.4 Ensure permissions on /etc/motd are configured" info : "The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users. If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information." solution : "Run the following commands to set permissions on /etc/motd: # chown root:root /etc/motd# chmod 644 /etc/motd" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.7.1.4,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1NS,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/motd" owner : "root" mask : "133" group : "root" system : "Linux" type : FILE_CHECK description : "1.7.1.5 Ensure permissions on /etc/issue are configured" info : "The contents of the /etc/issue file are displayed to users prior to login for local terminals. If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information." solution : "Run the following commands to set permissions on /etc/issue: # chown root:root /etc/issue# chmod 644 /etc/issue" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.7.1.5,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/issue" owner : "root" mask : "133" group : "root" system : "Linux" type : FILE_CHECK description : "1.7.1.6 Ensure permissions on /etc/issue.net are configured" info : "The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services. If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information." solution : "Run the following commands to set permissions on /etc/issue.net: # chown root:root /etc/issue.net# chmod 644 /etc/issue.net" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|1.7.1.6,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1NS,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/issue.net" owner : "root" mask : "133" group : "root" system : "Linux" type : FILE_CONTENT_CHECK description : "1.7.2 Ensure GDM login banner is configured - user-db" info : "GDM is the GNOME Display Manager which handles graphical login for GNOME based systems. Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place." solution : "Create the /etc/dconf/profile/gdm file with the following contents: user-db:usersystem-db:gdmfile-db:/usr/share/gdm/greeter-dconf-defaults Create or edit the banner-message-enable and banner-message-text options in /etc/dconf/db/gdm.d/01-banner-message: [org/gnome/login-screen]banner-message-enable=truebanner-message-text='Authorized uses only. All activity may be monitored and reported.' Run the following command to update the system databases: # dconf update" reference : "800-171|3.1.9,800-53|AC-8a.,CIS_Recommendation|1.7.2,ITSG-33|AC-8a.,LEVEL|1S,NESA|M5.2.5,NESA|T5.5.1,NIAv2|AM10a,NIAv2|AM10b,NIAv2|AM10c,NIAv2|AM10d,NIAv2|AM10e,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/dconf/profile/gdm" regex : "^[\\s]*user-db:user[\\s]*" expect : "^[\\s]*user-db:user[\\s]*" system : "Linux" type : FILE_CONTENT_CHECK description : "1.7.2 Ensure GDM login banner is configured - system-db" info : "GDM is the GNOME Display Manager which handles graphical login for GNOME based systems. Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place." solution : "Create the /etc/dconf/profile/gdm file with the following contents: user-db:usersystem-db:gdmfile-db:/usr/share/gdm/greeter-dconf-defaults Create or edit the banner-message-enable and banner-message-text options in /etc/dconf/db/gdm.d/01-banner-message: [org/gnome/login-screen]banner-message-enable=truebanner-message-text='Authorized uses only. All activity may be monitored and reported.' Run the following command to update the system databases: # dconf update" reference : "800-171|3.1.9,800-53|AC-8a.,CIS_Recommendation|1.7.2,ITSG-33|AC-8a.,LEVEL|1S,NESA|M5.2.5,NESA|T5.5.1,NIAv2|AM10a,NIAv2|AM10b,NIAv2|AM10c,NIAv2|AM10d,NIAv2|AM10e,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/dconf/profile/gdm" regex : "^[\\s]*system-db:gdm[\\s]*" expect : "^[\\s]*system-db:gdm[\\s]*" system : "Linux" type : FILE_CONTENT_CHECK description : "1.7.2 Ensure GDM login banner is configured - file-db" info : "GDM is the GNOME Display Manager which handles graphical login for GNOME based systems. Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place." solution : "Create the /etc/dconf/profile/gdm file with the following contents: user-db:usersystem-db:gdmfile-db:/usr/share/gdm/greeter-dconf-defaults Create or edit the banner-message-enable and banner-message-text options in /etc/dconf/db/gdm.d/01-banner-message: [org/gnome/login-screen]banner-message-enable=truebanner-message-text='Authorized uses only. All activity may be monitored and reported.' Run the following command to update the system databases: # dconf update" reference : "800-171|3.1.9,800-53|AC-8a.,CIS_Recommendation|1.7.2,ITSG-33|AC-8a.,LEVEL|1S,NESA|M5.2.5,NESA|T5.5.1,NIAv2|AM10a,NIAv2|AM10b,NIAv2|AM10c,NIAv2|AM10d,NIAv2|AM10e,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/dconf/profile/gdm" regex : "^[\\s]*file-db:/usr/share/gdm/greeter-dconf-defaults[\\s]*" expect : "^[\\s]*file-db:/usr/share/gdm/greeter-dconf-defaults[\\s]*" system : "Linux" type : CMD_EXEC description : "1.7.2 Ensure GDM login banner is configured - banner-message-enable" info : "GDM is the GNOME Display Manager which handles graphical login for GNOME based systems. Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place." solution : "Create the /etc/dconf/profile/gdm file with the following contents: user-db:usersystem-db:gdmfile-db:/usr/share/gdm/greeter-dconf-defaults Create or edit the banner-message-enable and banner-message-text options in /etc/dconf/db/gdm.d/01-banner-message: [org/gnome/login-screen]banner-message-enable=truebanner-message-text='Authorized uses only. All activity may be monitored and reported.' Run the following command to update the system databases: # dconf update" reference : "800-171|3.1.9,800-53|AC-8a.,CIS_Recommendation|1.7.2,ITSG-33|AC-8a.,LEVEL|1S,NESA|M5.2.5,NESA|T5.5.1,NIAv2|AM10a,NIAv2|AM10b,NIAv2|AM10c,NIAv2|AM10d,NIAv2|AM10e,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s \"banner-message-enable\" /etc/dconf/db/gdm.d/* | /usr/bin/awk '{print} END {if (NR == 0) print \"fail\"}'" expect : "banner-message-enable[\\s]*=[\\s]*true[\\s]*$" system : "Linux" type : BANNER_CHECK description : "1.7.2 Ensure GDM login banner is configured - banner-message-text" info : "GDM is the GNOME Display Manager which handles graphical login for GNOME based systems. Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place." solution : "Create the /etc/dconf/profile/gdm file with the following contents: user-db:usersystem-db:gdmfile-db:/usr/share/gdm/greeter-dconf-defaults Create or edit the banner-message-enable and banner-message-text options in /etc/dconf/db/gdm.d/01-banner-message: [org/gnome/login-screen]banner-message-enable=truebanner-message-text='Authorized uses only. All activity may be monitored and reported.' Run the following command to update the system databases: # dconf update" reference : "800-171|3.1.9,800-53|AC-8,CIS_Recommendation|1.7.2,ITSG-33|AC-8,LEVEL|1S,NESA|M1.3.6,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/dconf/db/gdm.d/01-banner-message" # Note: Variable @BANNER_TEXT@ replaced with "All activities performed on this system will be monitored." in field "content". content : "All activities performed on this system will be monitored." is_substring : YES system : "Linux" type : CMD_EXEC description : "1.8 Ensure updates, patches, and additional security software are installed" info : "Periodically patches are released for included software either due to security flaws or to include additional functionality. Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected." solution : "Use your package manager to update all packages on the system according to site policy. The following command will install all available updates: # zypper update" reference : "800-171|3.14.1,800-53|SI-2c.,CIS_Recommendation|1.8,CN-L3|8.1.4.4(e),CN-L3|8.1.10.5(a),CN-L3|8.1.10.5(b),CN-L3|8.5.4.1(b),CN-L3|8.5.4.1(d),CN-L3|8.5.4.1(e),CSF|ID.RA-1,CSF|PR.IP-12,ITSG-33|SI-2,LEVEL|1NS,NESA|T7.6.2,NESA|T7.7.1,NIAv2|AM38,NIAv2|AM39,NIAv2|SS14b,QCSC-v1|11.2,SWIFT-CSCv1|2.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "zypper list-updates" expect : "No updates found." system : "Linux" type : XINETD_SVC description : "2.1.1 Ensure chargen services are not enabled" info : "chargen is a network service that responds with 0 to 512 ASCII characters for each connection it receives. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable chargen and chargen-udp: # chkconfig chargen off# chkconfig chargen-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.1,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "chargen" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.1 Ensure chargen services are not enabled - chargen-udp" info : "chargen is a network service that responds with 0 to 512 ASCII characters for each connection it receives. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable chargen and chargen-udp: # chkconfig chargen off# chkconfig chargen-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.1,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "chargen-udp" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.2 Ensure daytime services are not enabled" info : "daytime is a network service that responds with the server's current date and time. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable daytime and daytime-udp: # chkconfig daytime off# chkconfig daytime-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.2,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "daytime" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.2 Ensure daytime services are not enabled - daytime-udp" info : "daytime is a network service that responds with the server's current date and time. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable daytime and daytime-udp: # chkconfig daytime off# chkconfig daytime-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.2,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "daytime-udp" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.3 Ensure discard services are not enabled" info : "discard is a network service that simply discards all data it receives. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable discard and discard-udp: # chkconfig discard off# chkconfig discard-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.3,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "discard" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.3 Ensure discard services are not enabled - discard-udp" info : "discard is a network service that simply discards all data it receives. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable discard and discard-udp: # chkconfig discard off# chkconfig discard-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.3,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "discard-udp" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.4 Ensure echo services are not enabled" info : "echo is a network service that responds to clients with the data sent to it by the client. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable echo and echo-udp: # chkconfig echo off# chkconfig echo-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.4,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "echo" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.4 Ensure echo services are not enabled - echo-udp" info : "echo is a network service that responds to clients with the data sent to it by the client. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable echo and echo-udp: # chkconfig echo off# chkconfig echo-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.4,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "echo-udp" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.5 Ensure time services are not enabled" info : "time is a network service that responds with the server's current date and time as a 32 bit integer. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable time and time-udp: # chkconfig time off # chkconfig time-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "time" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.5 Ensure time services are not enabled - time-udp" info : "time is a network service that responds with the server's current date and time as a 32 bit integer. This service is intended for debugging and testing purposes. It is recommended that this service be disabled. Disabling this service will reduce the remote attack surface of the system." solution : "Run the following commands to disable time and time-udp: # chkconfig time off # chkconfig time-udp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "time-udp" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.6 Ensure rsh server is not enabled - rexec" info : "The Berkeley rsh-server (rsh, rlogin, rexec) package contains legacy services that exchange credentials in clear-text. These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." solution : "Run the following commands to disable rsh, rlogin, and rexec: # chkconfig rexec off# chkconfig rlogin off# chkconfig rsh off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.6,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "rexec" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.6 Ensure rsh server is not enabled - rlogin" info : "The Berkeley rsh-server (rsh, rlogin, rexec) package contains legacy services that exchange credentials in clear-text. These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." solution : "Run the following commands to disable rsh, rlogin, and rexec: # chkconfig rexec off# chkconfig rlogin off# chkconfig rsh off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.6,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "rlogin" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.6 Ensure rsh server is not enabled - rsh" info : "The Berkeley rsh-server (rsh, rlogin, rexec) package contains legacy services that exchange credentials in clear-text. These legacy services contain numerous security exposures and have been replaced with the more secure SSH package." solution : "Run the following commands to disable rsh, rlogin, and rexec: # chkconfig rexec off# chkconfig rlogin off# chkconfig rsh off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.6,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "rsh" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.7 Ensure talk server is not enabled" info : "The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talk client (allows initiate of talk sessions) is installed by default. The software presents a security risk as it uses unencrypted protocols for communication." solution : "Run the following command to disable talk : # chkconfig talk off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "talk" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.8 Ensure telnet server is not enabled" info : "The telnet-server package contains the telnet daemon, which accepts connections from users from other systems via the telnet protocol. The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow a user with access to sniff network traffic the ability to steal credentials. The ssh package provides an encrypted session and stronger security." solution : "Run the following command to disable telnet : # chkconfig telnet off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.8,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "telnet" status : OFF type : RPM_CHECK description : "Check for atftp" rpm : "atftp-0.0.0-0.0.0" operator : "gt" required : YES system : "Linux" type : CHKCONFIG description : "2.1.9 Ensure tftp server is not enabled" info : "Trivial ob体育 Transfer Protocol (TFTP) is a simple file transfer protocol, typically used to automatically transfer configuration or boot machines from a boot server. The package atftp is used to define and support a TFTP server." solution : "Run the following command to disable tftp : # chkconfig tftp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.9,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "atftpd" levels : "123456" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.9 Ensure tftp server is not enabled" info : "Trivial ob体育 Transfer Protocol (TFTP) is a simple file transfer protocol, typically used to automatically transfer configuration or boot machines from a boot server. The package atftp is used to define and support a TFTP server." solution : "Run the following command to disable tftp : # chkconfig tftp off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.9,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "tftp" status : OFF system : "Linux" type : XINETD_SVC description : "2.1.10 Ensure rsync service is not enabled" info : "The rsyncd service can be used to synchronize files between systems over network links. The rsyncd service presents a security risk as it uses unencrypted protocols for communication." solution : "Run the following command to disable rsync: # chkconfig rsync off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.10,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "rsync" status : OFF system : "Linux" type : CHKCONFIG description : "2.1.11 Ensure xinetd is not enabled" info : "The eXtended InterNET Daemon (xinetd) is an open source super daemon that replaced the original inetd daemon. The xinetd daemon listens for well known services and dispatches the appropriate daemon to properly respond to service requests. If there are no xinetd services required, it is recommended that the daemon be disabled." solution : "Run one of the following command to disable xinetd : # chkconfig xinetd off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.1.11,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "xinetd" levels : "123456" status : OFF type : RPM_CHECK description : "Check NTP installed" rpm : "ntp-0.0.0-0" operator : "gt" required : YES type : RPM_CHECK description : "Check chrony installed" rpm : "chrony-0.0.0-0" operator : "gt" required : YES description : "2.2.1.1 Ensure time synchronization is in use" info : "System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them. Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations." solution : "On physical systems or virtual systems where host based time synchronization is not available run one of the following commands to install either ntp or chrony: # zypper install ntp# zypper install chrony On virtual systems where host based time synchronization is available consult your virtualization software documentation and setup host based synchronization." reference : "LEVEL|1NS,CIS_Recommendation|2.2.1.1" see_also : "https://workbench.cisecurity.org/files/1864" description : "2.2.1.1 Ensure time synchronization is in use" info : "System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them. Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations. NOTE - NTP or Chrony does not appear to be installed." solution : "On physical systems or virtual systems where host based time synchronization is not available run one of the following commands to install either ntp or chrony: # zypper install ntp# zypper install chrony On virtual systems where host based time synchronization is available consult your virtualization software documentation and setup host based synchronization." reference : "LEVEL|1NS,CIS_Recommendation|2.2.1.1" see_also : "https://workbench.cisecurity.org/files/1864" type : RPM_CHECK description : "Check NTP installed" rpm : "ntp-0.0.0-0" operator : "gt" required : YES system : "Linux" type : FILE_CONTENT_CHECK description : "2.2.1.2 Ensure ntp is configured - restrict -4" info : "ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system. If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." solution : "Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS=\"-u ntp:ntp\"" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|2.2.1.2,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ntp.conf" regex : "^[\\s]*restrict[\\s]+-4[\\s][^:]" expect : "^[\\s]*restrict[\\s]+-4[\\s]+(,?default[\\s]*|,?kod[\\s]*|,?limited[\\s]*|,?nomodify[\\s]*|,?notrap[\\s]*|,?nopeer[\\s]*|,?noquery[\\s]*){7}$" system : "Linux" type : FILE_CONTENT_CHECK description : "2.2.1.2 Ensure ntp is configured - restrict -6" info : "ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system. If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." solution : "Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS=\"-u ntp:ntp\"" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|2.2.1.2,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ntp.conf" regex : "^[\\s]*restrict[\\s]+-6[\\s][^:]" expect : "^[\\s]*restrict[\\s]+-6[\\s]+(,?default[\\s]*|,?kod[\\s]*|,?limited[\\s]*|,?nomodify[\\s]*|,?notrap[\\s]*|,?nopeer[\\s]*|,?noquery[\\s]*){7}$" system : "Linux" type : FILE_CONTENT_CHECK description : "2.2.1.2 Ensure ntp is configured - server" info : "ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system. If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." solution : "Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS=\"-u ntp:ntp\"" reference : "800-171|3.3.7,800-53|AU-8(1),CIS_Recommendation|2.2.1.2,CN-L3|8.1.4.3(b),CSCv6|6.1,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.4,ITSG-33|AU-8(1),LEVEL|1S,NESA|T3.6.7,NIAv2|NS44,NIAv2|NS45,NIAv2|NS46,NIAv2|NS47,PCI-DSSv3.1|10.4,PCI-DSSv3.2|10.4,QCSC-v1|8.2.1,QCSC-v1|13.2,TBA-FIISB|37.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ntp.conf" # Note: Variable @NTP_SERVER@ replaced with "192\\.168\\.0\\.1" in field "regex". regex : "^[\\s]*(server|pool)[\\s]+192\\.168\\.0\\.1" # Note: Variable @NTP_SERVER@ replaced with "192\\.168\\.0\\.1" in field "expect". expect : "^[\\s]*(server|pool)[\\s]+192\\.168\\.0\\.1" system : "Linux" type : FILE_CONTENT_CHECK description : "2.2.1.2 Ensure ntp is configured - ntp:ntp" info : "ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system. If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly." solution : "Add or edit restrict lines in /etc/ntp.conf to match the following: restrict -4 default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery Add or edit server or pool lines to /etc/ntp.conf as appropriate: server Add or edit the NTPD_OPTIONS in /etc/sysconfig/ntp to include '-u ntp:ntp': NTPD_OPTIONS=\"-u ntp:ntp\"" reference : "800-171|3.3.7,800-53|AU-8(1),CIS_Recommendation|2.2.1.2,CN-L3|8.1.4.3(b),CSCv6|6.1,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.4,ITSG-33|AU-8(1),LEVEL|1S,NESA|T3.6.7,NIAv2|NS44,NIAv2|NS45,NIAv2|NS46,NIAv2|NS47,QCSC-v1|8.2.1,QCSC-v1|13.2,TBA-FIISB|37.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/sysconfig/ntp" regex : "^NTPD_OPTIONS=" expect : "-u[\\s]+ntp:ntp" description : "2.2.1.2 Ensure ntp is configured - server" info : "ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system. If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly. NOTE - NTP does not appear to be installed." reference : "800-171|3.3.7,800-53|AU-8(1),CIS_Recommendation|2.2.1.2,CN-L3|8.1.4.3(b),CSCv6|6.1,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.4,ITSG-33|AU-8(1),LEVEL|1S,NESA|T3.6.7,NIAv2|NS44,NIAv2|NS45,NIAv2|NS46,NIAv2|NS47,PCI-DSSv3.1|10.4,PCI-DSSv3.2|10.4,QCSC-v1|8.2.1,QCSC-v1|13.2,TBA-FIISB|37.4" see_also : "https://workbench.cisecurity.org/files/1864" description : "2.2.1.2 Ensure ntp is configured - restrict -4" info : "ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system. If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly. NOTE - NTP does not appear to be installed." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|2.2.1.2,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" description : "2.2.1.2 Ensure ntp is configured - restrict -6" info : "ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system. If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly. NOTE - NTP does not appear to be installed." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|2.2.1.2,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" description : "2.2.1.2 Ensure ntp is configured - ntp:ntp" info : "ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server. This recommendation only applies if ntp is in use on the system. If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly. NOTE - NTP does not appear to be installed." reference : "800-171|3.3.7,800-53|AU-8(1),CIS_Recommendation|2.2.1.2,CN-L3|8.1.4.3(b),CSCv6|6.1,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.4,ITSG-33|AU-8(1),LEVEL|1S,NESA|T3.6.7,NIAv2|NS44,NIAv2|NS45,NIAv2|NS46,NIAv2|NS47,QCSC-v1|8.2.1,QCSC-v1|13.2,TBA-FIISB|37.4" see_also : "https://workbench.cisecurity.org/files/1864" type : RPM_CHECK description : "Check chrony installed" rpm : "chrony-0.0.0-0" operator : "gt" required : YES system : "Linux" type : FILE_CONTENT_CHECK description : "2.2.1.3 Ensure chrony is configured - server" info : "chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/ . chrony can be configured to be a client and/or a server. If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. This recommendation only applies if chrony is in use on the system." solution : "Add or edit server or pool lines to /etc/chrony.conf as appropriate: server Add or edit the OPTIONS in /etc/sysconfig/chronyd to include '-u chrony': OPTIONS=\"-u chrony\"" reference : "800-171|3.3.7,800-53|AU-8(1),CIS_Recommendation|2.2.1.3,CN-L3|8.1.4.3(b),CSCv6|6.1,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.4,ITSG-33|AU-8(1),LEVEL|1S,NESA|T3.6.7,NIAv2|NS44,NIAv2|NS45,NIAv2|NS46,NIAv2|NS47,QCSC-v1|8.2.1,QCSC-v1|13.2,TBA-FIISB|37.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/chrony.conf" # Note: Variable @NTP_SERVER@ replaced with "192\\.168\\.0\\.1" in field "regex". regex : "^[\\s]*(server|pool)[\\s]+192\\.168\\.0\\.1" # Note: Variable @NTP_SERVER@ replaced with "192\\.168\\.0\\.1" in field "expect". expect : "^[\\s]*(server|pool)[\\s]+192\\.168\\.0\\.1" system : "Linux" type : FILE_CONTENT_CHECK description : "2.2.1.3 Ensure chrony is configured - options" info : "chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/ . chrony can be configured to be a client and/or a server. If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. This recommendation only applies if chrony is in use on the system." solution : "Add or edit server or pool lines to /etc/chrony.conf as appropriate: server Add or edit the OPTIONS in /etc/sysconfig/chronyd to include '-u chrony': OPTIONS=\"-u chrony\"" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|2.2.1.3,CN-L3|8.1.10.6(d),CSCv6|6.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/sysconfig/chronyd" regex : "^OPTIONS=" expect : "-u[\\s]+chrony" description : "2.2.1.3 Ensure chrony is configured - server" info : "chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/ . chrony can be configured to be a client and/or a server. If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. This recommendation only applies if chrony is in use on the system. NOTE - Chrony does not appear to be installed." reference : "800-171|3.3.7,800-53|AU-8(1),CIS_Recommendation|2.2.1.3,CN-L3|8.1.4.3(b),CSCv6|6.1,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.4,ITSG-33|AU-8(1),LEVEL|1S,NESA|T3.6.7,NIAv2|NS44,NIAv2|NS45,NIAv2|NS46,NIAv2|NS47,QCSC-v1|8.2.1,QCSC-v1|13.2,TBA-FIISB|37.4" see_also : "https://workbench.cisecurity.org/files/1864" description : "2.2.1.3 Ensure chrony is configured - options" info : "chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/ . chrony can be configured to be a client and/or a server. If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. This recommendation only applies if chrony is in use on the system. NOTE - Chrony does not appear to be installed." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|2.2.1.3,CN-L3|8.1.10.6(d),CSCv6|6.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" system : "Linux" type : CMD_EXEC description : "2.2.2 Ensure X Window System is not installed" info : "The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login. Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface." solution : "Run the following command to remove the X Windows System packages: # zypper remove xorg-x11*" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|2.2.2,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/rpm -qa xorg-x11* | /bin/awk '{print} END {if (NR == 0) print \"No xorg-x11 items found\"; else print}'" expect : "^No xorg-x11 items found$" type : CHKCONFIG description : "2.2.3 Ensure Avahi Server is not enabled" info : "Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine. Automatic discovery of network services is not normally required for system functionality. It is recommended to disable the service to reduce the potential attack surface." solution : "Run the following command to disable avahi-daemon: # chkconfig avahi-daemon off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.3,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "avahi-daemon" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.4 Ensure CUPS is not enabled" info : "The Common Unix Print System (CUPS) provides the ability to print to both local and network printers. A system running CUPS can also accept print jobs from remote systems and print them to local printers. It also provides a web based remote administration capability. If the system does not need to print jobs or accept print jobs from other systems, it is recommended that CUPS be disabled to reduce the potential attack surface." solution : "Run the following command to disable cups: # chkconfig cups off Impact: Disabling CUPS will prevent printing from the system, a common task for workstation systems." reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.4,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "cups" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.5 Ensure DHCP Server is not enabled" info : "The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses. Unless a system is specifically set up to act as a DHCP server, it is recommended that this service be disabled to reduce the potential attack surface." solution : "Run the following command to disable dhcpd: # chkconfig dhcpd off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "dhcpd" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.6 Ensure LDAP server is not enabled" info : "The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database. If the system will not need to act as an LDAP server, it is recommended that the software be disabled to reduce the potential attack surface." solution : "Run the following command to disable ldap: # chkconfig ldap off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.6,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "slapd" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.7 Ensure NFS and RPC are not enabled - rpcbind" info : "The Network ob体育 System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network. If the system does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface." solution : "Run the following commands to disable nfs and rpcbind: # chkconfig nfs off# chkconfig rpcbind off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "rpcbind" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.7 Ensure NFS and RPC are not enabled - nfs" info : "The Network ob体育 System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network. If the system does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface." solution : "Run the following commands to disable nfs and rpcbind: # chkconfig nfs off# chkconfig rpcbind off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.7,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "nfs" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.8 Ensure DNS Server is not enabled" info : "The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network. Unless a system is specifically designated to act as a DNS server, it is recommended that the service be disabled to reduce the potential attack surface." solution : "Run the following command to disable named: # chkconfig named off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.8,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "named" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.9 Ensure FTP Server is not enabled" info : "The ob体育 Transfer Protocol (FTP) provides networked computers with the ability to transfer files. FTP does not protect the confidentiality of data or authentication credentials. It is recommended sftp be used if file transfer is required. Unless there is a need to run the system as a FTP server (for example, to allow anonymous downloads), it is recommended that the service be disabled to reduce the potential attack surface." solution : "Run the following command to disable vsftpd: # chkconfig vsftpd off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.9,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "vsftpd" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.10 Ensure HTTP server is not enabled" info : "HTTP or web servers provide the ability to host web site content. Unless there is a need to run the system as a web server, it is recommended that the service be disabled to reduce the potential attack surface." solution : "Run the following command to disable apache2: # chkconfig apache2 off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.10,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "httpd" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.11 Ensure IMAP and POP3 server is not enabled" info : "cyrus is an open source IMAP and POP3 server for Linux based systems. Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the service be disabled to reduce the potential attack surface." solution : "Run the following command to disable cyrus: # chkconfig cyrus off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.11,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "dovecot" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.12 Ensure Samba is not enabled" info : "The Samba daemon allows system administrators to configure their Linux systems to share file systems and directories with Windows desktops. Samba will advertise the file systems and directories via the Small Message Block (SMB) protocol. Windows desktop users will be able to mount these directories and file systems as letter drives on their systems. If there is no need to mount directories and file systems to Windows systems, then this service can be disabled to reduce the potential attack surface." solution : "Run the following command to disable smb: # chkconfig smb off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.12,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "smb" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.13 Ensure HTTP Proxy Server is not enabled" info : "Squid is a standard proxy server used in many environments. If there is no need for a proxy server, it is recommended that the squid proxy be disabled to reduce the potential attack surface." solution : "Run the following command to disable squid: # chkconfig squid off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.13,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "squid" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "2.2.14 Ensure SNMP Server is not enabled" info : "The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system. The SNMP server can communicate using SNMP v1, which transmits data in the clear and does not require authentication to execute commands. Unless absolutely necessary, it is recommended that the SNMP service not be used. If SNMP is required the server should be configured to disallow SNMP v1." solution : "Run the following command to disable snmpd: # chkconfig snmpd off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.14,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "snmpd" levels : "123456" status : OFF system : "Linux" type : FILE_CONTENT_CHECK description : "2.2.15 Ensure mail transfer agent is configured for local-only mode - main.cf" info : "Mail Transfer Agents (MTA), such as sendmail and Postfix, are used to listen for incoming mail and transfer the messages to the appropriate user or mail server. If the system is not intended to be a mail server, it is recommended that the MTA be configured to only process local mail. The software for all Mail Transfer Agents is complex and most have a long history of security issues. While it is important to ensure that the system can process local mail messages, it is not necessary to have the MTA's daemon listening on a port unless the server is intended to be a mail server that receives and processes mail from other systems." solution : "Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below: inet_interfaces = loopback-only Restart postfix: # service postfix restart" reference : "800-171|3.4.2,800-53|CM-6b.,CIP|007-6-R1,CIS_Recommendation|2.2.15,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|9.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/postfix/main.cf" regex : "^[\\s]*inet_interfaces[\\s]*=[\\s]*" expect : "^[\\s]*inet_interfaces[\\s]*=[\\s]*(127\.0\.0\.1|\[::1\]|loopback-only|localhost|[\\s,]?){1,}[\\s]*$" system : "Linux" type : CMD_EXEC description : "2.2.15 Ensure mail transfer agent is configured for local-only mode - netstat listening" info : "Mail Transfer Agents (MTA), such as sendmail and Postfix, are used to listen for incoming mail and transfer the messages to the appropriate user or mail server. If the system is not intended to be a mail server, it is recommended that the MTA be configured to only process local mail. The software for all Mail Transfer Agents is complex and most have a long history of security issues. While it is important to ensure that the system can process local mail messages, it is not necessary to have the MTA's daemon listening on a port unless the server is intended to be a mail server that receives and processes mail from other systems." solution : "Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below: inet_interfaces = loopback-only Restart postfix: # service postfix restart" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|2.2.15,CN-L3|8.1.10.6(d),CSCv6|9.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "netstat -an | grep LIST | grep \":25[[:space:]]\" | grep -v \"127.0.0.1:25\" | grep -v \"::1:25\" | /usr/bin/awk \'{print} END { if(NR==0) print \"pass\" }\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "2.2.16 Ensure NIS Server is not enabled" info : "The Network Information Service (NIS) (formally known as Yellow Pages) is a client-server directory service protocol for distributing system configuration files. The NIS server is a collection of programs that allow for the distribution of configuration files. 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 been replaced by such protocols as Lightweight Directory Access Protocol (LDAP). It is recommended that the service be disabled and other, more secure services be used" solution : "Run the following command to disable ypserv: # systemctl disable ypserv" reference : "800-171|3.4.8,800-53|CM-7(4),CIP|007-6-R1,CIS_Recommendation|2.2.16,CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS13a,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/bin/systemctl is-enabled ypserv | /usr/bin/awk \'{print} END { if(NR==0) print \"disabled\" }\'" expect : "disabled" dont_echo_cmd : YES system : "Linux" type : CHKCONFIG description : "2.2.17 Ensure rsync service is not enabled" info : "The rsyncd service can be used to synchronize files between systems over network links." solution : "Run the following command to disable rsyncd: # chkconfig rsyncd off" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|2.2.17,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "rsyncd" levels : "123456" status : OFF system : "Linux" type : RPM_CHECK description : "2.3.1 Ensure NIS Client is not installed" info : "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. 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." solution : "Run the following command to uninstall ypbind: # zypper remove ypbind Impact: Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse." reference : "800-171|3.4.8,800-53|CM-7(4),CIS_Recommendation|2.3.1,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS13a,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "ypbind-0.0.0-0" operator : "lt" required : NO system : "Linux" type : RPM_CHECK description : "2.3.2 Ensure rsh client is not installed" info : "The rsh package contains the client commands for the rsh services. 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." solution : "Run the following command to uninstall rsh: # zypper remove rsh Impact: Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse." reference : "800-171|3.4.8,800-53|CM-7(4),CIS_Recommendation|2.3.2,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS13a,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "rsh-0.0-0" operator : "lt" required : NO system : "Linux" type : RPM_CHECK description : "2.3.3 Ensure talk client is not installed" info : "The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talk client, which allows initialization of talk sessions, is installed by default. The software presents a security risk as it uses unencrypted protocols for communication." solution : "Run the following command to uninstall talk: # zypper remove talk Impact: Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse." reference : "800-171|3.4.8,800-53|CM-7(4),CIS_Recommendation|2.3.3,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS13a,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "talk-0.0-0" operator : "lt" required : NO system : "Linux" type : RPM_CHECK description : "2.3.4 Ensure telnet client is not installed" info : "The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol. 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 most Linux distributions." solution : "Run the following command to uninstall telnet: # zypper remove telnet Impact: Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse." reference : "800-171|3.4.8,800-53|CM-7(4),CIS_Recommendation|2.3.4,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS13a,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "telnet-0.0-0" operator : "lt" required : NO system : "Linux" type : RPM_CHECK description : "2.3.5 Ensure LDAP client is not installed" info : "The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database. If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface." solution : "Run the following command to uninstall openldap2-client: # zypper remove openldap2-client Impact: Removing the LDAP client will prevent or inhibit using LDAP for authentication in your environment." reference : "800-171|3.4.8,800-53|CM-7(4),CIS_Recommendation|2.3.5,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS13a,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "openldap2-client-0.0.0-0" operator : "lt" required : NO system : "Linux" type : CMD_EXEC description : "3.1.1 Ensure IP forwarding is disabled - sysctl" info : "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not. Setting the flag to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router." solution : "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.ip_forward=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.1.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.ip_forward" expect : "^[\\s]*net\\.ipv4\\.ip_forward[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.1.1 Ensure IP forwarding is disabled - /etc/sysctl" info : "The net.ipv4.ip_forward flag is used to tell the system whether it can forward packets or not. Setting the flag to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router." solution : "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.ip_forward = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.ip_forward=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.1.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.ip_forward[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.1.2 Ensure packet redirect sending is disabled - sysctl ipv4 all send" info : "ICMP Redirects are used to send routing information to other hosts. As a host itself does not act as a router (in a host only configuration), there is no need to send redirects. An attacker could use a compromised host to send invalid ICMP redirects to other router devices in an attempt to corrupt routing and have users access a system set up by the attacker as opposed to a valid system." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0 # sysctl -w net.ipv4.conf.default.send_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.1.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.all.send_redirects" expect : "^[\\s]*net\\.ipv4\\.conf\\.all\\.send_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.1.2 Ensure packet redirect sending is disabled - /etc/sysctl ipv4 all send" info : "ICMP Redirects are used to send routing information to other hosts. As a host itself does not act as a router (in a host only configuration), there is no need to send redirects. An attacker could use a compromised host to send invalid ICMP redirects to other router devices in an attempt to corrupt routing and have users access a system set up by the attacker as opposed to a valid system." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0 # sysctl -w net.ipv4.conf.default.send_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.1.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.all\\.send_redirects[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.1.2 Ensure packet redirect sending is disabled - sysctl ipv4 default send" info : "ICMP Redirects are used to send routing information to other hosts. As a host itself does not act as a router (in a host only configuration), there is no need to send redirects. An attacker could use a compromised host to send invalid ICMP redirects to other router devices in an attempt to corrupt routing and have users access a system set up by the attacker as opposed to a valid system." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0 # sysctl -w net.ipv4.conf.default.send_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.1.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.default.send_redirects" expect : "^[\\s]*net\\.ipv4\\.conf\\.default\\.send_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.1.2 Ensure packet redirect sending is disabled - /etc/sysctl ipv4 default send" info : "ICMP Redirects are used to send routing information to other hosts. As a host itself does not act as a router (in a host only configuration), there is no need to send redirects. An attacker could use a compromised host to send invalid ICMP redirects to other router devices in an attempt to corrupt routing and have users access a system set up by the attacker as opposed to a valid system." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.send_redirects=0 # sysctl -w net.ipv4.conf.default.send_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.1.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.default\\.send_redirects[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.1 Ensure source routed packets are not accepted - sysctl ipv4 all acccept" info : "In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used. Setting net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.all.accept_source_route" expect : "^[\\s]*net\\.ipv4\\.conf\\.all\\.accept_source_route[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.1 Ensure source routed packets are not accepted - /etc/sysctl ipv4 all acccept" info : "In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used. Setting net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.all\\.accept_source_route[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.1 Ensure source routed packets are not accepted - sysctl ipv4 default accept" info : "In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used. Setting net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.default.accept_source_route" expect : "^[\\s]*net\\.ipv4\\.conf\\.default\\.accept_source_route[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.1 Ensure source routed packets are not accepted - /etc/sysctl ipv4 default accept" info : "In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used. Setting net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_source_route=0 # sysctl -w net.ipv4.conf.default.accept_source_route=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.default\\.accept_source_route[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.2 Ensure ICMP redirects are not accepted - sysctl ipv4 default accept" info : "ICMP redirect messages are packets that convey routing information and tell your host (acting as a router) to send packets via an alternate path. It is a way of allowing an outside routing device to update your system routing tables. By setting net.ipv4.conf.all.accept_redirects to 0, the system will not accept any ICMP redirect messages, and therefore, won't allow outsiders to update the system's routing tables. Attackers could use bogus ICMP redirect messages to maliciously alter the system routing tables and get them to send packets to incorrect networks and allow your system packets to be captured." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.default.accept_redirects" expect : "^[\\s]*net\\.ipv4\\.conf\\.default\\.accept_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.2 Ensure ICMP redirects are not accepted - /etc/sysctl ipv4 default accept" info : "ICMP redirect messages are packets that convey routing information and tell your host (acting as a router) to send packets via an alternate path. It is a way of allowing an outside routing device to update your system routing tables. By setting net.ipv4.conf.all.accept_redirects to 0, the system will not accept any ICMP redirect messages, and therefore, won't allow outsiders to update the system's routing tables. Attackers could use bogus ICMP redirect messages to maliciously alter the system routing tables and get them to send packets to incorrect networks and allow your system packets to be captured." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.default\\.accept_redirects[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.2 Ensure ICMP redirects are not accepted - sysctl ipv4 all accept" info : "ICMP redirect messages are packets that convey routing information and tell your host (acting as a router) to send packets via an alternate path. It is a way of allowing an outside routing device to update your system routing tables. By setting net.ipv4.conf.all.accept_redirects to 0, the system will not accept any ICMP redirect messages, and therefore, won't allow outsiders to update the system's routing tables. Attackers could use bogus ICMP redirect messages to maliciously alter the system routing tables and get them to send packets to incorrect networks and allow your system packets to be captured." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.all.accept_redirects" expect : "^[\\s]*net\\.ipv4\\.conf\\.all\\.accept_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.2 Ensure ICMP redirects are not accepted - /etc/sysctl ipv4 all accept" info : "ICMP redirect messages are packets that convey routing information and tell your host (acting as a router) to send packets via an alternate path. It is a way of allowing an outside routing device to update your system routing tables. By setting net.ipv4.conf.all.accept_redirects to 0, the system will not accept any ICMP redirect messages, and therefore, won't allow outsiders to update the system's routing tables. Attackers could use bogus ICMP redirect messages to maliciously alter the system routing tables and get them to send packets to incorrect networks and allow your system packets to be captured." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.accept_redirects=0 # sysctl -w net.ipv4.conf.default.accept_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.all\\.accept_redirects[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.3 Ensure secure ICMP redirects are not accepted - sysctl ipv4 all secure" info : "Secure ICMP redirects are the same as ICMP redirects, except they come from gateways listed on the default gateway list. It is assumed that these gateways are known to your system, and that they are likely to be secure. It is still possible for even known gateways to be compromised. Setting net.ipv4.conf.all.secure_redirects to 0 protects the system from routing table updates by possibly compromised known gateways." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.3,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.all.secure_redirects" expect : "^[\\s]*net\\.ipv4\\.conf\\.all\\.secure_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.3 Ensure secure ICMP redirects are not accepted - /etc/sysctl ipv4 all secure" info : "Secure ICMP redirects are the same as ICMP redirects, except they come from gateways listed on the default gateway list. It is assumed that these gateways are known to your system, and that they are likely to be secure. It is still possible for even known gateways to be compromised. Setting net.ipv4.conf.all.secure_redirects to 0 protects the system from routing table updates by possibly compromised known gateways." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.3,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.all\\.secure_redirects[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.3 Ensure secure ICMP redirects are not accepted - sysctl ipv4 default secure" info : "Secure ICMP redirects are the same as ICMP redirects, except they come from gateways listed on the default gateway list. It is assumed that these gateways are known to your system, and that they are likely to be secure. It is still possible for even known gateways to be compromised. Setting net.ipv4.conf.all.secure_redirects to 0 protects the system from routing table updates by possibly compromised known gateways." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.3,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.default.secure_redirects" expect : "^[\\s]*net\\.ipv4\\.conf\\.default\\.secure_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.3 Ensure secure ICMP redirects are not accepted - /etc/sysctl ipv4 default secure" info : "Secure ICMP redirects are the same as ICMP redirects, except they come from gateways listed on the default gateway list. It is assumed that these gateways are known to your system, and that they are likely to be secure. It is still possible for even known gateways to be compromised. Setting net.ipv4.conf.all.secure_redirects to 0 protects the system from routing table updates by possibly compromised known gateways." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.secure_redirects=0 # sysctl -w net.ipv4.conf.default.secure_redirects=0 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.3,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.default\\.secure_redirects[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.4 Ensure suspicious packets are logged - sysctl ipv4 all log_martians" info : "When enabled, this feature logs packets with un-routable source addresses to the kernel log. Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|3.2.4,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSCv6|6,CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.all.log_martians" expect : "^[\\s]*net\\.ipv4\\.conf\\.all\\.log_martians[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.4 Ensure suspicious packets are logged - /etc/sysctl ipv4 all log_martians" info : "When enabled, this feature logs packets with un-routable source addresses to the kernel log. Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|3.2.4,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSCv6|6,CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.all\\.log_martians[[:space:]]*=[[:space:]]*1[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.4 Ensure suspicious packets are logged - sysctl ipv4 default log_martians" info : "When enabled, this feature logs packets with un-routable source addresses to the kernel log. Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|3.2.4,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSCv6|6,CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.default.log_martians" expect : "^[\\s]*net\\.ipv4\\.conf\\.default\\.log_martians[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.4 Ensure suspicious packets are logged - /etc/sysctl ipv4 default log_martians" info : "When enabled, this feature logs packets with un-routable source addresses to the kernel log. Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.log_martians=1 # sysctl -w net.ipv4.conf.default.log_martians=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|3.2.4,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSCv6|6,CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.default\\.log_martians[[:space:]]*=[[:space:]]*1[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.5 Ensure broadcast ICMP requests are ignored - sysctl" info : "Setting net.ipv4.icmp_echo_ignore_broadcasts to 1 will cause the system to ignore all ICMP echo and timestamp requests to broadcast and multicast addresses. Accepting ICMP echo and timestamp requests with broadcast or multicast destinations for your network could be used to trick your host into starting (or participating) in a Smurf attack. A Smurf attack relies on an attacker sending large amounts of ICMP broadcast messages with a spoofed source address. All hosts receiving this message and responding would send echo-reply messages back to the spoofed address, which is probably not routable. If many hosts respond to the packets, the amount of traffic on the network could be significantly multiplied." solution : "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.5,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.icmp_echo_ignore_broadcasts" expect : "^[\\s]*net\\.ipv4\\.icmp_echo_ignore_broadcasts[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.5 Ensure broadcast ICMP requests are ignored - /etc/sysctl" info : "Setting net.ipv4.icmp_echo_ignore_broadcasts to 1 will cause the system to ignore all ICMP echo and timestamp requests to broadcast and multicast addresses. Accepting ICMP echo and timestamp requests with broadcast or multicast destinations for your network could be used to trick your host into starting (or participating) in a Smurf attack. A Smurf attack relies on an attacker sending large amounts of ICMP broadcast messages with a spoofed source address. All hosts receiving this message and responding would send echo-reply messages back to the spoofed address, which is probably not routable. If many hosts respond to the packets, the amount of traffic on the network could be significantly multiplied." solution : "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_echo_ignore_broadcasts = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.5,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.icmp_echo_ignore_broadcasts[[:space:]]*=[[:space:]]*1[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.6 Ensure bogus ICMP responses are ignored - sysctl" info : "Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages. Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages." solution : "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_ignore_bogus_error_responses = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.6,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.icmp_ignore_bogus_error_responses" expect : "^[\\s]*net\\.ipv4\\.icmp_ignore_bogus_error_responses[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.6 Ensure bogus ICMP responses are ignored - /etc/sysctl" info : "Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages. Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages." solution : "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.icmp_ignore_bogus_error_responses = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.6,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.icmp_ignore_bogus_error_responses[[:space:]]*=[[:space:]]*1[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.7 Ensure Reverse Path Filtering is enabled - sysctl ipv4 all rp_filter" info : "Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set). Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.7,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.all.rp_filter" expect : "^[\\s]*net\\.ipv4\\.conf\\.all\\.rp_filter[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.7 Ensure Reverse Path Filtering is enabled - /etc/sysctl ipv4 all rp_filter" info : "Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set). Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.7,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.all\\.rp_filter[[:space:]]*=[[:space:]]*1[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.7 Ensure Reverse Path Filtering is enabled - sysctl ipv4 default rp_filter" info : "Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set). Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.7,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.conf.default.rp_filter" expect : "^[\\s]*net\\.ipv4\\.conf\\.default\\.rp_filter[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.7 Ensure Reverse Path Filtering is enabled - /etc/sysctl ipv4 default rp_filter" info : "Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set). Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.7,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.conf\\.default\\.rp_filter[[:space:]]*=[[:space:]]*1[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.2.8 Ensure TCP SYN Cookies is enabled - sysctl" info : "When tcp_syncookies is set, the kernel will handle TCP SYN packets normally until the half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that encodes the source and destination IP address and port number and the time the packet was sent. A legitimate connection would send the ACK packet of the three way handshake with the specially crafted sequence number. This allows the system to verify that it has received a valid response to a SYN cookie and allow the connection, even though there is no corresponding SYN in the queue. Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack." solution : "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.tcp_syncookies = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.tcp_syncookies=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.8,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv4.tcp_syncookies" expect : "^[\\s]*net\\.ipv4\\.tcp_syncookies[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.2.8 Ensure TCP SYN Cookies is enabled - /etc/sysctl" info : "When tcp_syncookies is set, the kernel will handle TCP SYN packets normally until the half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that encodes the source and destination IP address and port number and the time the packet was sent. A legitimate connection would send the ACK packet of the three way handshake with the specially crafted sequence number. This allows the system to verify that it has received a valid response to a SYN cookie and allow the connection, even though there is no corresponding SYN in the queue. Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack." solution : "Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.tcp_syncookies = 1 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv4.tcp_syncookies=1 # sysctl -w net.ipv4.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.2.8,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv4\\.tcp_syncookies[[:space:]]*=[[:space:]]*1[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.3.1 Ensure IPv6 router advertisements are not accepted - sysctl ipv6 default accept" info : "This setting disables the system's ability to accept IPv6 router advertisements. It is recommended that systems not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.3.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv6.conf.default.accept_ra" expect : "^[\\s]*net\\.ipv6\\.conf\\.default\\.accept_ra[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.3.1 Ensure IPv6 router advertisements are not accepted - /etc/sysctl ipv6 default accept" info : "This setting disables the system's ability to accept IPv6 router advertisements. It is recommended that systems not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.3.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv6\\.conf\\.default\\.accept_ra[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.3.1 Ensure IPv6 router advertisements are not accepted - sysctl ipv6 all accept" info : "This setting disables the system's ability to accept IPv6 router advertisements. It is recommended that systems not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.3.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv6.conf.all.accept_ra" expect : "^[\\s]*net\\.ipv6\\.conf\\.all\\.accept_ra[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.3.1 Ensure IPv6 router advertisements are not accepted - /etc/sysctl ipv6 all accept" info : "This setting disables the system's ability to accept IPv6 router advertisements. It is recommended that systems not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_ra=0 # sysctl -w net.ipv6.conf.default.accept_ra=0 # sysctl -w net.ipv6.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.3.1,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv6\\.conf\\.all\\.accept_ra[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.3.2 Ensure IPv6 redirects are not accepted - sysctl ipv6 default accept" info : "This setting prevents the system from accepting ICMP redirects. ICMP redirects tell the system about alternate routes for sending traffic. It is recommended that systems not accept ICMP redirects as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv6.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.3.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv6.conf.default.accept_redirects" expect : "^[\\s]*net\\.ipv6\\.conf\\.default\\.accept_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.3.2 Ensure IPv6 redirects are not accepted - /etc/sysctl ipv6 default accept" info : "This setting prevents the system from accepting ICMP redirects. ICMP redirects tell the system about alternate routes for sending traffic. It is recommended that systems not accept ICMP redirects as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv6.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.3.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv6\\.conf\\.default\\.accept_redirects[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.3.2 Ensure IPv6 redirects are not accepted - sysctl ipv6 all accept" info : "This setting prevents the system from accepting ICMP redirects. ICMP redirects tell the system about alternate routes for sending traffic. It is recommended that systems not accept ICMP redirects as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv6.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.3.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/sbin/sysctl net.ipv6.conf.all.accept_redirects" expect : "^[\\s]*net\\.ipv6\\.conf\\.all\\.accept_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : CMD_EXEC description : "3.3.2 Ensure IPv6 redirects are not accepted - /etc/sysctl ipv6 all accept" info : "This setting prevents the system from accepting ICMP redirects. ICMP redirects tell the system about alternate routes for sending traffic. It is recommended that systems not accept ICMP redirects as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes." solution : "Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0 Run the following commands to set the active kernel parameters: # sysctl -w net.ipv6.conf.all.accept_redirects=0 # sysctl -w net.ipv6.conf.default.accept_redirects=0 # sysctl -w net.ipv6.route.flush=1" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.3.2,CN-L3|8.1.10.6(j),CSCv6|11,CSCv6|3,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -s -E '^[[:space:]]*net\\.ipv6\\.conf\\.all\\.accept_redirects[[:space:]]*=[[:space:]]*0[[:space:]]*$' /etc/sysctl.conf /etc/sysctl.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "^pass$" system : "Linux" type : FILE_CONTENT_CHECK description : "3.3.3 Ensure IPv6 is disabled" info : "Although IPv6 has many advantages over IPv4, few organizations have implemented IPv6. If IPv6 is not to be used, it is recommended that it be disabled to reduce the attack surface of the system." solution : "Edit /boot/grub/menu.lst to include ' ipv6.disable=1' on all kernel lines." reference : "800-53|SI-7(9),CIS_Recommendation|3.3.3,CN-L3|8.1.2.3,CN-L3|8.1.4.6,CSF|PR.DS-6,ITSG-33|SI-7,ITSG-33|SI-7a.,LEVEL|1NS,NESA|T3.4.1,NESA|T7.3.2,NESA|T7.3.3,QCSC-v1|3.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/boot/grub/menu.lst" regex : "^[\\s]*kernel[\\s]*" expect : "ipv6\\.disable=1" system : "Linux" type : RPM_CHECK description : "3.4.1 Ensure TCP Wrappers is installed" info : "TCP Wrappers provides a simple access list and standardized logging method for services capable of supporting it. In the past, services that were called from inetd and xinetd supported the use of tcp wrappers. As inetd and xinetd have been falling in disuse, any service that can support tcp wrappers will have the libwrap.so library attached to it. TCP Wrappers provide a good simple access list mechanism to services that may not have that support built in. It is recommended that all services that can support TCP Wrappers, use it." solution : "Run the following command to install tcpd: # zypper install tcpd" reference : "800-171|3.4.8,800-53|CM-7(5),CIS_Recommendation|3.4.1,CSCv6|2.2,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.5.1,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS15a,PCI-DSSv3.1|12.3.7,PCI-DSSv3.2|12.3.7,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "tcpd-0.0.0-0" operator : "gt" required : YES system : "Linux" type : FILE_CONTENT_CHECK description : "3.4.2 Ensure /etc/hosts.allow is configured" info : "The /etc/hosts.allow file specifies which IP addresses are permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.deny file. The /etc/hosts.allow file supports access control by IP and helps ensure that only authorized systems can connect to the system." solution : "Run the following command to create /etc/hosts.allow: # echo 'ALL: /, /, ...' >/etc/hosts.allow where each / combination (for example, '192.168.1.0/255.255.255.0') represents one network block in use by your organization that requires access to this system." reference : "800-171|3.13.1,800-171|3.13.6,800-53|SC-7(5),CIS_Recommendation|3.4.2,CN-L3|7.1.2.2(c),CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(5),LEVEL|1S,NESA|T4.5.4,NIAv2|GS7b,NIAv2|NS25,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/hosts.allow" regex : "^[\\s]*ALL[\\s]*:" # Note: Variable @HOSTS_ALLOW_NETWORK@ replaced with "192\\.0\\.2\\.0\\\\/255\\.255\\.255\\.0" in field "expect". expect : "^[\\s]*ALL[\\s]*:[\\s]*192\\.0\\.2\\.0\\\\/255\\.255\\.255\\.0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "3.4.3 Ensure /etc/hosts.deny is configured" info : "The /etc/hosts.deny file specifies which IP addresses are not permitted to connect to the host. It is intended to be used in conjunction with the /etc/hosts.allow file. The /etc/hosts.deny file serves as a failsafe so that any host not specified in /etc/hosts.allow is denied access to the system." solution : "Run the following command to create /etc/hosts.deny: # echo 'ALL: ALL' >> /etc/hosts.deny" reference : "800-171|3.13.1,800-171|3.13.6,800-53|SC-7(5),CIS_Recommendation|3.4.3,CN-L3|7.1.2.2(c),CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(5),LEVEL|1S,NESA|T4.5.4,NIAv2|GS7b,NIAv2|NS25,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/hosts.deny" regex : "ALL:" expect : "^ALL:[\\s\\t]*ALL$" system : "Linux" type : FILE_CHECK description : "3.4.4 Ensure permissions on /etc/hosts.allow are configured" info : "The /etc/hosts.allow file contains networking information that is used by many applications and therefore must be readable for these applications to operate. It is critical to ensure that the /etc/hosts.allow file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions." solution : "Run the following commands to set permissions on /etc/hosts.allow: # chown root:root /etc/hosts.allow# chmod 644 /etc/hosts.allow" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|3.4.4,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/hosts.allow" owner : "root" mask : "133" group : "root" system : "Linux" type : FILE_CHECK description : "3.4.5 Ensure permissions on /etc/hosts.deny are configured" info : "The /etc/hosts.deny file contains network information that is used by many system applications and therefore must be readable for these applications to operate. It is critical to ensure that the /etc/hosts.deny file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions." solution : "Run the following commands to set permissions on /etc/hosts.deny: # chown root:root /etc/hosts.deny# chmod 644 /etc/hosts.deny" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|3.4.5,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/hosts.deny" owner : "root" mask : "133" group : "root" system : "Linux" type : CMD_EXEC description : "3.5.1 Ensure DCCP is disabled" info : "The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that supports streaming media and telephony. DCCP provides a way to gain access to congestion control, without having to do it at the application layer, but does not provide in-sequence delivery. If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install dccp /bin/true" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|3.5.1,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install dccp /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "3.5.2 Ensure SCTP is disabled" info : "The Stream Control Transmission Protocol (SCTP) is a transport layer protocol used to support message oriented communication, with several streams of messages in one connection. It serves a similar function as TCP and UDP, incorporating features of both. It is message-oriented like UDP, and ensures reliable in-sequence transport of messages with congestion control like TCP. If the protocol is not being used, it is recommended that kernel module not be loaded, disabling the service to reduce the potential attack surface." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install sctp /bin/true" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|3.5.2,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install sctp /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "3.5.3 Ensure RDS is disabled" info : "The Reliable Datagram Sockets (RDS) protocol is a transport layer protocol designed to provide low-latency, high-bandwidth communications between cluster nodes. It was developed by the Oracle Corporation. If the protocol is not being used, it is recommended that kernel module not be loaded, disabling the service to reduce the potential attack surface." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install rds /bin/true" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|3.5.3,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install rds /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : CMD_EXEC description : "3.5.4 Ensure TIPC is disabled" info : "The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communication between cluster nodes. If the protocol is not being used, it is recommended that kernel module not be loaded, disabling the service to reduce the potential attack surface." solution : "Edit or create the file /etc/modprobe.d/CIS.conf and add the following line: install tipc /bin/true" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|3.5.4,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'^[\\s]*install tipc /bin/true\' /etc/modprobe.d/* |/usr/bin/awk \'{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}\'" expect : "pass" system : "Linux" type : RPM_CHECK description : "3.6.1 Ensure iptables is installed" info : "iptables allows configuration of the IPv4 tables in the linux kernel and the rules stored within them. Most firewall configuration utilities operate as a front end to iptables. iptables is required for firewall management and configuration." solution : "Run the following command to install iptables: # zypper install iptables" reference : "800-171|3.4.8,800-53|CM-7(5),CIS_Recommendation|3.6.1,CSCv6|2.2,CSF|PR.IP-1,CSF|PR.PT-3,ISO/IEC-27001|A.12.5.1,ISO/IEC-27001|A.12.6.2,ITSG-33|CM-7,LEVEL|1S,NIAv2|SS15a,PCI-DSSv3.1|12.3.7,PCI-DSSv3.2|12.3.7,QCSC-v1|3.2,SWIFT-CSCv1|2.3,TBA-FIISB|44.2.2,TBA-FIISB|49.2.3" see_also : "https://workbench.cisecurity.org/files/1864" rpm : "iptables-0.0.0-0" operator : "gt" required : YES system : "Linux" type : CMD_EXEC description : "3.6.2 Ensure default deny firewall policy - INPUT" info : "A default deny all policy on connections ensures that any unconfigured network usage will be rejected. With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage." solution : "Run the following commands to implement a default DROP policy: # iptables -P INPUT DROP# iptables -P OUTPUT DROP# iptables -P FORWARD DROP" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.6.2,CN-L3|8.1.10.6(j),CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/sbin/iptables --list | /usr/bin/grep \'Chain INPUT\'" expect : "^Chain INPUT \\(policy DROP\\)" system : "Linux" type : CMD_EXEC description : "3.6.2 Ensure default deny firewall policy - OUTPUT" info : "A default deny all policy on connections ensures that any unconfigured network usage will be rejected. With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage." solution : "Run the following commands to implement a default DROP policy: # iptables -P INPUT DROP# iptables -P OUTPUT DROP# iptables -P FORWARD DROP" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.6.2,CN-L3|8.1.10.6(j),CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/sbin/iptables --list | /usr/bin/grep \'Chain OUTPUT\'" expect : "^Chain OUTPUT \\(policy DROP\\)" system : "Linux" type : CMD_EXEC description : "3.6.2 Ensure default deny firewall policy - FORWARD" info : "A default deny all policy on connections ensures that any unconfigured network usage will be rejected. With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage." solution : "Run the following commands to implement a default DROP policy: # iptables -P INPUT DROP# iptables -P OUTPUT DROP# iptables -P FORWARD DROP" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.6.2,CN-L3|8.1.10.6(j),CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/sbin/iptables --list | /bin/grep \'Chain FORWARD\'" expect : "^Chain FORWARD \\(policy DROP\\)" system : "Linux" type : CMD_EXEC description : "3.6.3 Ensure loopback traffic is configured - input" info : "Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8). Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure." solution : "Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT# iptables -A OUTPUT -o lo -j ACCEPT# iptables -A INPUT -s 127.0.0.0/8 -j DROP" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.6.3,CN-L3|8.1.10.6(j),CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/sbin/iptables -L INPUT -v -n | /bin/awk '{ a[$3\":\"$4\":\"$6\":\"$7\":\"$8\":\"$9] = NR; print } END { if (a[\"ACCEPT:all:lo:*:0.0.0.0/0:0.0.0.0/0\"] > 0 && a[\"ACCEPT:all:lo:*:0.0.0.0/0:0.0.0.0/0\"] < a[\"DROP:all:*:*:127.0.0.0/8:0.0.0.0/0\"]) { print \"pass\" } else { print \"fail\" } }'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.6.3 Ensure loopback traffic is configured - output" info : "Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8). Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure." solution : "Run the following commands to implement the loopback rules: # iptables -A INPUT -i lo -j ACCEPT# iptables -A OUTPUT -o lo -j ACCEPT# iptables -A INPUT -s 127.0.0.0/8 -j DROP" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.6.3,CN-L3|8.1.10.6(j),CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/sbin/iptables -L OUTPUT -v -n | /bin/awk '{ a[$3\":\"$4\":\"$6\":\"$7\":\"$8\":\"$9] = NR; print } END { if (a[\"ACCEPT:all:*:lo:0.0.0.0/0:0.0.0.0/0\"] > 0) { print \"pass\" } else { print \"fail\" } }'" expect : "^pass$" system : "Linux" type : CMD_EXEC description : "3.6.4 Ensure outbound and established connections are configured" info : "Configure the firewall rules for new outbound, and established connections. If rules are not in place for new outbound, and established connections all packets will be dropped by the default policy preventing network usage. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "Configure iptables in accordance with site policy. The following commands will implement a policy to allow all outbound connections and all established connections: # iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT # iptables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT # iptables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT# iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT# iptables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT# iptables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|3.6.4,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/sbin/iptables -L -v -n" expect : "" severity : MEDIUM system : "Linux" type : CMD_EXEC description : "3.6.5 Ensure firewall rules exist for all open ports" info : "Any ports that have been opened on non-loopback addresses need firewall rules to govern traffic. Without a firewall rule configured for open ports default firewall policy will drop all packets to these ports. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "For each port identified in the audit which does not have a firewall rule establish a proper rule for accepting inbound connections: # iptables -A INPUT -p --dport -m state --state NEW -j ACCEPT" reference : "800-171|3.13.1,800-53|SC-7(12),CIS_Recommendation|3.6.5,CN-L3|8.1.10.6(j),CSCv6|9.1,CSCv6|9.2,CSF|DE.CM-1,CSF|PR.AC-5,CSF|PR.DS-5,CSF|PR.PT-4,ISO/IEC-27001|A.13.1.3,ITSG-33|SC-7(12),LEVEL|1S,NESA|T4.5.4,NIAv2|AM38,NIAv2|SS13d,NIAv2|SS26,QCSC-v1|5.2.1,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|8.2.1,TBA-FIISB|43.1" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/netstat -ln; /usr/sbin/iptables -L INPUT -v -n" expect : "" severity : MEDIUM system : "Linux" type : CMD_EXEC description : "3.7 Ensure wireless interfaces are disabled" info : "Wireless networking is used when wired networks are unavailable. SUSE 11 contains a wireless tool kit to allow system administrators to configure and use wireless networks. If wireless is not to be used, wireless devices can be disabled to reduce the potential attack surface." solution : "Run the following command to disable any wireless interfaces: # ip link set down Disable any wireless interfaces in your network configuration. Impact: Many if not all laptop workstations and some desktop workstations will connect via wireless requiring these interfaces be enabled." reference : "800-171|3.1.16,800-53|AC-18(3),CIS_Recommendation|3.7,CSCv6|15.8,CSF|PR.PT-4,ITSG-33|AC-18(3),LEVEL|1NS,QCSC-v1|5.2.1,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/sbin/iwconfig | /bin/awk \'{print} END {if (NR == 0) print \"none\"}\'" expect : "none" type : RPM_CHECK description : "Check for rsyslog" rpm : "rsyslog-0.0.0-0" operator : "gt" required : YES system : "Linux" type : CHKCONFIG description : "4.2.1.1 Ensure rsyslog Service is enabled - chkconfig" info : "Once the rsyslog package is installed it needs to be activated. If the rsyslog service is not activated the system may default to the syslogd service or lack logging instead." solution : "Run the following command to enable syslog: # chkconfig syslog on Edit the /etc/sysconfig/syslog file and set SYSLOG_DAEMON is set to \"rsyslogd\": SYSLOG_DAEMON=\"rsyslogd\"" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|4.2.1.1,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|6.2,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "syslog" levels : "2345" status : ON system : "Linux" type : FILE_CONTENT_CHECK description : "4.2.1.1 Ensure rsyslog Service is enabled - /etc/sysconfig/syslog" info : "Once the rsyslog package is installed it needs to be activated. If the rsyslog service is not activated the system may default to the syslogd service or lack logging instead." solution : "Run the following command to enable syslog: # chkconfig syslog on Edit the /etc/sysconfig/syslog file and set SYSLOG_DAEMON is set to \"rsyslogd\": SYSLOG_DAEMON=\"rsyslogd\"" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|4.2.1.1,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSCv6|6.2,CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/sysconfig/syslog" regex : "^[\\s]*SYSLOG_DAEMON[\\s]*=[\\s]*" expect : "^[\\s]*SYSLOG_DAEMON[\\s]*=[\\s]*\"rsyslogd\"" description : "4.2.1.2 Ensure logging is configured" info : "The /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files specifies rules for logging and which files are to be used to log certain classes of messages. NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance." solution : "Edit the following lines in the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files as appropriate for your environment: *.emerg :omusrmsg:* mail.* -/var/log/mail mail.info -/var/log/mail.info mail.warning -/var/log/mail.warn mail.err /var/log/mail.err news.crit -/var/log/news/news.crit news.err -/var/log/news/news.err news.notice -/var/log/news/news.notice *.=warning;*.=err -/var/log/warn *.crit /var/log/warn *.*;mail.none;news.none -/var/log/messages local0,local1.* -/var/log/localmessages local2,local3.* -/var/log/localmessages local4,local5.* -/var/log/localmessages local6,local7.* -/var/log/localmessages Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd" reference : "CSCv6|6.2,LEVEL|1NS,CIS_Recommendation|4.2.1.2" see_also : "https://workbench.cisecurity.org/files/1864" system : "Linux" type : FILE_CONTENT_CHECK description : "4.2.1.3 Ensure rsyslog default file permissions configured" info : "rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files. It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected." solution : "Edit the /etc/rsyslog.conf and set $ob体育CreateMode to 0640 or more restrictive: $ob体育CreateMode 0640" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|4.2.1.3,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/rsyslog.conf" regex : "^\\$ob体育CreateMode" expect : "^\\$ob体育CreateMode 0[246][04]0" system : "Linux" type : CMD_EXEC description : "4.2.1.4 Ensure rsyslog is configured to send logs to a remote log host" info : "The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead." solution : "Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host): *.* @@loghost.example.com Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd" reference : "800-171|3.3.8,800-53|AU-9(2),CIS_Recommendation|4.2.1.4,CN-L3|8.1.3.5(d),CN-L3|8.1.4.3(c),CSCv6|6.6,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.2,ITSG-33|AU-9(2),LEVEL|1S,NESA|M5.2.3,NESA|M5.5.2,NIAv2|SS13e,QCSC-v1|8.2.1,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" # Note: Variable @SYSLOG_SERVER@ replaced with "192\\.168\\.0\\.1" in field "cmd". cmd : "/bin/grep '^\\*\\.\\*[^I][^I]*\\@\\@192\\.168\\.0\\.1' /etc/rsyslog.conf /etc/rsyslog.d/*.conf | /bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "pass" system : "Linux" type : CMD_EXEC description : "4.2.1.5 Ensure remote rsyslog messages are only accepted on designated log hosts - ModLoad" info : "By default, rsyslog does not listen for log messages coming in from remote systems. The ModLoad tells rsyslog to load the imtcp.so module so it can listen over a network via TCP. The InputTCPServerRun option instructs rsyslogd to listen on the specified TCP port. The guidance in the section ensures that remote log hosts are configured to only accept rsyslog data from hosts within the specified domain and that those systems that are not designed to be log hosts do not accept any remote rsyslog messages. This provides protection from spoofed log data and ensures that system administrators are reviewing reasonably complete syslog data in a central location." solution : "For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-comment or add the following lines: $ModLoad imtcp $InputTCPServerRun 514 For hosts that are not designated as log hosts, edit the /etc/rsyslog.conf file and comment or remove the following lines: # $ModLoad imtcp # $InputTCPServerRun 514 Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|4.2.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep '$ModLoad imtcp' /etc/rsyslog.conf /etc/rsyslog.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "pass" system : "Linux" type : CMD_EXEC description : "4.2.1.5 Ensure remote rsyslog messages are only accepted on designated log hosts - InputTCPServerRun" info : "By default, rsyslog does not listen for log messages coming in from remote systems. The ModLoad tells rsyslog to load the imtcp.so module so it can listen over a network via TCP. The InputTCPServerRun option instructs rsyslogd to listen on the specified TCP port. The guidance in the section ensures that remote log hosts are configured to only accept rsyslog data from hosts within the specified domain and that those systems that are not designed to be log hosts do not accept any remote rsyslog messages. This provides protection from spoofed log data and ensures that system administrators are reviewing reasonably complete syslog data in a central location." solution : "For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-comment or add the following lines: $ModLoad imtcp $InputTCPServerRun 514 For hosts that are not designated as log hosts, edit the /etc/rsyslog.conf file and comment or remove the following lines: # $ModLoad imtcp # $InputTCPServerRun 514 Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|4.2.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep '$InputTCPServerRun 514' /etc/rsyslog.conf /etc/rsyslog.d/* |/bin/awk '{print} END {if (NR != 0) print \"pass\" ; else print \"fail\"}'" expect : "pass" description : "4.2.1.1 Ensure rsyslog Service is enabled - chkconfig" info : "Once the rsyslog package is installed it needs to be activated. If the rsyslog service is not activated the system may default to the syslogd service or lack logging instead. NOTE - Nessus has not performed this check. rsyslog does not seem to be installed and this check is not applicable." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|4.2.1.1,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|6.2,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.1.1 Ensure rsyslog Service is enabled - /etc/sysconfig/syslog" info : "Once the rsyslog package is installed it needs to be activated. If the rsyslog service is not activated the system may default to the syslogd service or lack logging instead. NOTE - Nessus has not performed this check. rsyslog does not seem to be installed and this check is not applicable." reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|4.2.1.1,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSCv6|6.2,CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.1.2 Ensure logging is configured" info : "The /etc/rsyslog.conf file specifies rules for logging and which files are to be used to log certain classes of messages. A great deal of important security-related information is sent via rsyslog (e.g., successful and failed su attempts, failed login attempts, root login attempts, etc.). NOTE - Nessus has not performed this check. rsyslog does not seem to be installed and this check is not applicable." solution : "Edit the following lines in the /etc/rsyslog.conf file as appropriate for yourenvironment: *.emerg :omusrmsg:*mail.* -/var/log/mailmail.info -/var/log/mail.infomail.warning -/var/log/mail.warnmail.err /var/log/mail.errnews.crit -/var/log/news/news.critnews.err -/var/log/news/news.errnews.notice -/var/log/news/news.notice*.=warning;*.=err -/var/log/warn*.crit /var/log/warn*.*;mail.none;news.none -/var/log/messageslocal0,local1.* -/var/log/localmessageslocal2,local3.* -/var/log/localmessageslocal4,local5.* -/var/log/localmessageslocal6,local7.* -/var/log/localmessages Run the following command to restart rsyslogd: # pkill -HUP rsyslogd" reference : "LEVEL|1NS,CIS_Recommendation|4.2.1.2" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.1.3 Ensure rsyslog default file permissions configured" info : "rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files. It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected. NOTE - Nessus has not performed this check. rsyslog does not seem to be installed and this check is not applicable." solution : "Edit the /etc/rsyslog.conf and set $ob体育CreateMode to 0640 or more restrictive: $ob体育CreateMode 0640" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|4.2.1.3,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.1.4 Ensure rsyslog is configured to send logs to a remote log host" info : "The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead. Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system NOTE - Nessus has not performed this check. rsyslog does not seem to be installed and this check is not applicable." solution : "Edit the /etc/rsyslog.conf file and add the following line (where loghost.example.com is the name of your central log host). *.* @@loghost.example.com Run the following command to restart rsyslog: # pkill -HUP rsyslogd" reference : "800-171|3.3.8,800-53|AU-9(2),CIS_Recommendation|4.2.1.4,CN-L3|8.1.3.5(d),CN-L3|8.1.4.3(c),CSCv6|6.6,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.2,ITSG-33|AU-9(2),LEVEL|1S,NESA|M5.2.3,NESA|M5.5.2,NIAv2|SS13e,QCSC-v1|8.2.1,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.1.5 Ensure remote rsyslog messages are only accepted on designated log hosts - ModLoad" info : "By default, rsyslog does not listen for log messages coming in from remote systems. The ModLoad tells rsyslog to load the imtcp.so module so it can listen over a network via TCP. The InputTCPServerRun option instructs rsyslogd to listen on the specified TCP port. The guidance in the section ensures that remote log hosts are configured to only accept rsyslog data from hosts within the specified domain and that those systems that are not designed to be log hosts do not accept any remote rsyslog messages. This provides protection from spoofed log data and ensures that system administrators are reviewing reasonably complete syslog data in a central location." solution : "For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-comment or add the following lines: $ModLoad imtcp $InputTCPServerRun 514 For hosts that are not designated as log hosts, edit the /etc/rsyslog.conf file and comment or remove the following lines: # $ModLoad imtcp # $InputTCPServerRun 514 Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|4.2.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.1.5 Ensure remote rsyslog messages are only accepted on designated log hosts - InputTCPServerRun" info : "By default, rsyslog does not listen for log messages coming in from remote systems. The ModLoad tells rsyslog to load the imtcp.so module so it can listen over a network via TCP. The InputTCPServerRun option instructs rsyslogd to listen on the specified TCP port. The guidance in the section ensures that remote log hosts are configured to only accept rsyslog data from hosts within the specified domain and that those systems that are not designed to be log hosts do not accept any remote rsyslog messages. This provides protection from spoofed log data and ensures that system administrators are reviewing reasonably complete syslog data in a central location." solution : "For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-comment or add the following lines: $ModLoad imtcp $InputTCPServerRun 514 For hosts that are not designated as log hosts, edit the /etc/rsyslog.conf file and comment or remove the following lines: # $ModLoad imtcp # $InputTCPServerRun 514 Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIS_Recommendation|4.2.1.5,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSCv6|9.1,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1NS,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" type : RPM_CHECK description : "Check for syslog-ng" rpm : "syslog-ng-0.0.0-0" operator : "gt" required : YES system : "Linux" type : CHKCONFIG description : "4.2.2.1 Ensure syslog-ng service is enabled" info : "Once the syslog-ng package is installed it needs to be activated. If the syslog-ng service is not activated the system may default to the syslogd service or lack logging instead." solution : "Run the following command to enable syslog: # chkconfig syslog on Edit the /etc/sysconfig/syslog file and set SYSLOG_DAEMON is set to 'syslog-ng': SYSLOG_DAEMON='syslog-ng'" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|4.2.2.1,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "syslog" levels : "2345" status : ON description : "4.2.2.2 Ensure logging is configured" info : "The /etc/syslog-ng/syslog-ng.conf file specifies rules for logging and which files are to be used to log certain classes of messages. NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance." solution : "Edit the log lines in the /etc/syslog-ng/syslog-ng.conf file as appropriate for your environment: log { source(src); source(chroots); filter(f_console); destination(console); }; log { source(src); source(chroots); filter(f_console); destination(xconsole); }; log { source(src); source(chroots); filter(f_newscrit); destination(newscrit); }; log { source(src); source(chroots); filter(f_newserr); destination(newserr); }; log { source(src); source(chroots); filter(f_newsnotice); destination(newsnotice); }; log { source(src); source(chroots); filter(f_mailinfo); destination(mailinfo); }; log { source(src); source(chroots); filter(f_mailwarn); destination(mailwarn); }; log { source(src); source(chroots); filter(f_mailerr); destination(mailerr); }; log { source(src); source(chroots); filter(f_mail); destination(mail); }; log { source(src); source(chroots); filter(f_acpid); destination(acpid); flags(final); }; log { source(src); source(chroots); filter(f_acpid_full); destination(devnull); flags(final); }; log { source(src); source(chroots); filter(f_acpid_old); destination(acpid); flags(final); }; log { source(src); source(chroots); filter(f_netmgm); destination(netmgm); flags(final); }; log { source(src); source(chroots); filter(f_local); destination(localmessages); }; log { source(src); source(chroots); filter(f_messages); destination(messages); }; log { source(src); source(chroots); filter(f_iptables); destination(firewall); }; log { source(src); source(chroots); filter(f_warn); destination(warn); }; Run the following command to reload the syslog-ng configuration: # pkill -HUP syslog-ng" reference : "CSCv6|6.2,LEVEL|1NS,CIS_Recommendation|4.2.2.2" see_also : "https://workbench.cisecurity.org/files/1864" system : "Linux" type : FILE_CONTENT_CHECK description : "4.2.2.3 Ensure syslog-ng default file permissions configured" info : "syslog-ng will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files. It is important to ensure that log files exist and have the correct permissions to ensure that sensitive syslog-ng data is archived and protected." solution : "Edit the /etc/syslog-ng/syslog-ng.conf and set perm option to 0640 or more restrictive: options { chain_hostnames(off); flush_lines(0); perm(0640); stats_freq(3600); threaded(yes); };" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|4.2.2.3,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/syslog-ng/syslog-ng.conf" regex : "perm\\(0[246][04]0\\);" expect : "perm\\(0[246][04]0\\);" system : "Linux" type : FILE_CONTENT_CHECK description : "4.2.2.4 Ensure syslog-ng is configured to send logs to a remote log host" info : "The syslog-ng utility supports the ability to send logs it gathers to a remote log host or to receive messages from remote hosts, reducing administrative overhead." solution : "Edit the /etc/syslog-ng/syslog-ng.conf file and add the following lines (where logfile.example.com is the name of your central log host). destination logserver { tcp(\"logfile.example.com\" port(514)); }; log { source(src); destination(logserver); }; Run the following command to reload the syslog-ng configuration: # pkill -HUP syslog-ng" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|4.2.2.4,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSCv6|6.6,CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1NS,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/syslog-ng/syslog-ng.conf" regex : "^[\\s]*destination logserver.*" expect : "^[\\s]*destination logserver.*(udp|tcp).* port.*" system : "Linux" type : CMD_EXEC description : "4.2.2.5 Ensure remote syslog-ng messages are only accepted on designated log hosts" info : "By default, syslog-ng does not listen for log messages coming in from remote systems. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "On designated log hosts edit the /etc/syslog-ng/syslog-ng.conf file and configure the following lines are appropriately: source net{ tcp(); }; destination remote { file(\"/var/log/remote/${FULLHOST}-log\"); }; log { source(net); destination(remote); }; On non designated log hosts edit the /etc/syslog-ng/syslog-ng.conf file and remove or edit any sources that accept network sourced log messages. Run the following command to reload the syslog-ng configuration: # pkill -HUP syslog-ng" reference : "800-171|3.3.8,800-53|AU-9(2),CIS_Recommendation|4.2.2.5,CN-L3|8.1.3.5(d),CN-L3|8.1.4.3(c),CSCv6|9.1,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.2,ITSG-33|AU-9(2),LEVEL|1NS,NESA|M5.2.3,NESA|M5.5.2,NIAv2|SS13e,QCSC-v1|8.2.1,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -E \'\^source net\' /etc/syslog-ng/syslog-ng.conf;/bin/grep -E \'\^destination remote\' /etc/syslog-ng/syslog-ng.conf;/bin/grep -E \'\^log\' /etc/syslog-ng/syslog-ng.conf" expect : "" severity : MEDIUM description : "4.2.2.1 Ensure syslog-ng service is enabled" info : "Once the syslog-ng package is installed it needs to be activated. If the syslog-ng service is not activated the system may default to the syslogd service or lack logging instead. NOTE - Nessus has not performed this check. syslog-ng does not seem to be installed and this check is not applicable." solution : "Run the following command to enable syslog: # chkconfig syslog on Edit the /etc/sysconfig/syslog file and set SYSLOG_DAEMON is set to 'syslog-ng': SYSLOG_DAEMON='syslog-ng'" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|4.2.2.1,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.2.2 Ensure logging is configured" info : "The /etc/syslog-ng/syslog-ng.conf file specifies rules for logging and which files are to be used to log certain classes of messages. NOTE - Nessus has not performed this check. syslog-ng does not seem to be installed and this check is not applicable." solution : "Edit the log lines in the /etc/syslog-ng/syslog-ng.conf file as appropriate for your environment: log { source(src); source(chroots); filter(f_console); destination(console); }; log { source(src); source(chroots); filter(f_console); destination(xconsole); }; log { source(src); source(chroots); filter(f_newscrit); destination(newscrit); }; log { source(src); source(chroots); filter(f_newserr); destination(newserr); }; log { source(src); source(chroots); filter(f_newsnotice); destination(newsnotice); }; log { source(src); source(chroots); filter(f_mailinfo); destination(mailinfo); }; log { source(src); source(chroots); filter(f_mailwarn); destination(mailwarn); }; log { source(src); source(chroots); filter(f_mailerr); destination(mailerr); }; log { source(src); source(chroots); filter(f_mail); destination(mail); }; log { source(src); source(chroots); filter(f_acpid); destination(acpid); flags(final); }; log { source(src); source(chroots); filter(f_acpid_full); destination(devnull); flags(final); }; log { source(src); source(chroots); filter(f_acpid_old); destination(acpid); flags(final); }; log { source(src); source(chroots); filter(f_netmgm); destination(netmgm); flags(final); }; log { source(src); source(chroots); filter(f_local); destination(localmessages); }; log { source(src); source(chroots); filter(f_messages); destination(messages); }; log { source(src); source(chroots); filter(f_iptables); destination(firewall); }; log { source(src); source(chroots); filter(f_warn); destination(warn); }; Run the following command to reload the syslog-ng configuration: # pkill -HUP syslog-ng" reference : "CSCv6|6.2,LEVEL|1NS,CIS_Recommendation|4.2.2.2" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.2.3 Ensure syslog-ng default file permissions configured" info : "syslog-ng will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files. It is important to ensure that log files exist and have the correct permissions to ensure that sensitive syslog-ng data is archived and protected. NOTE - Nessus has not performed this check. syslog-ng does not seem to be installed and this check is not applicable." solution : "Edit the /etc/syslog-ng/syslog-ng.conf and set perm option to 0640 or more restrictive: options { chain_hostnames(off); flush_lines(0); perm(0640); stats_freq(3600); threaded(yes); };" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|4.2.2.3,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.2.4 Ensure syslog-ng is configured to send logs to a remote log host" info : "The syslog-ng utility supports the ability to send logs it gathers to a remote log host or to receive messages from remote hosts, reducing administrative overhead. NOTE - Nessus has not performed this check. syslog-ng does not seem to be installed and this check is not applicable." solution : "Edit the /etc/syslog-ng/syslog-ng.conf file and add the following lines (where logfile.example.com is the name of your central log host). destination logserver { tcp(\"logfile.example.com\" port(514)); }; log { source(src); destination(logserver); }; Run the following command to reload the syslog-ng configuration: # pkill -HUP syslog-ng" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|4.2.2.4,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSCv6|6.6,CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1NS,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.2.5 Ensure remote syslog-ng messages are only accepted on designated log hosts" info : "By default, syslog-ng does not listen for log messages coming in from remote systems. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "On designated log hosts edit the /etc/syslog-ng/syslog-ng.conf file and configure the following lines are appropriately: source net{ tcp(); }; destination remote { file(\"/var/log/remote/${FULLHOST}-log\"); }; log { source(net); destination(remote); }; On non designated log hosts edit the /etc/syslog-ng/syslog-ng.conf file and remove or edit any sources that accept network sourced log messages. Run the following command to reload the syslog-ng configuration: # pkill -HUP syslog-ng" reference : "800-171|3.3.8,800-53|AU-9(2),CIS_Recommendation|4.2.2.5,CN-L3|8.1.3.5(d),CN-L3|8.1.4.3(c),CSCv6|9.1,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.2,ITSG-33|AU-9(2),LEVEL|1NS,NESA|M5.2.3,NESA|M5.5.2,NIAv2|SS13e,QCSC-v1|8.2.1,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" type : RPM_CHECK description : "Check for rsyslog" rpm : "rsyslog-0.0.0-0" operator : "gt" required : YES type : RPM_CHECK description : "Check for syslog-ng" rpm : "syslog-ng-0.0.0-0" operator : "gt" required : YES description : "4.2.3 Ensure rsyslog or syslog-ng is installed" info : "The rsyslog and syslog-ng software are recommended replacements to the original syslogd daemon which provide improvements over syslogd, such as 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. The security enhancements of rsyslog and syslog-ng such as 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) justify installing and configuring the package." solution : "Install rsyslog or syslog-ng using one of the following commands: # zypper install rsyslog # zypper install syslog-ng" reference : "LEVEL|1S,CIS_Recommendation|4.2.3" see_also : "https://workbench.cisecurity.org/files/1864" description : "4.2.3 Ensure rsyslog or syslog-ng is installed" info : "The rsyslog and syslog-ng software are recommended replacements to the original syslogd daemon which provide improvements over syslogd, such as 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. The security enhancements of rsyslog and syslog-ng such as 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) justify installing and configuring the package. NOTE - rsyslog or syslog-ng does not appear to be installed." solution : "Install rsyslog or syslog-ng using one of the following commands: # zypper install rsyslog # zypper install syslog-ng" reference : "LEVEL|1S,CIS_Recommendation|4.2.3" see_also : "https://workbench.cisecurity.org/files/1864" system : "Linux" type : CMD_EXEC description : "4.2.4 Ensure permissions on all logfiles are configured" info : "Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well. It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected." solution : "Run the following command to set permissions on all existing log files: # find /var/log -type f -exec chmod g-wx,o-rwx {} +" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|4.2.4,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "OUTPUT=$(ls -l /var/log); /usr/bin/find /var/log -type f -perm /g+wx,o+rwx -ls | /bin/awk -v awkvar=\"${OUTPUT}\" '{print} END {if (NR == 0) print awkvar \"\\npass\" ; else print \"fail\"}'" expect : "^pass$" description : "4.3 Ensure logrotate is configured" info : "The system includes the capability of rotating log files regularly to avoid filling up the system with logs or making the logs unmanageable large. The file /etc/logrotate.d/syslog is the configuration file used to rotate log files created by syslog or rsyslog. By keeping the log files smaller and more manageable, a system administrator can easily archive these files to another system and spend less time looking through inordinately large log files. NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance." solution : "Edit /etc/logrotate.conf and /etc/logrotate.d/* to ensure logs are rotated according to site policy. Notes: If no maxage setting is set for logrotate a situation can occur where logrotate is interrupted and fails to delete rotated logfiles. It is recommended to set this to a value greater than the longest any log file should exist on your system to ensure that any such logfile is removed but standard rotation settings are not overridden." reference : "CSCv6|6.3,LEVEL|1NS,CIS_Recommendation|4.3" see_also : "https://workbench.cisecurity.org/files/1864" system : "Linux" type : CHKCONFIG description : "5.1.1 Ensure cron daemon is enabled" info : "The cron daemon is used to execute batch jobs on the system. While there may not be user jobs that need to be run on the system, the system does have maintenance jobs that may include security monitoring that have to run, and cron is used to execute them." solution : "Run the following command to enable cron: # chkconfig cron on" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.1.1,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" service : "cron" levels : "2345" status : ON system : "Linux" type : FILE_CHECK description : "5.1.2 Ensure permissions on /etc/crontab are configured" info : "The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file. This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access." solution : "Run the following commands to set ownership and permissions on /etc/crontab: # chown root:root /etc/crontab# chmod og-rwx /etc/crontab" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.1.2,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/crontab" owner : "root" mask : "077" group : "root" system : "Linux" type : FILE_CHECK description : "5.1.3 Ensure permissions on /etc/cron.hourly are configured" info : "This directory contains system cron jobs that need to run on an hourly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory." solution : "Run the following commands to set ownership and permissions on /etc/cron.hourly : # chown root:root /etc/cron.hourly # chmod og-rwx /etc/cron.hourly" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.1.3,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|5.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/cron.hourly" owner : "root" mask : "077" group : "root" system : "Linux" type : FILE_CHECK description : "5.1.4 Ensure permissions on /etc/cron.daily are configured" info : "The /etc/cron.daily directory contains system cron jobs that need to run on a daily basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory." solution : "Run the following commands to set ownership and permissions on /etc/cron.daily : # chown root:root /etc/cron.daily # chmod og-rwx /etc/cron.daily" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.1.4,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|5.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/cron.daily" owner : "root" mask : "077" group : "root" system : "Linux" type : FILE_CHECK description : "5.1.5 Ensure permissions on /etc/cron.weekly are configured" info : "The /etc/cron.weekly directory contains system cron jobs that need to run on a weekly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory." solution : "Run the following commands to set ownership and permissions on /etc/cron.weekly : # chown root:root /etc/cron.weekly # chmod og-rwx /etc/cron.weekly" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.1.5,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|5.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/cron.weekly" owner : "root" mask : "077" group : "root" system : "Linux" type : FILE_CHECK description : "5.1.6 Ensure permissions on /etc/cron.monthly are configured" info : "The /etc/cron.monthly directory contains system cron jobs that need to run on a monthly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory." solution : "Run the following commands to set ownership and permissions on /etc/cron.monthly : # chown root:root /etc/cron.monthly # chmod og-rwx /etc/cron.monthly" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.1.6,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|5.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/cron.monthly" owner : "root" mask : "077" group : "root" system : "Linux" type : FILE_CHECK description : "5.1.7 Ensure permissions on /etc/cron.d are configured" info : "The /etc/cron.d directory contains system cron jobs that need to run in a similar manner to the hourly, daily weekly and monthly jobs from /etc/crontab , but require more granular control as to when they run. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory." solution : "Run the following commands to set ownership and permissions on /etc/cron.d : # chown root:root /etc/cron.d # chmod og-rwx /etc/cron.d" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.1.7,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|5.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/cron.d" owner : "root" mask : "077" group : "root" system : "Linux" type : FILE_CHECK description : "5.1.8 Ensure at/cron is restricted to authorized users - at.allow" info : "Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs. On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files." solution : "Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: # rm /etc/cron.deny# rm /etc/at.deny# touch /etc/cron.allow# touch /etc/at.allow# chmod og-rwx /etc/cron.allow# chmod og-rwx /etc/at.allow# chown root:root /etc/cron.allow# chown root:root /etc/at.allow" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|5.1.8,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/at.allow" owner : "root" mask : "177" group : "root" system : "Linux" type : FILE_CHECK description : "5.1.8 Ensure at/cron is restricted to authorized users - cron.allow" info : "Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs. On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files." solution : "Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: # rm /etc/cron.deny# rm /etc/at.deny# touch /etc/cron.allow# touch /etc/at.allow# chmod og-rwx /etc/cron.allow# chmod og-rwx /etc/at.allow# chown root:root /etc/cron.allow# chown root:root /etc/at.allow" reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|5.1.8,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|3.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/cron.allow" owner : "root" mask : "177" group : "root" system : "Linux" type : FILE_CHECK_NOT description : "5.1.8 Ensure at/cron is restricted to authorized users - cron.deny" info : "Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs. On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files." solution : "Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: # rm /etc/cron.deny# rm /etc/at.deny# touch /etc/cron.allow# touch /etc/at.allow# chmod og-rwx /etc/cron.allow# chmod og-rwx /etc/at.allow# chown root:root /etc/cron.allow# chown root:root /etc/at.allow" reference : "800-171|3.1.7,800-53|AC-6(10),CIP|007-6-R1,CIS_Recommendation|5.1.8,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|9.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/cron.deny" system : "Linux" type : FILE_CHECK_NOT description : "5.1.8 Ensure at/cron is restricted to authorized users - at.deny" info : "Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. Any user not specifically defined in those files is allowed to use at and cron. By removing the files, only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs. On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files." solution : "Run the following commands to remove /etc/cron.deny and /etc/at.deny and create and set permissions and ownership for /etc/cron.allow and /etc/at.allow: # rm /etc/cron.deny# rm /etc/at.deny# touch /etc/cron.allow# touch /etc/at.allow# chmod og-rwx /etc/cron.allow# chmod og-rwx /etc/at.allow# chown root:root /etc/cron.allow# chown root:root /etc/at.allow" reference : "800-171|3.1.7,800-53|AC-6(10),CIP|007-6-R1,CIS_Recommendation|5.1.8,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|9.1,CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,PCI-DSSv3.1|2.2.2,PCI-DSSv3.1|2.2.3,PCI-DSSv3.2|2.2.2,PCI-DSSv3.2|2.2.3,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/at.deny" system : "Linux" type : FILE_CHECK description : "5.2.1 Ensure permissions on /etc/ssh/sshd_config are configured" info : "The /etc/ssh/sshd_config file contains configuration specifications for sshd. The command below sets the owner and group of the file to root." solution : "Run the following commands to set ownership and permissions on /etc/ssh/sshd_config: # chown root:root /etc/ssh/sshd_config # chmod og-rwx /etc/ssh/sshd_config" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.2.1,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|5.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" owner : "root" mask : "177" group : "root" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.2 Ensure SSH Protocol is set to 2" info : "SSH supports two different and incompatible protocols: SSH1 and SSH2. SSH1 was the original protocol and was subject to security issues. SSH2 is more advanced and secure. SSH v1 suffers from insecurities that do not affect SSH v2." solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Protocol 2" reference : "800-171|3.4.6,800-171|3.4.7,800-53|CM-7b.,CIP|007-6-R1,CIS_Recommendation|5.2.2,CN-L3|7.1.3.5(c),CN-L3|7.1.3.7(d),CN-L3|8.1.4.4(b),CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7a.,LEVEL|1S,NIAv2|SS13b,NIAv2|SS14a,NIAv2|SS14c,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*Protocol[\\s]" expect : "^[\\s]*Protocol[\\s]+2[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.3 Ensure SSH LogLevel is set to INFO" info : "The INFO parameter specifies that login and logout activity will be logged. SSH provides several logging levels with varying amounts of verbosity. DEBUG is specifically not recommended other than strictly for debugging SSH communications since it provides so much data that it is difficult to identify important security information. INFO level is the basic level that only records login activity of SSH users. In many situations, such as Incident Response, it is important to determine when a particular user was active on a system. The logout record can eliminate those users who disconnected, which helps narrow the field." solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LogLevel INFO" reference : "800-171|3.3.1,800-171|3.3.2,800-53|AU-12c.,CIS_Recommendation|5.2.3,CN-L3|7.1.3.3(a),CN-L3|7.1.3.3(b),CN-L3|7.1.3.3(c),CN-L3|8.1.3.5(a),CN-L3|8.1.3.5(b),CN-L3|8.1.4.3(a),CSF|DE.CM-1,CSF|DE.CM-3,CSF|DE.CM-7,CSF|PR.PT-1,ISO/IEC-27001|A.12.4.1,ITSG-33|AU-12c.,LEVEL|1S,NESA|T3.6.2,NESA|T3.6.5,NESA|T3.6.6,NIAv2|SM8,QCSC-v1|3.2,QCSC-v1|6.2,QCSC-v1|8.2.1,QCSC-v1|13.2,SWIFT-CSCv1|6.4,TBA-FIISB|45.1.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*LogLevel[\\s]" expect : "^[\\s]*LogLevel[\\s]+INFO[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.4 Ensure SSH X11 forwarding is disabled" info : "The X11Forwarding parameter provides the ability to tunnel X11 traffic through the connection to enable remote graphic connections. Disable X11 forwarding unless there is an operational requirement to use X11 applications directly. There is a small risk that the remote X11 servers of users who are logged in via SSH with X11 forwarding could be compromised by other users on the X11 server. Note that even if X11 forwarding is disabled, users can always install their own forwarders." solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: X11Forwarding no" reference : "800-171|3.4.2,800-53|CM-6b.,CIP|007-6-R1,CIS_Recommendation|5.2.4,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*X11Forwarding[\\s]" expect : "^[\\s]*X11Forwarding[\\s]+no[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.5 Ensure SSH MaxAuthTries is set to 3 or less" info : "The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure. Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy." solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: MaxAuthTries 4" reference : "800-171|3.1.8,800-53|AC-7a.,CIS_Recommendation|5.2.5,CN-L3|8.1.4.1(b),CSCv6|16.7,ITSG-33|AC-7a.,LEVEL|1S,NESA|T5.5.1,NIAv2|AM24,TBA-FIISB|45.1.2,TBA-FIISB|45.2.1,TBA-FIISB|45.2.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*MaxAuthTries[\\s]" expect : "^[\\s]*MaxAuthTries[\\s]+[1-3][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.6 Ensure SSH IgnoreRhosts is enabled" info : "The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication. Setting this parameter forces users to enter a password when authenticating with ssh." solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: IgnoreRhosts yes" reference : "800-171|3.5.2,800-53|AC-14a.,800-53|IA-5.,CIS_Recommendation|5.2.6,CSF|PR.AC-1,ITSG-33|AC-14a.,ITSG-33|IA-5,LEVEL|1S,NESA|T5.2.3,NESA|T5.6.1,QCSC-v1|5.2.2,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*IgnoreRhosts[\\s]" expect : "^[\\s]*IgnoreRhosts[\\s]+yes[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.7 Ensure SSH HostbasedAuthentication is disabled" info : "The HostbasedAuthentication parameter specifies if authentication is allowed through trusted hosts via the user of .rhosts, or /etc/hosts.equiv, along with successful public key client host authentication. This option only applies to SSH Protocol Version 2. Even though the .rhosts files are ineffective if support is disabled in /etc/pam.conf, disabling the ability to use .rhosts files in SSH provides an additional layer of protection ." solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: HostbasedAuthentication no" reference : "800-171|3.5.2,800-53|AC-14a.,800-53|IA-5.,CIS_Recommendation|5.2.7,CSF|PR.AC-1,ITSG-33|AC-14a.,ITSG-33|IA-5,LEVEL|1S,NESA|T5.2.3,NESA|T5.6.1,QCSC-v1|5.2.2,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*HostbasedAuthentication[\\s]" expect : "^[\\s]*HostbasedAuthentication[\\s]+no[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.8 Ensure SSH root login is disabled" info : "The PermitRootLogin parameter specifies if the root user can log in using ssh(1). The default is no. Disallowing root logins over SSH requires system admins to authenticate using their own individual account, then escalating to root via sudo or su. This in turn limits opportunity for non-repudiation and provides a clear audit trail in the event of a security incident" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitRootLogin no" reference : "800-171|3.1.2,800-171|3.1.15,800-53|AC-17(4),CIS_Recommendation|5.2.8,CN-L3|8.1.4.4(c),CN-L3|8.1.10.6(i),CSF|PR.AC-3,CSF|PR.PT-4,ISO/IEC-27001|A.6.2.2,ITSG-33|AC-17(4),LEVEL|1S,NESA|T5.4.5,QCSC-v1|3.2,QCSC-v1|5.2.1,QCSC-v1|5.2.2,SWIFT-CSCv1|5.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*PermitRootLogin[\\s]" expect : "^[\\s]*PermitRootLogin[\\s]+no[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.9 Ensure SSH PermitEmptyPasswords is disabled" info : "The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings. Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no" reference : "800-171|3.5.2,800-53|IA-5.,CIS_Recommendation|5.2.9,CSF|PR.AC-1,ITSG-33|IA-5,LEVEL|1S,NESA|T5.2.3,QCSC-v1|5.2.2,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*PermitEmptyPasswords[\\s]" expect : "^[\\s]*PermitEmptyPasswords[\\s]+no[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.10 Ensure SSH PermitUserEnvironment is disabled" info : "The PermitUserEnvironment option allows users to present environment options to the ssh daemon. Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has ssh executing trojan'd programs)" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitUserEnvironment no" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|5.2.10,CN-L3|8.1.10.6(d),CSCv6|16,CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*PermitUserEnvironment[\\s]" expect : "^[\\s]*PermitUserEnvironment[\\s]+no[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.11 Ensure only approved MAC algorithms are used" info : "This variable limits the types of MAC algorithms that SSH can use during communication. MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information" solution : "Edit the /etc/ssh/sshd_config file to set the parameter in accordance with site policy. The following includes all supported and accepted MACs: MACs hmac-sha2-512,hmac-sha2-256" reference : "800-171|3.13.11,800-53|SC-13.,CIS_Recommendation|5.2.11,CSCv6|3.4,CSF|PR.DS-5,ISO/IEC-27001|A.10.1.1,ITSG-33|SC-13,ITSG-33|SC-13a.,LEVEL|1S,NESA|M5.2.6,NESA|T7.4.1,NIAv2|CY3,NIAv2|CY4,NIAv2|CY5b,NIAv2|CY5c,NIAv2|CY5d,NIAv2|CY7,NIAv2|NS5e,QCSC-v1|6.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*MACs[\\s]" expect : "^[\\s]*MACs[\\s](?=.*hmac-sha2-512)(?=.*hmac-sha2-256).*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.12 Ensure SSH Idle Timeout Interval is configured - ClientAliveInterval" info : "The two options ClientAliveInterval and ClientAliveCountMax control the timeout of ssh sessions. When the ClientAliveInterval variable is set, ssh sessions that have no activity for the specified length of time are terminated. When the ClientAliveCountMax variable is set, sshd will send client alive messages at every ClientAliveInterval interval. When the number of consecutive client alive messages are sent with no response from the client, the ssh session is terminated. For example, if the ClientAliveInterval is set to 15 seconds and the ClientAliveCountMax is set to 3, the client ssh session will be terminated after 45 seconds of idle time. Having no timeout value associated with a connection could allow an unauthorized user access to another user's ssh session (e.g. user walks away from their computer and doesn't lock the screen). Setting a timeout value at least reduces the risk of this happening.. While the recommended setting is 300 seconds (5 minutes), set this timeout value based on site policy. The recommended setting for ClientAliveCountMax is 0. In this case, the client session will be terminated after 5 minutes of idle time and no keepalive messages will be sent." solution : "Edit the /etc/ssh/sshd_config file to set the parameters as follows: ClientAliveInterval 300ClientAliveCountMax 0" reference : "800-171|3.1.11,800-53|AC-12.,CIS_Recommendation|5.2.12,CN-L3|7.1.2.2(d),CN-L3|7.1.3.7(b),CN-L3|8.1.4.1(b),CSCv6|16.4,HIPAA|164.312(a)(2)(iii),ITSG-33|AC-12,LEVEL|1S,NIAv2|NS49,PCI-DSSv3.1|8.1.8,PCI-DSSv3.1|12.3.8,PCI-DSSv3.2|8.1.8,PCI-DSSv3.2|12.3.8" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*ClientAliveInterval[\\s]" expect : "^[\\s]*ClientAliveInterval[\\s]+([1-9]|[1-8][0-9]|9[0-9]|[12][0-9]{2}|300)[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.12 Ensure SSH Idle Timeout Interval is configured - ClientAliveCountMax" info : "The two options ClientAliveInterval and ClientAliveCountMax control the timeout of ssh sessions. When the ClientAliveInterval variable is set, ssh sessions that have no activity for the specified length of time are terminated. When the ClientAliveCountMax variable is set, sshd will send client alive messages at every ClientAliveInterval interval. When the number of consecutive client alive messages are sent with no response from the client, the ssh session is terminated. For example, if the ClientAliveInterval is set to 15 seconds and the ClientAliveCountMax is set to 3, the client ssh session will be terminated after 45 seconds of idle time. Having no timeout value associated with a connection could allow an unauthorized user access to another user's ssh session (e.g. user walks away from their computer and doesn't lock the screen). Setting a timeout value at least reduces the risk of this happening.. While the recommended setting is 300 seconds (5 minutes), set this timeout value based on site policy. The recommended setting for ClientAliveCountMax is 0. In this case, the client session will be terminated after 5 minutes of idle time and no keepalive messages will be sent." solution : "Edit the /etc/ssh/sshd_config file to set the parameters as follows: ClientAliveInterval 300ClientAliveCountMax 0" reference : "800-171|3.1.11,800-53|AC-12.,CIS_Recommendation|5.2.12,CN-L3|7.1.2.2(d),CN-L3|7.1.3.7(b),CN-L3|8.1.4.1(b),CSCv6|16.4,HIPAA|164.312(a)(2)(iii),ITSG-33|AC-12,LEVEL|1S,NIAv2|NS49,PCI-DSSv3.1|8.1.8,PCI-DSSv3.1|12.3.8,PCI-DSSv3.2|8.1.8,PCI-DSSv3.2|12.3.8" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*ClientAliveCountMax[\\s]" expect : "^[\\s]*ClientAliveCountMax[\\s]+[0-3][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.13 Ensure SSH LoginGraceTime is set to one minute or less" info : "The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access. Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy." solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: LoginGraceTime 60" reference : "800-171|3.1.11,800-53|AC-12.,CIS_Recommendation|5.2.13,CN-L3|7.1.2.2(d),CN-L3|7.1.3.7(b),CN-L3|8.1.4.1(b),CSCv6|16.4,HIPAA|164.312(a)(2)(iii),ITSG-33|AC-12,LEVEL|1S,NIAv2|NS49,PCI-DSSv3.1|8.1.8,PCI-DSSv3.1|12.3.8,PCI-DSSv3.2|8.1.8,PCI-DSSv3.2|12.3.8" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*LoginGraceTime[\\s]" expect : "^[\\s]*LoginGraceTime[\\s]+([1-9]|[1-5][0-9]|60)[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.14 Ensure SSH access is limited" info : "There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged: AllowUsers The AllowUsers variable gives the system administrator the option of allowing specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by only allowing the allowed users to log in from a particular host, the entry can be specified in the form of user@host. AllowGroups The AllowGroups variable gives the system administrator the option of allowing specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable. DenyUsers The DenyUsers variable gives the system administrator the option of denying specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by specifically denying a user's access from a particular host, the entry can be specified in the form of user@host. DenyGroups The DenyGroups variable gives the system administrator the option of denying specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable. Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system." solution : "Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows: AllowUsers AllowGroups DenyUsers DenyGroups " reference : "800-171|3.1.5,800-53|AC-6(7)(b),CIS_Recommendation|5.2.14,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|5.1,CSCv6|5.8,CSF|PR.AC-4,ISO/IEC-27001|A.9.2.5,ITSG-33|AC-6,LEVEL|1S,NESA|M1.1.3,NESA|T5.1.1,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*(Allow|Deny)(Users|Groups)[\\s]" expect : "^[\\s]*(Allow|Deny)(Users|Groups)[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "5.2.15 Ensure SSH warning banner is configured" info : "The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed. Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system." solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: Banner /etc/issue.net" reference : "800-171|3.1.9,800-53|AC-8a.,CIS_Recommendation|5.2.15,ITSG-33|AC-8a.,LEVEL|1S,NESA|M5.2.5,NESA|T5.5.1,NIAv2|AM10a,NIAv2|AM10b,NIAv2|AM10c,NIAv2|AM10d,NIAv2|AM10e,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/ssh/sshd_config" regex : "^[\\s]*Banner[\\s]" expect : "^[\\s]*Banner[\\s]+/etc/issue\\.net[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.1 Ensure password creation requirements are configured - minlen" info : "The pam_cracklib.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_cracklib.so options. try_first_pass - retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password. retry=3 - Allow 3 tries before sending back a failure. minlen=14 - password must be 14 characters or more dcredit=-1 - provide at least one digit ucredit=-1 - provide at least one uppercase character ocredit=-1 - provide at least one special character lcredit=-1 - provide at least one lowercase character The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies. Strong passwords protect systems from being hacked through brute force methods." solution : "Edit the /etc/pam.d/common-password file to include the appropriate options for pam_cracklib.so and to conform to site policy: password requisite pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1" reference : "800-171|3.5.7,800-53|IA-5(1)(a),CIS_Recommendation|5.3.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|5.7,CSCv6|16.12,CSF|PR.AC-1,ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(a),LEVEL|1S,NESA|T5.2.3,NIAv2|AM19a,NIAv2|AM19b,NIAv2|AM19c,NIAv2|AM19d,NIAv2|AM22a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.1,TBA-FIISB|26.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "^[\\s]*password[\\s]*requisite[\\s]*pam_cracklib\\.so" # Note: Variable @PW_MINLEN@ replaced with "(1[4-9]|[2-9][0-9])" in field "expect". expect : "minlen[\s]*=[\s]*(1[4-9]|[2-9][0-9])" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.1 Ensure password creation requirements are configured - try_first_pass" info : "The pam_cracklib.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_cracklib.so options. try_first_pass - retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password. retry=3 - Allow 3 tries before sending back a failure. minlen=14 - password must be 14 characters or more dcredit=-1 - provide at least one digit ucredit=-1 - provide at least one uppercase character ocredit=-1 - provide at least one special character lcredit=-1 - provide at least one lowercase character The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies. Strong passwords protect systems from being hacked through brute force methods." solution : "Edit the /etc/pam.d/common-password file to include the appropriate options for pam_cracklib.so and to conform to site policy: password requisite pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1" reference : "800-171|3.5.7,800-53|IA-5(1)(a),CIS_Recommendation|5.3.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|5.7,CSCv6|16.12,CSF|PR.AC-1,ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(a),LEVEL|1S,NESA|T5.2.3,NIAv2|AM19a,NIAv2|AM19b,NIAv2|AM19c,NIAv2|AM19d,NIAv2|AM22a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.1,TBA-FIISB|26.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "password[\\s]*requisite[\\s]*pam_cracklib\\.so" # Note: Variable @TRY_FIRST_PASS@ replaced with "try_first_pass" in field "expect". expect : "try_first_pass" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.1 Ensure password creation requirements are configured - retry" info : "The pam_cracklib.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_cracklib.so options. try_first_pass - retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password. retry=3 - Allow 3 tries before sending back a failure. minlen=14 - password must be 14 characters or more dcredit=-1 - provide at least one digit ucredit=-1 - provide at least one uppercase character ocredit=-1 - provide at least one special character lcredit=-1 - provide at least one lowercase character The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies. Strong passwords protect systems from being hacked through brute force methods." solution : "Edit the /etc/pam.d/common-password file to include the appropriate options for pam_cracklib.so and to conform to site policy: password requisite pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1" reference : "800-171|3.1.8,800-53|AC-7a.,CIS_Recommendation|5.3.1,CN-L3|8.1.4.1(b),CSCv6|5.7,CSCv6|16.7,CSCv6|16.12,ITSG-33|AC-7a.,LEVEL|1S,NESA|T5.5.1,NIAv2|AM24,TBA-FIISB|45.1.2,TBA-FIISB|45.2.1,TBA-FIISB|45.2.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "^[\\s]*password[\\s]*requisite[\\s]*pam_cracklib\\.so" # Note: Variable @PW_RETRY@ replaced with "[1-3]" in field "expect". expect : "retry[\s]*=[\s]*[1-3]" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.1 Ensure password creation requirements are configured - dcredit" info : "The pam_cracklib.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_cracklib.so options. try_first_pass - retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password. retry=3 - Allow 3 tries before sending back a failure. minlen=14 - password must be 14 characters or more dcredit=-1 - provide at least one digit ucredit=-1 - provide at least one uppercase character ocredit=-1 - provide at least one special character lcredit=-1 - provide at least one lowercase character The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies. Strong passwords protect systems from being hacked through brute force methods." solution : "Edit the /etc/pam.d/common-password file to include the appropriate options for pam_cracklib.so and to conform to site policy: password requisite pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1" reference : "800-171|3.5.7,800-53|IA-5(1)(a),CIS_Recommendation|5.3.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|5.7,CSCv6|16.12,CSF|PR.AC-1,ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(a),LEVEL|1S,NESA|T5.2.3,NIAv2|AM19a,NIAv2|AM19b,NIAv2|AM19c,NIAv2|AM19d,NIAv2|AM22a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.1,TBA-FIISB|26.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "password[\\s]*requisite[\\s]*pam_cracklib\\.so" # Note: Variable @PW_DCREDIT@ replaced with "-1" in field "expect". expect : "dcredit[\s]*=[\s]*-1" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.1 Ensure password creation requirements are configured - ucredit" info : "The pam_cracklib.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_cracklib.so options. try_first_pass - retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password. retry=3 - Allow 3 tries before sending back a failure. minlen=14 - password must be 14 characters or more dcredit=-1 - provide at least one digit ucredit=-1 - provide at least one uppercase character ocredit=-1 - provide at least one special character lcredit=-1 - provide at least one lowercase character The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies. Strong passwords protect systems from being hacked through brute force methods." solution : "Edit the /etc/pam.d/common-password file to include the appropriate options for pam_cracklib.so and to conform to site policy: password requisite pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1" reference : "800-171|3.5.7,800-53|IA-5(1)(a),CIS_Recommendation|5.3.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|5.7,CSCv6|16.12,CSF|PR.AC-1,ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(a),LEVEL|1S,NESA|T5.2.3,NIAv2|AM19a,NIAv2|AM19b,NIAv2|AM19c,NIAv2|AM19d,NIAv2|AM22a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.1,TBA-FIISB|26.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "password[\\s]*requisite[\\s]*pam_cracklib\\.so" # Note: Variable @PW_UCREDIT@ replaced with "-1" in field "expect". expect : "ucredit[\s]*=[\s]*-1" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.1 Ensure password creation requirements are configured - ocredit" info : "The pam_cracklib.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_cracklib.so options. try_first_pass - retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password. retry=3 - Allow 3 tries before sending back a failure. minlen=14 - password must be 14 characters or more dcredit=-1 - provide at least one digit ucredit=-1 - provide at least one uppercase character ocredit=-1 - provide at least one special character lcredit=-1 - provide at least one lowercase character The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies. Strong passwords protect systems from being hacked through brute force methods." solution : "Edit the /etc/pam.d/common-password file to include the appropriate options for pam_cracklib.so and to conform to site policy: password requisite pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1" reference : "800-171|3.5.7,800-53|IA-5(1)(a),CIS_Recommendation|5.3.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|5.7,CSCv6|16.12,CSF|PR.AC-1,ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(a),LEVEL|1S,NESA|T5.2.3,NIAv2|AM19a,NIAv2|AM19b,NIAv2|AM19c,NIAv2|AM19d,NIAv2|AM22a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.1,TBA-FIISB|26.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "password[\\s]*requisite[\\s]*pam_cracklib\\.so" # Note: Variable @PW_OCREDIT@ replaced with "-1" in field "expect". expect : "ocredit[\s]*=[\s]*-1" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.1 Ensure password creation requirements are configured - lcredit" info : "The pam_cracklib.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_cracklib.so options. try_first_pass - retrieve the password from a previous stacked PAM module. If not available, then prompt the user for a password. retry=3 - Allow 3 tries before sending back a failure. minlen=14 - password must be 14 characters or more dcredit=-1 - provide at least one digit ucredit=-1 - provide at least one uppercase character ocredit=-1 - provide at least one special character lcredit=-1 - provide at least one lowercase character The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies. Strong passwords protect systems from being hacked through brute force methods." solution : "Edit the /etc/pam.d/common-password file to include the appropriate options for pam_cracklib.so and to conform to site policy: password requisite pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1" reference : "800-171|3.5.7,800-53|IA-5(1)(a),CIS_Recommendation|5.3.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|5.7,CSCv6|16.12,CSF|PR.AC-1,ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(a),LEVEL|1S,NESA|T5.2.3,NIAv2|AM19a,NIAv2|AM19b,NIAv2|AM19c,NIAv2|AM19d,NIAv2|AM22a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.1,TBA-FIISB|26.2.4" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "password[\\s]*requisite[\\s]*pam_cracklib\\.so" # Note: Variable @PW_LCREDIT@ replaced with "-1" in field "expect". expect : "lcredit[\s]*=[\s]*-1" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.2 Ensure lockout for failed password attempts is configured - auth required" info : "Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration files. The second set of changes are applied to the program specific PAM configuration file. The second set of changes must be applied to each program that will lock out users. Check the documentation for each secondary program for instructions on how to configure them to work with PAM. Set the lockout number to the policy in effect at your site. Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems." solution : "Edit the /etc/pam.d/common-auth file and add the following pam_tally2.so line: auth required pam_tally2.so onerr=fail audit silent deny=3 unlock_time=900 Edit the /etc/pam.d/common-account file and add the following pam_tally2.so line: account required pam_tally2.so Notes: Additional module options may be set, recommendation only covers those listed here. If a user has been locked out because they have reached the maximum consecutive failure count defined by deny= in the pam_tally2.so module, the user can be unlocked by issuing the command pam_tally2 -u --reset. This command sets the failed count to 0, effectively unlocking the user. Use of the \"audit\" keyword may log credentials in the case of user error during authentication. This risk should be evaluated in the context of the site policies of your organization." reference : "800-171|3.1.8,800-53|AC-7a.,CIS_Recommendation|5.3.2,CN-L3|8.1.4.1(b),CSCv6|16.7,ITSG-33|AC-7a.,LEVEL|1S,NESA|T5.5.1,NIAv2|AM24,TBA-FIISB|45.1.2,TBA-FIISB|45.2.1,TBA-FIISB|45.2.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-auth" regex : "^[\\s]*auth[\\s]+required[\\s]+pam_tally2\\.so[\\s]*" expect : "^[\\s]*auth[\\s]+required[\\s]+pam_tally2\\.so[\\s]+onerr=fail[\\s]+audit[\\s]+silent[\\s]+deny=3[\\s]+unlock_time=900[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.2 Ensure lockout for failed password attempts is configured - account required" info : "Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration files. The second set of changes are applied to the program specific PAM configuration file. The second set of changes must be applied to each program that will lock out users. Check the documentation for each secondary program for instructions on how to configure them to work with PAM. Set the lockout number to the policy in effect at your site. Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems." solution : "Edit the /etc/pam.d/common-auth file and add the following pam_tally2.so line: auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900 Edit the /etc/pam.d/common-account file and add the following pam_tally2.so line: account required pam_tally2.so Notes: Additional module options may be set, recommendation only covers those listed here. If a user has been locked out because they have reached the maximum consecutive failure count defined by deny= in the pam_tally2.so module, the user can be unlocked by issuing the command pam_tally2 -u --reset. This command sets the failed count to 0, effectively unlocking the user. Use of the \"audit\" keyword may log credentials in the case of user error during authentication. This risk should be evaluated in the context of the site policies of your organization." reference : "800-171|3.1.8,800-53|AC-7a.,CIS_Recommendation|5.3.2,CN-L3|8.1.4.1(b),CSCv6|16.7,ITSG-33|AC-7a.,LEVEL|1S,NESA|T5.5.1,NIAv2|AM24,TBA-FIISB|45.1.2,TBA-FIISB|45.2.1,TBA-FIISB|45.2.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-account" regex : "^[\\s]*account[\\s]+required[\\s]+pam_tally2\\.so[\\s]*" expect : "^[\\s]*account[\\s]+required[\\s]+pam_tally2\\.so[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.3 Ensure password reuse is limited" info : "The /etc/security/opasswd file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords. Forcing users not to reuse their past 5 passwords make it less likely that an attacker will be able to guess the password. Note that these change only apply to accounts configured on the local system." solution : "Edit the /etc/pam.d/common-password file to include the remember option and conform to site policy as shown: password required pam_pwhistory.so remember=5" reference : "800-171|3.5.8,800-53|IA-5(1)(e),CIS_Recommendation|5.3.3,CSF|PR.AC-1,HIPAA|164.308(a)(5)(ii)(D),ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(e),LEVEL|1S,NESA|T5.2.3,NIAv2|AM22c,PCI-DSSv3.1|8.2.5,PCI-DSSv3.2|8.2.5,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "^[\\s]*password[\\s]*required[\\s]*pam_pwhistory\\.so" expect : "remember=([5-9]|1[0-9]|[2-9][0-9])" system : "Linux" type : FILE_CONTENT_CHECK description : "5.3.4 Ensure password hashing algorithm is SHA-512" info : "The commands below change password encryption from md5 to sha512 (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm. The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. Note that these change only apply to accounts configured on the local system." solution : "Edit the /etc/pam.d/common-password file to include the sha512 option for pam_unix.so as shown: password required pam_unix.so sha512" reference : "800-171|3.5.10,800-53|IA-5(1)(c),CIS_Recommendation|5.3.4,CSF|PR.AC-1,ITSG-33|IA-5(1)(c),LEVEL|1S,NESA|T5.2.3,NIAv2|CY6,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/common-password" regex : "^[\\s]*password[\\s]+required[\\s]+pam_unix\\.so[\\s]*" expect : "sha512" system : "Linux" type : FILE_CONTENT_CHECK description : "5.4.1.1 Ensure password expiration is 365 days or less - login.defs" info : "The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days. The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity." solution : "Set the PASS_MAX_DAYS parameter to 90 in /etc/login.defs: PASS_MAX_DAYS 90 Modify user parameters for all users with a password set to match: # chage --maxdays 90 You can also check this setting in /etc/shadow directly. The 5th field should be 365 or less for all users with a password. Note: A value of -1 will disable password expiration. Additionally the password expiration must be greater than the minimum days between password changes or users will be unable to change their password." reference : "800-171|3.5.2,800-53|IA-5(1)(d),CIP|007-6-R5.6,CIS_Recommendation|5.4.1.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|16,CSF|PR.AC-1,HIPAA|164.308(a)(5)(ii)(D),ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(d),LEVEL|1S,NESA|T5.2.3,NIAv2|AM20,NIAv2|AM21,PCI-DSSv3.1|8.2.4,PCI-DSSv3.2|8.2.4,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/login.defs" regex : "^[\\s]*PASS_MAX_DAYS[\\s]" expect : "^[\\s]*PASS_MAX_DAYS[\\s]+([1-9]|[1-9][0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])[\\s]*$" system : "Linux" type : CMD_EXEC description : "5.4.1.1 Ensure password expiration is 365 days or less - users" info : "The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the PASS_MAX_DAYS parameter be set to less than or equal to 365 days. The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity." solution : "Set the PASS_MAX_DAYS parameter to 90 in /etc/login.defs: PASS_MAX_DAYS 90 Modify user parameters for all users with a password set to match: # chage --maxdays 90 You can also check this setting in /etc/shadow directly. The 5th field should be 365 or less for all users with a password. Note: A value of -1 will disable password expiration. Additionally the password expiration must be greater than the minimum days between password changes or users will be unable to change their password." reference : "800-171|3.5.2,800-53|IA-5(1)(d),CIS_Recommendation|5.4.1.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|16,CSF|PR.AC-1,ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(d),LEVEL|1S,NESA|T5.2.3,NIAv2|AM20,NIAv2|AM21,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "echo 'Username, Maximum number of days between password change'; output=\"\"; failures=0; for i in $(egrep \"^[^:]+:[^\!*]\" /etc/shadow | cut -d: -f1); do change_date=$(chage --list \"$i\" | grep 'Maximum' | cut -d: -f2 | awk '{$1=$1};1'); output=\"${i}, ${change_date}\"; if [ $change_date -le 365 ] && [ $change_date -ge 1 ]; then output=\"${output} - Pass\"; else output=\"${output} - Fail\"; failures=$((failures+1)); fi; echo \"${output}\"; done; echo \"Number of failures: ${failures}\"" expect : "^Number of failures: 0$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.4.1.2 Ensure minimum days between password changes is 7 or more - login.defs" info : "The PASS_MIN_DAYS parameter in /etc/login.defs allows an administrator to prevent users from changing their password until a minimum number of days have passed since the last time the user changed their password. It is recommended that PASS_MIN_DAYS parameter be set to 7 or more days." solution : "Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs : PASS_MIN_DAYS 7 Modify user parameters for all users with a password set to match: # chage --mindays 7 Notes: You can also check this setting in /etc/shadow directly. The 4th field should be 7 or more for all users with a password." reference : "800-171|3.5.2,800-53|IA-5(1)(d),CIP|007-6-R5.6,CIS_Recommendation|5.4.1.2,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|16,CSF|PR.AC-1,HIPAA|164.308(a)(5)(ii)(D),ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(d),LEVEL|1S,NESA|T5.2.3,NIAv2|AM20,NIAv2|AM21,PCI-DSSv3.1|8.2.4,PCI-DSSv3.2|8.2.4,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/login.defs" regex : "^[\\s\\t]*PASS_MIN_DAYS\\s+" expect : "PASS_MIN_DAYS\\s+([7-9]|[1-9][0-9]+)\\s*$" system : "Linux" type : CMD_EXEC description : "5.4.1.2 Ensure minimum days between password changes is 7 or more - users" info : "The PASS_MIN_DAYS parameter in /etc/login.defs allows an administrator to prevent users from changing their password until a minimum number of days have passed since the last time the user changed their password. It is recommended that PASS_MIN_DAYS parameter be set to 7 or more days." solution : "Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs : PASS_MIN_DAYS 7 Modify user parameters for all users with a password set to match: # chage --mindays 7 Notes: You can also check this setting in /etc/shadow directly. The 4th field should be 7 or more for all users with a password." reference : "800-171|3.5.2,800-53|IA-5(1)(d),CIS_Recommendation|5.4.1.2,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|16,CSF|PR.AC-1,ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(d),LEVEL|1S,NESA|T5.2.3,NIAv2|AM20,NIAv2|AM21,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "echo 'Username, Minimum number of days between password change'; output=\"\"; failures=0; for i in $(egrep \"^[^:]+:[^\!*]\" /etc/shadow | cut -d: -f1); do change_date=$(chage --list \"$i\" | grep 'Minimum' | cut -d: -f2 | awk '{$1=$1};1'); output=\"${i}, ${change_date}\"; if [ $change_date -ge 7 ]; then output=\"${output} - Pass\"; else output=\"${output} - Fail\"; failures=$((failures+1)); fi; echo \"${output}\"; done; echo \"Number of failures: ${failures}\"" expect : "^Number of failures: 0$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.4.1.3 Ensure password expiration warning days is 7 or more - login.defs" info : "The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days. Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered." solution : "Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7 Modify user parameters for all users with a password set to match: # chage --warndays 7 " reference : "800-171|3.5.2,800-53|IA-5(1)(d),CIP|007-6-R5.6,CIS_Recommendation|5.4.1.3,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSCv6|16,CSF|PR.AC-1,HIPAA|164.308(a)(5)(ii)(D),ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(d),LEVEL|1S,NESA|T5.2.3,NIAv2|AM20,NIAv2|AM21,PCI-DSSv3.1|8.2.4,PCI-DSSv3.2|8.2.4,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/login.defs" regex : "^[\\s]*PASS_WARN_AGE\\s+" expect : "^[\\s]*PASS_WARN_AGE\\s+([7-9]|[1-9][0-9]+)\\s*$" system : "Linux" type : CMD_EXEC description : "5.4.1.3 Ensure password expiration warning days is 7 or more - users" info : "The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days. Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered." solution : "Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs: PASS_WARN_AGE 7 Modify user parameters for all users with a password set to match: # chage --warndays 7 " reference : "800-53|AC-9(3),CIS_Recommendation|5.4.1.3,CSCv6|16,ITSG-33|AC-9(3),LEVEL|1S,NESA|T5.5.1,TBA-FIISB|45.2.4" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "echo 'Username, Number of days of warning before password expires'; output=\"\"; failures=0; for i in $(egrep \"^[^:]+:[^\!*]\" /etc/shadow | cut -d: -f1); do change_date=$(chage --list \"$i\" | grep 'Warning' | cut -d: -f2 | awk '{$1=$1};1'); output=\"${i}, ${change_date}\"; if [ $change_date -ge 7 ]; then output=\"${output} - Pass\"; else output=\"${output} - Fail\"; failures=$((failures+1)); fi; echo \"${output}\"; done; echo \"Number of failures: ${failures}\"" expect : "^Number of failures: 0$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.4.1.4 Ensure inactive password lock is 30 days or less - useradd" info : "User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled." solution : "Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30 Modify user parameters for all users with a password set to match: # chage --inactive 30 Notes: You can also check this setting in /etc/shadow directly. The 7th field should be 30 or less for all users with a password. Note: A value of -1 would disable this setting." reference : "800-171|3.1.1,800-53|AC-2(3),CIP|004-6-R5,CIS_Recommendation|5.4.1.4,CN-L3|7.1.3.2(e),CN-L3|8.1.4.2(c),CSCv6|16,CSCv6|16.1,CSCv6|16.6,CSF|PR.AC-1,CSF|PR.AC-4,ISO/IEC-27001|A.9.2.1,ISO/IEC-27001|A.9.2.6,ITSG-33|AC-2(3),LEVEL|1S,NIAv2|AM26,PCI-DSSv3.1|8.1.4,PCI-DSSv3.2|8.1.4,QCSC-v1|5.2.2,QCSC-v1|8.2.1,QCSC-v1|13.2,QCSC-v1|15.2,TBA-FIISB|36.2.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/default/useradd" regex : "^[\\s]*INACTIVE[\\s]*=[\\s]*" expect : "^[\\s]*INACTIVE[\\s]*=[\\s]*(30|[1-2][0-9]|[1-9])[\\s]*$" system : "Linux" type : CMD_EXEC description : "5.4.1.4 Ensure inactive password lock is 30 days or less - users" info : "User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled." solution : "Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30 Modify user parameters for all users with a password set to match: # chage --inactive 30 Notes: You can also check this setting in /etc/shadow directly. The 7th field should be 30 or less for all users with a password. Note: A value of -1 would disable this setting." reference : "800-171|3.1.1,800-53|AC-2(3),CIS_Recommendation|5.4.1.4,CN-L3|7.1.3.2(e),CN-L3|8.1.4.2(c),CSCv6|16,CSCv6|16.1,CSCv6|16.6,CSF|PR.AC-1,CSF|PR.AC-4,ISO/IEC-27001|A.9.2.1,ISO/IEC-27001|A.9.2.6,ITSG-33|AC-2(3),LEVEL|1S,NIAv2|AM26,QCSC-v1|5.2.2,QCSC-v1|8.2.1,QCSC-v1|13.2,QCSC-v1|15.2,TBA-FIISB|36.2.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "echo 'Username, Inactive password days'; output=\"\"; failures=0; for i in $(egrep \"^[^:]+:[^!*]\" /etc/shadow | cut -d: -f1); do password_expires=$(egrep \"^\\b$i\\b\" /etc/shadow | cut -d: -f7 | tr -d '\\n'); if [ -z \"$password_expires\" ]; then password_expires=-1; fi; output=\"${i}, ${password_expires}\"; if [ $password_expires -le 30 ] && [ $password_expires -ge 1 ]; then status=\"Pass\"; else status=\"Fail\"; failures=$((failures+1)); fi; echo \"${output} - ${status}\"; done; echo \"Number of failures: ${failures}\"" expect : "^Number of failures: 0$" system : "Linux" type : CMD_EXEC description : "5.4.1.5 Ensure all users last password change date is in the past" info : "All users should have a password change date in the past." solution : "Investigate any users with a password change date in the future and correct them. Locking the account, expiring the password, or resetting the password manually may be appropriate." reference : "800-171|3.5.2,800-53|IA-5f.,CIS_Recommendation|5.4.1.5,CN-L3|8.1.4.1(a),CSF|PR.AC-1,ITSG-33|IA-5f.,LEVEL|1S,NESA|T5.5.3,QCSC-v1|5.2.2,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "echo 'Username, Current Days, Last Password Change Days'; output=\"\"; failures=0; for i in $(cut -d: -f1 < /etc/shadow); do now=$(($(date +%s) / 86400)); change_date=$(chage --list \"$i\" | grep 'Last Change' | cut -d: -f2 | awk '{$1=$1};1'); if [[ $change_date != \"never\" ]]; then epoch_change_date=$(($(date -d \"${change_date}\" +%s) / 86400)); else epoch_change_date='Never'; fi; output=\"${i}, ${now}, ${epoch_change_date}\"; if [[ $epoch_change_date < $now ]]; then output=\"${output} - Pass\"; else output=\"${output} - Fail\"; ((failures++)); fi; echo \"${output}\"; done; echo \"Number of failures: ${failures}\"" expect : "^Number of failures: 0$" system : "Linux" type : GRAMMAR_CHECK description : "5.4.2 Ensure system accounts are non-login" info : "There are a number of accounts provided with SUSE 11 that are used to manage applications and are not intended to provide an interactive shell. It is important to make sure that accounts that are not being used by regular users are prevented from being used to provide an interactive shell. By default, SUSE 11 sets the password field for these accounts to an invalid string, but it is also recommended that the shell field in the password file be set to /sbin/nologin. This prevents the account from potentially being used to run any commands." solution : "Set the shell for any accounts returned by the audit script to /sbin/nologin: # usermod -s /sbin/nologin The following script will automatically set all user shells required to /sbin/nologin and lock the sync, shutdown, and halt users: #!/bin/bash for user in `awk -F: '($3 < 500) {print $1 }' /etc/passwd`; do if [ $user != 'root' ]; then usermod -L $user if [ $user != 'sync' ] && [ $user != 'shutdown' ] && [ $user != 'halt' ]; then usermod -s /sbin/nologin $user fi fidone" reference : "800-171|3.1.5,800-53|AC-6.,CIS_Recommendation|5.4.2,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|13.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/passwd" regex : "^[A-Za-z0-9_-]+:x:([1-9][0-9][0-9][0-9]+):[0-9]+:[\"]?[A-Za-z0-9_\(\) \/-]*[\"]?:[\(\)A-Za-z0-9_\/-]+:.*" regex : "^[A-Za-z0-9_-]+:x:([1-9]:|[0-9][0-9]:|[0-9][0-9][0-9]:)[0-9]+:[\"]?[A-Za-z0-9_\(\) \/-]*[\"]?:[\(\)A-Za-z0-9_\/-]+:\/sbin\/nologin" regex : "^root:x:0:0:root:\/root:\/bin\/bash" regex : "^sync:x:5:0:sync:\/sbin:\/bin\/sync" regex : "^shutdown:x:6:0:shutdown:\/sbin:\/sbin\/shutdown" regex : "^halt:x:7:0:halt:\/sbin:\/sbin\/halt" system : "Linux" type : FILE_CONTENT_CHECK description : "5.4.3 Ensure default group for the root account is GID 0" info : "The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user. Using GID 0 for the root account helps prevent root -owned files from accidentally becoming accessible to non-privileged users." solution : "Run the following command to set the root user default group to GID 0: # usermod -g 0 root" reference : "800-171|3.1.1,800-53|AC-2c.,CIS_Recommendation|5.4.3,CN-L3|7.1.3.2(d),CSF|DE.CM-1,CSF|DE.CM-3,CSF|PR.AC-1,CSF|PR.AC-4,ISO/IEC-27001|A.9.2.1,ITSG-33|AC-2c.,LEVEL|1S,NESA|T5.2.1,NESA|T5.2.2,NIAv2|AM28,NIAv2|NS5j,NIAv2|SS14e,QCSC-v1|5.2.2,QCSC-v1|8.2.1,QCSC-v1|13.2,QCSC-v1|15.2" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/passwd" regex : "^root:" expect : "^root:x:0:0:" system : "Linux" type : FILE_CONTENT_CHECK description : "5.4.4 Ensure default user umask is 027 or more restrictive - /etc/bash.bashrc.local" info : "The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files (.profile, .bashrc, etc.) in their home directories. Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system." solution : "Edit the /etc/bash.bashrc.local, /etc/profile.local and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027 Notes: The audit and remediation in this recommendation apply to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked. Other methods of setting a default user umask exist however the shell configuration files are the last run and will override other settings if they exist therefor our recommendation is to configure in the shell configuration files. If other methods are in use in your environment they should be audited and the shell configs should be verified to not override." reference : "800-171|3.1.1,800-53|AC-3(4)(d),CIS_Recommendation|5.4.4,CN-L3|8.1.4.2(f),CN-L3|8.1.4.11(b),CN-L3|8.1.10.2(c),CN-L3|8.5.3.1,CN-L3|8.5.4.1(a),CSCv6|13,CSF|PR.AC-4,CSF|PR.PT-3,ISO/IEC-27001|A.9.4.1,ISO/IEC-27001|A.9.4.5,ITSG-33|AC-3(4),LEVEL|1S,NESA|T4.2.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.2,NESA|T7.5.3,NIAv2|AM3,NIAv2|SS29,QCSC-v1|3.2,QCSC-v1|5.2.2,QCSC-v1|13.2,TBA-FIISB|31.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/bash.bashrc.local" regex : "^[\\s]*umask[\\s]" expect : "^[\\s]*umask[\\s]+[0-7][2-7]7[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.4.4 Ensure default user umask is 027 or more restrictive - /etc/profile.local" info : "The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files (.profile, .bashrc, etc.) in their home directories. Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system." solution : "Edit the /etc/bash.bashrc.local, /etc/profile.local and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027 Notes: The audit and remediation in this recommendation apply to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked. Other methods of setting a default user umask exist however the shell configuration files are the last run and will override other settings if they exist therefor our recommendation is to configure in the shell configuration files. If other methods are in use in your environment they should be audited and the shell configs should be verified to not override." reference : "800-171|3.1.1,800-53|AC-3(4)(d),CIS_Recommendation|5.4.4,CN-L3|8.1.4.2(f),CN-L3|8.1.4.11(b),CN-L3|8.1.10.2(c),CN-L3|8.5.3.1,CN-L3|8.5.4.1(a),CSCv6|13,CSF|PR.AC-4,CSF|PR.PT-3,ISO/IEC-27001|A.9.4.1,ISO/IEC-27001|A.9.4.5,ITSG-33|AC-3(4),LEVEL|1S,NESA|T4.2.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.2,NESA|T7.5.3,NIAv2|AM3,NIAv2|SS29,QCSC-v1|3.2,QCSC-v1|5.2.2,QCSC-v1|13.2,TBA-FIISB|31.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/profile.local" regex : "^[\\s]*umask[\\s]" expect : "^[\\s]*umask[\\s]+[0-7][2-7]7[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.4.4 Ensure default user umask is 027 or more restrictive - /etc/profile.d/*" info : "The default umask determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the umask command into the standard shell configuration files (.profile, .bashrc, etc.) in their home directories. Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system." solution : "Edit the /etc/bash.bashrc.local, /etc/profile.local and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: umask 027 Notes: The audit and remediation in this recommendation apply to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked. Other methods of setting a default user umask exist however the shell configuration files are the last run and will override other settings if they exist therefor our recommendation is to configure in the shell configuration files. If other methods are in use in your environment they should be audited and the shell configs should be verified to not override." reference : "800-171|3.1.1,800-53|AC-3(4)(d),CIS_Recommendation|5.4.4,CN-L3|8.1.4.2(f),CN-L3|8.1.4.11(b),CN-L3|8.1.10.2(c),CN-L3|8.5.3.1,CN-L3|8.5.4.1(a),CSCv6|13,CSF|PR.AC-4,CSF|PR.PT-3,ISO/IEC-27001|A.9.4.1,ISO/IEC-27001|A.9.4.5,ITSG-33|AC-3(4),LEVEL|1S,NESA|T4.2.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.2,NESA|T7.5.3,NIAv2|AM3,NIAv2|SS29,QCSC-v1|3.2,QCSC-v1|5.2.2,QCSC-v1|13.2,TBA-FIISB|31.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/profile.d/*" regex : "^[\\s]*umask[\\s]" expect : "^[\\s]*umask[\\s]+[0-7][2-7]7[\\s]*$" required : NO system : "Linux" type : CMD_EXEC description : "5.5 Ensure root login is restricted to system console" info : "The file /etc/securetty contains a list of valid terminals that may be logged in directly as root. Since the system console has special properties to handle emergency situations, it is important to ensure that the console is in a physically secure location and that unauthorized consoles have not been defined." solution : "Remove entries for any consoles that are not in a physically secure location." reference : "800-171|3.1.5,800-53|AC-6(3),CIS_Recommendation|5.5,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSF|PR.AC-4,ISO/IEC-27001|A.9.1.2,ISO/IEC-27001|A.9.4.4,ITSG-33|AC-6(3),LEVEL|1NS,NESA|T5.1.1,NESA|T5.5.4,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep -v \"console\" /etc/securetty | /bin/awk \'{ print } END { if (NR==0) print \"none\" }\'" expect : "none" dont_echo_cmd : YES system : "Linux" type : CMD_EXEC description : "5.6 Ensure access to the su command is restricted - /etc/group" info : "The su command allows a user to run a command or shell as another user. The program has been superseded by sudo, which allows for more granular control over privileged access. Normally, the su command can be executed by any user. By uncommenting the pam_wheel.so statement in /etc/pam.d/su, the su command will only allow users in the wheel group to execute su. Restricting the use of su, and using sudo in its place, provides system administrators better control of the escalation of user privileges to execute privileged commands. The sudo utility also provides a better logging and audit mechanism, as it can log each command executed via sudo, whereas su can only record that a user executed the su program." solution : "Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so use_uid Create a comma separated list of users in the wheel statement in the /etc/group file: wheel:x:10:root," reference : "800-171|3.1.1,800-53|AC-2c.,CIS_Recommendation|5.6,CN-L3|7.1.3.2(d),CSF|DE.CM-1,CSF|DE.CM-3,CSF|PR.AC-1,CSF|PR.AC-4,ISO/IEC-27001|A.9.2.1,ITSG-33|AC-2c.,LEVEL|1S,NESA|T5.2.1,NESA|T5.2.2,NIAv2|AM28,NIAv2|NS5j,NIAv2|SS14e,QCSC-v1|5.2.2,QCSC-v1|8.2.1,QCSC-v1|13.2,QCSC-v1|15.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/grep ^wheel: /etc/group" expect : "^wheel:x:10:(?=.*root){1}.*$" system : "Linux" type : FILE_CONTENT_CHECK description : "5.6 Ensure access to the su command is restricted - /etc/pam.d/su" info : "The su command allows a user to run a command or shell as another user. The program has been superseded by sudo, which allows for more granular control over privileged access. Normally, the su command can be executed by any user. By uncommenting the pam_wheel.so statement in /etc/pam.d/su, the su command will only allow users in the wheel group to execute su. Restricting the use of su, and using sudo in its place, provides system administrators better control of the escalation of user privileges to execute privileged commands. The sudo utility also provides a better logging and audit mechanism, as it can log each command executed via sudo, whereas su can only record that a user executed the su program." solution : "Add the following line to the /etc/pam.d/su file: auth required pam_wheel.so use_uid Create a comma separated list of users in the wheel statement in the /etc/group file: wheel:x:10:root," reference : "800-171|3.1.7,800-53|AC-6(10),CIS_Recommendation|5.6,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/pam.d/su" regex : "^[\\s]*auth[\\s]+required[\\s]+pam_wheel\\.so[\\s]+use_uid[\\s]*$" expect : "^[\\s]*auth[\\s]+required[\\s]+pam_wheel\\.so[\\s]+use_uid[\\s]*$" system : "Linux" type : FILE_CHECK description : "6.1.2 Ensure permissions on /etc/passwd are configured" info : "The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate. It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions." solution : "Run the following command to set permissions on /etc/passwd: # chown root:root /etc/passwd# chmod 644 /etc/passwd" reference : "800-171|3.5.2,800-53|IA-5(6),CIS_Recommendation|6.1.2,CSCv6|3.1,CSF|PR.AC-1,ITSG-33|IA-5(6),LEVEL|1S,NESA|T5.2.3,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|5.4,TBA-FIISB|26.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/passwd" owner : "root" mask : "133" group : "root" system : "Linux" type : FILE_CHECK description : "6.1.3 Ensure permissions on /etc/shadow are configured" info : "The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information. If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts." solution : "Run the following commands to set permissions on /etc/shadow: # chown root:shadow /etc/shadow# chmod o-rwx,g-wx /etc/shadow" reference : "800-171|3.5.2,800-53|IA-5(6),CIS_Recommendation|6.1.3,CSCv6|3.1,CSF|PR.AC-1,ITSG-33|IA-5(6),LEVEL|1S,NESA|T5.2.3,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|5.4,TBA-FIISB|26.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/shadow" owner : "root" mask : "137" group : "shadow" system : "Linux" type : FILE_CHECK description : "6.1.4 Ensure permissions on /etc/group are configured" info : "The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else. The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs." solution : "Run the following command to set permissions on /etc/group: # chown root:root /etc/group# chmod 644 /etc/group" reference : "800-171|3.5.2,800-53|IA-5(6),CIS_Recommendation|6.1.4,CSCv6|3.1,CSF|PR.AC-1,ITSG-33|IA-5(6),LEVEL|1S,NESA|T5.2.3,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|5.4,TBA-FIISB|26.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/group" owner : "root" mask : "133" group : "root" system : "Linux" type : FILE_CHECK description : "6.1.5 Ensure permissions on /etc/passwd.old are configured" info : "The /etc/passwd.old file contains backup user account information." solution : "Run the following command to set permissions on /etc/passwd.old : # chown root:root /etc/passwd.old # chmod u-x,go-wx /etc/passwd.old" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.1.5,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|16.14,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/passwd.old" owner : "root" mask : "133" required : NO group : "root" system : "Linux" type : FILE_CHECK description : "6.1.6 Ensure permissions on /etc/shadow.old are configured" info : "The /etc/shadow.old file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information." solution : "Run the one of the following chown commands as appropriate and the chmod to set permissions on /etc/shadow.old : # chown root:root /etc/shadow.old # chown root:shadow /etc/shadow.old # chmod o-rwx,g-rw /etc/shadow.old" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.1.6,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|16.14,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/shadow.old" owner : "root" mask : "133" required : NO group : "(root|shadow)" system : "Linux" type : FILE_CHECK description : "6.1.7 Ensure permissions on /etc/group.old are configured" info : "The /etc/group.old file contains a backup list of all the valid groups defined in the system." solution : "Run the following command to set permissions on /etc/group.old : # chown root:root /etc/group.old # chmod u-x,go-wx /etc/group.old" reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.1.7,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|16.14,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/group.old" owner : "root" mask : "133" required : NO group : "root" description : "6.1.8 Ensure no world writable files exist" info : "Unix-based systems support variable settings to control access to files. World writable files are the least secure. See the chmod(2) man page for more information. Data in world-writable files can be modified and compromised by any user on the system. World writable files may also indicate an incorrectly written script or program that could potentially be the cause of a larger compromise to the system's integrity." solution : "Removing write access for the 'other' category (chmod o-w ) is advisable, but always consult relevant vendor documentation to avoid breaking any application dependencies on a given file." reference : "800-171|3.1.5,800-53|AC-6.,CIS_Recommendation|6.1.8,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSCv6|14,CSF|PR.AC-4,CSF|PR.DS-5,ITSG-33|AC-6,LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,PCI-DSSv3.1|7.1.2,PCI-DSSv3.2|7.1.2,QCSC-v1|5.2.2,QCSC-v1|6.2,QCSC-v1|13.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" name : "find_world_writeable_files" description : "6.1.9 Ensure no unowned files or directories exist" info : "Sometimes when administrators delete users from the password file they neglect to remove all files owned by those users from the system. A new user who is assigned the deleted user's user ID or group ID may then end up 'owning' these files, and thus have more access on the system than was intended." solution : "Locate files that are owned by users or groups not listed in the system configuration files, and reset the ownership of these files to some active user on the system as appropriate." reference : "800-53|AC-16(3),CIS_Recommendation|6.1.9,CSF|PR.AC-4,ISO/IEC-27001|A.8.2.1,ISO/IEC-27001|A.8.2.2,ITSG-33|AC-16(3),LEVEL|1S,NESA|T1.3.2,NESA|T1.3.3,NIAv2|SS28,QCSC-v1|5.2.2,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" name : "find_orphan_files" find_option : "nouser" description : "6.1.10 Ensure no ungrouped files or directories exist" info : "Sometimes when administrators delete users or groups from the system they neglect to remove all files owned by those users or groups. A new user who is assigned the deleted user's user ID or group ID may then end up 'owning' these files, and thus have more access on the system than was intended." solution : "Locate files that are owned by users or groups not listed in the system configuration files, and reset the ownership of these files to some active user on the system as appropriate." reference : "800-53|AC-16(3),CIS_Recommendation|6.1.10,CSF|PR.AC-4,ISO/IEC-27001|A.8.2.1,ISO/IEC-27001|A.8.2.2,ITSG-33|AC-16(3),LEVEL|1S,NESA|T1.3.2,NESA|T1.3.3,NIAv2|SS28,QCSC-v1|5.2.2,QCSC-v1|13.2" see_also : "https://workbench.cisecurity.org/files/1864" name : "find_orphan_files" find_option : "nogroup" description : "6.1.11 Audit SUID executables" info : "The owner of a file can set the file's permissions to run with the owner's or group's permissions, even if the user running the program is not the owner or a member of the group. The most common reason for a SUID program is to enable users to perform functions (such as changing their password) that require root privileges. There are valid reasons for SUID programs, but it is important to identify and review such programs to ensure they are legitimate. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "Ensure that no rogue SUID programs have been introduced into the system. Review the files returned by the action in the Audit section and confirm the integrity of these binaries." reference : "800-171|3.1.5,800-53|AC-6(8),CIS_Recommendation|6.1.11,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1NS,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" name : "find_suid_sgid_files" severity : MEDIUM description : "6.1.12 Audit SGID executables" info : "The owner of a file can set the file's permissions to run with the owner's or group's permissions, even if the user running the program is not the owner or a member of the group. The most common reason for a SGID program is to enable users to perform functions (such as changing their password) that require root privileges. There are valid reasons for SGID programs, but it is important to identify and review such programs to ensure they are legitimate. Review the files returned by the action in the audit section and check to see if system binaries have a different md5 checksum than what from the package. This is an indication that the binary may have been replaced. NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance." solution : "Ensure that no rogue SGID programs have been introduced into the system. Review the files returned by the action in the Audit section and confirm the integrity of these binaries." reference : "800-171|3.1.5,800-53|AC-6(8),CIS_Recommendation|6.1.12,CN-L3|7.1.3.2(b),CN-L3|7.1.3.2(g),CN-L3|8.1.4.2(d),CN-L3|8.1.10.6(a),CSF|PR.AC-4,ITSG-33|AC-6,LEVEL|1NS,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.4.1,NESA|T5.4.4,NESA|T5.4.5,NESA|T5.5.4,NESA|T5.6.1,NESA|T7.5.3,NIAv2|AM1,NIAv2|AM23f,NIAv2|SS13c,NIAv2|SS15c,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|5.1,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" name : "find_suid_sgid_files" severity : MEDIUM system : "Linux" type : CMD_EXEC description : "6.2.1 Ensure password fields are not empty" info : "An account with an empty password field means that anybody may log in as that user without providing a password. All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user." solution : "If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off." reference : "800-171|3.5.7,800-53|IA-5(1)(a),CIP|007-6-R5.5,CIS_Recommendation|6.2.1,CN-L3|7.1.2.7(e),CN-L3|7.1.3.1(b),CSF|PR.AC-1,HIPAA|164.308(a)(5)(ii)(D),ISO/IEC-27001|A.9.4.3,ITSG-33|IA-5(1)(a),LEVEL|1S,NESA|T5.2.3,NIAv2|AM19a,NIAv2|AM19b,NIAv2|AM19c,NIAv2|AM19d,NIAv2|AM22a,PCI-DSSv3.1|8.2.3,PCI-DSSv3.2|8.2.3,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|4.1,TBA-FIISB|26.2.1,TBA-FIISB|26.2.4" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/bin/cat /etc/shadow | /usr/bin/awk -F : \'($2 == \"\") { print $1 \" does not have a password.\";flag++ } END { if(flag<1) print \"none\" }\'" expect : "none" dont_echo_cmd : YES system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "6.2.2 Ensure no legacy '+' entries exist in /etc/passwd" info : "The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms. These entries may provide an avenue for attackers to gain privileged access on the system." solution : "Remove any legacy '+' entries from /etc/passwd if they exist." reference : "800-171|3.5.1,800-53|IA-2.,CIS_Recommendation|6.2.2,CN-L3|7.1.3.1(a),CN-L3|7.1.3.1(e),CN-L3|8.1.4.1(a),CN-L3|8.1.4.2(a),CN-L3|8.5.4.1(a),CSCv6|16.9,CSF|PR.AC-1,ITSG-33|IA-2,ITSG-33|IA-2a.,LEVEL|1S,NESA|T2.3.8,NESA|T5.3.1,NESA|T5.4.2,NESA|T5.5.1,NESA|T5.5.2,NESA|T5.5.3,NIAv2|AM2,NIAv2|AM8,NIAv2|AM14b,QCSC-v1|5.2.2,QCSC-v1|13.2,TBA-FIISB|35.1,TBA-FIISB|36.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/passwd" regex : "^[\\s]*\\+:" expect : "^[\\s]*\\+:" system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "6.2.3 Ensure no legacy '+' entries exist in /etc/shadow" info : "The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms. These entries may provide an avenue for attackers to gain privileged access on the system." solution : "Remove any legacy '+' entries from /etc/shadow if they exist." reference : "800-171|3.5.1,800-53|IA-2.,CIS_Recommendation|6.2.3,CN-L3|7.1.3.1(a),CN-L3|7.1.3.1(e),CN-L3|8.1.4.1(a),CN-L3|8.1.4.2(a),CN-L3|8.5.4.1(a),CSCv6|16.9,CSF|PR.AC-1,ITSG-33|IA-2,ITSG-33|IA-2a.,LEVEL|1S,NESA|T2.3.8,NESA|T5.3.1,NESA|T5.4.2,NESA|T5.5.1,NESA|T5.5.2,NESA|T5.5.3,NIAv2|AM2,NIAv2|AM8,NIAv2|AM14b,QCSC-v1|5.2.2,QCSC-v1|13.2,TBA-FIISB|35.1,TBA-FIISB|36.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/shadow" regex : "^[\\s]*\\+:" expect : "^[\\s]*\\+:" system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "6.2.4 Ensure no legacy '+' entries exist in /etc/group" info : "The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms. These entries may provide an avenue for attackers to gain privileged access on the system." solution : "Remove any legacy '+' entries from /etc/group if they exist." reference : "800-171|3.5.1,800-53|IA-2.,CIS_Recommendation|6.2.4,CN-L3|7.1.3.1(a),CN-L3|7.1.3.1(e),CN-L3|8.1.4.1(a),CN-L3|8.1.4.2(a),CN-L3|8.5.4.1(a),CSCv6|16.9,CSF|PR.AC-1,ITSG-33|IA-2,ITSG-33|IA-2a.,LEVEL|1S,NESA|T2.3.8,NESA|T5.3.1,NESA|T5.4.2,NESA|T5.5.1,NESA|T5.5.2,NESA|T5.5.3,NIAv2|AM2,NIAv2|AM8,NIAv2|AM14b,QCSC-v1|5.2.2,QCSC-v1|13.2,TBA-FIISB|35.1,TBA-FIISB|36.1" see_also : "https://workbench.cisecurity.org/files/1864" file : "/etc/group" regex : "^[\\s]*\\+:" expect : "^[\\s]*\\+:" description : "6.2.5 Ensure root is the only UID 0 account" info : "Any account with UID 0 has superuser privileges on the system. This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted." solution : "Remove any users other than root with UID 0 or assign them a new UID if appropriate." reference : "800-171|3.1.5,800-53|AC-6(5),CIS_Recommendation|6.2.5,CN-L3|8.1.10.6(a),CSCv6|5.1,CSF|PR.AC-4,ISO/IEC-27001|A.9.2.3,ITSG-33|AC-6(5),LEVEL|1S,NESA|T5.1.1,NESA|T5.2.2,NESA|T5.6.1,NIAv2|AM32,NIAv2|AM33,NIAv2|VL3a,QCSC-v1|5.2.2,QCSC-v1|6.2,SWIFT-CSCv1|1.2,TBA-FIISB|31.4.2,TBA-FIISB|31.4.3" see_also : "https://workbench.cisecurity.org/files/1864" name : "passwd_zero_uid" description : "6.2.6 Ensure root PATH Integrity" info : "The root user can execute any command on the system and could be fooled into executing programs unintentionally if the PATH is not set correctly. Including the current working directory (.) or other writable directory in root's executable path makes it likely that an attacker can gain superuser access by forcing an administrator operating as root to execute a Trojan horse program." solution : "Correct or justify any items discovered in the Audit step." reference : "800-171|3.4.7,800-53|CM-7(2),CIS_Recommendation|6.2.6,CSCv6|8.4,CSF|PR.IP-1,CSF|PR.PT-3,ITSG-33|CM-7(2),LEVEL|1S,NIAv2|SS15a,QCSC-v1|3.2,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" name : "dot_in_root_path_variable" system : "Linux" type : CMD_EXEC description : "6.2.7 Ensure all users' home directories exist" info : "Users can be defined in /etc/passwd without a home directory or with a home directory that does not actually exist. If the user's home directory does not exist or is unassigned, the user will be placed in '/' and will not be able to write any files or have local environment variables set." solution : "If any users' home directories do not exist, create them and make sure the respective user owns the directory. Users without an assigned home directory should be removed or assigned a home directory as appropriate." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.2.7,CN-L3|8.1.10.6(d),CSCv6|3.1,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "cat /etc/passwd | egrep -v '^(root|halt|sync|shutdown)' | awk -F: '($7 != \"/sbin/nologin\" && $7 != \"/bin/false\") { print $1 \" \" $6 }' | while read user dir; do if [ ! -d \"$dir\" ]; then echo \"The home directory ($dir) of user $user does not exist.\";fi; done | /usr/bin/awk '{print} END {if (NR == 0) print \"none\"'}" expect : "^none" system : "Linux" type : CMD_EXEC description : "6.2.8 Ensure users' home directories permissions are 750 or more restrictive" info : "While the system administrator can establish secure permissions for users' home directories, the users can easily override these. Group or world-writable user home directories may enable malicious users to steal or modify other users' data or to gain another user's system privileges." solution : "Making global modifications to user home directories without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user file permissions and determine the action to be taken in accordance with site policy." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.2.8,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|14.4,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "cat /etc/passwd | egrep -v '^(root|halt|sync|shutdown)' | awk -F: '($7 !=\"/sbin/nologin\" && $7 != \"/bin/false\") { print $1 \" \" $6 }' | while read user dir; do if [ ! -d \"$dir\" ]; then echo \"The home directory ($dir) of user $user does not exist.\";else dirperm=`ls -ld $dir | cut -f1 -d\" \"`;if [ `echo $dirperm | cut -c6` != \"-\" ]; then echo \"Group Write permission set on the home directory ($dir) of user $user\";fi;if [ `echo $dirperm | cut -c8` != \"-\" ]; then echo \"Other Read permission set on the home directory ($dir) of user $user\";fi;if [ `echo $dirperm | cut -c9` != \"-\" ]; then echo \"Other Write permission set on the home directory ($dir) of user $user\";fi;if [ `echo $dirperm | cut -c10` != \"-\" ]; then echo \"Other Execute permission set on the home directory ($dir) of user $user\";fi;fi;done | /bin/awk '{ print } END { if (NR==0) print \"All home directories have proper permissions\" }'" expect : "All home directories have proper permissions" system : "Linux" type : CMD_EXEC description : "6.2.9 Ensure users own their home directories" info : "The user home directory is space defined for the particular user to set local environment variables and to store personal files. Since the user is accountable for files stored in the user home directory, the user must be the owner of the directory." solution : "Change the ownership of any home directories that are not owned by the defined user to the correct user." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.2.9,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|14.4,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "cat /etc/passwd | egrep -v '^(root|halt|sync|shutdown)' | awk -F: '($7 !=\"/sbin/nologin\" && $7 != \"/bin/false\") { print $1 \" \" $6 }' | while read user dir; do if [ ! -d \"$dir\" ]; then echo \"The home directory ($dir) of user $user does not exist.\";else owner=$(stat -L -c \"%U\" \"$dir\") ;if [ \"$owner\" != \"$user\" ]; then echo \"The home directory ($dir) of user $user is owned by $owner.\";fi;fi;done | /bin/awk '{ print } END { if (NR==0) print \"All home directories have proper owners\" }'" expect : "All home directories have proper owners" system : "Linux" type : CMD_EXEC description : "6.2.10 Ensure users' dot files are not group or world writable" info : "While the system administrator can establish secure permissions for users' 'dot' files, the users can easily override these. Group or world-writable user configuration files may enable malicious users to steal or modify other users' data or to gain another user's system privileges." solution : "Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user dot file permissions and determine the action to be taken in accordance with site policy." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.2.10,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|14.4,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "cat /etc/passwd | egrep -v '^(root|halt|sync|shutdown)' | awk -F: '($7 != \"/sbin/nologin\" && $7 != \"/bin/false\") { print $1 \" \" $6 }' | while read user dir; do if [ ! -d \"$dir\" ]; then echo \"The home directory ($dir) of user $user does not exist.\"; else for file in $dir/.[A-Za-z0-9]*; do if [ ! -h \"$file\" -a -f \"$file\" ]; then fileperm=`ls -ld $file | cut -f1 -d\" \"`; if [ `echo $fileperm | cut -c6` != \"-\" ]; then echo \"Group Write permission set on file $file\"; fi; if [ `echo $fileperm | cut -c9` != \"-\" ]; then echo \"Other Write permission set on file $file\"; fi; fi; done; fi; done | /bin/awk '{ print } END { if (NR==0) print \"All dot files have proper permissions\" }'" expect : "All dot files have proper permissions" system : "Linux" type : CMD_EXEC description : "6.2.11 Ensure no users have .forward files" info : "The .forward file specifies an email address to forward the user's mail to. Use of the .forward file poses a security risk in that sensitive data may be inadvertently transferred outside the organization. The .forward file also poses a risk as it can be used to execute commands that may perform unintended actions." solution : "Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user .forward files and determine the action to be taken in accordance with site policy." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.2.11,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|7,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "cat /etc/passwd | egrep -v '^(root|halt|sync|shutdown)' | awk -F: '($7 != \"/sbin/nologin\" && $7 != \"/bin/false\") { print $1 \" \" $6 }' | while read user dir; do if [ ! -d \"$dir\" ]; then echo \"The home directory ($dir) of user $user does not exist.\"; else if [ ! -h \"$dir/.forward\" -a -f \"$dir/.forward\" ]; then echo \".forward file $dir/.forward exists\"; fi; fi; done | /bin/awk '{ print } END { if (NR==0) print \"No users have forward files\" }'" expect : "No users have forward files" system : "Linux" type : CMD_EXEC description : "6.2.12 Ensure no users have .netrc files" info : "The .netrc file contains data for logging into a remote host for file transfers via FTP. The .netrc file presents a significant security risk since it stores passwords in unencrypted form. Even if FTP is disabled, user accounts may have brought over .netrc files from other systems which could pose a risk to those systems." solution : "Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user .netrc files and determine the action to be taken in accordance with site policy." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.2.12,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|16.14,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "cat /etc/passwd | egrep -v '^(root|halt|sync|shutdown)' | awk -F: '($7 != \"/sbin/nologin\" && $7 != \"/bin/false\") { print $1 \" \" $6 }' | while read user dir; do if [ ! -d \"$dir\" ]; then echo \"The home directory ($dir) of user $user does not exist.\"; else if [ ! -h \"$dir/.netrc\" -a -f \"$dir/.netrc\" ]; then echo \".netrc file $dir/.netrc exists\"; fi; fi; done | /bin/awk '{ print } END { if (NR==0) print \"No users have netrc files\" }'" expect : "No users have netrc files" system : "Linux" type : CMD_EXEC description : "6.2.13 Ensure users' .netrc ob体育s are not group or world accessible" info : "While the system administrator can establish secure permissions for users' .netrc files, the users can easily override these. .netrc files may contain unencrypted passwords that may be used to attack other systems." solution : "Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user .netrc file permissions and determine the action to be taken in accordance with site policy." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.2.13,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|14.4,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "cat /etc/passwd | egrep -v '^(root|halt|sync|shutdown)' | awk -F: '($7 != \"/sbin/nologin\" && $7 != \"/bin/false\") { print $1 \" \" $6 }' | while read user dir; do if [ ! -d \"$dir\" ]; then echo \"The home directory ($dir) of user $user does not exist.\"; else for file in $dir/.netrc; do if [ ! -h \"$file\" -a -f \"$file\" ]; then fileperm=`ls -ld $file | cut -f1 -d\" \"`; if [ `echo $fileperm | cut -c5` != \"-\" ]; then echo \"Group Read set on $file\"; fi; if [ `echo $fileperm | cut -c6` != \"-\" ]; then echo \"Group Write set on $file\"; fi; if [ `echo $fileperm | cut -c7` != \"-\" ]; then echo \"Group Execute set on $file\"; fi; if [ `echo $fileperm | cut -c8` != \"-\" ]; then echo \"Other Read set on $file\"; fi; if [ `echo $fileperm | cut -c9` != \"-\" ]; then echo \"Other Write set on $file\"; fi; if [ `echo $fileperm | cut -c10` != \"-\" ]; then echo \"Other Execute set on $file\"; fi; fi; done; fi; done | /bin/awk '{ print } END { if (NR==0) print \"All netrc permissions correct\" }'" expect : "All netrc permissions correct" system : "Linux" type : CMD_EXEC description : "6.2.14 Ensure no users have .rhosts files" info : "While no .rhosts files are shipped by default, users can easily create them. This action is only meaningful if .rhosts support is permitted in the file /etc/pam.conf. Even though the .rhosts files are ineffective if support is disabled in /etc/pam.conf, they may have been brought over from other systems and could contain information useful to an attacker for those other systems." solution : "Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user .rhosts files and determine the action to be taken in accordance with site policy." reference : "800-171|3.4.2,800-53|CM-6b.,CIS_Recommendation|6.2.14,CN-L3|8.1.10.6(d),CSCv6|3.1,CSCv6|16.14,CSF|PR.IP-1,ITSG-33|CM-6b.,LEVEL|1S,NESA|T3.2.1,PCI-DSSv3.1|2.2.4,PCI-DSSv3.2|2.2.4,SWIFT-CSCv1|2.3" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "cat /etc/passwd | egrep -v '^(root|halt|sync|shutdown)' | awk -F: '($7 != \"/sbin/nologin\" && $7 != \"/bin/false\") { print $1 \" \" $6 }' | while read user dir; do if [ ! -d \"$dir\" ]; then echo \"The home directory ($dir) of user $user does not exist.\"; else for file in $dir/.rhosts; do if [ ! -h \"$file\" -a -f \"$file\" ]; then echo \".rhosts file in $dir\"; fi; done; fi; done | /bin/awk '{ print } END { if (NR==0) print \"No users have rhosts files\" }'" expect : "No users have rhosts files" system : "Linux" description : "6.2.15 Ensure all groups in /etc/passwd exist in /etc/group" info : "Over time, system administration errors and changes can lead to groups being defined in /etc/passwd but not in /etc/group. Groups defined in the /etc/passwd file but not in the /etc/group file pose a threat to system security since group permissions are not properly managed." solution : "Analyze the output of the Audit step above and perform the appropriate action to correct any discrepancies found." reference : "800-171|3.1.1,800-53|AC-2c.,CIS_Recommendation|6.2.15,CN-L3|7.1.3.2(d),CSCv6|16,CSF|DE.CM-1,CSF|DE.CM-3,CSF|PR.AC-1,CSF|PR.AC-4,ISO/IEC-27001|A.9.2.1,ITSG-33|AC-2c.,LEVEL|1S,NESA|T5.2.1,NESA|T5.2.2,NIAv2|AM28,NIAv2|NS5j,NIAv2|SS14e,QCSC-v1|5.2.2,QCSC-v1|8.2.1,QCSC-v1|13.2,QCSC-v1|15.2" see_also : "https://workbench.cisecurity.org/files/1864" name : "passwd_invalid_gid" system : "Linux" description : "6.2.16 Ensure no duplicate UIDs exist" info : "Although the useradd program will not let you create a duplicate User ID (UID), it is possible for an administrator to manually edit the /etc/passwd file and change the UID field. Users must be assigned unique UIDs for accountability and to ensure appropriate access protections." solution : "Based on the results of the audit script, establish unique UIDs and review all files owned by the shared UIDs to determine which UID they are supposed to belong to." reference : "800-171|3.5.5,800-171|3.5.6,800-53|IA-4d.,CIS_Recommendation|6.2.16,CN-L3|8.1.4.1(a),CSCv6|16,CSF|PR.AC-1,ITSG-33|IA-4d.,LEVEL|1S,NESA|T5.5.2,NIAv2|AM14a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|5" see_also : "https://workbench.cisecurity.org/files/1864" name : "passwd_duplicate_uid" system : "Linux" description : "6.2.17 Ensure no duplicate GIDs exist" info : "Although the groupadd program will not let you create a duplicate Group ID (GID), it is possible for an administrator to manually edit the /etc/group file and change the GID field. User groups must be assigned unique GIDs for accountability and to ensure appropriate access protections." solution : "Based on the results of the audit script, establish unique GIDs and review all files owned by the shared GID to determine which group they are supposed to belong to." reference : "800-171|3.5.5,800-171|3.5.6,800-53|IA-4d.,CIS_Recommendation|6.2.17,CN-L3|8.1.4.1(a),CSCv6|16,CSF|PR.AC-1,ITSG-33|IA-4d.,LEVEL|1S,NESA|T5.5.2,NIAv2|AM14a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|5" see_also : "https://workbench.cisecurity.org/files/1864" name : "group_duplicate_gid" system : "Linux" description : "6.2.18 Ensure no duplicate user names exist" info : "Although the useradd program will not let you create a duplicate user name, it is possible for an administrator to manually edit the /etc/passwd file and change the user name. If a user is assigned a duplicate user name, it will create and have access to files with the first UID for that username in /etc/passwd. For example, if 'test4' has a UID of 1000 and a subsequent 'test4' entry has a UID of 2000, logging in as 'test4' will use UID 1000. Effectively, the UID is shared, which is a security problem." solution : "Based on the results of the audit script, establish unique user names for the users. ob体育 ownerships will automatically reflect the change as long as the users have unique UIDs." reference : "800-171|3.5.5,800-171|3.5.6,800-53|IA-4d.,CIS_Recommendation|6.2.18,CN-L3|8.1.4.1(a),CSCv6|16,CSF|PR.AC-1,ITSG-33|IA-4d.,LEVEL|1S,NESA|T5.5.2,NIAv2|AM14a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|5" see_also : "https://workbench.cisecurity.org/files/1864" name : "passwd_duplicate_username" system : "Linux" description : "6.2.19 Ensure no duplicate group names exist" info : "Although the groupadd program will not let you create a duplicate group name, it is possible for an administrator to manually edit the /etc/group file and change the group name. If a group is assigned a duplicate group name, it will create and have access to files with the first GID for that group in /etc/group. Effectively, the GID is shared, which is a security problem." solution : "Based on the results of the audit script, establish unique names for the user groups. ob体育 group ownerships will automatically reflect the change as long as the groups have unique GIDs." reference : "800-171|3.5.5,800-171|3.5.6,800-53|IA-4d.,CIS_Recommendation|6.2.19,CN-L3|8.1.4.1(a),CSCv6|16,CSF|PR.AC-1,ITSG-33|IA-4d.,LEVEL|1S,NESA|T5.5.2,NIAv2|AM14a,QCSC-v1|5.2.2,QCSC-v1|13.2,SWIFT-CSCv1|5" see_also : "https://workbench.cisecurity.org/files/1864" name : "group_duplicate_name" system : "Linux" type : CMD_EXEC description : "6.2.20 Ensure shadow group is empty" info : "The shadow group allows system programs which require access the ability to read the /etc/shadow file. No users should be assigned to the shadow group." solution : "Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group." reference : "800-171|3.1.1,800-53|AC-2f.,CIS_Recommendation|6.2.20,CN-L3|7.1.3.2(d),CSCv6|5.1,CSF|DE.CM-1,CSF|DE.CM-3,CSF|PR.AC-1,CSF|PR.AC-4,ISO/IEC-27001|A.9.2.1,ITSG-33|AC-2f.,LEVEL|1S,NESA|M4.4.3,NESA|T5.2.1,NIAv2|SS14d,QCSC-v1|5.2.2,QCSC-v1|8.2.1,QCSC-v1|13.2,QCSC-v1|15.2" see_also : "https://workbench.cisecurity.org/files/1864" cmd : "/usr/bin/awk -F: 'FILENAME == \"/etc/group\" && $1 == \"shadow\" { gid=$3; if ($4!=\"\") { print \"secondary \"$4; f=1 } } FILENAME == \"/etc/passwd\" && $4 == gid && gid != \"\" { print \"primary \"$1; f=1; } END { if (!f) print \"shadow group empty\" }' /etc/group /etc/passwd" expect : "^shadow group empty$" description : "CIS_SUSE_Linux_Enterprise_Server_11_v2.1.0_L1.audit Level 1" info : "NOTE: Nessus has not identified that the chosen audit applies to the target device." see_also : "https://workbench.cisecurity.org/files/1864"