# # (C) 2014 Tenable Network Security, Inc. # # 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 Network Security, Inc. # # See the following licenses for details: # # http://static.tenable.com/prod_docs/Nessus_5_SLA_and_Subscription_Agreement.pdf # http://static.tenable.com/prod_docs/Subscription_Agreement.pdf # # @PROFESSIONALFEED@ # # $Revision: 1.5 $ # $Date: 2014/03/24 19:08:16 $ # # description : This document implements CIS Level 1 benchmarks # for SUSE Linux Enterprise Server 11 v1.0.0 # https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf # # NOTE : Some queries in this .audit require site-specific data to be known to the query in order to function properly. # Please note the following queries and edit their values accordingly. system : "Linux" 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]*$" # 2. ob体育system Configuration system : "Linux" type : FILE_CONTENT_CHECK description : "2.1 Create Separate Partition for /tmp" info : "The /tmp directory is a world-writable directory used for temporary storage by all users and some applications. Since the /tmp directory is intended to be world-writable, there is a risk of resource exhaustion if it is not bound to a separate partition. In addition, making /tmp its own file system allows an administrator to set the noexec option on the mount, making /tmp useless for an attacker to install executable code. It would also prevent an attacker from establishing a hardlink to a system setuid program and wait for it to be updated. Once the program was updated, the hardlink would be broken and the attacker would have his own copy of the program. If the program happened to have a security vulnerability, the attacker could continue to exploit the known flaw." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "For new installations, during installation create a custom partition setup and specify a separate partition for /tmp. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/tmp[\\s]" expect : "^[\\s]*.*[\\s]+\\/tmp[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "2.2 Set nodev option for /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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options). See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/tmp[\\s]" expect : "^[\\s]*.*[\\s]+\\/tmp[\\s]+.*[,]?nodev" system : "Linux" type : FILE_CONTENT_CHECK description : "2.3 Set nosuid option for /tmp Partition" info : "The nosuid mount option specifies that the filesystem cannot contain set userid files. Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create set userid files in /tmp." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options). See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/tmp[\\s]" expect : "^[\\s]*.*[\\s]+\\/tmp[\\s]+.*[,]?nosuid" system : "Linux" type : FILE_CONTENT_CHECK description : "2.4 Set noexec option for /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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add noexec to the fourth field (mounting options). See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/tmp[\\s]" expect : "^[\\s]*.*[\\s]+\\/tmp[\\s]|.*[,]?noexec" system : "Linux" type : FILE_CONTENT_CHECK description : "2.5 Create Separate Partition for /var" info : "The /var directory is used by daemons and other system services to temporarily store dynamic data. Some directories created by these processes may be world-writable. Since the /var directory may contain world-writable files and directories, there is a risk of resource exhaustion if it is not bound to a separate partition." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "For new installations, during installation create a custom partition setup and specify a separate partition for /var. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/var[\\s]" expect : "^[\\s]*.*[\\s]+\\/var[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "2.6 Bind Mount the /var/tmp directory to /tmp" info : "The /var/tmp directory is normally a standalone directory in the /var file system. Binding /var/tmp to /tmp establishes an unbreakable link to /tmp that cannot be removed (even by the root user). It also allows /var/tmp to inherit the same mount options that /tmp owns, allowing /var/tmp to be protected in the same /tmp is protected. It will also prevent /var from filling up with temporary files as the contents of /var/tmp will actually reside in the file system containing /tmp. All programs that use /var/tmp and /tmp to read/write temporary files will always be written to the /tmp file system, preventing a user from running the /var file system out of space or trying to perform operations that have been blocked in the /tmp filesystem." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# mount --bind /tmp /var/tmp' and edit the /etc/fstab file to contain the following line: '/tmp /var/tmp none bind 0 0'" file : "/etc/fstab" regex : "^[\\s]*\\/tmp[\\s]+\\/var/tmp[\\s]+none[\\s]+.*" expect : "^[\\s]*\\/tmp[\\s]+\\/var/tmp[\\s]+none[\\s]+bind[\\s]+0[\\s]+0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "2.7 Create Separate Partition for /var/log" info : "The /var/log directory is used by system services to store log data. There are two important reasons to ensure that system logs are stored on a separate partition: protection against resource exhaustion (since logs can grow quite large) and protection of audit data." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "For new installations, during installation create a custom partition setup and specify a separate partition for /var/log. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions." file : "/etc/fstab" regex : "^[\\s]*\\/log[\\s]+\\/var/log[\\s]+none[\\s]+.*" expect : "^[\\s]*\\/log[\\s]+\\/var/log[\\s]+none[\\s]+bind[\\s]+0[\\s]+0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "2.8 Create Separate Partition for /var/log/audit" info : "The auditing daemon, auditd, stores log data in the /var/log/audit directory. There are two important reasons to ensure that data gathered by auditd is stored on a separate partition: protection against resource exhaustion (since the audit.log file can grow quite large) and protection of audit data. The audit daemon calculates how much free space is left and performs actions based on the results. If other processes (such as syslog) consume space in the same partition as auditd, it may not perform as desired." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "For new installations, during installation create a custom partition setup and specify a separate partition for /var/log/audit. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/var\\/log/audit[\\s]" expect : "^[\\s]*.*[\\s]+\\/var\\/log/audit[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "2.9 Create Separate Partition for /home" info : "The /home directory is used to support disk storage needs of local users. If the system is intended to support local users, create a separate partition for the /home directory to protect against resource exhaustion and restrict the type of files that can be stored under /home." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "For new installations, during installation create a custom partition setup and specify a separate partition for /home. For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/home[\\s]" expect : "^[\\s]*.*[\\s]+\\/home[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "2.10 Add nodev Option to /home" info : "When set on a file system, this option prevents character and block special devices from being defined, or if they exist, from being used as character and block 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. NOTE: The actions in the item refer to the /home partition, which is the default user partition that is defined in many distributions. If you have created other user partitions, it is recommended that the Remediation and Audit steps be applied to these partitions as well." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options). See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/home[\\s]" expect : "^[\\s]*.*[\\s]+\\/home[\\s]+.*[,]?nodev" system : "Linux" type : FILE_CONTENT_CHECK description : "2.11 Add nodev Option to Removable Media Partitions" info : "Set nodev on removable media to prevent character and block special devices that are present on the removable be treated as these device files. NOTE: The actions in the item refer to the /home partition, which is the default user partition that is defined in many distributions. If you have created other user partitions, it is recommended that the Remediation and Audit steps be applied to these partitions as well." reference : "Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options). See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/m.*\\/(floppy|cdrom|corder)[\\s]" expect : "^[\\s]*.*[\\s]+\\/m.*\\/(floppy|cdrom|corder)[\\s].*[,]?nodev" string_required: NO system : "Linux" type : FILE_CONTENT_CHECK description : "2.12 Add noexec Option to Removable Media Partitions" info : "Set nodev on removable media to prevent character and block special devices that are present on the removable be treated as these device files. 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." reference : "Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add noexec to the fourth field (mounting options). Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/m.*\\/(floppy|cdrom|corder)[\\s]" expect : "^[\\s]*.*[\\s]+\\/m.*\\/(floppy|cdrom|corder)[\\s]+.*[,]?noexec" string_required: NO system : "Linux" type : FILE_CONTENT_CHECK description : "2.13 Add nosuid Option to Removable Media Partitions" info : "Set nosuid on removable media to prevent setuid and setgid executable files that are on that media from being executed as setuid and setgid. Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." reference : "Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options). Look for entries that have mount points that contain words such as floppy or cdrom. See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/m.*\\/(floppy|cdrom|corder)[\\s]" expect : "^[\\s]*.*[\\s]+\\/m.*\\/(floppy|cdrom|corder)[\\s]+.*[,]?nosuid" string_required: NO system : "Linux" type : FILE_CONTENT_CHECK description : "2.14 Add nodev Option to /dev/shm Partition" info : "The nodev mount option specifies that the /dev/shm (temporary filesystem stored in memory) cannot contain block or character 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add nodev to the fourth field (mounting options of entries that have mount points that contain /dev/shm. See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/dev\\/shm[\\s]" expect : "^[\\s]*.*[\\s]+\\/dev\\/shm[\\s]+.*[,]?nodev" system : "Linux" type : FILE_CONTENT_CHECK description : "2.15 Add nosuid Option to /dev/shm Partition" info : "The nosuid mount option specifies that the /dev/shm (temporary filesystem stored in memory) will not execute setuid and setgid on executable programs as such, but rather execute them with the uid and gid of the user executing the program. Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add nosuid to the fourth field (mounting options of entries that have mount points that contain /dev/shm. See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/dev\\/shm[\\s]" expect : "^[\\s]*.*[\\s]+\\/dev\\/shm[\\s]+.*[,]?nosuid" system : "Linux" type : FILE_CONTENT_CHECK description : "2.16 Add noexec Option to /dev/shm Partition" info : "Set noexec on the shared memory partition to prevent programs from executing from there. 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/fstab file and add noexec to the fourth field (mounting options of entries that have mount points that contain /dev/shm. See the fstab(5) manual page for more information." file : "/etc/fstab" regex : "^[\\s]*.*[\\s]+\\/dev\\/shm[\\s]" expect : "^[\\s]*.*[\\s]+\\/dev\\/shm[\\s]+.*[,]?noexec" system : "Linux" type : CMD_EXEC description : "2.17 Set Sticky Bit 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type d \( -perm -0002 -a ! -perm -1000 \) 2>/dev/null | xargs chmod a+t'" cmd : "/bin/df --local -P | /usr/bin/awk {'if (NR!=1) print $6'} | /usr/bin/xargs -I '{}' /usr/bin/find '{}' -xdev -type d \\( -perm -0002 -a ! -perm -1000 \\) 2>/dev/null | /usr/bin/awk '{print} END {if (NR == 0) print \"none\"}'" expect : "none" type : CHKCONFIG description : "2.25 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 it's contents available in system even if they lacked permissions to mount it themselves." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# chkconfig autofs off'" service : "autofs" levels : "123456" status : OFF # 3. Secure Boot Settings system : "Linux" type : FILE_CHECK description : "3.1 Set User/Group Owner on bootloader config" info : "Set the owner and group of your boot loaders config file to the root user. Suse default to GRUB stored at /boot/grub/menu.lst. Packages are available for LILO but it is not recommended. Setting the owner and group to root prevents non-root users from changing the file." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# chown root:root /boot/grub/menu.lst'" file : "/boot/grub/menu.lst" owner : "root" group : "root" system : "Linux" type : FILE_CHECK description : "3.2 Set Permissions on bootloader config" info : "Set permission on the /boot/grub/menu.lst file to read and write for root only. 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# chmod og-rwx /boot/grub/menu.lst'" file : "/boot/grub/menu.lst" mask : "177" system : "Linux" type : FILE_CONTENT_CHECK description : "3.4 Require Authentication for Single-User Mode - 'ls:S:wait:/etc/init.d/rc S'" info : "Since /etc/inittab determines what run state the system is in, setting the entry in /etc/inittab will force single user authentication. Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Ensure the following lines are in /etc/inittab: 'ls:S:wait:/etc/init.d/rc S ~~:S:respawn:/sbin/sulogin'" file : "/etc/inittab" regex : "^[\\s]*ls:S:" expect : "^[\\s]*ls:S:wait:\/etc\/init\.d\/rc[\\s]+S[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "3.4 Require Authentication for Single-User Mode - '~~:S:respawn:/sbin/sulogin'" info : "Since /etc/inittab determines what run state the system is in, setting the entry in /etc/inittab will force single user authentication. Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Ensure the following lines are in /etc/inittab: 'ls:S:wait:/etc/init.d/rc S ~~:S:respawn:/sbin/sulogin'" file : "/etc/inittab" regex : "^[\\s]*~~:S:" expect : "^[\\s]*~~:S:respawn:\/sbin\/sulogin[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "3.5 Disable Interactive Boot" info : "The PROMPT_FOR_CONFIRM option provides console users the ability to interactively boot the system and select which services to start on boot. Turn off the PROMPT_FOR_CONFIRM option on the console to prevent console users from potentially overriding established security settings." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the PROMPT_FOR_CONFIRM parameter in /etc/sysconfig/boot to no. 'PROMPT_FOR_CONFIRM=no'" file : "/etc/sysconfig/boot" regex : "^[\\s]*[Pp][Rr][Oo][Mm][Pp][Tt]_[Ff][Oo][Rr]_[Cc][Oo][Nn][Ff][Ii][Rr][Mm][\\s]*=" expect : "^[\\s]*[Pp][Rr][Oo][Mm][Pp][Tt]_[Ff][Oo][Rr]_[Cc][Oo][Nn][Ff][Ii][Rr][Mm][\\s]*=[\\s]*[Nn][Oo][\\s]*$" # 4 Additional Process Hardening system : "Linux" type : FILE_CONTENT_CHECK description : "4.1 Restrict Core Dumps - '/etc/security/limits.conf * 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." reference : "800-53|SC-5,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Add the following line to the /etc/security/limits.conf file. '* hard core 0'" 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 : "4.1 Restrict Core Dumps - 'sysctl fs.suid_dumpable = 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." reference : "800-53|SC-5,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Add the following line to the /etc/security/limits.conf file. '* hard core 0'" cmd : "/sbin/sysctl fs.suid_dumpable" expect : "^[\\s]*fs.suid_dumpable[\\s]+=[\\s]+0[\\s]*$" system : "Linux" type : RPM_CHECK description : "4.2 Enable XD/NX Support on 32-bit x86 Systems" 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." reference : "Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Install the kernel-pae package: '# zypper install kernel-pae'. If necessary configure /boot/grub/menu.lst to load the new kernel and reboot the system." rpm : "kernel-pae-0.0.0-0" operator : "lt" system : "Linux" type : FILE_CONTENT_CHECK description : "4.3 Enable Randomized Virtual Memory Region Placement" info : "Set the system flag to force randomized virtual memory region placement. Randomly placing virtual memory regions will make it difficult for to write memory page exploits as the memory placement will be consistently shifting." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Add the following line to the /etc/sysctl.conf file. 'kernel.randomize_va_space = 2'" file : "/etc/sysctl.conf" regex : "^[\\s]*kernel\.randomize_va_space[\\s]*" expect : "^[\\s]*kernel\.randomize_va_space[\\s]*=[\\s]*2[\\s]*$" system : "Linux" type : RPM_CHECK description : "4.4 Disable Prelink" info : "The prelinking feature changes binaries in an attempt to decrease their startup time." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Run the command: '# /usr/sbin/prelink -ua' to restore binaries to a normal, non-prelinked state, then remove prelink: '# zypper remove prelink'" rpm : "prelink-0.0.0-0" operator : "lt" # 5 OS Services # 5.1 Ensure Legacy Services are Not Enabled type : CHKCONFIG description : "5.1.1 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." reference : "Level|1S,PCI|2.2.2" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable NIS server: '# chkconfig ypserv off'" service : "ypserv" levels : "123456" status : OFF system : "Linux" type : RPM_CHECK description : "5.1.2 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Uninstall the ypbind package: '# zypper remove ypbind'" rpm : "ypbind-0.0.0-0" operator : "lt" system : "Linux" type : XINETD_SVC description : "5.1.3 Ensure rsh server is not enabled" info : "The Berkeley rsh-server (rsh, rlogin, rcp) 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable the rsh server: '# chkconfig rsh off'" service : "rsh" status : OFF system : "Linux" type : RPM_CHECK description : "5.1.4 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Uninstall the rsh package: '# zypper remove rsh'" rpm : "rsh-0.0.0-0" operator : "lt" system : "Linux" type : XINETD_SVC description : "5.1.5 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable talk server: '# chkconfig talk off'" service : "talk" status : OFF system : "Linux" type : RPM_CHECK description : "5.1.6 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 (allows initialization of talk sessions) is installed by default. The software presents a security risk as it uses unencrypted protocols for communication." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Uninstall talk client: '# zypper remove talk'" rpm : "talk-0.0.0-0" operator : "lt" system : "Linux" type : XINETD_SVC description : "5.1.7 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable telnet server if enabled: '# chkconfig telnet off'" service : "telnet" status : OFF system : "Linux" type : XINETD_SVC description : "5.1.8 Ensure tftp-server is not enabled (tftp)" 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 packages tftp and atftp are both used to define and support a TFTP server. TFTP does not support authentication nor does it ensure the confidentiality or integrity of data. It is recommended that TFTP be removed, unless there is a specific need for TFTP. In that case, extreme caution must be used when configuring the services." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable TFTP servers: '# chkconfig tftp off'" service : "tftp" status : OFF system : "Linux" type : CHKCONFIG description : "5.1.8 Ensure tftp-server is not enabled (atftpd)" 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 packages tftp and atftp are both used to define and support a TFTP server. TFTP does not support authentication nor does it ensure the confidentiality or integrity of data. It is recommended that TFTP be removed, unless there is a specific need for TFTP. In that case, extreme caution must be used when configuring the services." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable TFTP servers: '# chkconfig atftpd off'" service : "atftpd" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "5.1.9 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable xinetd: '# chkconfig xinetd off'" service : "xinetd" levels : "123456" status : OFF system : "Linux" type : XINETD_SVC description : "5.2 Ensure chargen-udp is not enabled" info : "chargen-udp is a network service that responds with 0 to 512 ASCII characters for each datagram 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable chargen-udp: '# chkconfig chargen-udp off'" service : "chargen-udp" status : OFF system : "Linux" type : XINETD_SVC description : "5.3 Ensure chargen is 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable chargen: '# chkconfig chargen off'" service : "chargen" status : OFF system : "Linux" type : XINETD_SVC description : "5.4 Ensure daytime-udp is not enabled" info : "daytime-udp 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable daytime-udp: '# chkconfig daytime-udp off'" service : "daytime-udp" status : OFF system : "Linux" type : XINETD_SVC description : "5.5 Ensure daytime is 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable daytime: '# chkconfig daytime off'" service : "daytime" status : OFF system : "Linux" type : XINETD_SVC description : "5.6 Ensure echo-udp is not enabled" info : "echo-udp 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable echo-udp: '# chkconfig echo-udp off'" service : "echo-udp" status : OFF system : "Linux" type : XINETD_SVC description : "5.7 Ensure echo is 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable echo: '# chkconfig echo off'" service : "echo" status : OFF system : "Linux" type : XINETD_SVC description : "5.8 Ensure discard-udp is not enabled" info : "discard-udp 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable discard-udp: '# chkconfig discard-udp off'" service : "discard-udp" status : OFF system : "Linux" type : XINETD_SVC description : "5.9 Ensure discard is 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable discard: '# chkconfig discard off'" service : "discard" status : OFF system : "Linux" type : XINETD_SVC description : "5.10 Ensure time-udp is not enabled" info : "time-udp 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable time-udp: '# chkconfig time-udp off'" service : "time-udp" status : OFF system : "Linux" type : XINETD_SVC description : "5.11 Ensure time is 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable time: '# chkconfig time off'" service : "time" status : OFF # 6 Special Purpose Services system : "Linux" type : CHKCONFIG description : "6.2 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. Since servers are not normally used for printing, this service is not needed unless dependencies require it. If this is the case, disable the service to reduce the potential attack surface. If for some reason the service is required on the server, follow the recommendations in sub-sections 3.2.1 - 3.2.5 to secure it." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable Avahi server: '# chkconfig avahi-daemon off'" service : "avahi-daemon" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.3 Ensure print server 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." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" see_also : "http://www.cups.org" solution : "Disable print server: '# chkconfig cups off'" service : "cups" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.4 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 server is specifically set up to act as a DHCP server, it is recommended that this service be deleted to reduce the potential attack surface." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" see_also : "http://www.isc.org/software/dhcp" solution : "Disable DHCP server: '# chkconfig dhcpd off'" service : "dhcpd" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.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 server does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable NFS: '# chkconfig nfs off'" service : "nfs" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.7 Ensure NFS and RPC are not enabled (RPC)" 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 server does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce remote attack surface." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable RPC: '# chkconfig rpcbind off'" service : "rpcbind" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.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 server is specifically designated to act as a DNS server, it is recommended that the package be deleted to reduce the potential attack surface." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable RPC: '# chkconfig named off'" service : "named" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.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 package be deleted to reduce the potential attack surface." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable RPC: '# chkconfig vsftpd off'" service : "vsftpd" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.11 Ensure IMAP and POP server is not enabled" info : "Cyrus-imap is an open source IMAP and POP3 server for Linux based systems. Unless POP3 and/or IMAP servers are to be provided to this server, it is recommended that the service be deleted to reduce the potential attack surface." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable RPC: '# chkconfig cyrus off'" service : "cyrus" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.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 deleted to reduce the potential attack surface." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable RPC: '# chkconfig smb off'" service : "smb" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.13 Ensure HTTP Proxy Server is not enabled" info : "Squid is a standard proxy server used in many distributions and environments. If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable RPC: '# chkconfig squid off'" service : "squid" levels : "123456" status : OFF system : "Linux" type : CHKCONFIG description : "6.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 communicates 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." reference : "PCI|2.2.2,Level|1NS,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable RPC: '# chkconfig snmpd off'" service : "snmpd" levels : "123456" status : OFF system : "Linux" type : FILE_CONTENT_CHECK description : "6.15 Configure Mail Transfer Agent for Local-Only Mode" 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. NOTE: The remediation given here provides instructions for configuring the postfix mail server, depending on your environment you may have an alternative MTA installed such as sendmail. If this is the case consult the documentation for your installed MTA to configure the recommended state." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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 this line: 'inet_interfaces = localhost # Execute the following command to restart postfix # service postfix restart'" file : "/etc/postfix/main.cf" regex : "^[\\s]*inet_interfaces[\\s]*=" expect : "^[\\s]*inet_interfaces[\\s]*=[\\s]*[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt][\\s]*$" system : "Linux" type : CHKCONFIG description : "6.16 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Disable rsync service: '# chkconfig rsyncd off'" service : "rsyncd" levels : "123456" status : OFF system : "Linux" type : RPM_CHECK description : "6.17 Ensure Biosdevname is not enabled" info : "YaST2 automatically installs biosdevname, if YaST2 auto-detects hardware compatible with biosdevname." info : "biosdevname uses three methods to determine NIC names: 1. PCI firmware spec.3.1 2. smbios (matches # after 'em' to OEM # printed on board or housing) 3. PCI IRQ Routing Table (uses # of NIC position in the device history). If the BIOS does not support biosdevname, no NICs' are re-named. Biosdevname is an external tool that works with the udev framework for naming devices. The feature can automatically be installed if YaST2 detects compatible hardware with biosdevname. biosdevname can also be enabled or disabled by using the kernel command line. biosdevname is an external tool that works with the udev framework for custom re-naming of system hardware connections made by the kernel and BIOS. As allowing the re-naming of devices can severely disrupt network communications by creating resource conflicts and provide an attack vector for denial of service exploits, this capability should be disabled or restricted according to the needs of the organization." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Uninstall the biosdevname package: '# zypper remove biosdevname'" rpm : "biosdevname-0.0.0-0" operator : "lt" # 7 Network Configuration and Firewalls ## 7.1 Modify Network Parameters (Host Only) system : "Linux" type : FILE_CONTENT_CHECK description : "7.1.1 Disable IP Forwarding" info : "The net.ipv4.ip_forward flag is used to tell the server whether it can forward packets or not. If the server is not to be used as a router, set the flag to 0. Setting the flag to 0 ensures that a server with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router." reference : "COBIT5|DSS05.03,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.ip_forward parameter to 0 in /etc/sysctl.conf: net.ipv4.ip_forward=0 | Modify active kernel parameters to match: '# /sbin/sysctl -w net.ipv4.ip_forward=0' '# /sbin/sysctl -w net.ipv4.route.flush=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.ip_forward[\\s]*=" expect : "^[\\s]*net\.ipv4\.ip_forward[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.1.2 Disable Send Packet Redirects - 'net.ipv4.conf.all.send_redirects'" 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." reference : "COBIT5|DSS05.03,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.send_redirects and net.ipv4.conf.default.send_redirects parameters to 0 in /etc/sysctl.conf: 'net.ipv4.conf.all.send_redirects=0' | Modify active kernel parameters to match: '# /sbin/sysctl -w net.ipv4.conf.all.send_redirects=0' '# /sbin/sysctl -w net.ipv4.default.all.send_redirects=0' '# /sbin/sysctl -w net.ipv4.route.flush=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.all\.send_redirects[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.all\.send_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.1.2 Disable Send Packet Redirects - 'net.ipv4.conf.default.send_redirects'" 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." reference : "COBIT5|DSS05.03,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.send_redirects and net.ipv4.conf.default.send_redirects parameters to 0 in /etc/sysctl.conf: 'net.ipv4.conf.all.send_redirects=0' | Modify active kernel parameters to match: '# /sbin/sysctl -w net.ipv4.conf.all.send_redirects=0' '# /sbin/sysctl -w net.ipv4.default.all.send_redirects=0' '# /sbin/sysctl -w net.ipv4.route.flush=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.default\.send_redirects[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.default\.send_redirects[\\s]*=[\\s]*0[\\s]*$" ## 7.2 Modify Network Parameters (Host and Router) system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.1 Disable Source Routed Packet Acceptance - 'net.ipv4.conf.all.accept_source_route'" 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 server 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 server as a way to reach the private address servers. 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route parameters to 0 in /etc/sysctl.conf: 'net.ipv4.conf.all.accept_source_route=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.all\.accept_source_route[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.all\.accept_source_route[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.1 Disable Source Routed Packet Acceptance - 'net.ipv4.conf.default.accept_source_route'" 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 server 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 server as a way to reach the private address servers. 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.accept_source_route and net.ipv4.conf.default.accept_source_route parameters to 0 in /etc/sysctl.conf: 'net.ipv4.conf.all.accept_source_route=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.default\.accept_source_route[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.default\.accept_source_route[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.2 Disable ICMP Redirect Acceptance - 'net.ipv4.conf.all.accept_redirects'" 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." reference : "Level|1S,800-53|CM-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.accept_redirects and net.ipv4.conf.default.accept_redirects parameters to 0 in /etc/sysctl.conf: 'net.ipv4.conf.all.accept_redirects=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.all\.accept_redirects[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.all\.accept_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.2 Disable ICMP Redirect Acceptance - 'net.ipv4.conf.all.accept_redirects'" 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." reference : "Level|1S,800-53|CM-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.accept_redirects and net.ipv4.conf.default.accept_redirects parameters to 0 in /etc/sysctl.conf: 'net.ipv4.conf.all.accept_redirects=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.default\.accept_redirects[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.default\.accept_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.3 Disable Secure ICMP Redirect Acceptance - 'net.ipv4.conf.all.secure_redirects'" 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." reference : "Level|1S,800-53|CM-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.secure_redirects and net.ipv4.conf.default.secure_redirects parameters to 0 in /etc/sysctl.conf: 'net.ipv4.conf.all.secure_redirects=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.all\.secure_redirects[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.all\.secure_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.3 Disable Secure ICMP Redirect Acceptance - 'net.ipv4.conf.default.secure_redirects'" 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." reference : "Level|1S,800-53|CM-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.secure_redirects and net.ipv4.conf.default.secure_redirects parameters to 0 in /etc/sysctl.conf: 'net.ipv4.conf.all.secure_redirects=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.default\.secure_redirects[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.default\.secure_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.4 Log Suspicious Packets - 'net.ipv4.conf.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 server." reference : "COBIT5|DSS01.03,Level|1S,800-53|CM-7,PCI|10.1" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.log_martians and net.ipv4.conf.default.log_martians parameters to 1 in /etc/sysctl.conf: 'net.ipv4.conf.all.log_martians=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.all\.log_martians[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.all\.log_martians[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.4 Log Suspicious Packets - 'net.ipv4.conf.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 server." reference : "COBIT5|DSS01.03,Level|1S,800-53|CM-7,PCI|10.1" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.log_martians and net.ipv4.conf.default.log_martians parameters to 1 in /etc/sysctl.conf: 'net.ipv4.conf.default.log_martians=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.default\.log_martians[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.default\.log_martians[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.5 Enable Ignore Broadcast Requests" 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.log_martians and net.ipv4.conf.default.log_martians parameters to 1 in /etc/sysctl.conf: 'net.ipv4.route.flush=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.icmp_echo_ignore_broadcasts[\\s]*=" expect : "^[\\s]*net\.ipv4\.icmp_echo_ignore_broadcasts[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.6 Enable Bad Error Message Protection" info : "Setting icmp_ignore_bogus_error_responses to 1 prevents the 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.icmp_ignore_bogus_error_responses parameter to 1 in /etc/sysctl.conf: 'net.ipv4.icmp_ignore_bogus_error_responses=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.icmp_ignore_bogus_error_responses[\\s]*=" expect : "^[\\s]*net\.ipv4\.icmp_ignore_bogus_error_responses[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.7 Enable RFC-recommended Source Route Validation" 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 server bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This is would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your server, you will not be able to enable this feature without breaking the routing." reference : "Level|1S,800-53|CM-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter parameters to 1 in /etc/sysctl.conf: 'net.ipv4.conf.all.rp_filter=1' 'net.ipv4.conf.default.rp_filter=1' | Modify active kernel parameters to match: '# /sbin/sysctl -w net.ipv4.conf.all.rp_filter=1' '# /sbin/sysctl -w net.ipv4.conf.default.rp_filter=1' '# /sbin/sysctl -w net.ipv4.route.flush=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.all\.rp_filter[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.all\.rp_filter[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.7 Enable RFC-recommended Source Route Validation" 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 server bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This is would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your server, you will not be able to enable this feature without breaking the routing." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter parameters to 1 in /etc/sysctl.conf: 'net.ipv4.conf.all.rp_filter=1' 'net.ipv4.conf.default.rp_filter=1' | Modify active kernel parameters to match: '# /sbin/sysctl -w net.ipv4.conf.all.rp_filter=1' '# /sbin/sysctl -w net.ipv4.conf.default.rp_filter=1' '# /sbin/sysctl -w net.ipv4.route.flush=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv4\.conf\.default\.rp_filter[\\s]*=" expect : "^[\\s]*net\.ipv4\.conf\.default\.rp_filter[\\s]*=[\\s]*1[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.2.8 Enable TCP SYN Cookies" 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 server 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 server 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 server to keep accepting valid connections, even if under a denial of service attack." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv4.tcp_syncookies parameter to 1 in /etc/sysctl.conf: 'net.ipv4.tcp_syncookies=1'" file : "/etc/sysctl.conf" regex : "^[\\s]*net.ipv4.tcp_syncookies[\\s]*=" expect : "^[\\s]*net.ipv4.tcp_syncookies[\\s]*=[\\s]*1[\\s]*$" ## 7.3 Configure IPv6 system : "Linux" type : FILE_CONTENT_CHECK description : "7.3.1 Disable IPv6 Router Advertisements - 'net.ipv6.conf.all.accept_ra'" info : "This setting disables the systems ability to accept 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." reference : "Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv6.conf.all.accept_ra and net.ipv6.conf.default.accept_ra parameter to 0 in /etc/sysctl.conf: 'net.ipv6.conf.all.accept_ra=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv6\.conf\.all\.accept_ra[\\s]*=" expect : "^[\\s]*net\.ipv6\.conf\.all\.accept_ra[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.3.1 Disable IPv6 Router Advertisements - 'net.ipv6.conf.default.accept_ra'" info : "This setting disables the systems ability to accept 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." reference : "800-53|CM-7,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv6.conf.all.accept_ra and net.ipv6.conf.default.accept_ra parameter to 0 in /etc/sysctl.conf: 'net.ipv6.conf.default.accept_ra=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv6\.conf\.default\.accept_ra[\\s]*=" expect : "^[\\s]*net\.ipv6\.conf\.default\.accept_ra[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.3.2 Disable IPv6 Redirect Acceptance - 'net.ipv6.conf.all.accept_redirects'" 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." reference : "Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv6.conf.all.accept_redirects and net.ipv6.conf.default.accept_redirects parameters to 0 in /etc/sysctl.conf: 'net.ipv6.conf.all.accept_redirects=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv6\.conf\.all\.accept_redirects[\\s]*=" expect : "^[\\s]*net\.ipv6\.conf\.all\.accept_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.3.2 Disable IPv6 Redirect Acceptance - 'net.ipv6.conf.default.accept_redirects'" 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." reference : "800-53|CM-7,800-53|CM-6,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the net.ipv6.conf.all.accept_redirects and net.ipv6.conf.default.accept_redirects parameters to 0 in /etc/sysctl.conf: 'net.ipv6.conf.default.accept_redirects=0'" file : "/etc/sysctl.conf" regex : "^[\\s]*net\.ipv6\.conf\.default\.accept_redirects[\\s]*=" expect : "^[\\s]*net\.ipv6\.conf\.default\.accept_redirects[\\s]*=[\\s]*0[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.3.3 Disable IPv6" 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." reference : "800-53|CM-7,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Perform the following command to turn ip6tables off: '# /sbin/chkconfig ip6tables off'" file : "/etc/modprobe.d/ipv6.conf" regex : "^[\\s]*options[\\s]+ipv6[\\s]+disable" expect : "^[\\s]*options[\\s]+ipv6[\\s]+disable[\\s]*=[\\s]*1[\\s]*$" ## 7.4 Install TCP Wrappers system : "Linux" type : RPM_CHECK description : "7.4.1 Install TCP Wrappers" 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." reference : "COBIT5|DSS01.03,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# zypper install tcpd'" rpm : "tcpd-0.0.0-0" operator : "gt" required : YES system : "Linux" type : FILE_CHECK description : "7.4.3 Verify Permissions on /etc/hosts.allow" 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "If the permissions of the /etc/hosts.allow file are incorrect, run the following command to correct them: '# /bin/chmod 644 /etc/hosts.allow'" file : "/etc/hosts.allow" mask : "133" system : "Linux" type : FILE_CHECK description : "7.4.5 Verify Permissions on /etc/hosts.deny" 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "If the permissions of the /etc/hosts.deny file are incorrect, run the following command to correct them: '# /bin/chmod 644 /etc/hosts.deny'" file : "/etc/hosts.deny" mask : "133" ## 7.5 Uncommon Network Protocols system : "Linux" type : FILE_CONTENT_CHECK description : "7.5.1 Disable DCCP" 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 insequence delivery. If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface." reference : "PCI|2.2.2,800-53|CM-7,800-53|CM-6,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# echo 'install dccp /bin/true' >> /etc/modprobe.d/CIS.conf'" file : "/etc/modprobe.d/CIS.conf" regex : "^[\\s]*install[\\s]+dccp[\\s]" expect : "^[\\s]*install[\\s]+dccp[\\s]+/bin/true[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.5.2 Disable SCTP" 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." reference : "PCI|2.2.2,800-53|CM-7,800-53|CM-6,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# echo 'install sctp /bin/true' >> /etc/modprobe.d/CIS.conf'" file : "/etc/modprobe.d/CIS.conf" regex : "^[\\s]*install[\\s]+sctp[\\s]" expect : "^[\\s]*install[\\s]+sctp[\\s]+/bin/true[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.5.3 Disable RDS" 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." reference : "PCI|2.2.2,800-53|CM-7,800-53|CM-6,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# echo 'install rds /bin/true' >> /etc/modprobe.d/CIS.conf'" file : "/etc/modprobe.d/CIS.conf" regex : "^[\\s]*install[\\s]+rds[\\s]" expect : "^[\\s]*install[\\s]+rds[\\s]+/bin/true[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "7.5.4 Disable TIPC" 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." reference : "PCI|2.2.2,800-53|CM-7,800-53|CM-6,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# echo 'install tipc /bin/true' >> /etc/modprobe.d/CIS.conf'" file : "/etc/modprobe.d/CIS.conf" regex : "^[\\s]*install[\\s]+tipc[\\s]" expect : "^[\\s]*install[\\s]+tipc[\\s]+/bin/true[\\s]*$" system : "Linux" type : CMD_EXEC description : "7.6 Deactivate Wireless Interfaces" info : "Wireless networking is used when wired networks are unavailable. Most distributions 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." reference : "PCI|11.1,800-53|CM-7,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Use the following commands to list all interfaces and identify devices with wireless interfaces. Once identified, shutdown the interface and remove it: 1. '# ifconfig -a' 2. '# iwconfig' 3. '# ifdown interface' 4. '# rm /etc/sysconfig/network-scripts/ifcfg-'" cmd : "/bin/echo $(/usr/sbin/iwconfig 2>&1) | /usr/bin/egrep -v 'no wireless extensions' | /bin/awk '{print} END {if (NR == 0) print \"none\"}'" expect : "none" dont_echo_cmd : YES severity : MEDIUM type : CHKCONFIG description : "7.7 SuSEfirewall2 is active - 'SuSEfirewall2_init'" info : "SuSEfirewall2 is a script that generates IPtables rules from configuration stored in the /etc/sysconfig/SuSEfirewall2 file. IPtables is an application that allows a system administrator to configure the IPv4 tables, chains and rules provided by the Linux kernel firewall." reference : "COBIT5|DSS05.03,PCI|1.1.4,800-53|CM-7,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Use the following commands to list all interfaces and identify devices with wireless interfaces. Once identified, shutdown the interface and remove it: 1. '# ifconfig -a' 2. '# iwconfig' 3. '# ifdown interface' 4. '# rm /etc/sysconfig/network-scripts/ifcfg-'" service : "SuSEfirewall2_init" levels : "35" status : ON type : CHKCONFIG description : "7.7 SuSEfirewall2 is active (SuSEfirewall2_setup)" info : "SuSEfirewall2 is a script that generates IPtables rules from configuration stored in the /etc/sysconfig/SuSEfirewall2 file. IPtables is an application that allows a system administrator to configure the IPv4 tables, chains and rules provided by the Linux kernel firewall." reference : "COBIT5|DSS05.03,PCI|1.1.4,800-53|CM-7,Level|1S" service : "SuSEfirewall2_setup" levels : "35" status : ON system : "Linux" type : FILE_CONTENT_CHECK description : "7.8 Limit access to trusted networks" info : "Use the standard system firewall configuration facility (SuSEfirewall2) to define networks to be trusted." reference : "COBIT5|DSS05.03,PCI|1.1.4,800-53|CM-7,Level|1S" file : "/etc/sysconfig/SuSEfirewall2" regex : "^[\\s]*FW_TRUSTED_NETS[\\s]*=" expect : "^[\\s]*FW_TRUSTED_NETS[\\s]*=[\\s]*\"[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.+" # 8.2 Configure rsyslog system : "Linux" type : RPM_CHECK description : "8.2.1 Install the rsyslog package" info : "The rsyslog package is a third party package that provides many enhancements to syslog, such as multi-threading, TCP communication, message filtering and data base support. The security enhancements of rsyslog 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." reference : "COBIT5|DSS01.03,PCI|2.2.2,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# yum install rsyslog'" rpm : "rsyslog-0.0.0-0" operator : "gt" required : YES system : "Linux" type : FILE_CONTENT_CHECK description : "8.2.2 Ensure the rsyslog Service is activated" info : "Once the rsyslog package is installed it needs to be activated. If the rsyslog service is not activated the system will default to the syslog-ng service instead." reference : "COBIT5|DSS01.03,PCI|2.2.2,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set SYSLOG_DAEMON to rsyslog in /etc/sysconfig/syslog" file : "/etc/sysconfig/syslog" regex : "SYSLOGD_DAEMON[\\s]*=" expect : "SYSLOGD_DAEMON[\\s]*=[\\s]*rsyslog" system : "Linux" type : FILE_CONTENT_CHECK description : "8.2.6 Accept Remote rsyslog Messages Only on Designated Log Hosts - $ModLoad imtcp.so" 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." reference : "COBIT5|DSS01.03,PCI|10.5.3,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" see_also : "See the rsyslog(8) man page for more information." solution : "For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and uncomment the following line: '$ModLoad imtcp.so'" file : "/etc/rsyslog.conf" regex : "^[\\s]*[\$]ModLoad[\\s]+imtcp\.so" expect : "^[\\s]*[\$]ModLoad[\\s]+imtcp\.so[\\s]*$" string_required: NO system : "Linux" type : FILE_CONTENT_CHECK description : "8.2.6 Accept Remote rsyslog Messages Only on Designated Log Hosts - $InputTCPServerRun 514" 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." reference : "COBIT5|DSS01.03,PCI|10.5.3,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" see_also : "See the rsyslog(8) man page for more information." solution : "For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and uncomment the following line: '$InputTCPServerRun 514'" file : "/etc/rsyslog.conf" regex : "^[\\s]*[\$]InputTCPServerRun[\\s]" expect : "^[\\s]*[\$]InputTCPServerRun[\\s]+514[\\s]*$" string_required: NO system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/warn" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/warn[\\s]" expect : "\\/var\\/log\\/warn[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/messages" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/messages[\\s]" expect : "\\/var\\/log\\/messages[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/allmessages" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/allmessages[\\s]" expect : "\\/var\\/log\\/allmessages[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/localmessages" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/localmessages[\\s]" expect : "\\/var\\/log\\/localmessages[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/firewall" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/firewall[\\s]" expect : "\\/var\\/log\\/firewall[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/acpid" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/acpid[\\s]" expect : "\\/var\\/log\\/acpid[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/NetworkManager" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/NetworkManager[\\s]" expect : "\\/var\\/log\\/NetworkManager[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/mail" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/mail[\\s]" expect : "\\/var\\/log\\/mail[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/mail.info" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/mail.info[\\s]" expect : "\\/var\\/log\\/mail.info[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/mail.warn" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/mail.warn[\\s]" expect : "\\/var\\/log\\/mail.warn[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/mail.err" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/mail.err[\\s]" expect : "\\/var\\/log\\/mail.err[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/news/news.crit" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/news\\/news.crit[\\s]" expect : "\\/var\\/log\\/news\\/news.crit[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/news/news.err" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/news\\/news.err[\\s]" expect : "\\/var\\/log\\/news\\/news.err[\\s]" system : "Linux" type : FILE_CONTENT_CHECK description : "8.4 Configure logrotate - /var/log/news/news.notice" 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. These files are rotated on a weekly basis via a cron job and the last 4 weeks are kept. 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." reference : "COBIT5|DSS01.03,PCI|10.2,Level|1NS" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/logrotate.d/syslog file to include appropriate system logs: /var/log/messages" file : "/etc/logrotate.d/syslog" regex : "\\/var\\/log\\/news\\/news.notice[\\s]" expect : "\\/var\\/log\\/news\\/news.notice[\\s]" ## 9 System Access, Authentication and Authorization # 9.1 Configure cron type : CHKCONFIG description : "9.1.1 Enable cron Daemon" 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." reference : "PCI|2.2.2,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "# chkconfig cron on" service : "cron" levels : "235" status : ON system : "Linux" type : FILE_CHECK description : "9.1.2 Set User/Group Owner and Permission on /etc/crontab" info : "The /etc/anacrontab file is used by anacron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and is the only user that can read and write the file" reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "1. '# chown root:root /etc/crontab' 2. '# chmod og-rwx /etc/crontab'" file : "/etc/crontab" owner : "root" group : "root" mask : "077" system : "Linux" type : FILE_CHECK description : "9.1.3 Set User/Group Owner and Permission on /etc/cron.hourly" 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. Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "1. '# chown root:root /etc/cron.hourly' 2. '# chmod og-rwx /etc/cron.hourly'" file : "/etc/cron.hourly" owner : "root" group : "root" mask : "077" system : "Linux" type : FILE_CHECK description : "9.1.4 Set User/Group Owner and Permission on /etc/cron.daily" 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. Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "1. '# chown root:root /etc/cron.daily' 2. '# chmod og-rwx /etc/cron.daily'" file : "/etc/cron.daily" owner : "root" group : "root" mask : "077" system : "Linux" type : FILE_CHECK description : "9.1.5 Set User/Group Owner and Permission on /etc/cron.weekly" 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. Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls." reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "1. '# chown root:root /etc/cron.weekly' 2. '# chmod og-rwx /etc/cron.weekly'" file : "/etc/cron.weekly" owner : "root" group : "root" mask : "077" system : "Linux" type : FILE_CHECK description : "9.1.6 Set User/Group Owner and Permission on /etc/cron.monthly" 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. Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "1. '# chown root:root /etc/cron.monthly' 2. '# chmod og-rwx /etc/cron.monthly'" file : "/etc/cron.monthly" owner : "root" group : "root" mask : "077" system : "Linux" type : FILE_CHECK description : "9.1.7 Set User/Group Owner and Permission on /etc/cron.d" 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. Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "1. '# chown root:root /etc/cron.d' 2. '# chmod og-rwx /etc/cron.d'" file : "/etc/cron.d" owner : "root" group : "root" mask : "077" # 9.2 Configure SSH system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.1 Set SSH Protocol 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." reference : "Level|1S,800-53|CM-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'Protocol 2'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*Protocol[\\s]" expect : "^[\\s]*Protocol[\\s]+2[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.2 Set LogLevel to INFO" info : "The INFO parameter specifices that record 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." reference : "COBIT5|DSS01.03,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'LogLevel INFO'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*LogLevel[\\s]" expect : "^[\\s]*LogLevel[\\s]+[Ii][Nn][Ff][Oo][\\s]*$" system : "Linux" type : FILE_CHECK description : "9.2.3 Set Permissions on /etc/ssh/sshd_config" 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. The /etc/ssh/sshd_config file needs to be protected from unauthorized changes by non-priliveged users, but needs to be readable as this information is used with many non-privileged programs." reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# chown root:root /etc/ssh/sshd_config'" file : "/etc/ssh/sshd_config" owner : "root" group : "root" mask : "177" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.4 Disable SSH X11 Forwarding" 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'X11Forwarding no'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*X11Forwarding[\\s]" expect : "^[\\s]*X11Forwarding[\\s]+[Nn][Oo][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.5 Set SSH MaxAuthTries to 4 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, it is set the number based on site policy." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'MaxAuthTries 4'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*MaxAuthTries[\\s]" expect : "^[\\s]*MaxAuthTries[\\s]+[1-4][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.6 Set SSH IgnoreRhosts to Yes" 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'IgnoreRhosts yes'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*IgnoreRhosts[\\s]" expect : "^[\\s]*IgnoreRhosts[\\s]+[Yy][Ee][Ss][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.7 Set SSH HostbasedAuthentication to No" 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 ." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'HostbasedAuthentication no'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*HostbasedAuthentication[\\s]" expect : "^[\\s]*HostbasedAuthentication[\\s]+[Nn][Oo][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.8 Disable SSH Root Login" 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 server 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." reference : "800-53|AC-1,Level|1S,800-53|SC-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'PermitRootLogin no'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*PermitRootLogin[\\s]" expect : "^[\\s]*PermitRootLogin[\\s]+[Nn][Oo][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.9 Set SSH PermitEmptyPasswords to No" info : "The PermitEmptyPasswords parameter specifies if the 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." reference : "800-53|AC-1,Level|1S,800-53|SC-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'PermitEmptyPasswords no'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*PermitEmptyPasswords[\\s]" expect : "^[\\s]*PermitEmptyPasswords[\\s]+[Nn][Oo][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.10 Do Not Allow Users to Set Environment Options" 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 trojaned programs)" reference : "COBIT5|DSS05.04,Level|1S,800-53|CM-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'PermitUserEnvironment no'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*PermitUserEnvironment[\\s]" expect : "^[\\s]*PermitUserEnvironment[\\s]+[nN][oO][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.11 Use Only Approved Cipher in Counter Mode" info : "This variable limits the types of ciphers that SSH can use during communication. Based on research conducted at various institutions, it was determined that the symmetric portion of the SSH Transport Protocol (as described in RFC 4253) has security weaknesses that allowed recovery of up to 32 bits of plaintext from a block of ciphertext that was encrypted with the Cipher Block Chaining (CBD) method. From that research, new Counter mode algorithms (as described in RFC4344) were designed that are not vulnerable to these types of attacks and these algorithms are now recommended for standard use. " reference : "800-53|SC-1,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'Ciphers aes128-ctr,aes192-ctr,aes256-ctr'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*Ciphers[\\s]" expect : "^[\\s]*Ciphers[\\s]+[aA][eE][sS]128-[cC][tT][rR],[aA][eE][sS]192-[cC][tT][rR],[aA][eE][sS]256-[cC][tT][rR][\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.12 Set Idle Timeout Interval for User Login - ClientAliveInterval 300" 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." reference : "800-53|AC-1,Level|1S,CCE|CCE-3689-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'ClientAliveInterval 300'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*ClientAliveInterval[\\s]" expect : "^[\\s]*ClientAliveInterval[\\s]+([1-9]|[1-9][0-9]|[1-2][0-9][0-9]|300)[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.2.12 Set Idle Timeout Interval for User Login - ClientAliveCountMax 0" 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." reference : "800-53|AC-1,Level|1S,CCE|CCE-3689-7" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/ssh/sshd_config file to set the parameter as follows: 'ClientAliveCountMax 0'" file : "/etc/ssh/sshd_config" regex : "^[\\s]*ClientAliveCountMax[\\s]" expect : "^[\\s]*ClientAliveCountMax[\\s]+0[\\s]*$" # 9.3 Configure PAM system : "Linux" type : FILE_CONTENT_CHECK description : "9.3.1 Set Password Creation Requirement Parameters Using pam_cracklib" info : "The pam_cracklib module checks of 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. Strong passwords protect systems from being hacked through brute force methods." reference : "800-53|IA-5,800-53|AC-3,Level|1S,800-53|CM-7,PCI|8.5.11,PCI|8.5.10,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the pam_cracklib.so parameters as follows in /etc/pam.d/common-password: 'password required pam_cracklib.so try_first_pass retry=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1'" file : "/etc/pam.d/common-password" regex : "^[\\s]*password[\\s]+required[\\s]+pam_cracklib\.so[\\s]" expect : "^[\\s]*password[\\s]+required[\\s]+pam_cracklib\.so[\\s]+retry=3[\\s]+minlen=14[\\s]+dcredit=-1[\\s]+ucredit=-1[\\s]+ocredit=-1[\\s]+lcredit=-1[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "9.3.2 Set Lockout for Failed Password Attempts" info : "Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration file /etc/pam.d/login. 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 userIDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems." reference : "PCI|8.5.13,Level|1NS,800-53|AC-7,PCI|8.5.11,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/pam.d/login file and add the auth line: 'auth required pam_tally2.so onerr=fail audit silent deny=3 unlock_time=900'" file : "/etc/pam.d/login" 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 : CMD_EXEC description : "9.3.3 Limit Password Reuse" 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. Note: The default password setting in this document is the last 5 passwords. Change this number to conform to your site's password policy." reference : "800-53|IA-5,Level|1S,PCI|8.5.12" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "# pam-config -a --pwhistory --pwhistory-remember=5" cmd : "/bin/pam-config -q --pwhistory" expect : "^[\\s]*remember=5[\\s]" dont_echo_cmd : NO system : "Linux" type : FILE_CONTENT_CHECK description : "9.5 Restrict Access to the su Command - /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." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the pam_wheel.so parameters as follows in /etc/pam.d/su: 'auth required pam_wheel.so use_uid" file : "/etc/pam.d/su" regex : "^[\\s]*auth[\\s]+required[\\s]+pam_wheel.so[\\s]" expect : "^[\\s]*auth[\\s]+required[\\s]+pam_wheel.so[\\s]+use_uid[\\s]*$" system : "Linux" type : CMD_EXEC description : "9.5 Restrict Access to the su Command - /etc/groups" 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." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|AC-2,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the proper list of users to be included in the wheel group in /etc/groups." cmd : "/bin/grep ^wheel: /etc/group" expect : "^wheel:x:10:root(,|$)" dont_echo_cmd : YES severity : HIGH # 10 User Accounts and Environment # 10.1 Set Shadow Password Suite Parameters (/etc/login.defs) name : "min_password_age" description : "10.1.2 Set Password Change Minimum Number of Days" 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. By restricting the frequency of password changes, an administrator can prevent users from repeatedly changing their password in an attempt to circumvent password reuse controls." reference : "800-53|IA-5,Level|1S,PCI|8.5.9,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7" value : "7..MAX" system : "Linux" type : FILE_CONTENT_CHECK description : "10.1.3 Set Password Expiring Warning Days" 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." reference : "800-53|IA-5,800-53|AC-3,Level|1S,800-53|CM-7,PCI|8.5.9,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Set the PASS_MIN_DAYS parameter to 7 in /etc/login.defs: PASS_MIN_DAYS 7" 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 : GRAMMAR_CHECK description : "10.2 Disable System Accounts" info : "There are a number of accounts provided with the most distributions that are used to manage applications and are not intended to provide an interactive shell." reference : "COBIT5|DSS05.04,Level|1S,PCI|2.1" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Accounts that have been locked are prohibited from running commands on the system. Such accounts are not able to login to the system nor are they able to use scheduled execution facilities such as cron." file : "/etc/passwd" regex : "^[A-Za-z0-9_-]+:x:([5-9][0-9][0-9]|[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-4][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 : CMD_EXEC description : "10.3 Set Default Group for root Account 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." reference : "COBIT5|DSS05.04,Level|1S,PCI|2.1" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# usermod -g 0 root'" cmd : "/bin/grep '^root:\' /etc/passwd | /bin/cut -f4 -d:" expect : "^0$" dont_echo_cmd : YES severity : HIGH system : "Linux" type : FILE_CONTENT_CHECK description : "10.4 Set Default umask for Users - /etc/bashrc" 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, .cshrc, etc.) in their home directories." reference : "COBIT5|DSS05.04,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/bashrc and /etc/profile files (and the appropriate files for any other shell supported on your system) and add the following the UMASK parameter as shown: 'umask 77'" file : "/etc/bashrc" regex : "^[\\s]*[uU][mM][aA][sS][kK][\\s]" expect : "^[\\s]*[uU][mM][aA][sS][kK][\\s]+(=\\s+)?077[\\s]*$" system : "Linux" type : FILE_CONTENT_CHECK description : "10.4 Set Default umask for Users - /etc/profile" 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, .cshrc, etc.) in their home directories." reference : "COBIT5|DSS05.04,Level|1S,800-53|CM-7,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Edit the /etc/bashrc and /etc/profile files (and the appropriate files for any other shell supported on your system) and add the following the UMASK parameter as shown: 'umask 77'" file : "/etc/profile" regex : "^[\\s]*[uU][mM][aA][sS][kK][\\s]" expect : "^[\\s]*[uU][mM][aA][sS][kK][\\s]+077[\\s]*$" system : "Linux" type : CMD_EXEC description : "10.5 Lock Inactive User Accounts" 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 35 or more days be disabled." reference : "COBIT5|DSS05.04,PCI|8.5.5,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# useradd -D -f 35'" cmd : "/usr/sbin/useradd -D | /bin/grep INACTIVE" expect : "^INACTIVE[\\s]*=[\\s]*(3[0-5]|[1-2][0-9]|[0-9])$" dont_echo_cmd : YES severity : HIGH system : "Linux" type : FILE_CHECK description : "12.2 Verify Permissions on /etc/passwd" 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." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# /bin/chmod 644 /etc/passwd'" file : "/etc/passwd" mask : "133" system : "Linux" type : FILE_CHECK description : "12.3 Verify Permissions on /etc/shadow" 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." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# /bin/chmod 640 /etc/shadow'" file : "/etc/shadow" mask : "137" system : "Linux" type : FILE_CHECK description : "12.4 Verify Permissions on /etc/group" 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." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# /bin/chown root:root /etc/group'" file : "/etc/group" mask : "133" system : "Linux" type : FILE_CHECK description : "12.5 Verify User/Group Ownership on /etc/passwd" info : "The /etc/passwd file contains a list of all the valid userIDs defined in the system, but not the passwords. The command below sets the owner and group of the file to root." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# /bin/chown root:root /etc/passwd'" file : "/etc/passwd" owner : "root" group : "root" system : "Linux" type : FILE_CHECK description : "12.6 Verify User/Group Ownership on /etc/shadow" info : "The /etc/shadow file contains the one-way cipher text passwords for each user defined in the /etc/passwd file. The command below sets the user and group ownership of the file to root." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# /bin/chown root:root /etc/shadow'" file : "/etc/shadow" owner : "root" group : "shadow" system : "Linux" type : FILE_CHECK description : "12.7 Verify User/Group Ownership on /etc/group" 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" reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "'# /bin/chown root:root /etc/group'" file : "/etc/group" owner : "root" group : "root" name : "find_world_writeable_files" description : "12.8 Find World Writable ob体育s" info : "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." reference : "COBIT5|DSS06.02,800-53|CM-7,Level|1NS,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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." name : "find_orphan_files" description : "12.9 Find Un-owned ob体育s and Directories" info : "Sometimes when administrators delete users from the passwd-file they neglect to remove all files owned by those users from the system" reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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." name : "find_orphan_files" description : "12.10 Find Un-grouped ob体育s and Directories" info : "Sometimes when administrators delete users from the passwd-file they neglect to remove all files owned by those users from the system" reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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." # 13 Review User and Group Settings system : "Linux" type : CMD_EXEC description : "13.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." reference : "Level|1S,PCI|8.5.11,PCI|8.5.10" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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: '# /usr/bin/passwd -l '" cmd : "/bin/cat /etc/shadow | /bin/awk -F : '($2 == \"\") { print $1 \" does not have a password.\"}'" expect : "" dont_echo_cmd : YES system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "13.2 Verify No Legacy '+' Entries Exist in /etc/passwd ob体育" 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Delete these entries if they exist." file : "/etc/passwd" regex : "^[\\s]*\\+:" expect : "^[\\s]*\\+:" system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "13.3 Verify No Legacy '+' Entries Exist in /etc/shadow ob体育" 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Delete these entries if they exist." file : "/etc/shadow" regex : "^[\\s]*\\+:" expect : "^[\\s]*\\+:" system : "Linux" type : FILE_CONTENT_CHECK_NOT description : "13.4 Verify No Legacy '+' Entries Exist in /etc/group ob体育" 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." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Delete these entries if they exist." file : "/etc/group" regex : "^[\\s]*\\+:" expect : "^[\\s]*\\+:" name : "passwd_zero_uid" description : "13.5 Verify No UID 0 Accounts Exist Other Than root" info : "Any account with UID 0 has superuser privileges on the system." reference : "PCI|8.5.8,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Delete any other entries that are displayed." name : "accounts_bad_home_permissions" description : "13.7 Check Permissions on User Home Directories" info : "While the system administrator can establish secure permissions for users' home directories, the users can easily override these." reference : "COBIT5|DSS05.04,800-53|AC-3,Level|1S,800-53|CM-6" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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." mask : "027" system : "Linux" type : FILE_CHECK description : "13.8 Check User Dot ob体育 Permissions" info : "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." reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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." file : "~/.*" mask : "0002" system : "Linux" type : FILE_CHECK description : "13.9 Check Permissions on User .netrc ob体育s" info : "While the system administrator can establish secure permissions for users' .netrc files, the users can easily override these." reference : "Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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 .netrc file permissions and determine the action to be taken in accordance with site policy." file : "~/.netrc" mask : "0077" system : "Linux" type : FILE_CHECK_NOT description : "13.10 Check for Presence of User .rhosts ob体育s" info : "While no .rhosts files are shipped by default, users can easily create them." reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "If any users have .rhosts files determine why they have them." file : "~/.rhosts" name : "passwd_invalid_gid" description : "13.11 Check Groups in /etc/passwd" info : "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." reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Analyze the output of the audit and perform the appropriate action to correct any discrepancies found." name : "accounts_without_home_dir" description : "13.12 Check That Users Are Assigned Valid Home Directories" info : "If the user's home directory does not exist, the user will be placed in '/' and will not be able to write any files or have local environment variables set" reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "If any users' home directories do not exist, create them and make sure the respective user owns the directory. Users without assigned should be removed or assigned a home directory as appropriate. Change the ownership any home directories that are not owned by the defined user to the correct user. " name : "accounts_without_home_dir" description : "13.13 Check User Home Directory Ownership" info : "Since the user is accountable for files stored in the user home directory, the user must be the owner of the directory." reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Change the ownership any home directories that are not owned by the defined user to the correct user." name : "passwd_duplicate_uid" description : "13.14 Check for Duplicate UIDs" info : "Users must be assigned unique UIDs for accountability and to ensure appropriate access protections" reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Based on the results of the script, establish unique UIDs and review all files owned by the shared UID to determine which UID they are supposed to belong to." name : "group_duplicate_gid" description : "13.15 Check for Duplicate GIDs" info : "User groups must be assigned unique GIDs for accountability and to ensure appropriate access protections" reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Based on the results of the script, establish unique GIDs and review all files owned by the shared GID to determine which GID they are supposed to belong to." name : "passwd_duplicate_username" description : "13.16 Check for Duplicate User Names" 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" reference : "COBIT5|DSS05.04,PCI|8.1,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Based on the results of the script, establish unique user names for the users. ob体育 ownerships will automatically reflect the change as long as the users have unique UIDs." name : "group_duplicate_name" description : "13.17 Check for Duplicate Group Names" 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." reference : "COBIT5|DSS05.04,PCI|8.1,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Based on the results of the script, establish unique names for the user groups. ob体育 group ownerships will automatically reflect the change as long as the groups have unique GIDs." system : "Linux" type : FILE_CHECK_NOT description : "13.18 Check for Presence of User .netrc ob体育s" info : "The .netrc file contains data for logging into a remote host for file transfers via FTP." reference : "COBIT5|DSS05.04,COBIT5|DSS01.03,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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." file : "~/.netrc" system : "Linux" type : FILE_CHECK_NOT description : "13.19 Check for Presence of User .forward ob体育s" info : "The .forward file specifies an email address to forward the user's mail to." reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" 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." file : "~/.forward" system : "Linux" type : CMD_EXEC description : "13.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. Any users assigned to the shadow group would be granted read access to the /etc/shadow file. If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed passwords to break them. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert additional user accounts." reference : "COBIT5|DSS05.04,Level|1S" see_also : "https://benchmarks.cisecurity.org/tools2/linux/CIS_SUSE_Linux_Enterprise_Server_11_Benchmark_v1.0.0.pdf" solution : "Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group." cmd : "/bin/grep ^shadow /etc/group | /bin/awk '-F: ($4 == '15') { print }' /etc/passwd" expect : "none" dont_echo_cmd : YES description : "SUSE Linux 11 is not installed" info : "The target system does not seem to be running SUSE Linux 11"